1 heat_template_version: pike
4 OpenStack containerized Ironic Conductor service
9 default: 'tripleoupstream'
11 DockerIronicConductorImage:
13 default: 'centos-binary-ironic-conductor:latest'
15 DockerIronicConfigImage:
16 description: The container image to use for the ironic config_volume
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.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
45 type: ./containers-common.yaml
48 type: ../../puppet/services/ironic-conductor.yaml
50 EndpointMap: {get_param: EndpointMap}
51 ServiceNetMap: {get_param: ServiceNetMap}
52 DefaultPasswords: {get_param: DefaultPasswords}
53 RoleName: {get_param: RoleName}
54 RoleParameters: {get_param: RoleParameters}
58 description: Role data for the Ironic Conductor role.
60 service_name: {get_attr: [IronicConductorBase, role_data, service_name]}
63 - get_attr: [IronicConductorBase, role_data, config_settings]
64 # to avoid hard linking errors we store these on the same
65 # volume/device as the ironic master_path
66 # https://github.com/docker/docker/issues/7457
67 - ironic::drivers::pxe::tftp_root: /var/lib/ironic/tftpboot
68 - ironic::drivers::pxe::tftp_master_path: /var/lib/ironic/tftpboot/master_images
69 - ironic::pxe::tftp_root: /var/lib/ironic/tftpboot
70 - ironic::pxe::http_root: /var/lib/ironic/httpboot
71 - ironic::conductor::http_root: /var/lib/ironic/httpboot
72 step_config: &step_config
73 get_attr: [IronicConductorBase, role_data, step_config]
74 service_config_settings: {get_attr: [IronicConductorBase, role_data, service_config_settings]}
75 # BEGIN DOCKER SETTINGS
78 puppet_tags: ironic_config
79 step_config: *step_config
83 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
85 /var/lib/kolla/config_files/ironic_conductor.json:
86 command: /usr/bin/ironic-conductor
88 - source: "/var/lib/kolla/config_files/src/*"
91 preserve_properties: true
93 - path: /var/lib/ironic
96 - path: /var/log/ironic
106 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
112 - {get_attr: [ContainersCommon, volumes]}
114 - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
115 - /var/lib/config-data/puppet-generated/ironic/:/var/lib/kolla/config_files/src:ro
116 - /lib/modules:/lib/modules:ro
120 - /var/lib/ironic:/var/lib/ironic
121 - /var/log/containers/ironic:/var/log/ironic
123 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
125 - name: create persistent directories
130 - /var/log/containers/ironic
132 - name: stat /httpboot
134 register: stat_httpboot
135 - name: stat /tftpboot
137 register: stat_tftpboot
138 - name: stat /var/lib/ironic/httpboot
139 stat: path=/var/lib/ironic/httpboot
140 register: stat_ironic_httpboot
141 - name: stat /var/lib/ironic/tftpboot
142 stat: path=/var/lib/ironic/tftpboot
143 register: stat_ironic_tftpboot
144 # cannot use 'copy' module as with 'remote_src' it doesn't support recursion
145 - name: migrate /httpboot to containerized (if applicable)
146 command: /bin/cp -R /httpboot /var/lib/ironic/httpboot
147 when: stat_httpboot.stat.exists and not stat_ironic_httpboot.stat.exists
148 - name: migrate /tftpboot to containerized (if applicable)
149 command: /bin/cp -R /tftpboot /var/lib/ironic/tftpboot
150 when: stat_tftpboot.stat.exists and not stat_ironic_tftpboot.stat.exists
151 # Even if there was nothing to copy from original locations,
152 # we need to create the dirs before starting the containers
153 - name: ensure ironic pxe directories exist
155 path: /var/lib/ironic/{{ item }}
161 - name: Stop and disable ironic_conductor service
163 service: name=openstack-ironic-conductor state=stopped enabled=no