ansible & cobbler

20
Ansible & Cobbler Triangle Devops, Feb 2013

Upload: kalia-cantrell

Post on 30-Dec-2015

88 views

Category:

Documents


0 download

DESCRIPTION

Ansible & Cobbler. Triangle Devops, Feb 2013. About Me. NCSU 2001 IBM / Adaptec, Integrian Red Hat Puppet Labs, WebAssign, rPath, Cisco. Ansible & Cobbler, In Context. OS Provisioning. Red Hat Satellite. cobbler. Task Exec. virt-factory. func. ansible. OS Config. puppet. chef. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Ansible & Cobbler

Ansible & CobblerTriangle Devops, Feb 2013

Page 2: Ansible & Cobbler

About Me

•NCSU 2001

•IBM / Adaptec, Integrian

•Red Hat

•Puppet Labs, WebAssign, rPath, Cisco

Page 3: Ansible & Cobbler

Ansible & Cobbler, In Context

cobblercobblerRed Hat Red Hat SatelliteSatellite

cfenginecfenginepuppepuppe

tt chefchef

ansiblansiblee

funcfuncvirt-factoryvirt-factory

capistrano/capistrano/fabricfabric

OS Provisioning

OS Config

Deployment

Task Exec

Page 4: Ansible & Cobbler

Cobbler•Before configuration, there must be

OS

•PXE tree management

•DHCP, DNS

•Yum Repos

•Power

•Lightweight CMDB

Page 5: Ansible & Cobbler

Some Cobbler Users

•Top 500 Supercomputers

•DNS root serves for .com and .net

•Modern Warfare

•Render farms

•Wall Street

Page 6: Ansible & Cobbler

Some Commands•cobbler import --name=Fedora18 --

path=/mnt/dvd

•cobbler system add --name=foo --mac= AA:BB:CC:DD:EE:FF --ip=2.2.2.2 --profile= Fedora18-x86_64

•cobbler system edit --name=foo --netboot-enabled=1

•cobbler system reboot --name=foo

Page 7: Ansible & Cobbler

Ansible

•A year old today.

•1100+ followers on github

•Top 10 New OSS Projects of 2012

Page 8: Ansible & Cobbler

Several Tools In One

•Configuration (cfengine, Chef, Puppet)

•Deployment (Capistrano, Fabric)

•Ad-Hoc Tasks (Func)

•Multi-Tier Orchestration (Juju, sort of)

Page 9: Ansible & Cobbler

Properties•Minimal learning curve, auditability

•No bootstrapping

•No DAG ordering, Fails Fast

•No agents (other than sshd) - 0 resource consumption when not in use

•No server

•No additional PKI

•Modules in any language

•YAML, not code

•SSH by default

•Strong multi-tier solution

Page 10: Ansible & Cobbler

Architecture

Page 11: Ansible & Cobbler

Focus: Orchestration

•Rolling Updates

•Multi-tier: Web Tier, DB Tier, Content Tier

•Monitoring, Outage Windows

•Load Balancing, Pools

•Email, REST, Logging, Interaction, etc

Page 12: Ansible & Cobbler

Inventory File

[webservers]asdf.example.com

[dbservers]jkl.example.com

mnop.example.com

Page 13: Ansible & Cobbler

External Inventory

•Cobbler

•OpenStack

•EC2 or Eucalyptus Cloud

•Etc

Page 14: Ansible & Cobbler

Basic Task Example

•ansible durham -m ping

•ansible webservers -m service -a “name=httpd state=restarted” --limit durham

Page 15: Ansible & Cobbler

- hosts: all user: mpdehaan sudo: True

tasks:

- name: ntp should be installed yum: name=ntp state=present

- name: template ntp.conf template: src=ntp.conf.j2 dest=/etc/ntp.conf notify: - restart ntpd

- name: ntp should be running/enabled service: name=ntp state=running enabled=yes

handlers:

- name: restart ntpd service: name=ntpd state=restarted

Page 16: Ansible & Cobbler

__________________________________ __________________________________ < TASK: [write app configuration] >< TASK: [write app configuration] > --------------------------------- --------------------------------- \ ^__^\ ^__^ \ (oo)\_______\ (oo)\_______ (__)\ )\/\(__)\ )\/\ ||----w |||----w | || |||| ||

ok: [127.0.0.1]ok: [127.0.0.1]

Page 17: Ansible & Cobbler

Fireball Mode

Page 18: Ansible & Cobbler

Pull Mode

Page 19: Ansible & Cobbler

API

import ansible.runnerimport sys

# construct the ansible runner and execute on all hostsresults = ansible.runner.Runner(    pattern='*', forks=10,    module_name='command', module_args='/usr/bin/uptime',).run()

Page 20: Ansible & Cobbler

Questions?

@[email protected]

cobbler.github.comansible.cc