Forked from craigvantonder/setup-awscli-codedeploy-agent.sh
Created
June 19, 2018 06:26
-
-
Save anuthaharinimn/49346bac9b222fea8d55bcc3c9144620 to your computer and use it in GitHub Desktop.
How to install AWS Code Deploy agent in Ubuntu 14.04 & 16.04
This file contains 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 CLI | |
apt-get install zip -y; | |
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"; | |
unzip awscli-bundle.zip; | |
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws; | |
aws configure; | |
#AWS Access Key ID [None]: Obtained when creating user in AWS IAM | |
#AWS Secret Access Key [None]: Obtained when creating user in AWS IAM | |
#Default region name [None]: Your region, e.g. eu-central-1 | |
#Default output format [None]: | |
######### | |
# 14.04 # http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-run-agent-install.html | |
######### | |
# | |
# CodeDeploy Agent | |
sudo apt-get update; | |
sudo apt-get install python-pip; | |
sudo apt-get install ruby2.0; | |
cd /home/ubuntu; | |
wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install; | |
chmod +x ./install; | |
sudo ./install auto; | |
sudo service codedeploy-agent start | |
sudo service codedeploy-agent status | |
######### | |
# 16.04 # https://github.com/aws/aws-codedeploy-agent/issues/61 | |
######### | |
# CodeDeploy Agent | |
sudo apt-get update; | |
sudo apt-get install python-pip; | |
# Ruby dep | |
sudo mkdir -p /etc/apt/sources.list.d | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 | |
cat <<EOF | sudo tee /etc/apt/sources.list.d/brightbox-ubuntu-ruby-ng-wily.list | |
deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily main | |
EOF | |
sudo apt-get update | |
sudo apt-get install ruby2.0 | |
cd /home/ubuntu; | |
wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install; | |
chmod +x ./install; | |
sudo ./install auto; | |
sudo systemctl start codedeploy-agent | |
sudo systemctl status codedeploy-agent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment