Fixup for manila-api containerized service

Use common volumes, and use the host log dir in DB sync container.

Co-Authored-By: Jiri Stransky <jistr@jistr.com>
Change-Id: I52602eb4ffd8834c36eec66ef845e5563f72f786
This commit is contained in:
Martin André 2017-06-12 17:08:39 +02:00
parent 388a1330a4
commit 92172227b8

View File

@ -14,7 +14,8 @@ parameters:
type: string
DockerManilaConfigImage:
description: image
default: 'centos-binary-manila-base:latest'
default: 'centos-binary-manila-api:latest'
type: string
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@ -40,6 +41,9 @@ parameters:
resources:
ContainersCommon:
type: ./containers-common.yaml
ManilaApiPuppetBase:
type: ../../puppet/services/manila-api.yaml
properties:
@ -73,20 +77,27 @@ outputs:
owner: manila:manila
recurse: true
docker_config:
step_3:
manila_api_db_sync:
user: root
step_2:
manila_init_logs:
image: &manila_api_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerManilaApiImage} ]
user: root
volumes:
- /var/log/containers/manila:/var/log/manila
command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R manila:manila /var/log/manila']
step_3:
manila_api_db_sync:
user: root
image: *manila_api_image
net: host
detach: false
volumes:
- /var/lib/config-data/manila/etc/manila/:/etc/manila:ro
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- logs:/var/log
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/config-data/manila/etc/manila/:/etc/manila/:ro
- /var/log/containers/manila:/var/log/manila
command: "/usr/bin/bootstrap_host_exec manila_api su manila -s /bin/bash -c '/usr/bin/manila-manage db sync'"
step_4:
manila_api:
@ -94,11 +105,12 @@ outputs:
net: host
restart: always
volumes:
- /var/lib/kolla/config_files/manila_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/manila/etc/manila/:/etc/manila/:ro
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /var/log/containers/manila:/var/log/manila
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/manila_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/manila/etc/manila/:/etc/manila/:ro
- /var/log/containers/manila:/var/log/manila
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks: