-
Notifications
You must be signed in to change notification settings - Fork 33
Deploy on OpsWorks
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.
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.
Travis uses .travis.yml file on the root of the repository to read configurations from. Here is how to configure this file for OpsWorks:
- Login to your server which should contain travis package to continue this configuration.
- create a file named .travis.yml
- execute command: travis setup opsworks -r webRunes/WRIO-InternetOS
- 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.
- 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.