Migrating Kambatz Meteor App to Galaxy

A few months back, MDG announced Meteor Galaxy, their “cloud platform for operating and managing Meteor applications”. It was only for development teams and enterprise at the time. Earlier this month they released One Galaxy for Everyone, including a basic “pay-as-you-go” plan for $0.035/container-hour.

Now, I can’t say I was unhappy with the free hosting on meteor.com, but along with this Galaxy release they also decided to shutdown the free hosting on meteor.com. So I had no choice, but to migrate my Kambatz app.

I am aware that there are multiple Meteor hosting options out there. I am going with Galaxy, for now, because:

  1. It looks like the path of least effort 🙂
  2. I did not see other viable free options, and this seems to be affordable.
  3. When Galaxy was launched on October 2015, I watched a talk by MDG’s Matt DeBergalis on AWS re:Invent about the Galaxy architecture. It’s built on top of AWS Elastic Container Service (ECS), and it was fascinating. If I can have a chance to experience it from some perspective (e.g., an end-user), maybe I can learn more about it. In any case, the alternative I had in mind is to set up my own Meteor-in-Docker on AWS-ECS, to minimize costs, so this seems pretty close to that. Maybe if I later transition, it will be smoother 🙂 .
  4. Supposedly, since I migrated before March 25, I should get a $25 credit on my Galaxy account 🙂 . Haven’t seen it yet though.

One thing to keep in mind is that Galaxy does not include MongoDB hosting. You’ll need to find another place to host your MongoDB, like mLab.

Migrating apps from the free Meteor hosting to Meteor Galaxy

My migration steps

See below for annotated screenshots of most steps as well.

  1. Create account on Meteor Galaxy (or use existing Meteor account). I chose the “Basic” plan.
  2. Create account on mLab.
  3. Create new database in mLab account. Prefer AWS us-east-1, as it is the same zone used by Meteor Galaxy.
  4. Create a user for the newly created database (note this isn’t the same as the mLab user – don’t use the same username / password).
  5. Write down the MongoDB URI (AKA “connection string”).
  6. Create a settings.json file in the root of the Meteor project (e.g. ~/work/kambatz/settings.json), and put in the MongoDB URI for the Galaxy deployment target (replacing the <dbuser> and <dbpassword> and <dburl> with your real details of course). See content below.

  7. Deploy the app to Galaxy, using a meteorapp.com subdomain: DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy kambatz.meteorapp.com --settings settings.json. Fill in your Galaxy username (not email) and password.

  8. Done. Go see your app serving on http://yourapp.meteorapp.com.

{
  "galaxy.meteor.com": {
    "env": {
      "MONGO_URL": "mongodb://<dbuser>:<dbpassword>@<dburl>"
    }
  }
}

Summary

That’s how I migrated my Kambatz app from the free (alas, deprecated) Meteor.com hosting to the new Meteor Galaxy hosting.

I did not cover DNS configuration for serving the app from custom domains, since I don’t care about this at the moment. I’m perfectly fine with using the meteorapp.com subdomain for development. For completeness, there’s a support article on configuring DNS on Galaxy help.

Also, since this hosting isn’t free, I am stopping my app when I’m not actively developing it to reduce costs. This means that http://kambatz.meteorapp.com will be up sometimes, but not always. Tough. I’m sure many of you relied on it 😛 .

No Comments Yet.

Leave a Reply