Documente Academic
Documente Profesional
Documente Cultură
D O C K E R ( / TA G / D O C K E R / ) J H I P S T E R ( / TA G / J H I P S T E R / ) D E V O P S ( / TA G / D E V O P S / )
A colleague recently introduced me to GoCD (https://www.gocd.org/) and explained some of its benefits and
why they prefer it for Continuous Delivery in their organization. I've used a number of popular CI/CD
products and wanted to give it a try. My colleague presented GoCD as a strong contender when seeking
Continuous Delivery and Pipelines for development software development. I will present a shallow dive into
this automation software while using a JHipster (http://www.jhipster.tech/) application as my artifact.
Terminology
GoCD has some typical abstractions for an automation server with extra cool stuff thrown in.
Resources - Tagging. For this demonstration, I've tagged my agents with "Java" and "Docker".
Environments - Isolation for pipelines and agents. Objects in one environment cannot be used in another.
Task - Smallest pipeline unit. A single command to be run, like a shell command.
Pipeline - Multiple stages that deliver your artifact. The first-class object of GoCD!
Material - Something that drives a pipeline. Very powerful and interesting feature of GoCD. Pipelines can be
material for other pipelines. Stages can be material for multiple pipelines which offers more options for
parallelism.
Value Stream Map - The visual representation of the CI/CD workflow. Another powerful feature that allows
a top-down view of multiple pipelines running and consuming each other as material.
Containers
http://blog.ippon.tech/gocd-with-jhipster/ 1/6
22/01/2018 GoCD with JHipster
So that these containers could communicate with each other, I added them to the bridge network and used
IP address instead of service discovery.
For Nexus set up, I created Docker repositories. One was used as a private registry and another was created
to proxy all of the images from Docker Hub.
Maven was used to build the Java artifact and the Docker image with Spotify's Dockerfile-Maven plugin
(https://github.com/spotify/dockerfile-maven).
-v /var/run/docker.sock:/var/run/docker.sock
This shares my host machine Docker socket with the container. After installing the Docker client inside the
container, it can use this connection to manage Docker on the host. It was used to stop, destroy, and create
JHipster app containers during my testing. I really like using this trick to simulate a Continuous Delivery
Pipeline as it made artifact delivery super smooth. This isn't secure so I don't recommend trying this on prod.
Infra
The Pipeline
Mapping out the steps before jumping into the GoCD server:
After some tinkering on the GoCD server, I created a JHipster environment, an Ippon pipeline group, and
added my pipeline to them. I also added another pipeline for checking the Docker socket functionality.
My Pipelines
http://blog.ippon.tech/gocd-with-jhipster/ 2/6
22/01/2018 GoCD with JHipster
Creating a new pipeline requires a name, group, material, initial stage, job, and task. From there it was just
plugging in the rest of my tasks.
When I began building the pipeline tasks, I really appreciated the command lookup tool.
Lookup Commands
Completed Tasks
http://blog.ippon.tech/gocd-with-jhipster/ 3/6
22/01/2018 GoCD with JHipster
When building out my pipeline I initially had a bunch of failures related to my Docker configuration. Fixing
these required many reruns of the job and subsequent failures. While that was frustrating, it was cool seeing
the graph that GoCD creates to visualize stage duration and success.
Stage Graph
Despite these setbacks, my pipeline was quickly successful and JHipster was delivered happily to his
ephemeral home in a Docker container.
Conclusions
This automation tool seems very powerful and perfect for those seeking a lot of parallelism in their pipelines
but I was unable to tap this potential. My tasks were able to fit inside a single job, inside a single stage. UI
navigation was a little convoluted, as I had to drill down into the pipeline, stage, and job to edit my tasks.
The console logging was very intermittent and slow compared to other automation servers. This was
complicated by what I felt was a lack of visual representation for my pipeline.
http://blog.ippon.tech/gocd-with-jhipster/ 4/6
22/01/2018 GoCD with JHipster
Above is the Value Stream Map for my pipeline while running. This doesn't convey enough information for
my tastes. The VSM is great for displaying large, interconnected pipelines and materials but suffers when
tasked to represent single pipelines.
I've built many pipelines but few so complex that I felt GoCD would have been my first choice for
implementing them. When approaching CI/CD I think it is best to look for the right tool for the job. GoCD is
still a strong contender if your job is highly complex and full of opportunities to utilize its first-class support
for parallelism.
NEWSLETTER
For our news update, subscribe to our newsletter! You can unsubscribe anytime. RECENT POST
Email address
GoCD with
JHipster
Jan 8, 2018
First name
(/gocd-with-
jhipster/)
Last name
Company
Go
(/twitter-mining/)
(/chatbot-questions/)
(http://blog.ippon.tech)
WE ARE IPPON
(http://www.ippon.tech/careers/)
(https://www.facebook.com/sharer/sharer.php?u=http://blog.ippon.tech/gocd-with-jhipster/)
(https://twitter.com/share?text=GoCD%20with%20JHipster&url=http://blog.ippon.tech/gocd-with-jhipster/)
(https://plus.google.com/share?url=http://blog.ippon.tech/gocd-with-jhipster/)
http://blog.ippon.tech/gocd-with-jhipster/ 5/6
22/01/2018 GoCD with JHipster
(http://www.digg.com/submit?url=http://blog.ippon.tech/gocd-with-jhipster/)
(http://www.linkedin.com/shareArticle?mini=true&url=http://blog.ippon.tech/gocd-with-jhipster/)
(/author/athrockmorton/)
RI C HM OND, VA
OUR COMPANY
Ippon Technologies is an international consulting firm that specializes in Agile Development, Big Data and DevOps / Cloud.
Our 300+ highly skilled consultants are located in the US, France and Australia. Ippon technologies has a $32 million
revenue and a 20% annual growth rate.
USA WE BSI T E ( HTT P: // W WW.I PP ON. F R) LI NK ED IN (H T TPS: //W WW.L IN KE DIN .CO M/COM PA NY/ I PPO N -T EC HN OLO GY )
Next Post
Twitter Mining: Winning By Design
(/twitter-mining/)
Sort by Best
Recommend 2 ⤤ Share
LOG IN WITH
OR SIGN UP WITH DISQUS ?
Name
Spark & Kafka - Achieving zero data-loss Results from Spring 5 Webflux Performance
2 comments • a year ago Tests - Ippon Technologies
Alexis Seigneurin — Hi Rafael,This is a good 5 comments • 6 months ago
question! I actually had to dig through the code Rossen Stoyanchev — Thanks for the detailed
again to remember how this worked!It is true … experiment and write-up! A few things around the
scenarios and also expectations could be …
http://blog.ippon.tech/gocd-with-jhipster/ 6/6