Assumptions
- Ubuntu 14.04 64-bit
- within VirtualBox 4.3.20
- on Windows 7 64-bit
- Apache Maven 3.2.3 is installed
- Git is installed
- Java is installed
Outline
- Install Jenkins
- Installing the Github Plugin
- Configuring Jenkins
- System: Adding paths to Maven, Java and Git
- Security: Change the default logon
Installing Jenkins on Ubuntu
The Advanced Packaging Tool (APT) works with core libraries to handle the installation and removal of software on Debian Linux distros. APT comes with multiple utilities, including apt-get.
The apt-get utility is used to perform installation of new software packages, removing existing software packages, upgrading of existing software packages and even used to upgrading the entire operating system. The apt-get utility has a list of sources that it connects to for the purpose of downloading software.
To download Jenkins, we'll need to augment the list of sources that apt-get knows about it. First, we need a public key from the jenkins site. We'll grab this key, and add it to the apt-keys utility.
1. Adding the Jenkins Key
sudo su
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
The wget command will download this key from the server and add it to the list of apt-keys.
2. Creating a Sources List for Jenkins
echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list
3. Update the APT cache
Now, we only have to update apt's cache before we can install Jenkins
apt-get update
As the cache has been updated we can proceed installing Jenkins. Note that Jenkins has a big bunch of dependencies, so it might take a few moments to install them all.
apt-get install jenkins
4. Verification
Verify Installation
http://localhost:8080/
Jenkins requires a few minutes to initialize:Installing the Git Plugin
The Github plugin is not installed by default with Jenkins.
Browse to the Jenkins start page at http://localhost:8080 and select
Manage Jenkins > Manage Plugins > Available
Click on the "Available" tag and type "GitHub Plugin" in the Filter text box:
Select this and proceed with the plugin installation.n
Jenkins Configuration
Jenkins may require additional configuration information.
Jenkins > Manage Jenkins > Configure System
Within the configuration page, specify the paths to
a local Java installation:
a local Maven installation:
a local Git installation:
Jenkins likewise offers the ability to install these tools automatically, if they do not already exist within your development environment.
Troubleshooting
- Git Plugin Integration
- Trigger: Adding a repository URL
- Message: Failed to connect to repository : Could not init /tmp/hudson/...
- Solution: Git was not installed locally
- Reference(s):
References
- Installing Jenkins
- Restarting Jenkins
- http://stackoverflow.com/questions/8072700/jenkins-manual-restart
- sudo /etc/init.d/jenkins restart
- Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload}
Nice post. Well written. Keep updating Devops Online Course
ReplyDeleteGREAT topic! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep sharing… DevOps Online Training
ReplyDeleteDevOps Training
DevOps Online Training
ReplyDeleteGreat Blog.very interesting and informative Blog...
Docker Online Training
Kubernetes Online Training
This is very helpfull Blog!! Thankyou.
ReplyDeleteDevOps Training
DevOps Online Training