Last active
January 20, 2022 01:02
-
-
Save lifeeth/557722cd62eb41010807ad1a2ce6ba41 to your computer and use it in GitHub Desktop.
AWS Codedeploy Agent install on Ubuntu 20.04 - Until a package is released for Ubuntu 20.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
#!/usr/bin/env bash | |
sudo snap install ruby --channel=2.5/stable --classic | |
sudo gem install bundler | |
sudo git clone https://github.com/aws/aws-codedeploy-agent.git /opt/codedeploy-agent | |
sudo chown -R root.root /opt/codedeploy-agent | |
sudo chmod 644 /opt/codedeploy-agent/conf/codedeployagent.yml | |
sudo chmod 755 /opt/codedeploy-agent/init.d/codedeploy-agent | |
sudo chmod 644 /opt/codedeploy-agent/init.d/codedeploy-agent.service | |
pushd /opt/codedeploy-agent | |
sudo bundle install --system | |
sudo /snap/bin/rake clean && sudo /snap/bin/rake | |
sudo cp /opt/codedeploy-agent/init.d/codedeploy-agent.service /etc/systemd/system | |
# Run codedeploy as root - Be aware of the security implications | |
sudo sed -i 's/\(User=\)\(.*\)/\1root/' /etc/systemd/system/codedeploy-agent.service | |
sudo sed -i 's/#User/User/g' /etc/systemd/system/codedeploy-agent.service | |
sudo systemctl daemon-reload | |
sudo systemctl enable codedeploy-agent | |
popd |
@lifeeth That is weird i try many times with your snippet, can you share ur public ami-id, to try with that again.
@cmllamosas - I have been using the same AMI. Could you share your codedeploy-agent.service
? I do run an apt-get upgrade
before installing though.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@cmllamosas That seems odd. These are the exact steps that worked for me on
ubuntu/images/*ubuntu-focal-20.04-amd64-server-*
ami.