ansible-dk: so that's a thing
TRANSCRIPT
/ Clinton WolfeDevOps Practice Lead@clintoncwolfe
Ansible-DK:So That's a Thing Now
id clintoncwolfe
• DevOps Consultant
• Config Management Specialist – Chef and Ansible
• Tooling wonk
What is Ansible-DK?
Nautilus Music Automaton by Arthur van Poppel
But Ansible is Simple!
via bestclipart.com
Infrastructure as Code is Scary!
via bestclipart.comvia statesymbols.com
REALITYMARKETING
B A T S
"Batteries Included?"
ansible-lint
TESTING TOOLSIaaS Support
B A T S
Gems AND Pips?
ansible-lint
TESTING TOOLSIaaS Support
Developer Workstations: Nope
awful workstations on pinterest
Omnibus to the Rescue!
B A T S
ansible-lint
RPM
DEB
DMG
/opt/ansible-dk/embedded/…
Omnibus to the Rescue!
B A T S
ansible-lint
RPM
DEB
DMG
/opt/ansible-dk/embedded/…
Chef did it all first!
Imitation is the Sincerest form of Flattery…
wikipedia
Installing and Upgrading
ADK Mode
$ eval $(ansible-dk shell-init bash)
export PATH="/opt/ansible-dk/bin:/Users/clinton/.ansible-dk/pyt…export GEM_ROOT="/opt/ansible-dk/embedded/lib/ruby/gems/2.1.0"export GEM_HOME="/Users/clinton/.ansible-dk/gem/ruby/2.1.0"export GEM_PATH="/Users/clinton/.ansible-dk/gem/ruby/2.1.0:/opt/…export PYTHONUSERBASE="/Users/clinton/.ansible-dk/python"export PIP_INSTALL_OPTION="--user"
$ which ansible/opt/ansible-dk/bin/ansible
Generator
$ ansible-dk generate repo –e iaas=awsUsing generator playbook at ~/.ansible-dk/generator/repo.yamlPLAY [create entire repo]TASK: [skeleton | git init]
changed: [localhost]TASK: [skeleton | template ansible.cfg]
changed: [localhost]...
$ tree.git/ ....gitignore.kitchen.yamlansible.cfginventories/ec2.pyinventories/ec2.iniroles/provisioning/tasks/main.yamlsite.yaml
Test-Kitchen Integration$ kitchen test-----> Starting Kitchen (v1.6.0)----->
Creating <nginx-centos7>...EC2 instance <i-f1a04176> created.
Going to invoke ansible-playbook with:ansible-playbook nginx.yaml
PLAY [testing "nginx" role]TASK: [nginx | Install nginx]
changed: [localhost]TASK: [nginx | Enable nginx service]
changed: [localhost]
Package "nginx"should be installed
Port "80" should be listening
-----> Destroying <nginx-centos7>EC2 instance <i-db8e6f5c> destroyed.
Kitchen is finished. (4m53.32s)
$ kitchen test-----> Starting Kitchen (v1.6.0)----->
Creating <nginx-centos7>...EC2 instance <i-f1a04176> created.
Going to invoke ansible-playbook with:ansible-playbook nginx.yaml
PLAY [testing "nginx" role]TASK: [nginx | Install nginx]
changed: [localhost]TASK: [nginx | Enable nginx service]
changed: [localhost]
Package "nginx"should be installed
Port "80" should be listening
-----> Destroying <nginx-centos7>EC2 instance <i-db8e6f5c> destroyed.
Kitchen is finished. (4m53.32s)
Test-Kitchen Integration
Edit
Create
ConvergeTest
Destroy
Do you have to do it our way?
via dw.com
Tool X is missing!
inspec ansible-toolkit
Your Suggestions!
/ Clinton WolfeDevOps Practice Lead@clintoncwolfe
Download or Contribute at:ansible-dk.org