Skip to content

Instantly share code, notes, and snippets.

@get-data-
Last active January 4, 2017 18:58
Show Gist options
  • Save get-data-/89eab97da4dc822b770319c6aafb1b57 to your computer and use it in GitHub Desktop.
Save get-data-/89eab97da4dc822b770319c6aafb1b57 to your computer and use it in GitHub Desktop.
Shell Script to install AWS Code Deploy on Ubuntu
#!/bin/bash
# AWS Code Deploy on Ubuntu
# Tested on Ubuntu 16.04 LTS
# Install dependancies to get Code Deploy
sudo apt-get update -y
sudo apt-get install python-pip -y
sudo apt-get install ruby -y
sudo apt-get install wget -y
# Install AWS CLI
sudo pip install awscli
# Configure EC2
aws configure
<AWS_ACCESS_KEY_ID>
<AWS_SECRET_ACCESS_KEY>
<DEFAULT_REGION_NAME>
<DEFAULT_OUTPUT_FORMAT>
# Download Code Deploy
cd /home/ubuntu
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
# Install Code Deploy
chmod +x ./install
# Make this install faster
# credit to github.com/andrewpunch/code_deploy_example/
sed -i "s/sleep(.*)/sleep(10)/" install
sudo ./install auto
# Fire it up
sudo service codedeploy-agent status
sudo service codedeploy-agent start
sudo service codedeploy-agent status
@get-data-
Copy link
Author

chmod +x codeDeploy.sh
./codeDeploy.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment