From 8b98a5e2b522884d70cdcc9933afd1f774478bb9 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Tue, 27 Jun 2023 04:39:26 +0100 Subject: [PATCH 01/15] change tomcat version from 9.0.75 to 9.0.76 The latest/stable version of Apache Tomcat 9 is 9.0.76 - released on June 5, 2023. Attempt to download 9.0.75 results in Error 404 not found. --- Tomcat-installation/READme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tomcat-installation/READme.md b/Tomcat-installation/READme.md index cd76f1c6..995a8aa6 100644 --- a/Tomcat-installation/READme.md +++ b/Tomcat-installation/READme.md @@ -24,14 +24,14 @@ sudo yum install java-1.8.0-openjdk-devel -y # install wget unzip packages. sudo yum install wget unzip -y ``` -## Install Tomcat version 9.0.75 +## Install Tomcat version 9.0.76 ### Download and extract the tomcat server ``` sh -sudo wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.75/bin/apache-tomcat-9.0.75.zip -sudo unzip apache-tomcat-9.0.75.zip -sudo rm -rf apache-tomcat-9.0.75.zip +sudo wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.76/bin/apache-tomcat-9.0.76.zip +sudo unzip apache-tomcat-9.0.76.zip +sudo rm -rf apache-tomcat-9.0.76.zip ### rename tomcat for good naming convention -sudo mv apache-tomcat-9.0.75 tomcat9 +sudo mv apache-tomcat-9.0.76 tomcat9 ### assign executable permissions to the tomcat home directory sudo chmod 777 -R /opt/tomcat9 sudo chown ec2-user -R /opt/tomcat9 From 9b85f51ca4dd8c926a13f999592aba317c954c40 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Fri, 30 Jun 2023 17:33:43 +0100 Subject: [PATCH 02/15] Update READme.md --- Maven-installation/READme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Maven-installation/READme.md b/Maven-installation/READme.md index 2594fbb2..57f942ee 100644 --- a/Maven-installation/READme.md +++ b/Maven-installation/READme.md @@ -30,10 +30,10 @@ git --version ## 2. Download, extract and Install Maven ``` sh #Step1) Download the Maven Software -sudo wget https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.zip -sudo unzip apache-maven-3.9.2-bin.zip -sudo rm -rf apache-maven-3.9.2-bin.zip -sudo mv apache-maven-3.9.2/ maven +sudo wget https://dlcdn.apache.org/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.zip +sudo unzip apache-maven-3.9.3-bin.zip +sudo rm -rf apache-maven-3.9.3-bin.zip +sudo mv apache-maven-3.9.3/ maven ``` ## .#Step3) Set Environmental Variable - For Specific User eg ec2-user ``` sh From 650de03b4b63867f12f70802786608f295e70349 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Fri, 30 Jun 2023 17:35:47 +0100 Subject: [PATCH 03/15] Update READme.md --- Maven-installation/READme.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Maven-installation/READme.md b/Maven-installation/READme.md index 57f942ee..175504b1 100644 --- a/Maven-installation/READme.md +++ b/Maven-installation/READme.md @@ -15,11 +15,17 @@ ### Install Java JDK 11+ and other softares (GIT, wget and tree) + ``` sh -# install Java JDK 11+ as a pre-requisit for maven to run. +# set hostname as maven. sudo hostnamectl set-hostname maven sudo su - ec2-user + +``` + +``` sh +# install Java JDK 11+ as a pre-requisite for maven to run. cd /opt sudo yum install wget nano tree unzip git-all -y sudo yum install java-11-openjdk-devel java-1.8.0-openjdk-devel -y From da9fc258e81978b7087dbb5921eae31b93ac90bc Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Fri, 30 Jun 2023 17:37:49 +0100 Subject: [PATCH 04/15] Update READme.md --- Tomcat-installation/READme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tomcat-installation/READme.md b/Tomcat-installation/READme.md index 995a8aa6..f9946e23 100644 --- a/Tomcat-installation/READme.md +++ b/Tomcat-installation/READme.md @@ -17,8 +17,12 @@ # change hostname to tomcat sudo hostnamectl set-hostname tomcat sudo su - ec2-user -cd /opt +``` + + +``` sh # install Java JDK 1.8+ as a pre-requisit for tomcat to run. +cd /opt sudo yum install git wget -y sudo yum install java-1.8.0-openjdk-devel -y # install wget unzip packages. From 738114fda7d8ce586683ca24475ee0048f3fdefc Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Wed, 12 Jul 2023 07:46:44 +0100 Subject: [PATCH 05/15] Update READme.md --- JENKINS-INSTALLATION/READme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/JENKINS-INSTALLATION/READme.md b/JENKINS-INSTALLATION/READme.md index c11b6cfd..53259ee8 100644 --- a/JENKINS-INSTALLATION/READme.md +++ b/JENKINS-INSTALLATION/READme.md @@ -28,6 +28,13 @@ cd /etc/yum.repos.d/ sudo curl -O https://pkg.jenkins.io/redhat-stable/jenkins.repo ``` +### Add Jenkins Repository and key (Use this) +```sh +sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo +sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key +``` + + ## Install Jenkins ```sh sudo yum -y install jenkins --nobest From 7122575740b85184889a5bf3a988c90ded426cec Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Wed, 12 Jul 2023 08:34:50 +0100 Subject: [PATCH 06/15] Create Jenkins-redhat8-installation-userdata --- .../Jenkins-redhat8-installation-userdata | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata diff --git a/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata b/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata new file mode 100644 index 00000000..6da79a1a --- /dev/null +++ b/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata @@ -0,0 +1,10 @@ +#!/bin/bash +sudo hostnamectl set-hostname ci +sudo yum -y install unzip wget tree git +sudo yum install java-11-openjdk -y +sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo +sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key +sudo yum -y install jenkins --nobest +sudo systemctl start jenkins +sudo systemctl enable jenkins +sudo systemctl status jenkins From c321606df45ccf1f5265dd600c4ad39e9bbf40fa Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 16:39:50 +0100 Subject: [PATCH 07/15] Update Jenkins-redhat8-installation-userdata --- JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata b/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata index 6da79a1a..d03735c5 100644 --- a/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata +++ b/JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata @@ -1,5 +1,5 @@ #!/bin/bash -sudo hostnamectl set-hostname ci +sudo hostnamectl set-hostname jenkins sudo yum -y install unzip wget tree git sudo yum install java-11-openjdk -y sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo From a624a92c13a69edf60437c8e9502a40620a6d191 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 16:41:13 +0100 Subject: [PATCH 08/15] Update READme.md --- JENKINS-INSTALLATION/READme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JENKINS-INSTALLATION/READme.md b/JENKINS-INSTALLATION/READme.md index 53259ee8..51a9e9c3 100644 --- a/JENKINS-INSTALLATION/READme.md +++ b/JENKINS-INSTALLATION/READme.md @@ -17,7 +17,7 @@ ### Install other softwares - git, unzip and wget ``` sh -sudo hostnamectl set-hostname ci +sudo hostnamectl set-hostname jenkins sudo yum -y install unzip wget tree git sudo yum install java-11-openjdk -y ``` From 984854979bd0261d20c71511b92548143ba51fb0 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 17:15:53 +0100 Subject: [PATCH 09/15] Create Jenkins-Docker Installation.sh --- JENKINS-INSTALLATION/Jenkins-Docker Installation.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 JENKINS-INSTALLATION/Jenkins-Docker Installation.sh diff --git a/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh b/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh new file mode 100644 index 00000000..bd5d0a63 --- /dev/null +++ b/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +sudo docker run -p 8090:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:lts-jdk11 From 1ecae6bbf525ce99dff33ce8c02644a3e594feb1 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 19:18:58 +0100 Subject: [PATCH 10/15] Update Jenkins-Docker Installation.sh --- .../Jenkins-Docker Installation.sh | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh b/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh index bd5d0a63..701ae209 100644 --- a/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh +++ b/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh @@ -1,3 +1,47 @@ -#! /bin/bash -sudo docker run -p 8090:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:lts-jdk11 +# Jenkins Installation And Setup In AWS EC2 Ubuntu or Amazon Linux Instnace. +#### Prerequisite ++ AWS Acccount. ++ Create Ubuntu or Amazon Linux EC2 t2.medium Instance with 4GB RAM. ++ Create Security Group and open Required ports. + + 8080 got Jenkins, ..etc ++ Attach Security Group to EC2 Instance. + + + +## Step 1 +### A. Install Docker on Ubuntu +``` sh +sudo apt-get update +sudo apt-get install docker.io +``` +--------OR--------- + +### B. Install Docker on Amazon Linux +``` sh +sudo yum install docker-io +sudo service docker start +``` + +## Step 2 +# Run Jenkins Using Docker +``` sh +sudo docker run --name jenkins -p 8080:8080 --restart=on-failure jenkins/jenkins:lts-jdk11 +``` + + +## Step 3 +# Retrieve Jenkins Password +``` sh +sudo docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword +``` +password will be display, copy the password and use to login to Jenkins server on the browser + + + + +## Step 4 Access Jenkins from the browser +```sh +public-ip:8080 +curl ifconfig.co +``` From 3e2b79727233187962fb7cb7d63a75358e4be115 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 19:23:52 +0100 Subject: [PATCH 11/15] Update and rename Jenkins-Docker Installation.sh to Jenkins-Docker-Installation.md --- ...tion.sh => Jenkins-Docker-Installation.md} | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename JENKINS-INSTALLATION/{Jenkins-Docker Installation.sh => Jenkins-Docker-Installation.md} (68%) diff --git a/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md similarity index 68% rename from JENKINS-INSTALLATION/Jenkins-Docker Installation.sh rename to JENKINS-INSTALLATION/Jenkins-Docker-Installation.md index 701ae209..5402026e 100644 --- a/JENKINS-INSTALLATION/Jenkins-Docker Installation.sh +++ b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md @@ -1,12 +1,12 @@ # Jenkins Installation And Setup In AWS EC2 Ubuntu or Amazon Linux Instnace. -#### Prerequisite -+ AWS Acccount. -+ Create Ubuntu or Amazon Linux EC2 t2.medium Instance with 4GB RAM. -+ Create Security Group and open Required ports. - + 8080 got Jenkins, ..etc -+ Attach Security Group to EC2 Instance. +#### Prerequisite + + AWS Acccount. + + Create Ubuntu or Amazon Linux EC2 t2.medium Instance with 4GB RAM. + + Create Security Group and open Required ports. + + 8080 got Jenkins, ..etc + + Attach Security Group to EC2 Instance. ## Step 1 @@ -24,14 +24,14 @@ sudo service docker start ``` ## Step 2 -# Run Jenkins Using Docker +## Run Jenkins Using Docker ``` sh sudo docker run --name jenkins -p 8080:8080 --restart=on-failure jenkins/jenkins:lts-jdk11 ``` ## Step 3 -# Retrieve Jenkins Password +## Retrieve Jenkins Password ``` sh sudo docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword ``` @@ -40,7 +40,8 @@ password will be display, copy the password and use to login to Jenkins server o -## Step 4 Access Jenkins from the browser +## Step 4 +## Access Jenkins from the browser ```sh public-ip:8080 curl ifconfig.co From e83b0b2a33eb04e6b769dd68fe6798255ce263de Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Sun, 30 Jul 2023 19:34:53 +0100 Subject: [PATCH 12/15] Update Jenkins-Docker-Installation.md --- JENKINS-INSTALLATION/Jenkins-Docker-Installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md index 5402026e..2be6d484 100644 --- a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md +++ b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md @@ -1,5 +1,5 @@ -# Jenkins Installation And Setup In AWS EC2 Ubuntu or Amazon Linux Instnace. +# Jenkins Installation And Setup In AWS EC2 Ubuntu or Amazon Linux Instnace Using Docker. #### Prerequisite + AWS Acccount. @@ -13,7 +13,7 @@ ### A. Install Docker on Ubuntu ``` sh sudo apt-get update -sudo apt-get install docker.io +sudo apt-get install docker.io -y ``` --------OR--------- @@ -26,7 +26,7 @@ sudo service docker start ## Step 2 ## Run Jenkins Using Docker ``` sh -sudo docker run --name jenkins -p 8080:8080 --restart=on-failure jenkins/jenkins:lts-jdk11 +sudo docker run --name jenkins -p 8080:8080 -d --restart=on-failure jenkins/jenkins:lts-jdk11 ``` From e705b53e237443f1054d27e6f89566bc5cbf940a Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Mon, 31 Jul 2023 19:24:24 +0100 Subject: [PATCH 13/15] Update READme.md --- kubeadm/READme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/kubeadm/READme.md b/kubeadm/READme.md index d9f41277..15bb2294 100644 --- a/kubeadm/READme.md +++ b/kubeadm/READme.md @@ -27,6 +27,7 @@ sudo -i #i1) Switch to root user [ sudo -i] sudo hostnamectl set-hostname node1 +# sudo hostnamectl set-hostname $1 #2) Disable swap & add kernel settings From 98d6ac6ecc3c9ec3717b17b40dfd428a18279c70 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Tue, 1 Aug 2023 16:31:52 +0100 Subject: [PATCH 14/15] Update Jenkins-Docker-Installation.md --- .../Jenkins-Docker-Installation.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md index 2be6d484..7b22723e 100644 --- a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md +++ b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md @@ -46,3 +46,24 @@ password will be display, copy the password and use to login to Jenkins server o public-ip:8080 curl ifconfig.co ``` + + + +## Jenkins Nexus Integration (WIP) +## Access Jenkins from the browser + +In your Jenkins docker server, run these commands: + +```sh +docker exec -u 0 -it jenkins bash +``` + + +```sh +apt-get update +apt-get install nano +nano jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven3.*.*/conf/settings.xml +``` +Add nexus repo url to the distributionManagement tag in Pom.xml (in your GitHub repo) + +(Replace * with the version of maven tool you installed in Jenkins) From be07344225fcb89545fac6d9e1e2f884ca86b8c4 Mon Sep 17 00:00:00 2001 From: Ibrahim Animashaun Date: Wed, 2 Aug 2023 23:38:41 +0100 Subject: [PATCH 15/15] Update Jenkins-Docker-Installation.md --- JENKINS-INSTALLATION/Jenkins-Docker-Installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md index 7b22723e..7182ae0a 100644 --- a/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md +++ b/JENKINS-INSTALLATION/Jenkins-Docker-Installation.md @@ -62,7 +62,7 @@ docker exec -u 0 -it jenkins bash ```sh apt-get update apt-get install nano -nano jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven3.*.*/conf/settings.xml +nano /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven3.*.*/conf/settings.xml ``` Add nexus repo url to the distributionManagement tag in Pom.xml (in your GitHub repo)