1 heat_template_version: ocata
4 OpenStack containerized Ironic Conductor service
9 default: 'tripleoupstream'
11 DockerIronicConductorImage:
13 default: 'centos-binary-ironic-conductor:latest'
15 DockerIronicConfigImage:
17 default: 'centos-binary-ironic-pxe:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
37 type: ./containers-common.yaml
40 type: ../../puppet/services/ironic-conductor.yaml
42 EndpointMap: {get_param: EndpointMap}
43 ServiceNetMap: {get_param: ServiceNetMap}
44 DefaultPasswords: {get_param: DefaultPasswords}
48 description: Role data for the Ironic Conductor role.
50 service_name: {get_attr: [IronicConductorBase, role_data, service_name]}
53 - get_attr: [IronicConductorBase, role_data, config_settings]
54 # to avoid hard linking errors we store these on the same
55 # volume/device as the ironic master_path
56 # https://github.com/docker/docker/issues/7457
57 - ironic::drivers::pxe::tftp_root: /var/lib/ironic/tftpboot
58 - ironic::drivers::pxe::tftp_master_path: /var/lib/ironic/tftpboot/master_images
59 - ironic::pxe::tftp_root: /var/lib/ironic/tftpboot
60 - ironic::pxe::http_root: /var/lib/ironic/httpboot
61 - ironic::conductor::http_root: /var/lib/ironic/httpboot
62 step_config: &step_config
63 get_attr: [IronicConductorBase, role_data, step_config]
64 service_config_settings: {get_attr: [IronicConductorBase, role_data, service_config_settings]}
65 # BEGIN DOCKER SETTINGS
68 puppet_tags: ironic_config
69 step_config: *step_config
73 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
75 /var/lib/kolla/config_files/ironic_conductor.json:
76 command: /usr/bin/ironic-conductor
78 - path: /var/lib/ironic
88 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
94 expression: $.data.common.concat($.data.service)
96 common: {get_attr: [ContainersCommon, volumes]}
98 - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
99 - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
100 - /lib/modules:/lib/modules:ro
104 - /var/lib/ironic:/var/lib/ironic
106 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
108 - name: create ironic persistent data directory
110 path: /var/lib/ironic
112 - name: stat /httpboot
114 register: stat_httpboot
115 - name: stat /tftpboot
117 register: stat_tftpboot
118 - name: stat /var/lib/ironic/httpboot
119 stat: path=/var/lib/ironic/httpboot
120 register: stat_ironic_httpboot
121 - name: stat /var/lib/ironic/tftpboot
122 stat: path=/var/lib/ironic/tftpboot
123 register: stat_ironic_tftpboot
124 # cannot use 'copy' module as with 'remote_src' it doesn't support recursion
125 - name: migrate /httpboot to containerized (if applicable)
126 command: /bin/cp -R /httpboot /var/lib/ironic/httpboot
127 when: stat_httpboot.stat.exists and not stat_ironic_httpboot.stat.exists
128 - name: migrate /tftpboot to containerized (if applicable)
129 command: /bin/cp -R /tftpboot /var/lib/ironic/tftpboot
130 when: stat_tftpboot.stat.exists and not stat_ironic_tftpboot.stat.exists
131 # Even if there was nothing to copy from original locations,
132 # we need to create the dirs before starting the containers
133 - name: ensure ironic pxe directories exist
135 path: /var/lib/ironic/{{ item }}
141 - name: Stop and disable ironic_conductor service
143 service: name=openstack-ironic-conductor state=stopped enabled=no