RETIRED, Heat templates for deploying OpenStack
Go to file
Michele Baldessari 2aa664e458 Make redeploy idempotent
Rerunning the overcloud deploy command with no changes restarts a
truckload of containers (first seen this via
https://bugzilla.redhat.com/show_bug.cgi?id=1612960).  So we really have
three separate issues here. Below is the list of all the containers that
may restart needlessly (at least what I have observed in my tests):
A) cron category:
ceilometer_agent_notification cinder_api cinder_api_cron cinder_scheduler
heat_api heat_api_cfn heat_api_cron heat_engine keystone keystone_cron
logrotate_crond nova_api nova_api_cron nova_conductor nova_consoleauth
nova_metadata nova_scheduler nova_vnc_proxy openstack-cinder-volume-docker-0
panko_api

These end up being restarted because in the config volume for the container there is
a cron file and cron files are generated with a timestamp inside:
$ cat /var/lib/config-data/puppet-generated/keystone/var/spool/cron/keystone
...
 # HEADER: This file was autogenerated at 2018-08-07 11:44:57 +0000 by puppet.
...

The timestamp is unfortunately hard coded into puppet in both the cron provider and the parsedfile
provider:
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/cron/crontab.rb#L127
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/parsedfile.rb#L104

We fix this by repiping tar into 'tar xO' and grepping away any line
that starts with # HEADER.

B) swift category:
swift_account_auditor swift_account_reaper swift_account_replicator
swift_account_server swift_container_auditor swift_container_replicator
swift_container_server swift_container_updater swift_object_auditor
swift_object_expirer swift_object_replicator swift_object_server
swift_object_updater swift_proxy swift_rsync

