Hi Ansible folks!
Cross posting here from the Vagrant and Packer mailing lists, because I
thought that people on the Ansible mailing list would probably have really
great ideas to share with me.
I am really enjoying my current workflow with Ansible. I love it because it
models my Dev workflow, almost precisely, thereby getting me close to the
"infrastructure as code" nirvana.
We just wrapped up CITCON Zagreb [footnote:x] where I was talking to other
DevOps folks about how they use Ansible. There were some interesting ideas!
I wanted to ask on this mailing list what other people are doing. I would
love any feedback.
1. Pickup story to automate deployment of something
2. Write broken acceptance test (in something like Cucumber)
1. Put acceptance test in "In Progress" bucket [footnote:xx]
3. Write broken functional test (in something like Serverspec)
4. Write just enough code to make it pass - Vagrant + Ansible +
Virtualbox
5. Refactor - Good sense and Fowler's patterns
6. Run my pre-commit build - Packer + Ansible + AWS (or whatever target
platform)
7. Commit/push - Git (or VCS of choice)
8. Go to step 3, until acceptance test passes
9. Review with customer, maybe go back to step 2
10. Move acceptance test into the "Complete" bucket
11. Story complete
At step 7, of course, my CI server picks up the change and sends it through
the following stages of my pipeline:
1. Checkout from Git
2. Runs Vagrant+Ansible+AWS
1. Executes functional tests - Serverspec - 0% tolerance for broken tests
2. Executes "Complete" Acceptance tests against the Vagrant instance
- 0% tolerance for breakages
3. Executes "In Progress" Acceptance tests against the Vagrant
instance - reporting on results and fail if a test passes [footnote:xxx]
3. Runs Packer+Ansible+AWS
1. Execute functional tests - 0% tolerance for broken tests
2. Execute Acceptance tests - 0% tolerance for all "Complete" and "In
Progress" acceptance tests [footnote:xxxx]
4. Alerts the world that a fresh new AMI is ready to consume!
There would be more Continuous Delivery related steps, but I will leave
those off for brevity.
Thoughts? Is this what other people are doing?
Sincerely,
PJ (Paul Julius)
Footnotes:
----
x. Continuous Integration and Testing Conference (
http://citconf.com/zagreb2014, specifically http://citconf.com/zagreb2014)
xx. Note that I also use a "Ready" bucket for acceptance tests written in
advance of the story being worked on, though I generally discourage that
practice as "Lean waste".
xxx. Ivan Moore brought up a good point that our CI pipelines should catch
when an acceptance test goes green, but we don't expect it to. If it goes
green, that really means the work is done, and it should be moved into the
"Complete" bucket.
xxxx. Though the stage will break for the duration of the Story, I don't
want the image to be made available in an interim stage, so I stop it from
going out until all the acceptance tests are completed. In principal, I
like this model, but have at times published interim AMIs for people to
play with.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/04a8f823-a804-492a-ae9b-71ea5680fef3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.