Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Jenkins Setup TDD

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

I

GCTMS Jenkins Setup

Technical Design Document


Version 1.0

Statement of Confidentiality

This document is proprietary and confidential property of Western Union Financial Services, Inc. and/or
its affiliates (Western Union). It is intended solely for use by employees and agents of Western
Union and shall not be reproduced or disclosed to any other party without the express written consent of
Western Union. The use, disclosure, reproduction, modification, transfer, or transmittal of this work for
any purpose in any form or by any means without the written permission of Western Union is strictly
prohibited.
CONFIDENTIAL, UNPUBLISHED PROPERTY OF WESTERN UNION FINANCIAL SERVICES, .USE
AND DISTRIBUTION LIMITED SOLEY TO AUTHORIZED PERSONNEL.

Western Union Financial Services, Inc. 2016. All Rights Reserved

The controlled master of this document is available on-line. Hard copies of this document are for
information only and are not subject to document control.
Document Revision History

Date Version Modification Author


18-05-16 1.0 Initial Draft Ayesha Khan
Table of Contents
1) Jenkins Binary .................................................................................................... Error! Bookmark not defined.
2) Jenkins URL ....................................................................................................... Error! Bookmark not defined.
3) Jenkins logins ...................................................................................................... Error! Bookmark not defined.
4) Granting access ................................................................................................................................................... 22
5) Outbound Connectivity Requirements ................................................................................................................ 22
1) Jenkins Binary
Download Jenkins Binary from https://jenkins.io/download/ from Internet.

Click Download Jenkins Button


Download Long Term Support Release Binary LTS Release for Redhat Linux
Operation System.

Download Jenkins-1.651.1.-1.1.noarch.rmp from Jenkins Website.


2) Install Jenkins Binary in 10.45.16.247 Machine

Copy the Jenkins Binary Jenkins-1.651.1.-1.1.noarch.rmp from Local Desktop to 10.45.16.247


Machine.

Install the Jenkins Binary in /apps directory through root user.

Note:-

Jenkins Binary install through root user only

[root@WUWVC2ASJEN01 apps]# cd /apps


[root@WUWVC2ASJEN01 apps]# ls -lrt
total 62912
drwxr-xr-x 2 root root 69 Apr 7 09:13 logs
-rwxrwxr-x 1 webadm webadm 64421637 May 5 09:24 jenkins-1.651.1-
1.1.noarch.rpm
[root@WUWVC2ASJEN01 apps]# rpm -ivh jenkins-1.651.1-1.1.noarch.rpm
warning: jenkins-1.651.1-1.1.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID
d50582e6: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:jenkins-1.651.1-1.1 ################################# [100%]

3) Check Installed Jenkins Version in 10.45.16.247 Machine

By default Jenkins installed in /var/lib directory path


We can able to check the Installed Jenkins Version in
/var/lib/jenkins/config.xml file

rpm -qa | grep -i jenkins

4) Jenkins Service automatically added in init.d directory


The Jenkins Service automatically added in /etc/init.d/Jenkins file.

5) Start & Stop Jenkins Service in Linux Machine


[root@WUWVC2ASJEN01 ~]#service jenkins start (only execute through root
user)

[root@WUWVC2ASJEN01 ~]#service jenkins stop (only execute through root


user)
6) Access Jenkins Admin Console in IE Browser

Check the 8080 port number is listening in 10.45.16.247 Machine.

By default Jenkins listening 8080 port

http://10.45.16.247:8080

The 8080 Port number is blocked by WU-Internet Firewall.

Then we have to raise firewall request to Network Team to open 8080 port in WU
Internal. WU Network Team to open 8080 Port from WU Internal to 10.45.16.247.
Then we can verify through telnet command in WU windows Jump Server 172.31.8.60.

C:\Users\TEMP.HQINTL1.035>telnet 10.45.16.247 8080


The page goes to blank page. It shows Jenkins server admin port number is opened
in WU Internal.

Jenkins Admin Console Home Page:-


7) Change the Jenkins Home Path to /apps directory

The Jenkins Server Home Path is configured in /etc/sysconfig/jenkins file

Before:-

JENKINS_HOME="/var/lib/jenkins"

After:-

JENKINS_HOME="/apps/jenkins"

Change the JENKINS_HOME path to /apps/Jenkins directory. Then restart the Jenkins Service by using

[root@WUWVC2ASJEN01 ~]# service jenkins stop

[root@WUWVC2ASJEN01 ~]# service jenkins start

8) Change the Jenkins User to webadm userid


Jenkins Server by default installed jenkins userid. This Jenkins userid is configured in
/etc/sysconfig/jenkins file

Before:-

JENKINS_USER=jenkins"

After:-

JENKINS_USER="webadm"

Change the JENKINS_USER to webadm id in /etc/sysconfig/jenkins file . Then restart the Jenkins
Service by using
[root@WUWVC2ASJEN01 ~]# service jenkins stop

[root@WUWVC2ASJEN01 ~]# service jenkins start

If you check the Jenkins process in Linux Machine by using

ps ef|grep jenkins

Jenkins Admin Console URL:-

http://10.45.16.247:8080/

9) Install JDK 1.8 version in Jenkins Server

