User Tools

Site Tools


tech:devops:jenkins:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tech:devops:jenkins:start [2017/10/17 23:42]
rk4n3 created
tech:devops:jenkins:start [2018/12/19 01:39] (current)
rk4n3
Line 1: Line 1:
-====== ​Jenkins Topics ​======+<typo fs:​xx-large;​ fw:​bold>​Jenkins Topics</​typo>​ 
 +====== ​Installation & Configuration ​======
  
 +===== Prerequisites =====
 +  * OpenJDK 8:  ''​yum install java-1.8.0-openjdk-devel''​
 +  * Maven: ​ [[#​maven_installation|see installation instructions below]]
 +
 +===== Jenkins Installation =====
 +Pull the Jenkins repository file and import its GPG key:
 +<​code>​
 +wget -O /​etc/​yum.repos.d/​jenkins.repo http://​pkg.jenkins.io/​redhat-stable/​jenkins.repo
 +rpm --import http://​pkg.jenkins.io/​redhat-stable/​jenkins.io.key
 +</​code>​
 +... then, do a ''​yum update''​ and ''​yum install jenkins''​ \\
 +If the ''​jenkins''​ login isn't locked down off-server:
 +  * Enable login for Jenkins with ''​usermod -s /bin/bash jenkins''​
 +  * Log in as ''​jenkins''​ and create SSH key with:  ''​ssh-keygen -t rsa''​
 +Otherwise:
 +  * Create SSH key for ''​jenkins''​ from root: ''​ssh-keygen -f id_rsa -C "​jenkins@bluejay"''​
 +Open firewall for Jenkins:<​code>​
 +firewall-cmd --permanent --zone=public --add-port=8080/​tcp
 +firewall-cmd --reload
 +</​code>​
 +Remember to ''​systemctl enable jenkins''​ and ''​systemctl start jenkins''​ \\
 +Log in (default login is ''​admin''​ with password ''​admin''​) and change password, add user(s) \\
 +
 +===== Maven Installation =====
 +Get latest maven archive, example:<​code>​wget http://​www-eu.apache.org/​dist/​maven/​maven-3/​3.6.0/​binaries/​apache-maven-3.6.0-bin.tar.gz</​code>​
 +Extract to suitable location and sym-link to it (''/​usr/​maven''​ or ''/​opt/​maven''​) \\
 +Set environment variables in ''/​etc/​profile.d/​maven.sh'':<​code>​
 +export M3_HOME=/​usr/​maven
 +export M2_HOME=${M3_HOME}
 +export PATH=${M3_HOME}/​bin:​${PATH}
 +</​code>​
 +... perform a ''​source /​etc/​profile.d/​maven.sh''​ to get these in current shell.
 +
 +
 +===== Configuration =====
 +
 +==== Environment Variables ====
 +Some environment variables may need to be set at the global level, which can be configured under the "​Manage Jenkins"​ section:
 +  * PATH
 +  * JAVA_HOME
 +  * M3_HOME
 +
 +===== Trivia =====
 +
 +==== CentOS/RHEL Trivia ====
 <​code>​ <​code>​
 wget -O /​etc/​yum.repos.d/​jenkins.repo https://​pkg.jenkins.io/​redhat-stable/​jenkins.repo wget -O /​etc/​yum.repos.d/​jenkins.repo https://​pkg.jenkins.io/​redhat-stable/​jenkins.repo
Line 9: Line 55:
 You will need to explicitly install a Java runtime environment,​ because Oracle'​s Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM. \\ You will need to explicitly install a Java runtime environment,​ because Oracle'​s Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM. \\
 With that set up, the Jenkins package can be installed with: <​code>​yum install jenkins</​code>​ With that set up, the Jenkins package can be installed with: <​code>​yum install jenkins</​code>​
- 
  
tech/devops/jenkins/start.1508301759.txt.gz · Last modified: 2017/10/17 23:42 by rk4n3