Codemotion 2015

Post on 22-Jan-2018

235 views 2 download

Transcript of Codemotion 2015

Ansible by exampleCAS2015

MeOperations

@TicketbisEng

Ticket marketplace

1M Tickets over 50 countries

90M € in 2015

David González

@penguinjournals

Ansible

- IT automation, provision, deploy, ad hoc commands

- Agentless

- Python + SSH

- From basics to full control

Task1https://github.com/penguinjournals/ansible-101/blob/master/task1/task1.md

NO software improvement,

just tech porn.

Inventory and configuration file

- Gather all your machines

- Group them

- Use it to run commands against single or multiple machines

Task2https://github.com/penguinjournals/ansible-101/blob/master/task2/task2.md

Improvement:

- Your infrastructure is documented

- Groups of hosts, no ssh cowboys

Modules, tasks, plays, playbooks

- Modules are used to control system resources

http://docs.ansible.com/ansible/modules.html

- Plays map tasks to roles

- Playbooks are descriptions of the desired state of your systems

http://docs.ansible.com/ansible/playbooks_intro.html

- Repeatable and reliable

Task3https://github.com/penguinjournals/ansible-101/blob/master/task3/task3.md

Improvement:

- Setup documented

- Setup is the same in all hosts

- Setup is repeatable in new hosts

USE VERSION CONTROL

Roles

- DRY, reusable pieces of playbooks with a defined purpose (common, nginx,

tomcat)

- Good practice: separate setup roles from application deployment roles

Task4https://github.com/penguinjournals/ansible-101/blob/master/task4/task4.md

Improvement:

- Reutilization at infrastructure level

- DRY

Application deployment

- http://www.ansible.com/application-deployment

Task5https://github.com/penguinjournals/ansible-101/blob/master/task5/task5.md

Improvement:

- Automated deployments

- Push button deployments

Cloud

- Dynamic inventories, default and custom

- Amazon cloud modules (Amazon AWS, GCE, Azure, DigitalOcean, Linode...)

http://docs.ansible.com/ansible/list_of_cloud_modules.html

Task6https://github.com/penguinjournals/ansible-101/blob/master/task6/task6.md

Improvement:

- Autoescalable deployment

- Integrate cloud management in

deployment tasks

From adhoc

commands, to full

management of your

infrastructure.

Resources

- http://www.ansible.com/resources

- http://docs.ansible.com/ansible/modules.html

- https://galaxy.ansible.com

- https://groups.google.com/forum/#!forum/ansible-project

- https://www.google.com

WE ARE HIRING!

itjobs@ticketbis.com