Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions JENKINS-INSTALLATION/Jenkins-Docker-Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# Jenkins Installation And Setup In AWS EC2 Ubuntu or Amazon Linux Instnace Using Docker.

#### 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 -y
```
--------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 -d --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
```



## 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 /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)

(Replace * with the version of maven tool you installed in Jenkins)
10 changes: 10 additions & 0 deletions JENKINS-INSTALLATION/Jenkins-redhat8-installation-userdata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
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
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
9 changes: 8 additions & 1 deletion JENKINS-INSTALLATION/READme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
Expand Down
16 changes: 11 additions & 5 deletions Maven-installation/READme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,10 +36,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
Expand Down
16 changes: 10 additions & 6 deletions Tomcat-installation/READme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,25 @@
# 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.
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
Expand Down
1 change: 1 addition & 0 deletions kubeadm/READme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down