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
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,60 @@
- Copy and Paste everything from the zipped file into the repository you cloned in your local
- Add the code to git, commit and push it to your upstream branch "main or master"
- Confirm that the code exist on GitHub

- - -

2) Jenkins/Maven/Ansible
- As a shortcut - Just click on the Fork Button on your Github screen.

3) Jenkins/Maven/Ansible
- Create an Amazon Linux 2 VM instance and call it "jenkins-maven-ansible"
- Instance type: t2.medium
- Security Group (Open): 8080, 9100 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair
- User data (Copy the following user data): https://github.com/awanmbandi/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/jenkins-install.sh
- User data (Copy the following user data): https://github.com/showmikb/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/jenkins-install.sh
- Launch Instance

3) SonarQube
4) SonarQube
- Create an Create an Ubuntu 18.04 VM instance and call it "SonarQube"
- Instance type: t2.medium
- Security Group (Open): 9000, 9100 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair
- User data (Copy the following user data): https://github.com/awanmbandi/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/sonarqube-install.sh
- User data (Copy the following user data): https://github.com/showmikb/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/sonarqube-install.sh
- Launch Instance

4) Nexus
5) Nexus
- Create an Amazon Linux 2 VM instance and call it "Nexus"
- Instance type: t2.medium
- Security Group (Open): 8081, 9100 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair
- User data (Copy the following user data): https://github.com/awanmbandi/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/nexus-install.sh
- User data (Copy the following user data): https://github.com/showmikb/eagles-batch-devops-projects/blob/maven-nexus-sonarqube-jenkins-install/nexus-install.sh
- Launch Instance

5) EC2 (Dev/Stage/Prod)
6) EC2 (Dev/Stage/Prod)
- Create 3 Amazon Linux 2 VM instance and call them (Names: Dev-Env, Stage-Env and Prod-Env)
- Instance type: t2.micro
- Security Group (Open): 8080, 9100 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair

6) Prometheus
7) Prometheus
- Create an Ubuntu 20.04 VM instance and call it "Prometheus"
- Instance type: t2.micro
- Security Group (Open): 9090 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair
- Launch Instance

7) Grafana
8) Grafana
- Create an Ubuntu 20.04 VM instance and call it "Grafana"
- Instance type: t2.micro
- Security Group (Open): 3000 and 22 to 0.0.0.0/0
- Key pair: Select or create a new keypair
- Launch Instance

8) Slack
9) Slack
- Go to the bellow Workspace and create a Private Slack Channel and name it "yourfirstname-jenkins-cicd-pipeline-alerts"
- Link: https://app.slack.com/client/T043JRQBB5L/C044F5PH3DE

9) Configure Promitheus
10) Configure Promitheus
- Login/SSH to your Prometheus Server
- Clone the following repository: https://github.com/awanmbandi/eagles-batch-devops-projects.git
- Change directory to "eagles-batch-devops-projects"
Expand All @@ -72,7 +76,7 @@
- Confirm the status shows "Active (running)"
- Exit

10) Configure Grafana
11) Configure Grafana
- Login/SSH to your Grafana Server
- Clone the following repository: https://github.com/awanmbandi/eagles-batch-devops-projects.git
- Change directory to "eagles-batch-devops-projects"
Expand All @@ -82,7 +86,7 @@
- Confirm the status shows "Active (running)"
- Exit

11) Configure The "Node Exporter" accross the "Dev", "Stage" and "Prod" instances including your "Pipeline Infra"
12) Configure The "Node Exporter" accross the "Dev", "Stage" and "Prod" instances including your "Pipeline Infra"
- Login/SSH into the "Dev-Env", "Stage-Env" and "Prod-Env" VM instance
- Perform the following operations on all of them
- Install git by running: sudo yum install git -y
Expand All @@ -98,7 +102,7 @@
- Prod-EnvPublicIPaddress:9100 (Confirm this page is accessible)
- Exit

12) Configure The "Node Exporter" on the "Jenkins-Maven-Ansible", "Nexus" and "SonarQube" instances
13) Configure The "Node Exporter" on the "Jenkins-Maven-Ansible", "Nexus" and "SonarQube" instances
- Login/SSH into the "Jenkins-Maven-Ansible", "Nexus" and "SonarQube" VM instance
- Perform the following operations on all of them
- Install git by running: sudo yum install git -y (The SonarQube server already has git)
Expand All @@ -114,7 +118,7 @@
- SonarQubePublicIPaddress:9100
- Exit

13) Update the Prometheus config file and include all the IP Addresses of the Pipeline Instances that are
14) Update the Prometheus config file and include all the IP Addresses of the Pipeline Instances that are
running the Node Exporter API. That'll include ("Dev", "Stage", "Prod", "Jenkins-Maven-Ansible", "Nexus" and "SonarQube")
- SSH into the Prometheus instance either using your GitBash (Windows) or Terminal (macOS) or browser
- Run the command: sudo vi /etc/prometheus/prometheus.yml
Expand All @@ -126,7 +130,7 @@
- Confirm that Prometheus is able to reach everyone of your Nodes, do this by confirming the Status "UP" (green)
- Done

14) Open a New Tab on your browser for Grafana also if you've not done so already.
15) Open a New Tab on your browser for Grafana also if you've not done so already.
- Copy your Grafana Instance Public IP and put on the browser with port 3000 e.g "GrafanaPublic:3000"
- Once the UI Opens pass the following username and password
- Username: admin
Expand All @@ -151,15 +155,15 @@
- Refresh your Grafana Dashbaord
- Click on the "Drop Down" for "Host" and select any of the "Instances(IP)"

15) Update Your Jenkins file with your Slack Channel Name
16) Update Your Jenkins file with your Slack Channel Name
- Go back to your local, open your "Jenkins-CICD-Project" repo/folder/directory on VSCODE
- Open your "Jenkinsfile"
- Update the slack channel name on line "97"
- Change name from "jenkins-cicd-pipeline-alerts" to yours
- Add the changes to git, commit and push to GitHub
- Confirm the changes reflects on GitHub

16) Copy your Jenkins Public IP Address and paste on the browser = ExternalIP:8080
17) Copy your Jenkins Public IP Address and paste on the browser = ExternalIP:8080
- Login to your Jenkins instance using your Shell (GitBash or your Mac Terminal)
- Copy the Path from the Jenkins UI to get the Administrator Password
- Run: `sudo cat /var/lib/jenkins/secrets/initialAdminPassword`
Expand All @@ -171,7 +175,7 @@
- Name and Email can also be admin. You can use `admin` all through as we
- Continue and Start using Jenkins

17) Once on the Jenkins Dashboard
18) Once on the Jenkins Dashboard
- Click on "Manage Jenkins"
- Click on "Plugin Manager"
- Click "Available"
Expand All @@ -183,4 +187,4 @@
- Slack Notification
- Install all plugings without restart

18) Confirm and make test your installations/setups
19) Confirm and make test your installations/setups
22 changes: 14 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

Expand Down Expand Up @@ -106,10 +106,16 @@
<version>2.8</version>
</plugin>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>

<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -148,12 +154,12 @@

<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.11</version>
<version>3.0.0</version>
</plugin>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version>
<version>3.0.0</version>
</plugin>

<plugin>
Expand Down