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


#1

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

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!


#3

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


#4

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


#5

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.


#6

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


#7

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


#8

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


#9

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.


PaaS vs Server(Best place to setup Meteor App for Production
What hosting services are you using for your Meteor App?
#10

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:


#11

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?


#12

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.


#13

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:


#14

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


#15

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


#16

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.


#17

Thanks for the shoutout!

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


#18

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.


#19

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