1 heat_template_version: ocata
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
77 image: &nova_api_image
80 - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
83 volumes: &nova_api_volumes
84 - /var/lib/config-data/nova/etc/:/etc/:ro
85 - /etc/hosts:/etc/hosts:ro
86 - /etc/localtime:/etc/localtime:ro
87 command: ['/usr/bin/nova-manage', 'api_db', 'sync']
88 # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
89 # to be capable of upgrading a baremetal setup. This is to ensure the name
90 # of the cell is 'default'
93 image: *nova_api_image
96 volumes: *nova_api_volumes
98 - '/usr/bin/nova-manage'
101 nova_api_create_default_cell:
103 image: *nova_api_image
106 volumes: *nova_api_volumes
107 # NOTE: allowing the exit code 2 is a dirty way of making
108 # this idempotent (if the resource already exists a conflict
112 - '/usr/bin/nova-manage'
118 image: *nova_api_image
121 volumes: *nova_api_volumes
122 command: ['/usr/bin/nova-manage', 'db', 'sync']
126 image: *nova_api_image
133 expression: $.data.common.concat($.data.service)
135 common: {get_attr: [ContainersCommon, volumes]}
137 - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
138 - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
140 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
142 nova_api_discover_hosts:
144 image: *nova_api_image
147 volumes: *nova_api_volumes
149 - '/usr/bin/nova-manage'
153 - name: Stop and disable nova_api service
155 service: name=openstack-nova-api state=stopped enabled=no