making a robust installer for linux server applications with puppet modules
TRANSCRIPT
Packstack
Derek HigginsSenior Software EngineerRed Hat
Packstack
A utility that uses Puppet modules to deploy various parts of OpenStack on multiple pre-installed servers over SSH.
RDO
a freely-available, community-supported distribution of OpenStack that runs on Red Hat Enterprise Linux, Fedora, and their derivatives.
RDO
Makes it easy to install and deploy the most up-to-date OpenStack components.
Packages Openstack components and versions of their dependencies that are known to work together.
Provides you with installation tools to simplify Openstack installation
Packstack
1. sudo yum install -y http://...2. sudo yum install -y openstack-packstack3. packstack --allinoneor3. packstack --gen-answer-file
Overview
Pythonuser interactionsparsing answerfilegenerate puppet manifestscoordinate puppet tasks
ssh (multiple hosts)
puppetpuppet apply- in series on each host- multiple hosts done in parallel (where possible)
RDO Openstack packages
Packstack Plugins
One per component
Responsible for Registering config directives
Minimal script on hosts
Generating puppet manifest
Nova plugin : Config Directives
{"CMD_OPTION": "novaconductor-host", "USAGE" : "The IP address of the server on which to install the Nova Conductor service", "PROMPT": "Enter the IP address of the Nova Conductor service", "OPTION_LIST" : [], "VALIDATORS": [validators.validate_ip, validators.validate_ssh], "DEFAULT_VALUE" : utils.get_localhost_ip(), "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME" : "CONFIG_NOVA_CONDUCTOR_HOST", "USE_DEFAULT" : False, "NEED_CONFIRM": False, "CONDITION" : False },
Nova plugin : Config Directives
{"CMD_OPTION": "nova-db-passwd", "USAGE" : "The password to use for the Nova to access DB", "PROMPT": "Enter the password for the Nova DB access", "OPTION_LIST" : [], "VALIDATORS": [validators.validate_not_empty], "DEFAULT_VALUE" : uuid.uuid4().hex[:16], "MASK_INPUT": True, "LOOSE_VALIDATION": False, "CONF_NAME" : "CONFIG_NOVA_DB_PW", "USE_DEFAULT" : True, "NEED_CONFIRM": True, "CONDITION" : False },
Nova plugin : script
server = utils.ScriptRunner(host) cmd = "ip addr show dev %s" server.append(cmd % (device, device)) server.execute()
Nova plugin : puppet manifest
def createkeystonemanifest(config): manifestfile = "%s_keystone.pp"%controller.CONF['CONFIG_KEYSTONE_HOST'] manifestdata = getManifestTemplate("keystone_nova.pp") appendManifestFile(manifestfile, manifestdata)
class {"nova::keystone::auth": password => "%(CONFIG_NOVA_KS_PW)s", public_address => "%(CONFIG_NOVA_API_HOST)s", admin_address => "%(CONFIG_NOVA_API_HOST)s", internal_address => "%(CONFIG_NOVA_API_HOST)s", cinder => true,}
keystone_nova.pp
Puppet plugin : applying modules
Copy modules and manifests to all hosts
Apply groups of manifests in parallelDon't run in parallel on same hosts
Monitor for log file
Search log file for errors
Continue to next group of manifests
Puppet modules used
Stackforge Modulescinder glance horizon keystone neutron nova openstack swift
Otherapache concat firewall inifile memcached mysql qpid rsync ssh stdlib sysctl vlan xinetd
MySQL
Create Users
Create Databases
Configure Access
Keystone
PKI default token format
Admin / Demo / Per Service users
Services / Endpoints created
Compulsory Service
Glance
Api / Registry same host
Populated with cirros image
Nova
Controller / Service per Host
1+ nova compute hosts
libvirt kvm / qemu
tunes compute nodes (virtual-host profile)
Networking
nova FlatDHCP
nova VLAN
Neutron
L2 pluginsLinuxbridge
openvswitch
Namespace enabled kernel
Cinder
Backends :lvm/iscsi
gluster (havana)
nfs
Lvm/iscsi Creates Sample 20G cinder-volumes VG
Volume/Scheduler/API same host only
Swift
Single proxy
Multiple storage hosts
Multiple storage devices
Configurable ring
Horizon
Http / Https options
os-client
Client libraries / cli's installed
Admin and demo rc files
Nagios
Nrpe
MonitorsLoad
disk usage (/var)
Keystone
Glance
Nova
Cinder
Swift
Other
Iptables Filters
sebools
Coming Soon
Heat
Ceilometer
More Info
Packstack --help
http://openstack.redhat.com/
http://openstack.redhat.com/Quickstart
https://github.com/stackforge/packstack
MeEmail : [email protected]
Twitter : @bethehokie
Freenode : derekh