Disable docker setup in mupx deployment - meteor

I am trying to simple meteor application using mupx. In my scenario, I want to bypass docker setup and all docker options because everything is already installed on my destination server.
how can I do that ? I am using mupx 1.5.2 version.
here is my mup.json file.
{
"servers": [
{
"host": "MY_HOSR",
"username": "USER",
"password": "PASSWORD",
"env": {}
}
],
"setupMongo": false,
"setupNode" : false,
"appName": "blank",
"app": "/home/rut2/meteor_workspace/blank",
"env": {
"PORT": 3000,
"ROOT_URL": "http://MY_HOST:3000"
},
"deployCheckWaitTime": 15,
"enableUploadProgressBar": true
}
The reason I want to disable this is, I never could deploy successfully with this options. It always gives me error while starting meteor/ verifying deployment stage. (I will discuss error if anyone wants to help on that one also.)
I had the lower version of mup (1.0.1, which is without docker options), and it was working perfectly.
Please help me guys. I have been stuck here since 3 days. tried every issues, every forum I found related.
Thank you in advance

You can't use mupx without docker. I had these kind of problems too, some solutions that works for me: upgrade server node version, increase deploy wait time, custom image.

Related

ARM template deploy generating conflict error for traffic manager

I have come onto a project that has had an ARM deployment via templates running for a number of months now, and until recently everything was working without issue:
Successful deployments
But then, something changed and most (but not all) deployments began failing:
Unsuccessful deployments
The error reported is:
{
"code": "Conflict",
"message": "Conflicting changes were detected when processing the request. This can happen when there are multiple requests trying to update one profile at the same time. Please retry your request."
}
Yet this is the only deploy running at the time. For now I've managed to stave off the issue by adding a dependsOn to the traffic manager resource:
{
"apiVersion": "2015-11-01",
"type": "Microsoft.Network/trafficManagerProfiles",
"name": "[variables('traffic-manager-name')]",
"location": "global",
"properties": {
"profileStatus": "Enabled",
"trafficRoutingMethod": "Priority",
"dnsConfig": {
"relativeName": "[variables('traffic-manager-name')]",
"ttl": 30
},
"monitorConfig": {
"protocol": "HTTP",
"port": 80,
"path": "/"
},
"endpoints": [
{
"name": "[variables('traffic-manager-endpoint')]",
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints",
"properties": {
"endpointStatus": "Enabled",
"targetResourceId": "[resourceId('Microsoft.Web/sites', variables('web-app-name'))]",
"target": "[concat(variables('web-app-name'), '.azurewebsites.net')]",
"weight": 1,
"priority": 1,
"endpointLocation": "[resourceGroup().location]"
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('web-app-name'))]"
]
}
But I am concerned that doing so may simply be obfuscating a genuine issue that still needs addressing. If anyone knows any more about that error, or why it might have just started happening out of nowhere, I'd love to know!
When using ARM template to deploy traffic manager, it returns with 409 conflict error "Conflicting changes were detected when processing the request. This can happen when there are multiple requests trying to update one profile at the same time. Please retry your request." because the ARM template deployments are aimed at creating new resources hence it use PUT requests. If the traffic manager profile already exists, it will return when the template makes a change that would alter or affect existing profiles. Before deployment, there was a traffic manager created, thus the template failed with conflict error. To resolve or overcome the issue make sure that no TM profile created before the ARM deployment. Then retest the deployment.
Hope this helps! Cheers!

Meteor Deployment via MUP

I am trying to deploy my app via MUP ,everything works fine except when I run command mup deploy. In browser website loads but it does not shows the latest changes I have made. Build files has all changes that I have made.I am using Amazon EC2 for server.
Edit:
In MUP logs it shows that server has started on port 80. I also checked the build file it has latest code but somehow server is not rendering in browser.I am not sure its issue of MUP Or meteor build or amazon EC2 server.
Since I'm having the exact same problem, I can clarify the question.
I'm using Mup build 1.2.8/latest on Windows 10, Meteor v1.4.4.2/latest, deploying to Ubuntu 14.04 on Digital Ocean.
Doing "mup.cmd deploy" builds the bundle, pushes it to the server, starts the app and verifies the deployment, all successfully. The meteor logs as shown by "mup.cmd logs" shows the app started successfully (other than the Kadira warning which should be fixed in the newly deployed version). Browsing to my app doesn't show any of my recent changes (they do show up when running locally). It seems as if the updated container isn't the one running. I've tried starting, stopping and removing the Docker container to no avail.
For reference, here is the mup.js file I'm using (with the names changed to protect the guilty). This file worked to deploy fine 6 weeks ago.
module.exports = {
servers: {
one: {
host: '1.2.3.4',
username: 'Ron',
pem: '/cygwin64/home/Ron/.ssh/id_rsa',
}
},
meteor: {
name: 'MyApp',
path: '../',
servers: {
one: {}
},
buildOptions: {
serverOnly: true,
debug: true,
cleanAfterBuild: true,
buildLocation: '../../output'
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'https://MyApp.com',
MONGO_URL: 'mongodb://localhost/meteor'
},
docker: {
// change to 'kadirahq/meteord' if your app is not using Meteor 1.4
image: 'abernix/meteord:base'
},
// This is the maximum time in seconds it will wait
// for your app to start
// Add 30 seconds if the server has 512mb of ram
// And 30 more if you have binary npm dependencies.
deployCheckWaitTime: 60,
ssl: {
autogenerate: {
email: 'email#example.com',
domains: 'MyApp.com, www.MyApp.com'
}
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
mongo: {
port: 27017,
version: '3.4.1',
servers: {
one: {}
}
}
};
EDIT::
I deleted all of the containers and images except mongo, ran "mup setup" and "mup deploy" again with exactly the same results, old version is running. So the problem seems to be with the meteor build portion of mup.
EDIT 2::
I found at least 1 of the problems. I have the buildLocation set to a relative path. At some point Mup changes the current directory which causes multiple copies of the buildLocation to be used. In my case the output of the Meteor build command (the new files) were in one and Mup was deploying to the server from another one that happened to contain the old files. I changed buildLocation to an absolute path and the new version is being deployed. Yeah! But wait, even though Mup says the verification worked, my app never runs and the container keeps restarting. Looking out the logs I suspect that the problem is with the line below. Somehow the path has a backslash in it. I'm not sure where this is coming from.
[192.241.229.15]npm ERR! enoent ENOENT: no such file or directory,
chmod
'/bundle/bundle/programs/server/npm/node_modules/sshpk/bin\sshpk-conv'
SOLUTION:: Thanks to Parth Mahida I was inspired to remove the /opt/MyApp directory on the server, as well as removing and reinstalling the sshpk NPM package on my build machine then redid Mup setup and Mup deploy and everything worked again. No idea how the sshpk package became corrupt, but at this point I don't care.

Meteor app doesn't appear in browser after deployment with mup

I'm facing strange issue - I deployed my Meteor app with mup ( followed this instruction: https://www.vultr.com/docs/deploy-a-meteor-application-on-ubuntu ). Everything went successfully (see screenshot).
However the content doesn't appear when I try to access it via browser (I type IP-address).
As a server I use apache2 on Ubuntu 15.04, and mup.json as following:
{
// Server authentication info
"servers": [
{
"host": "IP_ADDRESS",
"username": "developer"
//"password": "password"
// or pem file (ssh based authentication)
//"pem": "~/.ssh/id_rsa"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": false,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "meteor",
// Location of app (local directory)
"app": "~/app",
// Configure environment
"env": {
"PORT": 80,
"UPSTART_UID": "meteoruser",
"ROOT_URL": "http://IP_ADDRESS",//and I also tried http://localhost
//"MONGO_URL": "",
"METEOR_ENV": "production"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
I would appreciate any help! Thanks in advance!
UPD: I made a better research and found a great tutorial - https://www.phusionpassenger.com/library/walkthroughs/deploy/meteor/ownserver/apache/oss/vivid/deploy_app.html . So, if anyone else curious about how to deploy Meteor app, please have a look :)

Deploying Telescope App to Amazon EC2

What am I doing wrong? I'm trying to deploy my Telescope app. I'm using this to do that: https://github.com/arunoda/meteor-up. It gives me an error when I try to deploy using Mup. Here's my mup.json config file:
{
// Server authentication info
"servers": [
{
"host": "52.25.228.14",
"username": "ec2-user",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "~/Documents/appname/appname.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "appname",
// Location of app (local directory)
"app": "~/Documents/appname/Telescope",
// Configure environment
"env": {
"ROOT_URL": "ec2-52-25-228-14.us-west-2.compute.amazonaws.com"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
Common pitfalls :
Are sure you ran mup setup before deploying ?
Try using a relative path to setup the app location, ie replace ~/Documents/appname/Telescope by . if your mup.json is located at the root of your Telescope instance.
I did run mup setup, did use http://, and tried many times to get it to connect/deploy.
I gave up and just went with a Wordpress theme and am customizing it how I want it. The other way was way too complicated. It didn't allow me to do what I wanted in a timely manner. Thanks for trying to help though guys.

How to disable default nginx site when using Chef and Vagrant?

I am using Berkshelf, Chef and Vagrant and I am trying to configure a custom site running on nginx. I am using the opscode nginx recipe and then writing my own recipe for the custom site. When I run vagrant up I get the an error about not disabling the default nginx site. I've found several different suggestions but nothing seems to be working.
The error:
STDOUT:
STDERR: nginx: [emerg] a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites- enabled/kyleboon.me:2
nginx: configuration file /etc/nginx/nginx.conf test failed
My Berksfile:
site :opscode
metadata
cookbook 'nginx'
The 'roles/web.json' role I defined:
{
"name": "web",
"chef_type": "role",
"json_class": "Chef::Role",
"description": "The base role for systems that serve HTTP traffic",
"default_attributes": {
"nginx": {
"default_site_enabled": false
},
"app": {
"name": "kyleboon.me",
"web_dir": "/var/data/www/kyleboon.me"
},
"user":{
"name": "vagrant"
}
},
"run_list": [
"recipe[nginx]",
"recipe[kyleboon.me]"
]
}
Here is the recipes/default/default.rb for the nginx site I am adding:
nginx_site 'default' do
action :disable
end
%w(public logs).each do |dir|
directory "#{node.app.web_dir}/#{dir}" do
owner node.user.name
mode "0755"
recursive true
end
end
template "#{node.nginx.dir}/sites-available/kyleboon.me" do
source "site.erb"
mode 0777
owner node.nginx.user
group node.nginx.user
end
nginx_site "kyleboon.me"
cookbook_file "#{node.app.web_dir}/public/index.html" do
source "index.html"
mode 0755
owner node.user.name
end
(P.S. I know the file permissions need to be changed, I've just been fiddling with lots of things, I'll update those once I get everything else working)
And here is attributes/default.rb:
override['nginx']['enable_default_site'] = false
You can see I have tried to disable the default site in the web.json, the attributes and the recipe itself but none of them stick.
I don't have a node or solo node defined and I'm not sure if that's an issue. My main problem with vagrant so far has been the endless possibilities for how to do things. No two examples are done in the same way and I'm not sure what is considered the 'best' or 'right' way to go.
You can disable any nginx site by name using the nginx_site and its name. The problem you are having is because the nginx_site definition is actually looking for the enable parameter to be set to true or false not the action parameter set to :disabled.
To disable the default site add to your recipe:
nginx_site 'default' do
enable false
end
This is working for me as of version 1.7.1 of the nginx opscode cookbook. I dont know if this will work with the version provided by community as it appears to be several months old.
To get the latest version add to your Berksfile:
cookbook 'nginx', git: 'https://github.com/opscode-cookbooks/nginx'
Hope that helps :)
I'm getting the same error, but I don't have the default site enabled. Instead, it's coming from /etc/nginx/conf.d/default.conf! I had to resort to
file "/etc/nginx/conf.d/default.conf" do
action :delete
end
This is coming from the RHEL package that the nginx cookbook is installing on my box.

Resources