Ansible or Jenkins pipelines for bigger jobs

0 votes

At the moment we are using combination of Jenkins pipelines and Ansible playbooks. Usually we end up with short ansible playbooks that are run either inside of Jenkins pipeline or just as a jenkins job.

What would be be better approach for more complicated, multi-step jobs?

For example one job consists of:

  1. Start ec2 instance from AMI
  2. Run migrations
  3. Pull latest code, compile and restart
  4. Create new AMI from temporary instance
  5. Terminate temporary instance

I do like the fact that I can handle user input in Jenkins pipelines as well as the graphic representation of every step in the pipeline. In example above each step would be probably its own little ansible playbook. Passing parameters from playbook to playbook isnt that straight forward, but we know how to do it.

I am not 100% sure if I am doing this up to best standard as during creating these pipelines I am thinking that this should probably be ansible and the other way arounnd.

Can anyone tell me how these two can work together?

Jun 16, 2018 in Jenkins by Atul
• 10,220 points
197 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Well, you are indeed well aware of the limitations that each tool brings to the table,

The sweet spot would be what works the best for you and your company, now, ask yourself which approach would be easier to manage? which one would become too complicated when scaling?

I've done both approaches and found that the pipeline tools from jenkins seem to have the best effect in terms of "readability" and ease of management, this is specially evident when we had the chance to bring new members on the team and they can get a quick overview of the processes just by looking at our pipelines on jenkins,

Now, we have also used a combination of jenkins (just ci) + nexus (artifact management) + octopus (just cd) + ansible (provisioning) to handle everything on complicated pipelines,

Again, ask yourself what would be easier to manage, and what is most likely to grow over time (number of steps on the pipeline, number of pipelines or jobs, number of servers to manage, etc...) and take a decision based on that.

I hope it would help you resolve your query.
answered Jun 16, 2018 by shubham
• 6,640 points

Related Questions In Jenkins

+1 vote
5 answers

Is it possible to shift or move jobs between two jenkins servers?

There are some Jenkins plugins out there ...READ MORE

answered Oct 25, 2018 in Jenkins by akaash
198 views
+2 votes
6 answers
+1 vote
3 answers

Rename jobs from jenkins file

Go to the Configure screen and edit the Project name field ...READ MORE

answered Oct 25, 2018 in Jenkins by Laila
431 views
0 votes
1 answer

Unable to access Jenkins. I newly installed Jenkins but for some reason I cannot access it.

Try changing the port, Change JENKINS_AJP_PORT="xyz" to JENKINS_AJP_PORT="abc" If changing the ...READ MORE

answered Jul 4, 2018 in Jenkins by Sophie may
• 9,330 points
129 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Why is it displaying Jenkins build failure for Android app

I think you should try this. Try Uninstalling ...READ MORE

answered Apr 12, 2018 in Jenkins by shubham
• 6,640 points
183 views
0 votes
2 answers

Is possible for Jenkins to auto start and stop slave nodes?

Try Jenkins Plugin called as Slave SetupPlugin. This ...READ MORE

answered Aug 6, 2018 in Jenkins by Nilesh
• 6,900 points
543 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.