Deploying Telescope App to Amazon EC2 - meteor

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.

Related

How to rewrites to firebase hosting

I have tried to work on this tutorial which is about creating Cloud Run environment and serving a page on Firebase Hosting.
https://firebase.google.com/docs/hosting/cloud-run#python
The Cloud Run part works as it says on the page, but Firebase Hosting part is not working for me. It get 404 error when I access the PROJECT_ID.web.app/ and PROJECT_ID.firebaseapp.com/
I updated the Firebase CLI version to make it the latest version.
"hosting": {
"public": "public", // I need to add this since I got an error without specify public dir
"rewrites": [ {
"source": "**",
"run": {
"serviceId": "helloworld", // "service name" (from when you deployed the container image)
"region": "us-central1" // optional (if omitted, default is us-central1)
}
} ]
}
Does anyone have the same issue as well?
Thanks!
I am wondering if you have missed a step in the set up stage. There is a helpful guide that includes the steps for implementation you might want to have a look at.
You can also test your container locally with Docker to rule out any obvious issues first. If you need to install Docker you can follow this guide.
To run your container locally you can do:
PORT=8080 && \
docker run -p 9090:${PORT} -e PORT=${PORT} gcr.io/myproject/my-image:latest
Replace myproject/my-image:latest to the project where the container image is stored on Google Cloud Platform
The PORT environment variable specifies the port your application will use to listen for HTTP or HTTPS requests. This is a requirement from the Container Runtime Contract. In this example, we use port 8080.
http://localhost:9090

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.

Deploying an Meteor app with mup - error: no configs found for meteor

I've been trying to deploy a meteor app to Digital Ocean. I've configured mup.js like this:
module.exports = {
servers: {
one: {
host: '[droplet ip address]',
username: '[username]',
password: '[password]'
}
},
// Install MongoDB on the server. Does not destroy the local MongoDB on future setups
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: nodeVersion defaults to 0.10.36 if omitted. Do not use v, just the version number.
"nodeVersion": "0.10.36",
// Install PhantomJS on the server
"setupPhantom": true,
// Application name (no spaces).
"appName": "pichaprint",
// Location of app (local directory). This can reference '~' as the users home directory.
// i.e., "app": "~/Meteor/my-app",
// This is the same as the line below.
"app": ".",
// Configure environment
// ROOT_URL must be set to https://YOURDOMAIN.com when using the spiderable package & force SSL
// your NGINX proxy or Cloudflare. When using just Meteor on SSL without spiderable this is not necessary
"env": {
"PORT": 80,
"ROOT_URL": "http://pichaprint.com",
},
"deployCheckWaitTime": 15
};
When I try to run mup setup, I get the following error:
error: no configs found for meteor
I'm currently working live by using PuTTY and I'm within the meteor project folder which contains the mup.js file (that's the reason the app property value is a period). What could I be doing wrong?
It turns out that even though I initialized mup by entering mup init, it did not actually generate a mup.json. So I had to create that manually by entering the following command: cat > mup.json in the root of my project folder

Disable docker setup in mupx deployment

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.

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 :)

Resources