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
44 type: ./containers-common.yaml
47 type: ../../puppet/services/nova-api.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 Nova API role.
59 service_name: {get_attr: [NovaApiBase, role_data, service_name]}
62 - get_attr: [NovaApiBase, role_data, config_settings]
63 - apache::default_vhost: false
64 step_config: &step_config
67 - - "['Nova_cell_v2'].each |String $val| { noop_resource($val) }"
68 - {get_attr: [NovaApiBase, role_data, step_config]}
69 service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
70 # BEGIN DOCKER SETTINGS
73 puppet_tags: nova_config
74 step_config: *step_config
78 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
80 /var/lib/kolla/config_files/nova_api.json:
81 command: /usr/bin/nova-api
87 # db sync runs before permissions set by kolla_config
91 image: &nova_api_image
94 - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
98 - /var/log/containers/nova:/var/log/nova
99 command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
102 image: *nova_api_image
105 volumes: &nova_api_volumes
107 - {get_attr: [ContainersCommon, volumes]}
109 - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
110 - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
111 - /var/log/containers/nova:/var/log/nova
112 command: ['/usr/bin/nova-manage', 'api_db', 'sync']
113 # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
114 # to be capable of upgrading a baremetal setup. This is to ensure the name
115 # of the cell is 'default'
118 image: *nova_api_image
121 volumes: *nova_api_volumes
123 - '/usr/bin/nova-manage'
126 nova_api_create_default_cell:
128 image: *nova_api_image
131 volumes: *nova_api_volumes
132 # NOTE: allowing the exit code 2 is a dirty way of making
133 # this idempotent (if the resource already exists a conflict
137 - '/usr/bin/nova-manage'
143 image: *nova_api_image
146 volumes: *nova_api_volumes
147 command: ['/usr/bin/nova-manage', 'db', 'sync']
151 image: *nova_api_image
156 volumes: *nova_api_volumes
158 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
160 nova_api_discover_hosts:
162 image: *nova_api_image
165 volumes: *nova_api_volumes
167 - '/usr/bin/nova-manage'
171 - name: create persistent logs directory
173 path: /var/log/containers/nova
176 - name: Stop and disable nova_api service
178 service: name=openstack-nova-api state=stopped enabled=no