Meteor Deployment Galaxy

meteor-deployment

// Meteor - Deployment - Galaxy:

In case you need to debug a deployed application, you can also use 'meteor deploy 
<subdomain> --debug' which will allow you to use the browser-based debugger and 
keep your breakpoints.

How can we see the list of sites that you're authorized to deploy to?

meteor list-sites

How can we see the logs if our application is hosted on meteor.com?

meteor log <subdomain>

How can we connect to the MongoDB database if our application is hosted on meteor.com?

meteor mongo subdomain

What is Galaxy?

Galaxy includes a number of features that make it the easiest way to deploy Meteor apps, including intelligent routing of clients and coordination of version updates. Galaxy is a pay-as-you-go cloud hosting provider starting at $0.035 per hour. It provides:

  1. Meteor specific container architecture
  2. Unlimited maximum containers
  3. Flexible container options per app1
  4. One-click container scaling
  5. Coordinated version updates
  6. Advanced traffic & load routing
  7. High availability fault tolerance
  8. Full application logging
  9. Full application metrics
  10. SSL support
  11. Wildcard domain management
  12. Auto pre-rendering for SEO

Pricing for containers:

  1. $0.035/hour: 512MB RAM, 0.5 ECU
  2. $0.07/hour: 1GB RAM, 1 ECU
  3. $0.14/hour: 2GB RAM, 2 ECU
  4. $0.28/hour: 4GB RAM, 4 ECU

Galaxy Support helps developers with the deployment and management of their apps on Galaxy. Basic support is available to all Galaxy users, but add-on support plans guarantee a speedy response for your critical apps when you need it most. Galaxy support options:

  1. Basic plan:
    1. 2+ business day response
    2. No critical SLA
  2. Priority:
    • $99 /month (billed annually)
    • $149 /month (billed monthly)
    • 1 business day response
    • No critical SLA
  3. Premium:
    • $399 /month (billed annually)
    • $499 /month (billed monthly)2
    • 1 business day response
    • 1-hour critical SLA (24x7x365 coverage)
  4. Enterprise:
    • $1299 /month (billed annually)2
    • $1499 /month (billed monthly)2
    • 4 business hour response
    • 15 min critical SLA (24x7x365 coverage)

If you deploy to Galaxy, you can use a x.meteorapp.com or x.eu.meteorapp.com domain while you are testing the app. Learn more about Galaxy domains. If you deploy to Galaxy, you can generate a free SSL certificate with a single click (courtesy of Let’s Encrypt!).

How can we use Galaxy?

  1. Log into galaxy
  2. Click on your app.
  3. Click on settings.
  4. In domains, click add new domain and enter your domain
  5. In the description for the Domains and Encryption section you will see an address that looks something like us-east-1.galaxy-ingress.meteor.com. Copy this down.
  6. On your host, create a new custom resource record Name: *, Type: CNAME, Data: us-east-1.galaxy-ingress.meteor.com (or paste yours if it differs in galaxy).
  7. Create a new custom resource record Name: www, Type: CNAME, Data: us-east-1.galaxy-ingress.meteor.com (or paste yours if it differs in galaxy).

The easiest way to operate your app with confidence is to use Galaxy, the service built by Meteor Development Group specifically to run Meteor apps. Galaxy is a distributed system that runs on Amazon AWS. If you understand what it takes to run Meteor apps correctly and just how Galaxy works, you’ll come to appreciate Galaxy’s value, and that it will save you a lot of time and trouble. Most large Meteor apps run on Galaxy today, and many of them have switched from custom solutions they used prior to Galaxy’s launch.

In order to deploy to Galaxy, you’ll need to sign up for an account, and separately provision a MongoDB database.

Once you’ve done that, it’s easy to deploy to Galaxy. You just need to add some environment variables to your settings file to point it at your MongoDB, and you can deploy with:

DEPLOY_HOSTNAME=us-east-1.galaxy-deploy.meteor.com meteor deploy your-app.com --settings production-settings.json

In order for Galaxy to work with your custom domain (your-app.com in this case), you need to set up your DNS to point at Galaxy. Once you’ve done this, you should be able to reach your site from a browser.

You can also log into the Galaxy UI at https://galaxy.meteor.com. Once there you can manage your applications, monitor the number of connections and resource usage, view logs, and change settings.

Set up SSL on your Galaxy application with the certificate and key for your domain. The key things here are to add the force-ssl package and to use the Galaxy UI to add your SSL certificate.

Once you are setup with Galaxy, deployment is simple (just re-run the meteor deploy command above), and scaling is even easier—simply log into galaxy.meteor.com, and scale instantly from there.

How can we use Continuous Deployment to deploy to Galaxy?

Continuous deployment refers to the process of deploying an application via a continuous integration tool, usually when some condition is reached (such as a git push to the master branch). You can use CD to deploy to Galaxy, as Nate Strauser explains in a blog post on the subject.

How can we do a rolling deployment using Galaxy?

It’s important to understand what happens during a deployment, especially if your deployment involves changes in data format (and potentially data migrations).

When you are running your app on multiple servers or containers, it’s not a good idea to shut down all of the servers at once and then start them all back up again. This will result in more downtime than necessary, and will cause a huge spike in CPU usage when all of your clients reconnect again at the same time. To alleviate this, Galaxy stops and re-starts containers one by one during deployment. There will be a time period during which some containers are running the old version and some the new version, as users are migrated incrementally to the new version of your app.

If the new version involves different data formats in the database, then you need to be a little more careful about how you step through versions to ensure that all the versions that are running simultaneously can work together.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License