From 12b5a390a3b605bf3cc88c71e44a3657bd342c6b Mon Sep 17 00:00:00 2001 From: Irving Viveros Date: Tue, 8 Jun 2021 15:18:13 +0000 Subject: [PATCH 1/2] Update remote system --- scripts/install_jenkins.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install_jenkins.sh b/scripts/install_jenkins.sh index 03221caf..9850fec8 100644 --- a/scripts/install_jenkins.sh +++ b/scripts/install_jenkins.sh @@ -2,7 +2,13 @@ # this script is only tested on ubuntu xenial +# update system + +sudo apt-get update && sudo apt-get upgrade -y + # install docker + +sudo apt-get remove docker docker-engine docker.io containerd runc # Uninstall old versions 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 \ From 46bd2419172d218402f354a5a6befd82f5d1696f Mon Sep 17 00:00:00 2001 From: Irving Viveros <43256092+irvingviveros@users.noreply.github.com> Date: Tue, 8 Jun 2021 10:47:56 -0500 Subject: [PATCH 2/2] Fix cURL address Replaced the cURL ifconfig.co address to fix the error response from that website. The new URL provides us the Public IP address without errors. --- scripts/install_jenkins.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_jenkins.sh b/scripts/install_jenkins.sh index 9850fec8..7d922246 100644 --- a/scripts/install_jenkins.sh +++ b/scripts/install_jenkins.sh @@ -15,7 +15,7 @@ sudo add-apt-repository \ $(lsb_release -cs) \ stable" apt-get update -apt-get install docker-ce docker-ce-cli containerd.io +apt-get install docker-ce docker-ce-cli containerd.io -y systemctl enable docker systemctl start docker usermod -aG docker ubuntu @@ -27,4 +27,4 @@ docker run -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:/var/jenkins_home -d # show endpoint echo 'Jenkins installed' -echo 'You should now be able to access jenkins at: http://'$(curl -s ifconfig.co)':8080' +echo 'You should now be able to access jenkins at: http://'$(curl icanhazip.com)':8080'