Use kolla api to set ownership

Kolla provides a way to set ownership of files and directory inside the
containers. Use it instead of running an additional container to do the
job.

Change-Id: I554faf7c797f3997dd3ca854da032437acecf490
This commit is contained in:
Martin André 2017-04-05 08:43:25 +02:00
parent 29faa38ddc
commit 16ba2ee4c8
2 changed files with 10 additions and 21 deletions

View File

@ -62,18 +62,13 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mongodb.json:
command: /usr/bin/mongod --unixSocketPrefix=/var/run/mongodb --config /etc/mongod.conf run
permissions:
- path: /var/lib/mongodb
owner: mongodb:mongodb
recurse: true
docker_config:
step_2:
mongodb_data_ownership:
start_order: 0
image: *mongodb_image
net: host
user: root
command: ['chown', '-R', 'mongodb:', '/var/lib/mongodb']
volumes:
- /var/lib/mongodb:/var/lib/mongodb
mongodb:
start_order: 1
image: *mongodb_image
net: host
privileged: false

View File

@ -71,20 +71,14 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mysql.json:
command: /usr/bin/mysqld_safe
permissions:
- path: /var/lib/mysql
owner: mysql:mysql
recurse: true
docker_config:
step_2:
mysql_data_ownership:
start_order: 0
detach: false
image: *mysql_image
net: host
user: root
# Kolla does only non-recursive chown
command: ['chown', '-R', 'mysql:', '/var/lib/mysql']
volumes:
- /var/lib/mysql:/var/lib/mysql
mysql_bootstrap:
start_order: 1
start_order: 0
detach: false
image: *mysql_image
net: host
@ -113,7 +107,7 @@ outputs:
- {get_param: MysqlRootPassword}
- {get_param: [DefaultPasswords, mysql_root_password]}
mysql:
start_order: 2
start_order: 1
image: *mysql_image
restart: always
net: host