Security Group and Key pair

Security Group and Keypair

For this project we gonna create Three Security group one is for Jenkins, another one is for Nexus and the last one is for Sonar.

 We can be in any location for this project. am still in N-virginia.

Key pair----> Create key pair--- Name: Ci-vprofile-key---- File format: Pem (If your using putty them choose PPk, am using git so am choosing Pem) ---- Create key pair.

Private key downloaded we gonna use this single key for all three server.

Create Security Group

We Need to create Three security group let see how to create security group

security group---> Create security group---- Security group name: vprofile-jenkins-sg----Description: Security group for jenkins---vpc: Choose default vpc-----  Inbound rules.

Inbound rules: Edit inbound rules.

Type: Custom TCP---- Port range: 8080 ---- source:MY IP

Type:Custom TCP--- Port range: 22------ Source: MY IP---------Create Security Group.

Now we create security group for Nexus server

security group---> Create security group---- Security group name: vprofile-nexus-sg----Description: Security group for nexus---vpc: Choose default vpc-----  Inbound rules.

Inbound rules: Edit inbound rules.

Type: Custom TCP---- Port range: 8081 ---- source:MY IP

Type: Custom TCP---- Port range: 8081 ---- source: from jenkins security group

Type:Custom TCP--- Port range: 22------ Source: MY IP---------Create Security Group.

Now we create security group for sonar server

security group---> Create security group---- Security group name: vprofile-sonar-sg----Description: Security group for sonar---vpc: Choose default vpc-----  Inbound rules.

Inbound rules: Edit inbound rules.

Type: Custom TCP---- Port range: 80 ---- source:MY IP

Type: All traffic---- Port range: All  ---- source:Sonar security group itself.

Type:Custom TCP--- Port range: 80------ Source:Jenkins security group ---------Create Security Group.


EC2 Instance

Install Jenkins Instance

Instance---Launch Instance--For jenkins we gonna use Ubuntu 18--- choose ubuntu 18---- choose t2 small not micro--- Add User data in the below box---storage 8 is enough-- Add tag----Add storage: select existing storage group:Jenkins Server ---- Review and Launch.


Copy the public ip of Jenkins instance and paste it in website :8080  it will bring it in to jenkins site but we need administrator password for that we need to log into ssh go to 

Github root director---- try ssh -i <mentioned where your pem key is) Desktop/ci-vprofile-key.pem ubuntu@<public `ip address>

it will bring into root of ubuntu 18 instance copy the path from jenkins and paste it to github  try the command cat and path then click enter it will generate password copy that password and paste it in jenkins site.


Install selected plugins-----Create First admin User-- Username: admin----Password: you can give any password confirm Password: *****----Full name: Deepika k------E-mail address:***** ------- save and continue.---- Start jenkins. 


Install Nexus instance

Instance---Launch Instance--For Nexus we gonna use Centos 7--- choose Centos 7---- choose t2 medium not micro--- Add User data in the below box---storage 8 is enough-- Add tag----Add storage: select existing storage group:Nexius Server ---- Review and Launch.


Copy the public ip of Nexius instance and paste it in website :8081  it will bring it in to Nexus site now we need to sign in copy the path and paste it in github to get the password.

Github root director---- try ssh -i <mentioned where your pem key is) Desktop/ci-vprofile-key.pem ubuntu@<public ip address>

it will bring into root of Centos 7 instance copy the path from Nexus sigin and paste it to github  try the command cat and path then click enter it will generate password copy that password and paste it in Nexus site.

Our Nexus server is successful sign in Create Repositories (we gonna create three repo maven center, Maven group and maven release)

Create Repositories---maven2(hosted)--- Name: vprofile-release--- Create Repository.

Create Repositories---maven2(Proxy)--- Name: vprofile-maven-central ---Proxy Remote storage: https://repo1.maven.org/maven2/ Create Repository.

Create Repositories---maven2(group)--- Name: vprofile-maven -group----Available: member: ---vprofile-maven-central, maven-release---Create Repository.

Create Repositories---maven2(hosted)--- Name: vprofile-snapshot-----Version Policy: instead of release we gonna add Snapshot ----- Create Repository.





Install selected plugins-----Create First admin User-- Username: admin----Password: you can give any password confirm Password: *****----Full name: Deepika k------E-mail address:***** ------- save and continue.---- Start jenkins. 


Install Sonar instance

Instance---Launch Instance--For Nexus we gonna use Centos 7--- choose Centos 7---- choose t2 medium not micro--- Add User data in the below box---storage 8 is enough-- Add tag----Add storage: select existing storage group:Nexius Server ---- Review and Launch.