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
44 type: ./containers-common.yaml
47 type: ../../puppet/services/ironic-conductor.yaml
49 EndpointMap: {get_param: EndpointMap}
50 ServiceNetMap: {get_param: ServiceNetMap}
51 DefaultPasswords: {get_param: DefaultPasswords}
52 RoleName: {get_param: RoleName}
53 RoleParameters: {get_param: RoleParameters}
57 description: Role data for the Ironic Conductor role.
59 service_name: {get_attr: [IronicConductorBase, role_data, service_name]}
62 - get_attr: [IronicConductorBase, role_data, config_settings]
63 # to avoid hard linking errors we store these on the same
64 # volume/device as the ironic master_path
65 # https://github.com/docker/docker/issues/7457
66 - ironic::drivers::pxe::tftp_root: /var/lib/ironic/tftpboot
67 - ironic::drivers::pxe::tftp_master_path: /var/lib/ironic/tftpboot/master_images
68 - ironic::pxe::tftp_root: /var/lib/ironic/tftpboot
69 - ironic::pxe::http_root: /var/lib/ironic/httpboot
70 - ironic::conductor::http_root: /var/lib/ironic/httpboot
71 step_config: &step_config
72 get_attr: [IronicConductorBase, role_data, step_config]
73 service_config_settings: {get_attr: [IronicConductorBase, role_data, service_config_settings]}
74 # BEGIN DOCKER SETTINGS
77 puppet_tags: ironic_config
78 step_config: *step_config
82 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
84 /var/lib/kolla/config_files/ironic_conductor.json:
85 command: /usr/bin/ironic-conductor
87 - path: /var/lib/ironic
90 - path: /var/log/ironic
100 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
106 - {get_attr: [ContainersCommon, volumes]}
108 - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
109 - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
110 - /lib/modules:/lib/modules:ro
114 - /var/lib/ironic:/var/lib/ironic
115 - /var/log/containers/ironic:/var/log/ironic
117 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
119 - name: create persistent directories
124 - /var/log/containers/ironic
126 - name: stat /httpboot
128 register: stat_httpboot
129 - name: stat /tftpboot
131 register: stat_tftpboot
132 - name: stat /var/lib/ironic/httpboot
133 stat: path=/var/lib/ironic/httpboot
134 register: stat_ironic_httpboot
135 - name: stat /var/lib/ironic/tftpboot
136 stat: path=/var/lib/ironic/tftpboot
137 register: stat_ironic_tftpboot
138 # cannot use 'copy' module as with 'remote_src' it doesn't support recursion
139 - name: migrate /httpboot to containerized (if applicable)
140 command: /bin/cp -R /httpboot /var/lib/ironic/httpboot
141 when: stat_httpboot.stat.exists and not stat_ironic_httpboot.stat.exists
142 - name: migrate /tftpboot to containerized (if applicable)
143 command: /bin/cp -R /tftpboot /var/lib/ironic/tftpboot
144 when: stat_tftpboot.stat.exists and not stat_ironic_tftpboot.stat.exists
145 # Even if there was nothing to copy from original locations,
146 # we need to create the dirs before starting the containers
147 - name: ensure ironic pxe directories exist
149 path: /var/lib/ironic/{{ item }}
155 - name: Stop and disable ironic_conductor service
157 service: name=openstack-ironic-conductor state=stopped enabled=no