Last active
April 28, 2023 12:03
-
-
Save chandradeoarya/f040921db01a6a2e8652efd589900632 to your computer and use it in GitHub Desktop.
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 | |
#Install jenkins | |
sudo apt-get install openjdk-11-jdk | |
sudo apt-get install git | |
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |sudo gpg --dearmor -o /usr/share/keyrings/jenkins.gpg | |
sudo sh -c 'echo deb [signed-by=/usr/share/keyrings/jenkins.gpg] http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt update | |
sudo apt install openjdk-8-jre -y | |
sudo apt install jenkins -y | |
sudo systemctl start jenkins.service | |
sudo cat /var/lib/jenkins/secrets/initialAdminPassword | |
#Install docker | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` test" -y | |
sudo apt update -y | |
sudo apt install docker-ce -y | |
sudo usermod -aG docker ubuntu | |
sudo usermod -aG docker jenkins | |
# Install docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment