1 heat_template_version: pike
4 OpenStack containerized Nova API service
9 default: 'tripleoupstream'
13 default: 'centos-binary-nova-api:latest'
15 DockerNovaConfigImage:
17 default: 'centos-binary-nova-base: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/nova-api.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 Nova API role.
60 service_name: {get_attr: [NovaApiBase, role_data, service_name]}
63 - get_attr: [NovaApiBase, role_data, config_settings]
64 - apache::default_vhost: false
65 step_config: &step_config
68 - - "['Nova_cell_v2'].each |String $val| { noop_resource($val) }"
69 - {get_attr: [NovaApiBase, role_data, step_config]}
70 service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
71 # BEGIN DOCKER SETTINGS
74 puppet_tags: nova_config
75 step_config: *step_config
79 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
81 /var/lib/kolla/config_files/nova_api.json:
82 command: /usr/bin/nova-api
88 # db sync runs before permissions set by kolla_config
92 image: &nova_api_image
95 - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
99 - /var/log/containers/nova:/var/log/nova
100 command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
103 image: *nova_api_image
106 volumes: &nova_api_volumes
108 - {get_attr: [ContainersCommon, volumes]}
110 - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
111 - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
112 - /var/log/containers/nova:/var/log/nova
113 command: ['/usr/bin/nova-manage', 'api_db', 'sync']
114 # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
115 # to be capable of upgrading a baremetal setup. This is to ensure the name
116 # of the cell is 'default'
119 image: *nova_api_image
122 volumes: *nova_api_volumes
124 - '/usr/bin/nova-manage'
127 nova_api_create_default_cell:
129 image: *nova_api_image
132 volumes: *nova_api_volumes
133 # NOTE: allowing the exit code 2 is a dirty way of making
134 # this idempotent (if the resource already exists a conflict
138 - '/usr/bin/nova-manage'
144 image: *nova_api_image
147 volumes: *nova_api_volumes
148 command: ['/usr/bin/nova-manage', 'db', 'sync']
152 image: *nova_api_image
157 volumes: *nova_api_volumes
159 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
161 nova_api_discover_hosts:
163 image: *nova_api_image
166 volumes: *nova_api_volumes
168 - '/usr/bin/nova-manage'
172 - name: create persistent logs directory
174 path: /var/log/containers/nova
177 - name: Stop and disable nova_api service
179 service: name=openstack-nova-api state=stopped enabled=no