edX slides from NYC Ansiblefest

Had a fantastic time at Ansiblefest NYC, kudos to the Ansible team!
A few people asked me for edX slides during happy hour, here they are
- http://goo.gl/U3xNyL

Good read John, thanks for sharing!

I particularly liked the profiling at the end of the play
(N longest running tasks) - is that a straight Ansible plugin,
or is there more to it than that?

It's a little bit more than just a plugin since we are controlling the
Ansible run's output.
What the plugin does is direct the Ansible status updates to a queue
(SQS in AWS) and a python script pulls the messages from the queue to
report the run status in the Jenkins console output.
The python script that polls sqs retrieves the task details and task
timing information so it keeps track of it and prints out a summary at
the end.

This is the plugin that sends messages to sqs -
https://github.com/edx/configuration/blob/master/playbooks/callback_plugins/sqs.py
poll_sqs_ansible() in this python script is what grabs the messages
from sqs - https://github.com/edx/configuration/blob/master/util/vpc-tools/abbey.py#L363

Unfortunately sqs is not guaranteed FIFO so there is sliding window
for messages which results in a delay for seeing the status updates.
We are probably going to move away from SQS and switch to writing a
callback plugin that sends messages to hipchat.

-John

This is pretty easy to get from an API script hitting Tower, for those that are inclined too :slight_smile:

I’ve been using this callback for play times:

https://github.com/jlafon/ansible-profile/blob/master/callback_plugins/profile_tasks.py

John,

Thanks for sharing. I especially enjoyed slide 11 ( https://docs.google.com/presentation/d/1-AaITmG0_d6O7NKXYb8ErOacvqBryFkEI7tHhb43uDo/pub?start=false&loop=false&delayms=3000#slide=id.g181a185a8_06 ) where you detail variable naming; UPPERCASE for overriding, lowercase for internal. Pretty awesome and well thought.

~ Brice

It’s overthinking it IMHO.

Thanks Brian, that's really helpful.