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: ../../puppet/services/nova-api.yaml
39 EndpointMap: {get_param: EndpointMap}
40 ServiceNetMap: {get_param: ServiceNetMap}
41 DefaultPasswords: {get_param: DefaultPasswords}
45 description: Role data for the Nova API role.
47 service_name: {get_attr: [NovaApiBase, role_data, service_name]}
50 - get_attr: [NovaApiBase, role_data, config_settings]
51 - apache::default_vhost: false
52 step_config: &step_config
55 - - "['Nova_cell_v2'].each |String $val| { noop_resource($val) }"
56 - {get_attr: [NovaApiBase, role_data, step_config]}
57 service_config_settings: {get_attr: [NovaApiBase, role_data, service_config_settings]}
58 # BEGIN DOCKER SETTINGS
61 puppet_tags: nova_config
62 step_config: *step_config
66 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
68 /var/lib/kolla/config_files/nova_api.json:
69 command: /usr/bin/nova-api
74 image: &nova_api_image
77 - [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
80 volumes: &nova_api_volumes
81 - /var/lib/config-data/nova/etc/:/etc/:ro
82 - /etc/hosts:/etc/hosts:ro
83 - /etc/localtime:/etc/localtime:ro
84 command: ['/usr/bin/nova-manage', 'api_db', 'sync']
85 # FIXME: we probably want to wait on the 'cell_v2 update' in order for this
86 # to be capable of upgrading a baremetal setup. This is to ensure the name
87 # of the cell is 'default'
90 image: *nova_api_image
93 volumes: *nova_api_volumes
95 - '/usr/bin/nova-manage'
98 nova_api_create_default_cell:
100 image: *nova_api_image
103 volumes: *nova_api_volumes
104 # NOTE: allowing the exit code 2 is a dirty way of making
105 # this idempotent (if the resource already exists a conflict
109 - '/usr/bin/nova-manage'
115 image: *nova_api_image
118 volumes: *nova_api_volumes
119 command: ['/usr/bin/nova-manage', 'db', 'sync']
123 image: *nova_api_image
129 - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
130 - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
131 - /etc/hosts:/etc/hosts:ro
132 - /etc/localtime:/etc/localtime:ro
134 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
136 nova_api_discover_hosts:
138 image: *nova_api_image
141 volumes: *nova_api_volumes
143 - '/usr/bin/nova-manage'
147 - name: Stop and disable nova_api service
149 service: name=openstack-nova-api state=stopped enabled=no