Skip to content
umairadeeb edited this page Dec 17, 2014 · 3 revisions

How This Works

As we are using Travis for code validation, we will configure our travis build to deploy code after successful build completion on AWS OpsWorks. The process looks something like this:

Code check-in on GIT --> Travis Build triggered --> App deployed on OpsWorks

To make this process work, we need to first create a new APP on OpsWorks. After creation of APP, we need to configure Travis to deploy application code on this recently created APP on OpsWorks.

Create New App on OpsWorks

To create new APP on OpsWorks, go to OpsWorks Console, then Stack -> Apps -> +App (create new app)

Configuration of App should look something like below for a node.js app:

Name: WRIO-InternetOS Type: Node.js Data source type: None Repository type: Git Repository URL: https://github.com/webRunes/WRIO-InternetOS

After creation of new App, you can get OpsWorks ID which is required to deploy from Travis.

Configure Travis for OpsWorks Deployment

Travis uses .travis.yml file on the root of the repository to read configurations from. Here is how to configure this file for OpsWorks:

  1. Login to your server which should contain travis package to continue this configuration.
  2. create a file named .travis.yml
  3. execute command: travis setup opsworks -r webRunes/WRIO-InternetOS
  4. A setup wizard will ask Access key, Secret key, OpsWorks ID, to configure .travis.yml file. After completion of wizard, you now have OpsWorks deployment configuration.
  5. Copy these configurations from .travis.yml file and append them to repository's .travis.yml file.

Your setup is completed. Your new app should deploy on OpsWorks now.

Clone this wiki locally