summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-06-12 17:08:39 +0200
committerMartin André <m.andre@redhat.com>2017-06-15 09:45:57 +0000
commit92172227b8010effc8075f9250d9186f25a68794 (patch)
tree576aae27fc99530c13122634ebe4d3bb72d72b8c /docker
parent388a1330a47e93569bc4ecd6ed1cccb4a1384a83 (diff)
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
Diffstat (limited to 'docker')
-rw-r--r--docker/services/manila-api.yaml38
1 files changed, 25 insertions, 13 deletions
diff --git a/docker/services/manila-api.yaml b/docker/services/manila-api.yaml
index 47d0f579..a203d436 100644
--- a/docker/services/manila-api.yaml
+++ b/docker/services/manila-api.yaml
@@ -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: