From the Blogosphere
How to Set Up Continuous Deployment to Amazon OpsWorks
Learn how to continuously deploy code to Amazon Opsworks
By: Manuel Weiss
Sep. 27, 2013 04:00 PM
Deploying code to Amazon OpsWorks using Codeship
One task, that is not immediately obvious how to solve, is triggering an OpsWorks build remotely from the command line, or from a build server. This article will explain how we do exactly this, using the excellent Codeship Continuous Integration and Deployment service.
Setting up a new IAM user on AWS
First, we go to IAM, click on Groups and then Create New Group. This brings up the following screen:
Creating a new AWS IAM group
This group will provide all its members with access to OpsWorks. A name similar to "opsworks-users" makes sense. Once you've picked a name, click on Continue and we are presented with a Policy selection screen. At this point, we can select from the list of available policies or create a fully custom policy. In our case, the existing "AWS OpsWorks Full Access" policy is just what we need, so let's select it:
Select the AWS OpsWorks Full Access Policy
Now that we have an IAM group in place, let's create a user we will use for deployment. On the main IAM screen, click on Users and Create New Users, this brings up the following screen:
Create a new AWS IAM user
Choose a sensible name and generate your new user. It is very important to download the security credentials for your new user. We will need these for deployment, namely theAccess Key ID and the Secret Access Key.
Finally, add the new user to our opsworks-users group, which will give the account access to our OpsWorks deployments. This can be done by first clicking on the user, then going to the Groups tab and clicking on the Add User to Groups button.
Gather information from your AWS account
First we need to record the Stack ID for the OpsWorks Stack we will be deploying to. We need to go to our Stack and click on the Stack Settings button:
On the next screen, the Stack ID will be shown under the label OpsWorks ID, let's record it:
After that we need the Application ID for the application we will be deploying. This can be found on the OpsWorks Application page:
Finally, we go to the OpsWorks Instance that we will be deploying to and record it's OpsWorks ID:
At this point we should have our:
Latest AJAXWorld RIA Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week