Quantcast
Viewing all articles
Browse latest Browse all 98

Trying out Jenkins

Jenkins seems to be the top code build, integration and QA automation tool to support continuous delivery.

Jenkins allows me to kick of jobs on a schedule or ofter certain events and Jenkins will keep track of the status of the jobs and the results.

To get Jenkins installed,  I read wiki.jenkins-ci.org   and then read biouno.org to try my first Jenkins example.

I installed Jenkins  on one of the VMs from the “landshark” demo environment for Delphix Express. Landshark consists of two Linux Centos VMs that provide source and target examples for Delphix Express. I used the “target” VM but could have just as easily used the “source” machine.

Installing Jenkins

To install Jenkins I did:

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

sudo yum install jenkins

Then

service jenkins start

This gives the message “OK” but actually Jenkins dies. The workaround was to edit /etc/sysconfig/jenkins and change

JENKINS_AJP_PORT="8009"

to

JENKINS_AJP_PORT="8010"

also starting jenkins by hand worked even without workaround

cd /usr/lib/jenkins 
java -jar jenkins.war

I then accessed the Jenkins console at    http://my_linux_vm:8080

Running Jenkins

Click on “create new jobs”

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.13.55 PM

Name the job

Select “Freestyle project”

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.14.17 PM

Schedule the “date” command to be run and every 5 minutes by doing:

  • Fill in “Build Triggers” by checking “Build periodically” and type in “H/5 * * * *”
  • Under build choose “Execute Shell” and type in “echo `date`”

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.15.52 PM

After hitting “Save”, then letting 5 minutes pass you’ll see a new entry in “Build History” in the bottom left. Click on the “#1″.

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.21.27 PM

Then click “Console Output”

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.21.38 PM

and you will see the output of the shell script we scheduled to be run every 5 minutes.

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-23 at 1.21.51 PM

Delphix plugin

Delphix plugin is easy to add. Just navigate to “Manage Jenkins” in the top left

Image may be NSFW.
Clik here to view.
Screen Shot 2016-01-15 at 11.34.17 AM

Then click on “Manage Plugins”

Image may be NSFW.
Clik here to view.
Screen Shot 2016-01-15 at 11.34.27 AM

Then type in “delphix” in the search bar and then click on the “Delphix Jenkins plugin” to install

Image may be NSFW.
Clik here to view.
Screen Shot 2016-01-15 at 11.45.10 AM

Now we can access Delphix APIs through the Jenkins interface. If I access a job (pick a job then click “configure” on the top left, or create a new job) and click  “add build step” under build, you will now see Delphix command options:

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-28 at 12.34.37 PM

Here is a zoom in to the new “Add build step” options:

Image may be NSFW.
Clik here to view.
Screen Shot 2015-12-28 at 12.34.43 PM
Before we can use these build steps, we have to add the Delphix engine(s) to Jenkins.

To add Delphix engine(s) click on “Manage Jenkins” on the top left

Image may be NSFW.
Clik here to view.
jenkins_add_delphix1

Then you should see a long page. In the middle of this page you should see a “Delphix” section

Image may be NSFW.
Clik here to view.
jenkins_add_delphix2

Add the Delphix engine(s) and hit “save” at the bottom of the screen

Image may be NSFW.
Clik here to view.
jenkins_add_delphix3
Now when I add a build step I can choose a Delphix action like “add environment”

Image may be NSFW.
Clik here to view.
Screen Shot 2016-01-15 at 12.05.34 PM
and now I can click “run now” and it adds the environment


Viewing all articles
Browse latest Browse all 98

Trending Articles