Is Ansible a replacement for a CI tool like Hudson / Jenkins?

Recently at our company, we decided to use Ansible for deployment and continuous integration. But when I started using Ansible, I did not find modules for creating Java projects with Maven or modules for running JUnit or JMeter tests.

So, I'm in a dubious state: maybe I'm using Ansible incorrectly.

When I looked at Jenkins, he can do things like build, run tests, deploy. The downside to Hudson is creating / deleting an instance in cloud environments like AWS.

So, in general, for what purpose do we need to use Ansible / Jenkins? For CI, do I need to use a combination of Ansible and Jenkins?

Please shed light on the proper use of Ansible.

+42
hudson jenkins ansible
Sep 15 '14 at 7:20
source share
2 answers

First, Jenkins and Hudson are basically the same project. I will call it Jenkins below. See How to choose between Hudson and Jenkins? , Hudson vs. Jenkins in 2012 and What is the most noticeable difference between Jenkins and Hudson from a user perspective? for more.

Secondly, Ansible should not be a continuous integration mechanism. It (usually) does not poll git repositories and runs builds that don't work reasonably.

When can I just use Jenkins?

If your machine environment and deployment process is very simple (for example, Heroku or hardware that is configured outside of your team), Jenkins might be enough. You can write a custom script that deploys as the final build step (or chain).

When can I just use Ansible?

If you only need to "deploy" without the need for assembly / testing, Ansible may be enough. For example, you can start deployment from the command line or using Ansible Tower. This is great for small projects, static sites, etc.

How do they work together?

A good combination is to use Jenkins to create, test, and save artifacts. Add a step to invoke Ansible or Ansible Tower to handle the actual deployment process. This allows Ansible to process the machine configuration and allows Jenkins to process the CI process.

What are the alternatives to Jenkins?

I highly recommend Thoughtworks Go (not to be confused with Go the language) instead of Jenkins. Others include CruiseControl, TravisCI and Integrity.

+71
Sep 15 '14 at 17:14
source share

Ansible is just an “illustrious SSH loop”. CI is not only working software, but also the entire process of managing success and failure, who receives the notification and how merging is combined into targeted version control.

If we focus only on software, CI is a reactive trigger scheduler with code changes and launches the typical sequence of "validation-release-release-deploy-deploy" "steps".

So with regard to Ansible software without additional “sugaring,” it’s just a toolkit for launching things that may be the very steps, but this is not CI. The indifferent (without the tower) is completely devoid of this reactive nature.

If you want to marry Ansible with CI, you can.

Ansible tower is a very promising scheduler, but if you need CI software, I think you don't need it. Any CI application that can run a shell script will be able to run Ansible playbooks.

However, unlike Ansible tower, CI tools are known to display test reports of all test frameworks, trigger notifications, etc.

A strong tower can make sense in a complex environment with a large number of groups touching Ansible code ... True, I did not see any real reason to pay for it. But if the manager liked the web interface, nothing can stand, "but others use it."

I suspect the Ansible Tower concept was in response to the puppetry.

:)

+1
Mar 15 '17 at 12:29
source share



All Articles