Last active
July 19, 2020 18:13
-
-
Save andreasneuber/cbc54c2269695e5c91963b45a934d8c5 to your computer and use it in GitHub Desktop.
Install Jenkins and Docker on Ubuntu Server 18.04 EC2 instance
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
# Create a Ubuntu Server 18.04 LTS instance | |
# Associate an Elastic IP to instance - https://docs.bitnami.com/aws/faq/configuration/configure-static-address/ | |
# Add inbound security group rule.. | |
# Custom TCP TCP 8080 0.0.0.0/0 | |
# Install Java and Docker | |
sudo apt update | |
sudo apt install -y openjdk-8-jdk | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt update | |
sudo apt install -y docker-ce | |
sudo usermod -aG docker ${USER} | |
#Logout-Login | |
# Confirm with $ id -nG | |
sudo usermod -aG docker jenkins | |
sudo service jenkins restart | |
docker | |
java -version | |
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt update | |
sudo apt install -y jenkins | |
systemctl status jenkins | |
# Call Elastic IP in browser like: http://<IP>:8080 | |
sudo cat /var/lib/jenkins/secrets/initialAdminPassword | |
# Continue with usual setup in browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment