Thursday, May 12, 2016

How to continuously integrate with Jenkins

Hi there!

"Continuous integration" gets thrown around a lot, but what does it really mean?

Unless you've been in a development role, it can be a little hard to define.

In short, it's a service that will automatically try to merge developer branches and test them before they are integrated into the main project code.

It's all in the effort to detect issues before they can cause real problems.

Let's get started then!

Jenkins is a time-tested tool for managing build servers, and by natural extension, continuous integration as well.

Jenkins can look a little ugly, but it gets the job done!
First, provision a server with any OS of your choosing. (Jenkins has some options now!)

Next, follow the instructions on the Jenkins site to download for your OS.

Install and let me know if you have any issues!  At the time of writing, Jenkins is now releasing v2.3 which has major changes to the setup process.

After changing the admin password, you have the option to install some suggested plugins, which is what makes Jenkins the most flexible CI tool! I highly recommend it!

One of the plugins installed is git integration, so you can easily link a Github repository with a freestyle project.

One plugin I've used in the past is the pull request builder, a great integration for larger teams where you'll want finer controls over what's being built and why.

That's really it!  Make sure to (build if necessary, and) run your test suite during the jenkins job and finally package and store to application it in your build repository for easy deployment later!

Let me know if you experience any funny business during setup and I'll add more to this guide, enjoy!

How to integrate a Ruby script into ZeroMQ

Hey there!

I'm going to walk you through the steps of integrating a basic Ruby script into a microservice architecture.

Microservices are typically managed via REST HTTP calls or a message queue.

In this example, I'll be using ZeroMQ a speedy message queue.

Be sure to understand what microservices are before we get too far into it!

First, let's make an example Ruby script to integrate.

This is an hello world example taken from the ZeroMQ documentation.

Here's the corresponding server side response.

As you can see, there's little overhead that you must include for a functioning message queue operating a simple request response pattern.

Give it a try, and let me know your thoughts!