Thank you, we'll be in touch Call us: 01474 704400

Using Mercurial with Amazon OpsWorks

So you have decided to use OpsWorks for your nice shiny cluster. This isn't a bad plan, I've been using it to set up a new cluster and so far it has turned out ok. There is one minor issue though. As with many of these lovely services, if you're not using Git then you won't be handed built-in repository management on a silver platter. This is unfortunate because I (and it seems everyone I know that has tried it) prefer Mercurial.

While there's not a lot you can easily do to allow managing your custom Chef recipes on Mercurial (just give up and use Git for this purpose) thankfully there are alternatives to just using Git for source control within OpsWorks. Admittedly I feel like I may have cheated a little bit but it allows use of Mercurial on OpsWorks without a lot of hassle with custom recipes so I'll count it as a win.

Assumptions

  • You have already configured a Stack with a suitable Layer within OpsWorks
  • You are using BitBucket (or are happy to do so)

How to configure an App to use a Mercurial repository

  1. Push your Mercurial repository to Bitbucket. If you like you can keep the repository private
  2. Open up your project and go to "Downloads"
  3. Click on the "Branches" tab
  4. Find the branch you want to deploy to OpsWorks and copy down the corresponding zip file location
  5. Open your stack within the AWS console
  6. Click on "Apps"
  7. Click on +App
  8. Specify the following settings:

    - Repository type = Http Archive

    - Repository URL = The URL you found in step 4

    - User name / Password = If the repository is private, enter a valid Bitbucket user to allow access

  9. Fill out all other details as you wish (name / domains etc)
  10. Deploy!

That's all there is to it. This won't allow the app to automatically update when you push more updates to Bitbucket but will at least allow you to get started with a Mercurial repository on OpsWorks.

20.08.14

Author

Simon Hooker, Head of Product Development

Category

Blog

BACK TO TOP
A note to our visitors
Our website uses cookies so that we can provide a better service. Continue to use the site as normal if you're happy with this, or find out how to manage cookies.