Ansible and OpenStack

Installing OpenStack

Base System

  • Bare Metal
  • Cloud instances
  • Docker?

System Dependencies

  • Managed manually
  • Package deps
  • Baked images

Service Dependencies

  • SQL Database
  • AMQP Messaging

OpenStack Installation Source

  • Packages
  • Venvs
  • Git repos

OpenStack Installation Order

  • No order per se
  • Keystone first
  • glance, nova, neutron, cinder, swift, heat, horizon, etc
  • setup services in keystone
  • add images, flavors, networks, volume types

Ansible Best Practices

Arranging Content

  • Cleanly separated roles
  • Generic default data in roles
  • Explicit site data loaded externally
  • Thematic tags
  • Protection around disruption
  • Apply roles via groups

Execution

  • Dev/CI/Test installs should mirror Prod
  • Consider RBAC frontends like Jenkins or Tower
  • Logging is your friend

Scaling

  • Crank up the forks
  • Provide stage vs deploy capability
  • Beware of API limits
  • Dynamic inventory with facts provided

Upgrading OpenStack

Reuse content

  • Use the same roles
  • Orchestrate them as needed
  • Orchestrate the restarts

Upgrade Order

  • Loose order between services
    • Beware of cross project features
    • Beware of shared userland changes
  • Order important WITHIN services
    • Nova is the complicated example

Database Migrations

  • Painful for Nova (prune deleted content)
  • Service interruption
  • Rolling back is... difficult

OpenStack Ansible Resources

Complete Systems

  • Ursula (Blue Box)
    • https://github.com/blueboxgroup/ursula
  • Stackforge os-ansible-deployment (Rackspace Private Cloud)
    • https://github.com/stackforge/os-ansible-deployment

Modules

  • Upstream
    • A ton on the way https://github.com/ansible/ansible-modules-extras/pull/92
  • 3rd party
    • https://github.com/openstack-ansible/openstack-ansible-modules

People

  • #ansible (Freenode)
  • #openstack-operators (Freenode)
  • ops midcycle-meetups
  • ops track at summit

Ansible and OpenStack

By Jesse Keating

Ansible and OpenStack

Some thoughts on deploying OpenStack with Ansible

  • 2,229