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.
37 type: ./containers-common.yaml
40 type: ../../puppet/services/nova-api.yaml
42 EndpointMap: {get_param: EndpointMap}
43 ServiceNetMap: {get_param: ServiceNetMap}
44 DefaultPasswords: {get_param: DefaultPasswords}
48 description: Role data for the Nova API role.
50 service_name: {get_attr: [NovaApiBase, role_data, service_name]}
53 - get_attr: [NovaApiBase, role_data, config_settings]
54 - apache::default_vhost: false
55 step_config: &step_config
58 - - "['Nova_cell_v2'].each |String $val| { noop_resource($val) }"
59 - {get_attr: [NovaApiBase, role_data, step_config]}
60 service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
61 # BEGIN DOCKER SETTINGS
64 puppet_tags: nova_config
65 step_config: *step_config
69 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
71 /var/lib/kolla/config_files/nova_api.json:
72 command: /usr/bin/nova-api
78 # db sync runs before permissions set by kolla_config
82 image: &nova_api_image
85 - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
89 - /var/log/containers/nova:/var/log/nova
90 command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
93 image: *nova_api_image
96 volumes: &nova_api_volumes
98 - {get_attr: [ContainersCommon, volumes]}
100 - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
101 - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
102 - /var/log/containers/nova:/var/log/nova
103 command: ['/usr/bin/nova-manage', 'api_db', 'sync']
104 # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
105 # to be capable of upgrading a baremetal setup. This is to ensure the name
106 # of the cell is 'default'
109 image: *nova_api_image
112 volumes: *nova_api_volumes
114 - '/usr/bin/nova-manage'
117 nova_api_create_default_cell:
119 image: *nova_api_image
122 volumes: *nova_api_volumes
123 # NOTE: allowing the exit code 2 is a dirty way of making
124 # this idempotent (if the resource already exists a conflict
128 - '/usr/bin/nova-manage'
134 image: *nova_api_image
137 volumes: *nova_api_volumes
138 command: ['/usr/bin/nova-manage', 'db', 'sync']
142 image: *nova_api_image
147 volumes: *nova_api_volumes
149 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
151 nova_api_discover_hosts:
153 image: *nova_api_image
156 volumes: *nova_api_volumes
158 - '/usr/bin/nova-manage'
162 - name: create persistent logs directory
164 path: /var/log/containers/nova
167 - name: Stop and disable nova_api service
169 service: name=openstack-nova-api state=stopped enabled=no