RETIRED, Heat templates for deploying OpenStack
Go to file
Michele Baldessari be05b9bc37 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)
(cherry picked from commit 2aa664e458)
2018-09-03 08:12:54 +02:00
ci Lower Ceph PGs count in scenario004 2018-07-18 11:23:49 +02:00
common Default bootstrap_server_id 2018-08-13 17:38:19 +02:00
deployed-server Merge "Use UpgradeInitCommonCommand with deployed-server too" into stable/queens 2018-06-20 16:40:00 +00:00
docker Make redeploy idempotent 2018-09-03 08:12:54 +02:00
docker_config_scripts Improve nova statedir ownership logic 2018-07-25 16:49:52 +02:00
environments Merge "Fix Neutron SFC environment file" into stable/queens 2018-08-21 02:44:36 +00:00
extraconfig IHA Default the compute endpoint check script to internal 2018-08-23 22:18:03 +00:00
firstboot Adding a workaround for enabling steering in ConnectX-3 devices 2018-03-08 07:40:49 +00:00
network Merge "Edit some post update tasks logic" into stable/queens 2018-08-30 14:05:32 +00:00
plan-samples Update default value for derive params workflow inputs 2018-01-15 05:50:47 -05:00
puppet Merge "Use fqdn for live_migration_inbound_addr" into stable/queens 2018-08-31 19:33:53 +00:00
releasenotes Merge "Add role parameter for rx/tx virtio-net queue size" into stable/queens 2018-08-20 18:23:14 +00:00
roles Merge "Make VhostuserSocketGroup param as mandatory for ComputeOvsDpdkRT role" into stable/queens 2018-08-20 09:53:26 +00:00
sample-env-generator Clean up env files for Cinder's Netapp backend 2018-07-16 17:05:05 +00:00
scripts Avoid awk error in hosts-config.sh for large deployments 2017-04-07 10:50:39 +01:00
tools Revert "Delete not-used services-docker files" 2018-07-30 12:39:45 +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-24 05:06:30 +00:00
.gitignore Sample environment generator 2017-06-12 15:02:50 -05:00
.gitreview Update .gitreview for stable/queens 2018-03-03 11:43:08 +00:00
.testr.conf Improve nova statedir ownership logic 2018-07-25 16:49:52 +02:00
LICENSE Add license file 2014-01-20 11:58:20 +01:00
README.rst Merge "fix the scenario chart" into stable/queens 2018-06-01 20:40:28 +00:00
all-nodes-validation.yaml Change template names to queens 2017-11-23 10:15:32 +01: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 queens 2017-11-23 10:15:32 +01:00
capabilities-map.yaml Clean up Cinder backends in capabilities map 2018-05-14 23:35:59 +00:00
config-download-software.yaml Support SshKnownHostsDeployment with config-download 2018-07-12 19:58:40 -04:00
config-download-structured.yaml Support SshKnownHostsDeployment with config-download 2018-07-12 19:58:40 -04:00
default_passwords.yaml Change template names to queens 2017-11-23 10:15:32 +01:00
hosts-config.yaml Change template names to queens 2017-11-23 10:15:32 +01:00
j2_excludes.yaml Remove ipv6 specific network templates 2017-08-31 13:12:17 -07:00
net-config-bond.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-bridge.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-linux-bridge.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-noop.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-static-bridge-with-external-dhcp.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-static-bridge.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-static.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
net-config-undercloud.j2.yaml Render NIC config templates with jinja2 2018-02-13 00:19:37 -08:00
network_data.yaml Add default value for name_lower in network_data.yaml to update ServiceNetMap 2018-06-30 18:57:50 +00:00
network_data_ganesha.yaml Enable management network in network_data 2018-04-23 14:01:59 +00:00
overcloud-resource-registry-puppet.j2.yaml Support SshKnownHostsDeployment with config-download 2018-07-12 19:58:40 -04:00
overcloud.j2.yaml Merge "Support SshKnownHostsDeployment with config-download" into stable/queens 2018-07-16 05:00:57 +00:00
plan-environment.yaml Containers defaults for plan environment 2018-05-28 08:11:24 +00:00
requirements.txt Updated from global requirements 2017-11-16 11:30:33 +00:00
roles_data.yaml Set tuned profile for compute roles 2018-08-16 14:15:20 +05:30
roles_data_undercloud.yaml Add TripleOFirewall service to undercloud roles 2018-02-17 01:42:06 +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-25 16:49:52 +02:00
tox.ini Improve nova statedir ownership logic 2018-07-25 16:49:52 +02: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 non-ha ovh-ha
openshift

X

keystone

X

X

X

X

X

X

X

X

X

glance

rbd

swift

file

rgw

file

file

file

file

cinder

rbd

iscsi
heat

X

X

ironic

X

mysql

X

X

X

X

X

X

X

X

X

neutron

ovs

ovs

ovs

ovs

ovs

ovn

ovs

ovs

neutron-bgpvpn

wip

ovn

X

neutron-l2gw

wip

rabbitmq

X

X

X

X

X

X

X

X

mongodb
redis

X

X

haproxy

X

X

X

X

X

X

X

X

memcached

X

X

X

X

X

X

X

X

pacemaker

X

X

X

X

X

X

X

X

nova

qemu

qemu

qemu

qemu

ironic

qemu

qemu

qemu

ntp

X

X

X

X

X

X

X

X

X

X

snmp

X

X

X

X

X

X

X

X

X

X

timezone

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