I need to deploy my meteor app to either Google compute engine or AWS

I need to deploy my meteor app to either Google compute engine or AWS

I have been trying for over a week to get my app deployed. I have followed different scripts and instructions I have found on the web. It seems very difficult. I really like Meteor and have written a couple of cool apps. Now I find I am unable to deploy it. :frowning: What am I missing? Anyone have a source on where to learn more about this?
I am at wits end.

Seems that if Meteor canā€™t be deployed easily it will not flourish.

2 Likes

Have you tried https://github.com/onmodulus/demeteorizer or https://github.com/julien-c/meteoric.sh yet? I personally havenā€™t used either, perhaps someone that has can chip in and raise any ā€œgotchasā€. Good luck!

I have not. Will look into them. Thank you.

I use meteor-up for deploying on digitial ocean, and thereā€™s an awesome screencast which shows it step by step: https://www.youtube.com/watch?v=WLGdXtZMmiI

1 Like

Iā€™m using modulus.io with compose.io for the MongoDB. It works well and pretty smoothly. I tried in the past (a year or two ago) to deploy by hand to AWS, but it was a pain. This was before Arunodaā€™s cool work on Meteor Up and multicore existed. I believe he walks through setting up on Digital Ocean in one of his pieces at https://meteorhacks.com.

OP: FWIW - Iā€™ve heard great things about meteor-up, +1 this approach. Is AWS a hard req?

From what I understand, using @arunodaā€™s Meteor UP and Cluster can give you everything you need for an easy and scalable deployment.

Have you looked into the script we wrote? http://q42.com/blog/post/98968122208/how-to-deploy-meteor-on-google-compute-engine

2 Likes

Thatā€™s been my experience. Iā€™m running on https://www.linode.com/ using MUP, and it works like a charm.

Excited to try https://modulus.io/ and https://www.compose.io/ soon though.

Iā€™ve deployed the same app to four different platforms. Hereā€™s a summary of my experiences:

  1. meteor.com. Obviously this canā€™t be beaten for quick and easy, but there are no guarantees about the degree to which it can scale. Initial set up takes 10 seconds: meteor deploy myapp, deploying a new version takes 10 seconds: meteor deploy myapp. For a small number of users, meteor.com gives nice, snappy response times.

  2. My own hardware with a clean debian install on a relatively beasty box (8Gb RAM and 4 cores). I installed meteor, node, haproxy, forever, and a 3-member mongo replica set by hand, and run four instances of the app. Setting this up took (literally) days ā€“ but then I was a complete n00b to dev ops and was learning as I went. Now, using a slightly hacked version of meteoric, I can deploy a new version with meteoric deploy in the terminal. This setup gives nice quick response times while in the same city/country, but tends to be a bit slow when accessing it from the other side of the world.

  3. AWS EBS with compose.io ā€“ setup took a lot of manual steps that I never want to have to repeat and the better part of a day of trial and error to get going. Until I write a (fairly involved) shell script to automate it, deploying a new version will take 10 - 15 minutes of fiddling around (assuming I can remember what Iā€™m doing and donā€™t make any mistakes). Reponse times for a t2.micro instance (1Gb RAM, 1 core, and free for a year :smiley: ) are, understandably, not too quick (at least compared to meteor.com). In the spirit of ā€œanswering the actual questionā€, this video and this gist by Kris Hamoud got me going on AWS EBS ā€“ I wouldnā€™t have had a hope otherwise.

  4. Digital Ocean with compose.io using Meteor Up. Initial setup took less than half an hour (from not having an account with D.O. to a running app instance hooked up to compose.io db). Iā€™ve set up SSL with that server as well, which mup supports nicely, so deploying a new version is as simple as typing mup deploy in the terminal. Iā€™m paying $10 a month for 1Gb RAM and 1 core and my general feeling is that response times (at basically no load) are, on average, a bit faster than the AWS t2.micro instance. (Both are deployed on US West Coast server, as is the compose.io db.)

So, for the moment, Iā€™m foregoing the auto-scaling and load balancing that AWS EBS offers, in favour of the sweet and easy setup and deploy solution that D.O. + Meteor Up offers. Will be looking into using meteorhacks:cluster with the D.O. solution as soon as I get time.

If Galaxy doesnā€™t drop soon, Arunoda will already have made Meteor dev ops too easy for us all! :wink:

15 Likes

Yes I have, It was the most promising but I have not been able to get it to work. Every thing seems fine but the app does not run. Would you be willing to help?

Ok I have tried this again.
From the script cd opt
Nothing got copied here. No Permissions.
managed to copy the default file to my home directory.
When attempting to run i get: No command ā€˜pm2ā€™ found,
I installed pm2.
No errors no web page
Looking further. Does not appear that anything in the script worked. Node is not installed.

Perhaps try installing node, pm2, etc manually on your box first? Iā€™ve successfully deployed to EC2 (on CentOS 6 & 7) without using mup/demeteorizer/etc. I made this really quick script to help someone before, maybe itā€™ll help guide you. Try it on a fresh install in case it deletes stuff in your /home/user folder :stuck_out_tongue_winking_eye:

1 Like

Sounds like the startup script didnā€™t run properly.
Make sure you edit this file to use your own bucket:
https :// github .com/Q42/meteor-gce/blob/master/startup.sh
(I canā€™t post links on this forum and editing doesnā€™t work)

Upload it to your own bucket and then use it when you start up your instance:

gcloud compute instances create "meteor" --zone "europe-west1-a" --tags "http-server" --scopes storage-ro --metadata startup-script-url=gs://YOURBUCKETNAMEHERE/startup.sh --disk "name=mongo-data" "mode=rw" "boot=no"

You can see if it executed this script properly by checking your VM instance details at console.developers.google .com (crap, this forum doesnā€™t allow me to post links)
All the way at the bottom it says ā€œSerial consoleā€ (click on ā€œView outputā€)

1 Like

Digital Ocean have a good step-by-step guide for installing Meteor behind nginx on your own Ubuntu 14.04 server. -> https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx

1 Like

Update,
I have managed to deploy my apps to AWS.
The key was that nitrous.io that I was on opened up their platform to gain root access and I was able to install MUP there.
Now. the challenge seems to be transferring the mongodb data to the deployed server. No easy answers there either. Just hope it does not take me another 2 months to figure it out.

Thanks for the shoutout!

Our current stack which has been pretty great for us recently is AWS, Docker, and Opsworks.

1 Like

Compose.io seems to change its policy about free usage option. So this tutorial becomes a bit obsolete. I have used mupx and the tutorial on vultr to deploy the initial counter app to my DigitalOcean vps.

i canā€™t use this line, i donā€™t have a startup.sh, who can create this file?