summaryrefslogtreecommitdiff
path: root/hot/software-config/elements/README.rst
blob: 7fe09a434c61a4a806944731b8b71b051508d479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
============================
Software configuration hooks
============================

.. warning::
  All hooks (heat agents) in heat-templates repository are deprecated,
  please use hooks in `heat-agents https://git.openstack.org/cgit/openstack/heat-agents` instead.
  Here is document entry for heat-agents: `https://docs.openstack.org/heat-agents/latest/`

This directory contains `diskimage-builder <https://github.com/openstack/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 <https://github.com/openstack/tripleo-image-elements>`_
repository. These elements will build an image which uses
`os-collect-config <https://github.com/openstack/os-collect-config>`_,
`os-refresh-config <https://github.com/openstack/os-refresh-config>`_, and
`os-apply-config <https://github.com/openstack/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-templates.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-templates/hot/software-config/elements
  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