Skip to content

Instantly share code, notes, and snippets.

@craigvantonder
Last active February 11, 2021 12:15
Show Gist options
  • Select an option

  • Save craigvantonder/c1cdced4764166e9acb5dfd92996f932 to your computer and use it in GitHub Desktop.

Select an option

Save craigvantonder/c1cdced4764166e9acb5dfd92996f932 to your computer and use it in GitHub Desktop.

Revisions

  1. craigvantonder revised this gist Sep 11, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ sudo systemctl start codedeploy-agent
    sudo systemctl status codedeploy-agent

    #########
    # 18.04 # https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html
    # 18.04 / 20.04 # https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html
    #########

    # Switch to root and update first
    @@ -78,3 +78,4 @@ chmod +x ./install;
    # Enable and check status of the agent
    systemctl start codedeploy-agent;
    systemctl status codedeploy-agent;

  2. craigvantonder revised this gist Jun 5, 2019. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -63,11 +63,11 @@ sudo systemctl status codedeploy-agent
    #########

    # Switch to root and update first
    sudo su
    apt update
    sudo su;
    apt update;

    # Ruby dependency
    apt install ruby
    apt install -y ruby;

    # CodeDeploy Agent
    cd /home/ubuntu;
    @@ -76,5 +76,5 @@ chmod +x ./install;
    ./install auto;

    # Enable and check status of the agent
    systemctl start codedeploy-agent
    systemctl status codedeploy-agent
    systemctl start codedeploy-agent;
    systemctl status codedeploy-agent;
  3. craigvantonder revised this gist Apr 14, 2019. No changes.
  4. craigvantonder revised this gist Apr 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -73,7 +73,7 @@ apt install ruby
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;
    ./install auto;

    # Enable and check status of the agent
    systemctl start codedeploy-agent
  5. craigvantonder revised this gist Apr 14, 2019. 1 changed file with 31 additions and 6 deletions.
    37 changes: 31 additions & 6 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -15,12 +15,15 @@ aws configure;
    #########
    # 14.04 # http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-run-agent-install.html
    #########
    #

    # CodeDeploy Agent
    # Python dependency
    sudo apt-get update;
    sudo apt-get install python-pip;

    # Ruby dependency
    sudo apt-get install ruby2.0;

    # CodeDeploy Agent
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    @@ -33,10 +36,11 @@ sudo service codedeploy-agent status
    # 16.04 # https://github.com/aws/aws-codedeploy-agent/issues/61
    #########

    # CodeDeploy Agent
    # Python dependency
    sudo apt-get update;
    sudo apt-get install python-pip;
    # Ruby dep

    # Ruby dependency
    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
    @@ -45,11 +49,32 @@ EOF
    sudo apt-get update
    sudo apt-get install ruby2.0

    # CodeDeploy Agent
    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
    sudo systemctl status codedeploy-agent

    #########
    # 18.04 # https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html
    #########

    # Switch to root and update first
    sudo su
    apt update

    # Ruby dependency
    apt install ruby

    # CodeDeploy Agent
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;

    # Enable and check status of the agent
    systemctl start codedeploy-agent
    systemctl status codedeploy-agent
  6. craigvantonder revised this gist Nov 12, 2016. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,9 @@ 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
    #########
    @@ -45,4 +48,8 @@ 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 ./install auto;


    sudo systemctl start codedeploy-agent
    sudo systemctl status codedeploy-agent
  7. craigvantonder revised this gist Nov 11, 2016. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -13,25 +13,24 @@ aws configure;
    #Default output format [None]:

    #########
    # 14.04 #
    # 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;
    sudo apt-get install wget;
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;

    #########
    # 16.04 #
    # 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
  8. craigvantonder revised this gist Nov 11, 2016. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,9 @@ aws configure;
    #Default region name [None]: Your region, e.g. eu-central-1
    #Default output format [None]:

    ****** 14.04
    #########
    # 14.04 #
    #########

    # CodeDeploy Agent
    sudo apt-get update;
    @@ -24,7 +26,9 @@ wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;

    ****** 16.04
    #########
    # 16.04 #
    #########

    # CodeDeploy Agent

  9. craigvantonder revised this gist Nov 11, 2016. No changes.
  10. craigvantonder revised this gist Nov 11, 2016. 1 changed file with 15 additions and 10 deletions.
    25 changes: 15 additions & 10 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,20 @@ aws configure;
    #Default region name [None]: Your region, e.g. eu-central-1
    #Default output format [None]:

    ****** 14.04

    # CodeDeploy Agent
    sudo apt-get update;
    sudo apt-get install python-pip;
    sudo apt-get install ruby2.0;
    sudo apt-get install wget;
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;

    ****** 16.04

    # CodeDeploy Agent

    sudo apt-get update;
    @@ -25,16 +39,7 @@ EOF
    sudo apt-get update
    sudo apt-get install ruby2.0

    # CodeDeploy Agent
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;



    +++++ THE ABOVE WORKS ON 14.04

    BELOW WE NEED:


    sudo ./install auto;
  11. craigvantonder revised this gist Nov 11, 2016. 1 changed file with 20 additions and 3 deletions.
    23 changes: 20 additions & 3 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -13,11 +13,28 @@ aws configure;
    #Default output format [None]:

    # CodeDeploy Agent

    sudo apt-get update;
    sudo apt-get install python-pip;
    sudo apt-get install ruby2.0;
    sudo apt-get install wget;
    # 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

    # CodeDeploy Agent
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;
    sudo ./install auto;



    +++++ THE ABOVE WORKS ON 14.04

    BELOW WE NEED:


  12. craigvantonder revised this gist Sep 30, 2016. No changes.
  13. craigvantonder revised this gist Sep 30, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    #!/bin/bash

    # This works in 14.04 but not 16.04, with 16.04 there is issues installing CodeDeploy agent because of python?

    # AWS CLI
    apt-get install zip -y;
    curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip";
  14. craigvantonder revised this gist Sep 30, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    #!/bin/bash

    # This works in 14.04 but not 16.04, with 16.04 there is issues installing CodeDeploy agent because of python?

    # AWS CLI
    apt-get install zip -y;
    curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip";
  15. craigvantonder created this gist Sep 27, 2016.
    23 changes: 23 additions & 0 deletions setup-awscli-codedeploy-agent.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/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]:

    # CodeDeploy Agent
    sudo apt-get update;
    sudo apt-get install python-pip;
    sudo apt-get install ruby2.0;
    sudo apt-get install wget;
    cd /home/ubuntu;
    wget https://aws-codedeploy-eu-central-1.s3.amazonaws.com/latest/install;
    chmod +x ./install;
    sudo ./install auto;