Writing A New Puppet OpenStack Module Like A Rockstar Emilien - - PowerPoint PPT Presentation

writing a new puppet openstack module
SMART_READER_LITE
LIVE PREVIEW

Writing A New Puppet OpenStack Module Like A Rockstar Emilien - - PowerPoint PPT Presentation

Writing A New Puppet OpenStack Module Like A Rockstar Emilien Macchi Software Engineer @ Red Hat OpenStack Summit - Barcelona 2016 Agenda Puppet OpenStack project How to contribute Building a new module Get our hands dirty!


slide-1
SLIDE 1

Writing A New Puppet OpenStack Module Like A Rockstar

Emilien Macchi

Software Engineer @ Red Hat

OpenStack Summit - Barcelona 2016

slide-2
SLIDE 2

Agenda

  • Puppet OpenStack project
  • How to contribute
  • Building a new module
  • Get our hands dirty!
  • Questions
slide-3
SLIDE 3

Puppet OpenStack project

slide-4
SLIDE 4

OpenStack is (very) complex to deploy.

Source: docs.openstack.org

slide-5
SLIDE 5

This happens when you deploy OpenStack without automation tools...

slide-6
SLIDE 6

?

slide-7
SLIDE 7

“The Puppet modules for OpenStack bring scalable and reliable IT automation to OpenStack cloud deployments.”

Source: OpenStack governance

slide-8
SLIDE 8

Puppetize OpenStack

MySQL RabbitMQ Keystone

  • penstacklib
  • penstack_extras

sysctl concat inifile ntp memcached corosync apt python firewall apache Barbican Ceilometer Cinder Gnocchi Designate Glance Heat Horizon Ironic Cloudkitty Aodh Magnum Manila Mistral Murano Neutron Nova

Rally Panko Sahara Congress Watcher Swift Trove Zaqar Tempest

Source: Puppetconf talk with Colleen Murphy

slide-9
SLIDE 9
  • Manage Keystone resources (endpoints, service)
  • Manage database(s) (MySQL or PostgreSQL)
  • Manage service(s) configuration:

○ Oslo sections ○ Keystone section ○ Specific to the service

  • API service under WSGI with Apache
  • Manage all other services
  • Highly composable and documented

Puppet module composition

slide-10
SLIDE 10

Example

include ::mysql include ::keystone include ::keystone::wsgi::apache include ::keystone::roles::admin

slide-11
SLIDE 11
  • Unit tests (RSpec)
  • Beaker tests
  • Integration tests
  • OpenStack installers:

○ TripleO ○ Fuel

Testing

slide-12
SLIDE 12

How to contribute

slide-13
SLIDE 13

Multiple ways to help

  • Give feedback (IRC, e-mails, Launchpad)
  • Write code: bugfix, features
  • Improve documentation
  • Increase testing coverage
  • Help in troubleshooting (IRC, e-mails)
  • ...
slide-14
SLIDE 14

Contribute to Puppet OpenStack

  • Join us on IRC (#puppet-openstack on freenode)
  • Setup your OpenStack account

○ http://docs.openstack.org/infra/manual/developers.html

  • Subscribe to openstack-dev mailing-list, [puppet] tag
  • Participate to weekly meetings
  • Report bugs on Launchpad
slide-15
SLIDE 15

Building a new module

slide-16
SLIDE 16
slide-17
SLIDE 17

Don’t create the module on your own Github.

slide-18
SLIDE 18
slide-19
SLIDE 19

Steps

  • Check if module already exists
  • Communicate about this new module (IRC, e-mail)
  • Add project to openstack/governance and openstack-infra/project-config
  • Run cookiecutter to generate the Puppet module
  • Services adjustments
  • Deploy!

docs.openstack.org/developer/puppet-openstack-guide/new-module.html

slide-20
SLIDE 20

Cookiecutter

Generate module with script Adjust manifests Review process

  • Clone cookiecutter
  • Run script
  • Change ports
  • Adjust service name
  • Require Gerrit

account

  • First iteration of

module

slide-21
SLIDE 21

Anatomy of a generated Puppet module

  • Manifest to deploy Keystone resources
  • Manifest to deploy databases (MySQL and PostgreSQL)
  • Manifest to configure logging
  • Basic structure for unit and functional tests
  • Reno support (release notes)
  • Puppet dependencies (Gemfile, Rakefile, spec_helper, metadata.json, etc)
slide-22
SLIDE 22

Demo

slide-23
SLIDE 23

Thank you :-) emilien@redhat.com