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:
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 - path: /var/lib/ironic
91 - path: /var/log/ironic
101 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
107 - {get_attr: [ContainersCommon, volumes]}
109 - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
110 - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
111 - /lib/modules:/lib/modules:ro
115 - /var/lib/ironic:/var/lib/ironic
116 - /var/log/containers/ironic:/var/log/ironic
118 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
120 - name: create persistent directories
125 - /var/log/containers/ironic
127 - name: stat /httpboot
129 register: stat_httpboot
130 - name: stat /tftpboot
132 register: stat_tftpboot
133 - name: stat /var/lib/ironic/httpboot
134 stat: path=/var/lib/ironic/httpboot
135 register: stat_ironic_httpboot
136 - name: stat /var/lib/ironic/tftpboot
137 stat: path=/var/lib/ironic/tftpboot
138 register: stat_ironic_tftpboot
139 # cannot use 'copy' module as with 'remote_src' it doesn't support recursion
140 - name: migrate /httpboot to containerized (if applicable)
141 command: /bin/cp -R /httpboot /var/lib/ironic/httpboot
142 when: stat_httpboot.stat.exists and not stat_ironic_httpboot.stat.exists
143 - name: migrate /tftpboot to containerized (if applicable)
144 command: /bin/cp -R /tftpboot /var/lib/ironic/tftpboot
145 when: stat_tftpboot.stat.exists and not stat_ironic_tftpboot.stat.exists
146 # Even if there was nothing to copy from original locations,
147 # we need to create the dirs before starting the containers
148 - name: ensure ironic pxe directories exist
150 path: /var/lib/ironic/{{ item }}
156 - name: Stop and disable ironic_conductor service
158 service: name=openstack-ironic-conductor state=stopped enabled=no