Deploying a Scalatra App to Elastic Beanstalk via Codeship

I’ve recently started using Codeship – a cloud based Continuous Integration and Deployment environment – for a “Just for fun” project I needed to deploy to AWS, specifically to Elastic Beanstalk. At the time of this writing, there were no AWS plugins available on Codeship to make this deployment possible but, thanks to one of their Engineers (thanks you Florian), I was able to make it happen using the “Custom Script” option on Codeship, and the “ebs_deploy” tool by Brian Dilley.

As per the docs of Ebs Deploy, I added a “ebs.config” file in my repository that contains details about my AWS settings, my Elastic Beanstalk app settings and my environments. It also contains a section defining the type of file I want uploaded as well as the command the would build that file.

With that added, I changed my deployment setting on my project in Codeship to use the “Custom Script” option, and entered the following commands

The first command ensures that Ebs Deploy is present on my environment. The second initialize my environments based on the ebs.config, which can be useful should I change/add new environments to that file. Finally, the third command does the actual deployment.

Et voila! I hope this helps!

Advertisements
Deploying a Scalatra App to Elastic Beanstalk via Codeship

3 thoughts on “Deploying a Scalatra App to Elastic Beanstalk via Codeship

    1. My main reason for using ebs-deploy over aws-cli was its simplicity. ebs-deploy abstracts away the various commands I would have needed to replicate with aws-cli. By me providing just a config file, it knows to create or update my elastic beanstalk application and its environments, how to build my application and how to upload its new version to elastic beanstalk. As such the only thing I need to maintain is the config, not the script I would have written to work with aws-cli. It also has a single command to do zero down time deployment, which also saves me having to write a script with aws-cli to do the same thing.

      I hope this helps!
      Boguste

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s