Last active
January 4, 2017 18:58
-
-
Save get-data-/89eab97da4dc822b770319c6aafb1b57 to your computer and use it in GitHub Desktop.
Shell Script to install AWS Code Deploy on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x codeDeploy.sh
./codeDeploy.sh