210 likes | 245 Views
Learn about Ansible, Cobbler, and their role in modern warfare, rendering farms, and Wall Street. Understand key commands for Cobbler configuration and system management, as well as Ansible properties and architecture for efficient deployment and orchestration. Case studies include top supercomputers and DNS root.
E N D
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 cfengine capistrano/fabric Deployment
Cobbler • Before configuration, there must be OS • PXE tree management • DHCP, DNS • Yum Repos • Power • Lightweight CMDB
Some Cobbler Users • Top 500 Supercomputers • DNS root serves for .com and .net • Modern Warfare • Render farms • Wall Street
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
Ansible • A year old today. • 1100+ followers on github • Top 10 New OSS Projects of 2012
Several Tools In One • Configuration (cfengine, Chef, Puppet) • Deployment (Capistrano, Fabric) • Ad-Hoc Tasks (Func) • Multi-Tier Orchestration (Juju, sort of)
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
Focus: Orchestration • Rolling Updates • Multi-tier: Web Tier, DB Tier, Content Tier • Monitoring, Outage Windows • Load Balancing, Pools • Email, REST, Logging, Interaction, etc
Inventory File [webservers] asdf.example.com [dbservers] jkl.example.com mnop.example.com
External Inventory • Cobbler • OpenStack • EC2 or Eucalyptus Cloud • Etc
Basic Task Example • ansible durham -m ping • ansible webservers -m service -a “name=httpd state=restarted” --limit durham
- 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
__________________________________ < TASK: [write app configuration] > --------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || ok: [127.0.0.1]
API import ansible.runner import sys # construct the ansible runner and execute on all hosts results = ansible.runner.Runner( pattern='*', forks=10, module_name='command', module_args='/usr/bin/uptime', ).run()
Questions?@laserllamamichael.dehaan@gmail.comcobbler.github.comansible.ccQuestions?@laserllamamichael.dehaan@gmail.comcobbler.github.comansible.cc