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: ../../puppet/services/ironic-conductor.yaml
39 EndpointMap: {get_param: EndpointMap}
40 ServiceNetMap: {get_param: ServiceNetMap}
41 DefaultPasswords: {get_param: DefaultPasswords}
45 description: Role data for the Ironic Conductor role.
47 service_name: {get_attr: [IronicConductorBase, role_data, service_name]}
50 - get_attr: [IronicConductorBase, role_data, config_settings]
51 # to avoid hard linking errors we store these on the same
52 # volume/device as the ironic master_path
53 # https://github.com/docker/docker/issues/7457
54 - ironic::drivers::pxe::tftp_root: /var/lib/ironic/tftpboot
55 - ironic::drivers::pxe::tftp_master_path: /var/lib/ironic/tftpboot/master_images
56 - ironic::pxe::tftp_root: /var/lib/ironic/tftpboot
57 - ironic::pxe::http_root: /var/lib/ironic/httpboot
58 - ironic::conductor::http_root: /var/lib/ironic/httpboot
59 step_config: &step_config
60 get_attr: [IronicConductorBase, role_data, step_config]
61 service_config_settings: {get_attr: [IronicConductorBase, role_data, service_config_settings]}
62 # BEGIN DOCKER SETTINGS
65 puppet_tags: ironic_config
66 step_config: *step_config
70 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConfigImage} ]
72 /var/lib/kolla/config_files/ironic_conductor.json:
73 command: /usr/bin/ironic-conductor
75 - path: /var/lib/ironic
85 - [ {get_param: DockerNamespace}, {get_param: DockerIronicConductorImage} ]
90 - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
91 - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
92 - /etc/hosts:/etc/hosts:ro
93 - /etc/localtime:/etc/localtime:ro
94 - /lib/modules:/lib/modules:ro
98 - /var/lib/ironic:/var/lib/ironic
100 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
102 - name: create ironic persistent data directory
104 path: /var/lib/ironic
106 - name: stat /httpboot
108 register: stat_httpboot
109 - name: stat /tftpboot
111 register: stat_tftpboot
112 - name: stat /var/lib/ironic/httpboot
113 stat: path=/var/lib/ironic/httpboot
114 register: stat_ironic_httpboot
115 - name: stat /var/lib/ironic/tftpboot
116 stat: path=/var/lib/ironic/tftpboot
117 register: stat_ironic_tftpboot
118 # cannot use 'copy' module as with 'remote_src' it doesn't support recursion
119 - name: migrate /httpboot to containerized (if applicable)
120 command: /bin/cp -R /httpboot /var/lib/ironic/httpboot
121 when: stat_httpboot.stat.exists and not stat_ironic_httpboot.stat.exists
122 - name: migrate /tftpboot to containerized (if applicable)
123 command: /bin/cp -R /tftpboot /var/lib/ironic/tftpboot
124 when: stat_tftpboot.stat.exists and not stat_ironic_tftpboot.stat.exists
125 # Even if there was nothing to copy from original locations,
126 # we need to create the dirs before starting the containers
127 - name: ensure ironic pxe directories exist
129 path: /var/lib/ironic/{{ item }}
135 - name: Stop and disable ironic_conductor service
137 service: name=openstack-ironic-conductor state=stopped enabled=no