ansible-dk: so that's a thing

20
/ Clinton Wolfe DevOps Practice Lead @clintoncwolfe Ansible-DK: So That's a Thing Now

Upload: clinton-wolfe

Post on 21-Mar-2017

210 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Ansible-DK: So That's a Thing

/ Clinton WolfeDevOps Practice Lead@clintoncwolfe

Ansible-DK:So That's a Thing Now

Page 2: Ansible-DK: So That's a Thing

id clintoncwolfe

• DevOps Consultant

• Config Management Specialist – Chef and Ansible

• Tooling wonk

Page 3: Ansible-DK: So That's a Thing

What is Ansible-DK?

Nautilus Music Automaton by Arthur van Poppel

Page 4: Ansible-DK: So That's a Thing

But Ansible is Simple!

via bestclipart.com

Page 5: Ansible-DK: So That's a Thing

Infrastructure as Code is Scary!

via bestclipart.comvia statesymbols.com

REALITYMARKETING

Page 6: Ansible-DK: So That's a Thing

B A T S

"Batteries Included?"

ansible-lint

TESTING TOOLSIaaS Support

Page 7: Ansible-DK: So That's a Thing

B A T S

Gems AND Pips?

ansible-lint

TESTING TOOLSIaaS Support

Page 8: Ansible-DK: So That's a Thing

Developer Workstations: Nope

awful workstations on pinterest

Page 9: Ansible-DK: So That's a Thing

Omnibus to the Rescue!

B A T S

ansible-lint

RPM

DEB

DMG

/opt/ansible-dk/embedded/…

Page 10: Ansible-DK: So That's a Thing

Omnibus to the Rescue!

B A T S

ansible-lint

RPM

DEB

DMG

/opt/ansible-dk/embedded/…

Page 11: Ansible-DK: So That's a Thing

Chef did it all first!

Page 12: Ansible-DK: So That's a Thing

Imitation is the Sincerest form of Flattery…

wikipedia

Page 13: Ansible-DK: So That's a Thing

Installing and Upgrading

Page 14: Ansible-DK: So That's a Thing

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

Page 15: Ansible-DK: So That's a Thing

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

Page 16: Ansible-DK: So That's a Thing

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)

Page 17: Ansible-DK: So That's a Thing

$ 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

Page 18: Ansible-DK: So That's a Thing

Do you have to do it our way?

via dw.com

Page 19: Ansible-DK: So That's a Thing

Tool X is missing!

inspec ansible-toolkit

Your Suggestions!

Page 20: Ansible-DK: So That's a Thing

/ Clinton WolfeDevOps Practice Lead@clintoncwolfe

Download or Contribute at:ansible-dk.org