ansible

15
Freelance software engineer with a passion in automation @tizianoperrucci Working mostly for Startups often with Thursday, November 14, 13

Upload: tizianoperrucci

Post on 10-May-2015

342 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Ansible

Freelance software engineer with a passion in automation

@tizianoperrucci

Working mostly for Startupsoften with

Thursday, November 14, 13

Page 2: Ansible

Ansible

A push model to avoid architectural overhead

Thursday, November 14, 13

Page 3: Ansible

A tool that combines

Ad hoc task execution

Configuration management

Multi-node software deployment

Thursday, November 14, 13

Page 4: Ansible

Main characteristics

Agentless: manages nodes over SSH

Modular: shipped with a module library

Uses YAML to describe systems

Requires only Python ≥ 2.4

Thursday, November 14, 13

Page 5: Ansible

Tools’ diversity

Thursday, November 14, 13

Page 6: Ansible

Pros for not having Agents

Zero bootstrapping

Avoid server and agent compatibility problems

Avoid ‘thundering herd’

No daemons -> Improved resource utilization

Thursday, November 14, 13

Page 7: Ansible

Security

Ansible has a very low attack surface

Just relying on SSH

Log in remotely as any user account

Credential segregation

Thursday, November 14, 13

Page 8: Ansible

[webservers]vm1vm2vm3

$ ansible-playbook -i hosts site.yml

---- hosts: webservers user: tiziano

tasks: - name: What is it? command: uname -a

hosts: site.yml:

Thursday, November 14, 13

Page 9: Ansible

Ansible Modules

Programs that can control system resources or execute system commands

Modules are packaged with arguments and transferred to the host machine

Ansible executes and removes them in one action

The result is sent back in JSON

Thursday, November 14, 13

Page 10: Ansible

TasksConditionals

Handlers

VariablesTemplates

...

What else Ansible offers?

Thursday, November 14, 13

Page 11: Ansible

roles/ common/ # this hierarchy represents a "role" tasks/ # main.yml # <-- tasks file can include smaller files if warranted handlers/ # main.yml # <-- handlers file templates/ # <-- files for use with the template resource ntp.conf.j2 # <------- templates end in .j2 files/ # bar.txt # <-- files for use with the copy resource foo.sh # <-- script files for use with the script resource vars/ # main.yml # <-- variables associated with this role

Ansible Roles

Thursday, November 14, 13

Page 12: Ansible

Continuous Deployment

Release early, release often

Shorter feedback cycles

Thursday, November 14, 13

Page 13: Ansible

The Continuous Integration systemwill invoke an Ansible playbook upon a

successful build.

Thursday, November 14, 13

Page 14: Ansible

CLI for deployment based mostly on Ansible

Bring simplicity and prudence when dealing with multiple IaaS providers

Prudentia®

Thursday, November 14, 13

Page 15: Ansible

Thanks!

All the resources used in this presentation are available here:

https://github.com/TizianoPerrucci/devops-ansible

Thursday, November 14, 13