Download Oracle JDK 1.8 64bit version from Oracle Website jdk-8u91-linux-x64.tar.gz

http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jre-8u91-oth-JPR
Copy the Oracle JDK 1.8 64bit binary to /var/lib SUN_JDK_1.8/ path.

Then install Oracle JDK 1.8 version in /var/lib SUN_JDK_1.8/ path


Copy the IBM JDK 1.8 64bit binary to /var/lib IBM_JDK_1.8/ path.

Then install IBM JDK 1.8 version in /var/lib IBM_JDK_1.8/ path

We have checked installed JDK version is 1.8.0.91 (64bit)


Jenkins Manage Jenkins Configure System JDK

10) Install Maven 3.3.9 Version in Jenkins Server

Download Maven 3.3.9 Version from Maven Apache Website apache-maven-3.3.9-bin.zip

https://maven.apache.org/download.cgi
Copy apache-maven-3.3.9-bin.zip binary to Jenkins Server /var/lib/maven path

Install the Maven 3.3.9 in /var/lib/maven/ Path.

Check installed Maven version.

Create maven.sh script in /etc/profile.d path

Jenkins Manage Jenkins Configure System Maven


11) Configure SMTP in Jenkins admin console Jenkins Server
Request Network team to open firewall port 25 for SMTP Servers to Jenkins Server

SMTP Servers:-

RESTON Data Center:-

smtpva.prod.wudip.com - 10.44.16.251 and 10.44.16.252

CHICAGO Data Center:-

smtpch.prod.wudip.com - 10.46.16.251 and 10.46.16.252

Then check SMTP server ipaddress with port number 25 in Jenkins Server for Reston & Chicago Data
Centre SMTP Servers

[webadm@WUWVC2ASJEN01 ~]$ telnet 10.44.16.252 25


[webadm@WUWVC2ASJEN01 ~]$ telnet 10.46.16.251 25
[webadm@WUWVC2ASJEN01 ~]$ telnet 10.44.16.251 25
[webadm@WUWVC2ASJEN01 ~]$ telnet 10.46.16.252 25
Requesting to WU-Messing to White List Jenkins Server Ipaddress 10.45.16.247 for sending
mail through Reston & Chicago SMTP Servers.

12) Configure Proxy Setting in Jenkins Server for Internet Access

Configure Western Union Charlotte Forward Proxy (172.27.96.235:8080) in Jenkins Admin


Console for Internet Access
Charlotte Forward Proxy: 10.44.20.93:80

Request Network Team to open fireware port number from Jenkins Server to Charlotte Forward
Proxy (10.44.20.93:8080)

Verify Charlotte Forward Proxy Port number is opened from Jenkins Server

[webadm@WUWVC2ASJEN01 ~]$ telnet 172.27.96.235 8080

http://10.45.16.247:8080/

Jenkins Manage Jenkins -> Advance (option)


We can able to check Test URL in Jenkins Admin Console Proxy Configuration Page.

Test URL : https://repo.maven.apache.org/maven2/

Then Client the Validate Proxy Button. If the result shows Success then Jenkins Server able to connect
Maven URL.

13) Configure SSH-KEYGEN in Jenkins Server for without asking


password login into remote machine.

Step 1: Create public and private keys using ssh-key-gen on WUWVC2ASJEN01

[webadm@WUWVC2ASJEN01 ~]$ ssh-keygen


Generating public/private rsa key pair.
Enter file in which to save the key /home/webadm/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Press enter key]
Your identification has been saved in /home/webadm/.ssh/id_rsa.
Your public key has been saved in /home/webadm/.ssh/id_rsa.pub.
The key fingerprint is:
33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 webadm@WUWVC2ASJEN01

Step 2: Copy the public key to remote-host using ssh-copy-id

[webadm@WUWVC2ASJEN01 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host


webadm@remote-host's password:
Now try logging into the machine, with "ssh 'remote-host'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Note: ssh-copy-id appends the keys to the remote-hosts .ssh/authorized_key.

id_rsa RSA Private Key

id_rsa.pub RSA Public Key

Copy the id_rsa private key in Jenkins Admin Console

Jenkins Manage Jenkins Configure Sytems Publish over SSH


Configure DEV Jboss Server for SSH Server Configuration

14) Configure SVN URL in Jenkins Admin Console.


We have to raise firewall request to Network Team for SVN Source URL
https://cvs1.wuintranet.net from Jenkins Server.

https://cvs1.wuintranet.net/repos/GCTMS/trunk

Jenkins GCTMS-CSCApp-Jars-Build Configure Source Code Management

We have to raise firewall request to Network Team for SVN Source URL
http:// git.wuintranet.net from Jenkins Server.
15) Granting access
To grant access for a particular user, on the left side of the screen click Manage Jenkins Configure Global Security.
Under the Matrix-based security in Authorization, there is a field for User/group to add. Enter the name of the
user you wish to authorize, and click Add. Then check the flags in the matrix that the user will need access to, e.g.
Administer.

16) Outbound Connectivity Requirements


Jenkins will require access to the following URLs:
1) SVN Repository - https://cvs1.wuintranet.net/repos/GCTMS
2) Maven Central Repository - https://repo.maven.apache.org/maven2/

You might also like