So the swift containers restart because when recalculating the md5 over the
/var/lib/config-data/puppet-generated/swift folder we also include:
B.1) /etc/swift/backups/... which is a folder which over time collects backup of the ringfiles
B.2) /etc/swift/*.gz it seems that the *.gz files seem to change over time

We just add a parameter to the tar command to exclude those files as
we do not need to trigger a restart if those files change.
--exclude='*/etc/swift/backups/*' --exclude='*/etc/swift/*.gz'

C) libvirt category:
nova_compute nova_libvirt nova_migration_target nova_virtlogd

This one seems to be due to the fact that the /etc/libvirt/passwd.db file contains a timestamp and
even when we disable a user and passwd.db does not exist, it gets
created:
[root@compute-1 nova_libvirt]# git diff cb2441bb1caf7572ccfd870561dcc29d7819ba04..0c7441f30926b111603ce4d4b60c6000fe49d290 .

passwd.db changes do not need to trigger a restart of the container se
we can safely exclude this file from any md5 calculation.

Part C) was: Co-Authored-By: Martin Schupper <mschuppe@redhat.com>

We only partial-bug this one because we want a cleaner fix where
exceptions to the files being checksummed will be specified in the tht
service files.

Partial-Bug: #1786065

Tested as follows:
./overcloud_deploy.sh
tripleo-ansible-inventory --static-yaml-inventory inv.yaml
ansible -f1 -i inv.yaml  -m shell --become -a "docker ps --format=\"{{ '{{' }}.Names{{ '}}' }}: {{ '{{' }}.CreatedAt{{ '}}' }}\" | sort" overcloud > before
./overcloud_deploy.sh
ansible -f1 -i inv.yaml  -m shell --become -a "docker ps --format=\"{{ '{{' }}.Names{{ '}}' }}: {{ '{{' }}.CreatedAt{{ '}}' }}\" | sort" overcloud > after
diff -u before after | wc -l
0

Change-Id: I10f5cacd9fee94d804ebcdffd0125676f5a209c4
(cherry picked from commit 42c3f18051)
2018-09-03 08:12:20 +02:00
ci Always enable image prepare service for docker clouds 2018-08-28 05:04:53 +00:00
common Merge "Parallelize server pre and post steps" 2018-08-21 19:03:14 +00:00
deployed-server Always enable image prepare service for docker clouds 2018-08-28 05:04:53 +00:00
docker Make redeploy idempotent 2018-09-03 08:12:20 +02:00
docker_config_scripts Improve nova statedir ownership logic 2018-07-09 17:07:30 +01:00
environments Ceph update and upgrade in config-download era 2018-08-29 08:01:47 +00:00
extraconfig IHA Default the compute endpoint check script to internal 2018-08-23 12:14:40 +02:00
firstboot Change template names to rocky 2018-05-09 08:28:42 +02:00
network Merge "Edit some post update tasks logic" 2018-08-18 20:00:48 +00:00
plan-samples Role specific derive parameters workflow parameter 2018-06-28 08:10:27 -04:00
puppet Merge "Assert container's ssl cert exists before upgrade." 2018-08-22 14:18:16 +00:00
releasenotes Merge "Clarify ironic classic driver removal reno" 2018-08-22 14:06:41 +00:00
roles Always enable image prepare service for docker clouds 2018-08-28 05:04:53 +00:00
sample-env-generator Merge "Disable recursion in Designate-managed BIND" 2018-08-03 00:08:27 +00:00
scripts Cleanup hosts name on initial install 2018-07-09 15:02:08 -06:00
tools Merge "Fix logic around heat output exclusions handling" 2018-08-20 19:26:42 +00:00
tripleo_heat_templates Do not generate apache/haproxy certs for invalid networks 2018-02-08 12:50:04 +00:00
validation-scripts Use ipaddress module 2018-02-27 18:01:21 +01:00
zuul.d import zuul job settings from project-config 2018-08-29 10:16:13 -04:00
.gitignore Sample environment generator 2017-06-12 15:02:50 -05:00
.gitreview Update .gitreview for stable/rocky 2018-08-24 14:44:43 +00:00
.testr.conf Improve nova statedir ownership logic 2018-07-09 17:07:30 +01:00
LICENSE Add license file 2014-01-20 11:58:20 +01:00
README.rst Fix RST syntax (needed by release) 2018-07-25 22:39:40 -04:00
all-nodes-validation.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
babel.cfg Add release configuration. 2013-10-22 17:49:35 +01:00
bindep.txt Add in roles data validation 2017-07-07 09:51:40 -06:00
bootstrap-config.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
capabilities-map.yaml Merge "Add networking-ansible ML2 plugin support" 2018-07-05 17:44:05 +00:00
config-download-software.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
config-download-structured.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
default_passwords.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
hosts-config.yaml Change template names to rocky 2018-05-09 08:28:42 +02:00
j2_excludes.yaml Remove ipv6 specific network templates 2017-08-31 13:12:17 -07:00
lower-constraints.txt add lower-constraints job 2018-04-20 16:10:28 -04:00
net-config-bond.j2.yaml DnsServers using get_attr 2018-07-14 09:19:12 +02:00
net-config-bridge.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-linux-bridge.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-noop.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-standalone.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-static-bridge-with-external-dhcp.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-static-bridge.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-static.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
net-config-undercloud.j2.yaml Add per-network routes to NIC templates 2018-07-30 09:53:30 +02:00
network_data.yaml Fix typo in network_data files 2018-08-20 08:25:15 +02:00
network_data_ganesha.yaml Fix typo in network_data files 2018-08-20 08:25:15 +02:00
network_data_routed.yaml Fix typo in network_data files 2018-08-20 08:25:15 +02:00
overcloud-resource-registry-puppet.j2.yaml Always enable image prepare service for docker clouds 2018-08-28 05:04:53 +00:00
overcloud.j2.yaml Merge "Add BlacklistedIpAddresses stack output" 2018-08-17 11:30:36 +00:00
plan-environment.yaml Add name and description fields to plan-environment.yaml 2017-04-12 17:25:40 +02:00
requirements.txt Add validation for hiera interpolation in services 2018-04-18 10:11:39 +02:00
roles_data.yaml Always enable image prepare service for docker clouds 2018-08-28 05:04:53 +00:00
roles_data_undercloud.yaml Merge "Break out image prepare into its own "service"" 2018-08-10 02:31:33 +00:00
setup.cfg Drop deprecated templates/Makefile/merge.py 2015-11-25 15:00:13 -05:00
setup.py Updated from global requirements 2017-03-28 13:03:01 +00:00
test-requirements.txt Improve nova statedir ownership logic 2018-07-09 17:07:30 +01:00
tox.ini Update UPPER_CONSTRAINTS_FILE for stable/rocky 2018-08-24 14:44:46 +00:00

README.rst

Team and repository tags

image

tripleo-heat-templates

Heat templates to deploy OpenStack using OpenStack.

Features

The ability to deploy a multi-node, role based OpenStack deployment using OpenStack Heat. Notable features include:

  • Choice of deployment/configuration tooling: puppet, (soon) docker
  • Role based deployment: roles for the controller, compute, ceph, swift, and cinder storage
  • physical network configuration: support for isolated networks, bonding, and standard ctlplane networking

Directories

A description of the directory layout in TripleO Heat Templates.

  • environments: contains heat environment files that can be used with -e

    on the command like to enable features, etc.

  • extraconfig: templates used to enable 'extra' functionality. Includes

    functionality for distro specific registration and upgrades.

  • firstboot: example first_boot scripts that can be used when initially

    creating instances.

  • network: heat templates to help create isolated networks and ports
  • puppet: templates mostly driven by configuration with puppet. To use these

    templates you can use the overcloud-resource-registry-puppet.yaml.

  • validation-scripts: validation scripts useful to all deployment

    configurations

  • roles: example roles that can be used with the tripleoclient to generate

    a roles_data.yaml for a deployment See the roles/README.rst for additional details.

Service testing matrix

The configuration for the CI scenarios will be defined in tripleo-heat-templates/ci/ and should be executed according to the following table:

- scn000 scn001 scn002 scn003 scn004 scn006 scn007 scn009 scn010 non-ha ovh-ha
openshift

X

keystone

X

X

X

X

X

X

X

X

X

X

glance

rbd

swift

file

rgw

file

file

file

file

file

cinder

rbd

iscsi
heat

X

X

ironic

X

mysql

X

X

X

X

X

X

X

X

X

X

neutron

ovs

ovs

ovs

ovs

ovs

ovn

ovs

ovs

ovs

neutron-bgpvpn

wip

ovn

X

neutron-l2gw

wip

om-rpc rabbit rabbit

amqp1

rabbit rabbit rabbit rabbit rabbit rabbit
om-notify rabbit rabbit rabbit rabbit rabbit rabbit rabbit rabbit rabbit
mongodb
redis

X

X

haproxy

X

X

X

X

X

X

X

X

X

memcached

X

X

X

X

X

X

X

X

X

pacemaker

X

X

X

X

X

X

X

X

X

nova

qemu

qemu

qemu

qemu

ironic

qemu

qemu

qemu

qemu

ntp

X

X

X

X

X

X

X

X

X

X

X

snmp

X

X

X

X

X

X

X

X

X

X

X

timezone

X

X

X

X

X

X

X

X

X

X

X

sahara

X

mistral

X

swift

X

aodh

X

X

ceilometer

X

X

gnocchi

rbd

swift

panko

X

X

barbican

X

zaqar

X

ec2api

X

cephrgw

X

tacker

X

congress

X

cephmds

X

manila

X

collectd

X

fluentd

X

sensu-client

X

designate

X

octavia

X

X