1 heat_template_version: pike
4 OpenStack containerized Ironic API service
10 DockerIronicApiConfigImage:
11 description: The container image to use for the ironic_api config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
43 type: ./containers-common.yaml
46 type: ../../puppet/services/database/mysql-client.yaml
49 type: ../../puppet/services/ironic-api.yaml
51 EndpointMap: {get_param: EndpointMap}
52 ServiceData: {get_param: ServiceData}
53 ServiceNetMap: {get_param: ServiceNetMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the Ironic API role.
62 service_name: {get_attr: [IronicApiBase, role_data, service_name]}
65 - get_attr: [IronicApiBase, role_data, config_settings]
66 - apache::default_vhost: false
67 step_config: &step_config
70 - - {get_attr: [IronicApiBase, role_data, step_config]}
71 - {get_attr: [MySQLClient, role_data, step_config]}
72 service_config_settings: {get_attr: [IronicApiBase, role_data, service_config_settings]}
73 # BEGIN DOCKER SETTINGS
75 config_volume: ironic_api
76 puppet_tags: ironic_config
77 step_config: *step_config
78 config_image: {get_param: DockerIronicApiConfigImage}
80 /var/lib/kolla/config_files/ironic_api.json:
81 command: /usr/sbin/httpd -DFOREGROUND
83 - source: "/var/lib/kolla/config_files/src/*"
86 preserve_properties: true
88 - path: /var/log/ironic
92 # db sync runs before permissions set by kolla_config
95 image: &ironic_api_image {get_param: DockerIronicApiImage}
99 - /var/log/containers/ironic:/var/log/ironic
100 command: ['/bin/bash', '-c', 'chown -R ironic:ironic /var/log/ironic']
104 image: *ironic_api_image
111 - {get_attr: [ContainersCommon, volumes]}
113 - /var/lib/config-data/ironic_api/etc/ironic:/etc/ironic:ro
114 - /var/log/containers/ironic:/var/log/ironic
115 command: "/usr/bin/bootstrap_host_exec ironic_api su ironic -s /bin/bash -c 'ironic-dbsync --config-file /etc/ironic/ironic.conf'"
119 image: *ironic_api_image
125 - {get_attr: [ContainersCommon, volumes]}
127 - /var/lib/kolla/config_files/ironic_api.json:/var/lib/kolla/config_files/config.json:ro
128 - /var/lib/config-data/puppet-generated/ironic_api/:/var/lib/kolla/config_files/src:ro
129 - /var/log/containers/ironic:/var/log/ironic
131 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
133 - name: create persistent logs directory
135 path: /var/log/containers/ironic
138 - name: Stop and disable ironic_api service
140 service: name=openstack-ironic-api state=stopped enabled=no