How do I run Kitchen? There are five basic commands to provision platforms and test infrastructure code.
$ kitchen create
$ kitchen converge
$ kitchen setup
| FROM jeanblanchard/java:8 | |
| LABEL environement="dev" service="book" owner="rcherara" | |
| LABEL Description="This image is used to start the rest-example executable" Vendor="API Books" Version="1.0" | |
| MAINTAINER rcherara | |
| WORKDIR /opt/rest-example/ | |
| COPY target/rest-example-0.1.0.jar rest-example-0.1.0.jar | |
| CMD java -jar rest-example-0.1.0.jar | |
| EXPOSE 7680 | |
| # Install aws-codedeploy-agent and required gems | |
| sudo apt-get install -y git | |
| codedeploy_git_url='https://github.com/aws/aws-codedeploy-agent.git' | |
| git clone "$codedeploy_git_url" | |
| sudo gem install bundler | |
| sudo mv aws-codedeploy-agent /opt/codedeploy-agent | |
| cd /opt/codedeploy-agent | |
| bundle install --system | |
| # Setup permissions |
| #!/bin/bash | |
| instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
| region=$(curl http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}') | |
| clear | |
| echo " The Id of this EC2 Instance is : $instanceId" | |
| echo " The Region of this EC2 Instance is : $region" |