aboutsummaryrefslogtreecommitdiffstats
path: root/docker/services/nova-api.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'docker/services/nova-api.yaml')
-rw-r--r--docker/services/nova-api.yaml37
1 files changed, 30 insertions, 7 deletions
diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml
index c97f45de..9282c934 100644
--- a/docker/services/nova-api.yaml
+++ b/docker/services/nova-api.yaml
@@ -13,7 +13,7 @@ parameters:
default: 'centos-binary-nova-api:latest'
type: string
DockerNovaConfigImage:
- description: image
+ description: The container image to use for the nova config_volume
default: 'centos-binary-nova-base:latest'
type: string
EndpointMap:
@@ -62,6 +62,9 @@ outputs:
map_merge:
- get_attr: [NovaApiBase, role_data, config_settings]
- apache::default_vhost: false
+ nova_wsgi_enabled: false
+ nova::api::service_name: '%{::nova::params::api_service_name}'
+ nova::wsgi::apache_api::ssl: false
step_config: &step_config
list_join:
- "\n"
@@ -80,6 +83,11 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_api.json:
command: /usr/bin/nova-api
+ config_files:
+ - source: "/var/lib/kolla/config_files/src/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
permissions:
- path: /var/log/nova
owner: nova:nova
@@ -104,11 +112,10 @@ outputs:
net: host
detach: false
user: root
- volumes: &nova_api_volumes
+ volumes: &nova_api_bootstrap_volumes
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
- /var/log/containers/nova:/var/log/nova
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage api_db sync'"
@@ -121,14 +128,14 @@ outputs:
net: host
detach: false
user: root
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 map_cell0'"
nova_api_create_default_cell:
start_order: 2
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
# NOTE: allowing the exit code 2 is a dirty way of making
# this idempotent (if the resource already exists a conflict
# is raised)
@@ -140,7 +147,7 @@ outputs:
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
user: root
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage db sync'"
step_4:
@@ -151,16 +158,32 @@ outputs:
user: nova
privileged: true
restart: always
+ volumes: &nova_api_volumes
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/puppet-generated/nova/:/var/lib/kolla/config_files/src:ro
+ - /var/log/containers/nova:/var/log/nova
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ nova_api_cron:
+ image: *nova_api_image
+ net: host
+ user: root
+ privileged: true
+ restart: always
volumes: *nova_api_volumes
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ command: "/usr/sbin/crond -n"
step_5:
nova_api_discover_hosts:
start_order: 1
image: *nova_api_image
net: host
detach: false
- volumes: *nova_api_volumes
+ volumes: *nova_api_bootstrap_volumes
user: root
command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts'"
host_prep_tasks: