Steve Baker b6dfdf8e99 Delete containers based on labels, not state files
This rewrites 50-heat-docker-cmd to not require any state directory to
make decisions on what containers to delete. Instead the labels on the
running containers are used to make decisions on when containers
should be deleted.

This also changes the behaviour to ignore the config name and strictly
use the config id, so all containers for a given config id are deleted
when that config no longer appears in the list of configs. This maps
correctly to heat's software deployment model and allows a future
change to properly implement replace_on_change[1] behaviour.

Containers created with an older docker-cmd (or create any other way)
will never be deleted by 50-heat-config-docker-cmd. This will result
in docker run failures when unique container names are re-used and
will require manual intervention to delete the old containers before
continuing.

[1] http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::SoftwareConfig-prop-inputs-*-replace_on_change

Change-Id: Iaf56c2b5fcb4969ce09480742f13a04d35bd2bae
2017-02-20 14:24:50 -05:00
2017-01-04 16:57:10 +01:00
2017-01-04 16:57:10 +01:00
2017-01-04 16:57:10 +01:00
2017-01-13 11:37:47 -05:00
2017-01-25 16:15:23 +01:00
2017-01-25 16:15:23 +01:00
2017-01-25 16:15:23 +01:00
2017-01-04 16:57:10 +01:00

Software configuration hooks

This directory contains diskimage-builder elements to build an image which contains the software configuration hook required to use your preferred configuration method.

These elements depend on some elements found in the tripleo-image-elements repository. These elements will build an image which uses os-collect-config, os-refresh-config, and os-apply-config together to invoke a hook with the supplied configuration data, and return any outputs back to heat.

When building an image only the elements for the preferred configuration methods are required. The heat-config element is automatically included as a dependency.

An example fedora based image containing all hooks can be built and uploaded to glance with the following:

git clone https://git.openstack.org/openstack/diskimage-builder.git
git clone https://git.openstack.org/openstack/tripleo-image-elements.git
git clone https://git.openstack.org/openstack/heat-agents.git
git clone https://git.openstack.org/openstack/dib-utils.git
export PATH="${PWD}/dib-utils/bin:$PATH"
export ELEMENTS_PATH=tripleo-image-elements/elements:heat-agents/
diskimage-builder/bin/disk-image-create vm \
  fedora selinux-permissive \
  os-collect-config \
  os-refresh-config \
  os-apply-config \
  heat-config \
  heat-config-ansible \
  heat-config-cfn-init \
  heat-config-docker-compose \
  heat-config-kubelet \
  heat-config-puppet \
  heat-config-salt \
  heat-config-script \
  -o fedora-software-config.qcow2
openstack image create --disk-format qcow2 --container-format bare fedora-software-config < \
  fedora-software-config.qcow2
Description
OpenStack Orchestration (Heat) Agents
Readme 2 MiB
Languages
Python 95.6%
Shell 4.4%