aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/docker-puppet.py43
-rw-r--r--docker/services/aodh-api.yaml75
-rw-r--r--docker/services/aodh-evaluator.yaml33
-rw-r--r--docker/services/aodh-listener.yaml33
-rw-r--r--docker/services/aodh-notifier.yaml33
-rw-r--r--docker/services/containers-common.yaml2
-rw-r--r--docker/services/database/mongodb.yaml25
-rw-r--r--docker/services/database/mysql.yaml33
-rw-r--r--docker/services/database/redis.yaml7
-rw-r--r--docker/services/etcd.yaml8
-rw-r--r--docker/services/glance-api.yaml89
-rw-r--r--docker/services/gnocchi-api.yaml74
-rw-r--r--docker/services/gnocchi-metricd.yaml33
-rw-r--r--docker/services/gnocchi-statsd.yaml33
-rw-r--r--docker/services/heat-api-cfn.yaml66
-rw-r--r--docker/services/heat-api.yaml66
-rw-r--r--docker/services/heat-engine.yaml54
-rw-r--r--docker/services/ironic-api.yaml56
-rw-r--r--docker/services/ironic-conductor.yaml44
-rw-r--r--docker/services/ironic-pxe.yaml73
-rw-r--r--docker/services/keystone.yaml61
-rw-r--r--docker/services/memcached.yaml32
-rw-r--r--docker/services/mistral-api.yaml68
-rw-r--r--docker/services/mistral-engine.yaml35
-rw-r--r--docker/services/mistral-executor.yaml43
-rw-r--r--docker/services/neutron-api.yaml58
-rw-r--r--docker/services/neutron-dhcp.yaml37
-rw-r--r--docker/services/neutron-l3.yaml37
-rw-r--r--docker/services/neutron-ovs-agent.yaml39
-rw-r--r--docker/services/neutron-plugin-ml2.yaml9
-rw-r--r--docker/services/nova-api.yaml51
-rw-r--r--docker/services/nova-compute.yaml51
-rw-r--r--docker/services/nova-conductor.yaml34
-rw-r--r--docker/services/nova-ironic.yaml51
-rw-r--r--docker/services/nova-libvirt.yaml47
-rw-r--r--docker/services/nova-metadata.yaml9
-rw-r--r--docker/services/nova-placement.yaml37
-rw-r--r--docker/services/nova-scheduler.yaml35
-rw-r--r--docker/services/panko-api.yaml73
-rw-r--r--docker/services/rabbitmq.yaml65
-rw-r--r--docker/services/services.yaml11
-rw-r--r--docker/services/swift-proxy.yaml89
-rw-r--r--docker/services/swift-ringbuilder.yaml9
-rw-r--r--docker/services/swift-storage.yaml269
-rw-r--r--docker/services/zaqar.yaml58
45 files changed, 1500 insertions, 688 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 111005ac..f1594d2d 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -152,8 +152,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
log.debug('manifest %s' % manifest)
log.debug('config_image %s' % config_image)
log.debug('volumes %s' % volumes)
- hostname = short_hostname()
- sh_script = '/var/lib/docker-puppet/docker-puppet-%s.sh' % config_volume
+ sh_script = '/var/lib/docker-puppet/docker-puppet.sh'
with open(sh_script, 'w') as script_file:
os.chmod(script_file.name, 0755)
@@ -162,43 +161,40 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
mkdir -p /etc/puppet
cp -a /tmp/puppet-etc/* /etc/puppet
rm -Rf /etc/puppet/ssl # not in use and causes permission errors
- echo '{"step": %(step)s}' > /etc/puppet/hieradata/docker.json
+ echo "{\\"step\\": $STEP}" > /etc/puppet/hieradata/docker.json
TAGS=""
- if [ -n "%(puppet_tags)s" ]; then
- TAGS='--tags "%(puppet_tags)s"'
+ if [ -n "$PUPPET_TAGS" ]; then
+ TAGS="--tags \"$PUPPET_TAGS\""
fi
- FACTER_hostname=%(hostname)s FACTER_uuid=docker /usr/bin/puppet apply --verbose $TAGS /etc/config.pp
+ FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply --verbose $TAGS /etc/config.pp
# Disables archiving
- if [ -z "%(no_archive)s" ]; then
- rm -Rf /var/lib/config-data/%(name)s
+ if [ -z "$NO_ARCHIVE" ]; then
+ rm -Rf /var/lib/config-data/${NAME}
# copying etc should be enough for most services
- mkdir -p /var/lib/config-data/%(name)s/etc
- cp -a /etc/* /var/lib/config-data/%(name)s/etc/
+ mkdir -p /var/lib/config-data/${NAME}/etc
+ cp -a /etc/* /var/lib/config-data/${NAME}/etc/
if [ -d /root/ ]; then
- cp -a /root/ /var/lib/config-data/%(name)s/root/
+ cp -a /root/ /var/lib/config-data/${NAME}/root/
fi
if [ -d /var/lib/ironic/tftpboot/ ]; then
- mkdir -p /var/lib/config-data/%(name)s/var/lib/ironic/
- cp -a /var/lib/ironic/tftpboot/ /var/lib/config-data/%(name)s/var/lib/ironic/tftpboot/
+ mkdir -p /var/lib/config-data/${NAME}/var/lib/ironic/
+ cp -a /var/lib/ironic/tftpboot/ /var/lib/config-data/${NAME}/var/lib/ironic/tftpboot/
fi
if [ -d /var/lib/ironic/httpboot/ ]; then
- mkdir -p /var/lib/config-data/%(name)s/var/lib/ironic/
- cp -a /var/lib/ironic/httpboot/ /var/lib/config-data/%(name)s/var/lib/ironic/httpboot/
+ mkdir -p /var/lib/config-data/${NAME}/var/lib/ironic/
+ cp -a /var/lib/ironic/httpboot/ /var/lib/config-data/${NAME}/var/lib/ironic/httpboot/
fi
# apache services may files placed in /var/www/
if [ -d /var/www/ ]; then
- mkdir -p /var/lib/config-data/%(name)s/var/www
- cp -a /var/www/* /var/lib/config-data/%(name)s/var/www/
+ mkdir -p /var/lib/config-data/${NAME}/var/www
+ cp -a /var/www/* /var/lib/config-data/${NAME}/var/www/
fi
fi
- """ % {'puppet_tags': puppet_tags, 'name': config_volume,
- 'hostname': hostname,
- 'no_archive': os.environ.get('NO_ARCHIVE', ''),
- 'step': os.environ.get('STEP', '6')})
+ """)
with tempfile.NamedTemporaryFile() as tmp_man:
with open(tmp_man.name, 'w') as man_file:
@@ -211,6 +207,11 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
dcmd = ['/usr/bin/docker', 'run',
'--user', 'root',
'--name', 'docker-puppet-%s' % config_volume,
+ '--env', 'PUPPET_TAGS=%s' % puppet_tags,
+ '--env', 'NAME=%s' % config_volume,
+ '--env', 'HOSTNAME=%s' % short_hostname(),
+ '--env', 'NO_ARCHIVE=%s' % os.environ.get('NO_ARCHIVE', ''),
+ '--env', 'STEP=%s' % os.environ.get('STEP', '6'),
'--volume', '%s:/etc/config.pp:ro' % tmp_man.name,
'--volume', '/etc/puppet/:/tmp/puppet-etc/:ro',
'--volume', '/usr/share/openstack-puppet/modules/:/usr/share/openstack-puppet/modules/:ro',
diff --git a/docker/services/aodh-api.yaml b/docker/services/aodh-api.yaml
index 9480ce84..9ba0ec03 100644
--- a/docker/services/aodh-api.yaml
+++ b/docker/services/aodh-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized aodh service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EnableInternalTLS:
type: boolean
default: false
@@ -45,6 +52,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -70,15 +79,20 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/aodh-api.json:
command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/aodh
+ owner: aodh:aodh
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
aodh_init_log:
start_order: 0
image: *aodh_image
user: root
- command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && mkdir -p /var/log/aodh && chown aodh:aodh /var/log/aodh']
volumes:
- - logs:/var/log
+ - /var/log/containers/aodh:/var/log/aodh
+ command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R aodh:aodh /var/log/aodh']
aodh_db_sync:
start_order: 1
image: *aodh_image
@@ -86,13 +100,11 @@ outputs:
privileged: false
detach: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
- - logs:/var/log
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ - /var/log/containers/aodh:/var/log/aodh
command: /usr/bin/aodh-dbsync
step_4:
aodh_api:
@@ -101,28 +113,31 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/aodh-api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
- - /var/lib/config-data/aodh/etc/httpd/:/etc/httpd/:ro
- - /var/lib/config-data/aodh/var/www/:/var/www/:ro
- - logs:/var/log
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- - ''
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
- - ''
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/aodh-api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ - /var/lib/config-data/aodh/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/aodh/var/www/:/var/www/:ro
+ - /var/log/containers/aodh:/var/log/aodh
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/aodh
+ state: directory
upgrade_tasks:
- name: Stop and disable aodh service (running under httpd)
tags: step2
diff --git a/docker/services/aodh-evaluator.yaml b/docker/services/aodh-evaluator.yaml
index 13d6cf21..b4036c00 100644
--- a/docker/services/aodh-evaluator.yaml
+++ b/docker/services/aodh-evaluator.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Aodh Evaluator service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -62,6 +71,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/aodh-evaluator.json:
command: /usr/bin/aodh-evaluator
+ permissions:
+ - path: /var/log/aodh
+ owner: aodh:aodh
+ recurse: true
docker_config:
step_4:
aodh_evaluator:
@@ -70,15 +83,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/aodh-evaluator.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/aodh-evaluator.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ - /var/log/containers/aodh:/var/log/aodh
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/aodh
+ state: directory
upgrade_tasks:
- name: Stop and disable openstack-aodh-evaluator service
tags: step2
diff --git a/docker/services/aodh-listener.yaml b/docker/services/aodh-listener.yaml
index 63c45aad..61153089 100644
--- a/docker/services/aodh-listener.yaml
+++ b/docker/services/aodh-listener.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Aodh Listener service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -62,6 +71,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/aodh-listener.json:
command: /usr/bin/aodh-listener
+ permissions:
+ - path: /var/log/aodh
+ owner: aodh:aodh
+ recurse: true
docker_config:
step_4:
aodh_listener:
@@ -70,15 +83,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/aodh-listener.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/aodh-listener.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ - /var/log/containers/aodh:/var/log/aodh
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/aodh
+ state: directory
upgrade_tasks:
- name: Stop and disable openstack-aodh-listener service
tags: step2
diff --git a/docker/services/aodh-notifier.yaml b/docker/services/aodh-notifier.yaml
index dbe31b65..11ca12f9 100644
--- a/docker/services/aodh-notifier.yaml
+++ b/docker/services/aodh-notifier.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Aodh Notifier service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -62,6 +71,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/aodh-notifier.json:
command: /usr/bin/aodh-notifier
+ permissions:
+ - path: /var/log/aodh
+ owner: aodh:aodh
+ recurse: true
docker_config:
step_4:
aodh_notifier:
@@ -70,15 +83,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/aodh-notifier.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/aodh-notifier.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/aodh/etc/aodh/:/etc/aodh/:ro
+ - /var/log/containers/aodh:/var/log/aodh
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/aodh
+ state: directory
upgrade_tasks:
- name: Stop and disable openstack-aodh-notifier service
tags: step2
diff --git a/docker/services/containers-common.yaml b/docker/services/containers-common.yaml
index d3561f6b..fad1456c 100644
--- a/docker/services/containers-common.yaml
+++ b/docker/services/containers-common.yaml
@@ -14,3 +14,5 @@ outputs:
- /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro
- /etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro
- /etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro
+ # Syslog socket
+ - /dev/log:/dev/log
diff --git a/docker/services/database/mongodb.yaml b/docker/services/database/mongodb.yaml
index 7d2d1a15..437e6c82 100644
--- a/docker/services/database/mongodb.yaml
+++ b/docker/services/database/mongodb.yaml
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -35,6 +42,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -66,6 +75,9 @@ outputs:
- path: /var/lib/mongodb
owner: mongodb:mongodb
recurse: true
+ - path: /var/log/mongodb
+ owner: mongodb:mongodb
+ recurse: true
docker_config:
step_2:
mongodb:
@@ -76,7 +88,7 @@ outputs:
- /var/lib/kolla/config_files/mongodb.json:/var/lib/kolla/config_files/config.json
- /var/lib/config-data/mongodb/etc/:/etc/:ro
- /etc/localtime:/etc/localtime:ro
- - logs:/var/log/kolla
+ - /var/log/containers/mongodb:/var/log/mongodb
- /var/lib/mongodb:/var/lib/mongodb
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
@@ -88,13 +100,16 @@ outputs:
step_config: 'include ::tripleo::profile::base::database::mongodb'
config_image: *mongodb_image
volumes:
- - /var/lib/mongodb:/var/lib/mongodb
- - logs:/var/log/kolla:ro
+ - /var/lib/mongodb:/var/lib/mongodb
+ - /var/log/containers/mongodb:/var/log/mongodb
host_prep_tasks:
- - name: create /var/lib/mongodb
+ - name: create persistent directories
file:
- path: /var/lib/mongodb
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/mongodb
+ - /var/lib/mongodb
upgrade_tasks:
- name: Stop and disable mongodb service
tags: step2
diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml
index cba2070d..cc9f6eab 100644
--- a/docker/services/database/mysql.yaml
+++ b/docker/services/database/mysql.yaml
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
MysqlRootPassword:
type: string
hidden: true
@@ -39,6 +46,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -76,9 +85,18 @@ outputs:
owner: mysql:mysql
recurse: true
docker_config:
+ # Kolla_bootstrap runs before permissions set by kolla_config
step_2:
- mysql_bootstrap:
+ mysql_init_logs:
start_order: 0
+ image: *mysql_image
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/mysql:/var/log/mariadb
+ command: ['/bin/bash', '-c', 'chown -R mysql:mysql /var/log/mariadb']
+ mysql_bootstrap:
+ start_order: 1
detach: false
image: *mysql_image
net: host
@@ -90,12 +108,13 @@ outputs:
- /etc/localtime:/etc/localtime:ro
- /etc/hosts:/etc/hosts:ro
- /var/lib/mysql:/var/lib/mysql
+ - /var/log/containers/mysql:/var/log/mariadb
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- KOLLA_BOOTSTRAP=True
# NOTE(mandre) skip wsrep cluster status check
- KOLLA_KUBERNETES=True
- -
+ -
list_join:
- '='
- - 'DB_ROOT_PASSWORD'
@@ -107,7 +126,7 @@ outputs:
- {get_param: MysqlRootPassword}
- {get_param: [DefaultPasswords, mysql_root_password]}
mysql:
- start_order: 1
+ start_order: 2
image: *mysql_image
restart: always
net: host
@@ -123,12 +142,16 @@ outputs:
config_image: *mysql_image
volumes:
- /var/lib/mysql:/var/lib/mysql/:ro
+ - /var/log/containers/mysql:/var/log/mariadb
- /var/lib/config-data/mysql/root:/root:ro #provides .my.cnf
host_prep_tasks:
- - name: create /var/lib/mysql
+ - name: create persistent directories
file:
- path: /var/lib/mysql
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/mysql
+ - /var/lib/mysql
upgrade_tasks:
- name: Stop and disable mysql service
tags: step2
diff --git a/docker/services/database/redis.yaml b/docker/services/database/redis.yaml
index aa615919..fbf53cb9 100644
--- a/docker/services/database/redis.yaml
+++ b/docker/services/database/redis.yaml
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
diff --git a/docker/services/etcd.yaml b/docker/services/etcd.yaml
index 0a7daef8..13a0735b 100644
--- a/docker/services/etcd.yaml
+++ b/docker/services/etcd.yaml
@@ -26,6 +26,14 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ type: json
EtcdInitialClusterToken:
description: Initial cluster token for the etcd cluster during bootstrap.
type: string
diff --git a/docker/services/glance-api.yaml b/docker/services/glance-api.yaml
index 0b4f81ed..c474131d 100644
--- a/docker/services/glance-api.yaml
+++ b/docker/services/glance-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack Glance service configured with Puppet
@@ -26,6 +26,21 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ EnableInternalTLS:
+ type: boolean
+ default: false
+
+conditions:
+
+ internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
+
resources:
@@ -38,6 +53,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -63,36 +80,70 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/glance-api.json:
command: /usr/bin/glance-api --config-file /usr/share/glance/glance-api-dist.conf --config-file /etc/glance/glance-api.conf
+ /var/lib/kolla/config_files/glance_api_tls_proxy.json:
+ command: /usr/sbin/httpd -DFOREGROUND
docker_config:
+ # Kolla_bootstrap/db_sync runs before permissions set by kolla_config
step_3:
+ glance_init_logs:
+ start_order: 0
+ image: *glance_image
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/glance:/var/log/glance
+ command: ['/bin/bash', '-c', 'chown -R glance:glance /var/log/glance']
glance_api_db_sync:
+ start_order: 1
image: *glance_image
net: host
privileged: false
detach: false
volumes: &glance_volumes
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/glance-api.json:/var/lib/kolla/config_files/config.json
- - /var/lib/config-data/glance_api/etc/glance/:/etc/glance/:ro
- - /lib/modules:/lib/modules:ro
- - /run:/run
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/glance-api.json:/var/lib/kolla/config_files/config.json
+ - /var/lib/config-data/glance_api/etc/glance/:/etc/glance/:ro
+ - /var/log/containers/glance:/var/log/glance
environment:
- KOLLA_BOOTSTRAP=True
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
step_4:
- glance_api:
- image: *glance_image
- net: host
- privileged: false
- restart: always
- volumes: *glance_volumes
- environment:
- - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ map_merge:
+ - glance_api:
+ start_order: 2
+ image: *glance_image
+ net: host
+ privileged: false
+ restart: always
+ volumes: *glance_volumes
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ - if:
+ - internal_tls_enabled
+ - glance_api_tls_proxy:
+ start_order: 2
+ image: *glance_image
+ net: host
+ user: root
+ restart: always
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/glance_api_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/glance_api/etc/httpd/:/etc/httpd/:ro
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ - {}
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/glance
+ state: directory
upgrade_tasks:
- name: Stop and disable glance_api service
tags: step2
diff --git a/docker/services/gnocchi-api.yaml b/docker/services/gnocchi-api.yaml
index 6cddcd54..4770533b 100644
--- a/docker/services/gnocchi-api.yaml
+++ b/docker/services/gnocchi-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized gnocchi service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EnableInternalTLS:
type: boolean
default: false
@@ -45,6 +52,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -70,15 +79,20 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/gnocchi-api.json:
command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/gnocchi
+ owner: gnocchi:gnocchi
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
gnocchi_init_log:
start_order: 0
image: *gnocchi_image
user: root
- command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && mkdir -p /var/log/gnocchi && chown gnocchi:gnocchi /var/log/gnocchi']
volumes:
- - logs:/var/log
+ - /var/log/containers/gnocchi:/var/log/gnocchi
+ command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R gnocchi:gnocchi /var/log/gnocchi']
gnocchi_db_sync:
start_order: 1
image: *gnocchi_image
@@ -86,13 +100,11 @@ outputs:
detach: false
privileged: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
- - logs:/var/log
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ - /var/log/containers/gnocchi:/var/log/gnocchi
command: ["/usr/bin/gnocchi-upgrade", "--skip-storage"]
step_4:
gnocchi_api:
@@ -101,27 +113,31 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/gnocchi-api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
- - /var/lib/config-data/gnocchi/etc/httpd/:/etc/httpd/:ro
- - /var/lib/config-data/gnocchi/var/www/:/var/www/:ro
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- - ''
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
- - ''
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/gnocchi-api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ - /var/lib/config-data/gnocchi/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/gnocchi/var/www/:/var/www/:ro
+ - /var/log/containers/gnocchi:/var/log/gnocchi
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/gnocchi
+ state: directory
upgrade_tasks:
- name: Stop and disable httpd service
tags: step2
diff --git a/docker/services/gnocchi-metricd.yaml b/docker/services/gnocchi-metricd.yaml
index 5ce7e12a..9ddc3afb 100644
--- a/docker/services/gnocchi-metricd.yaml
+++ b/docker/services/gnocchi-metricd.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Gnocchi Metricd service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -60,6 +69,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/gnocchi-metricd.json:
command: /usr/bin/gnocchi-metricd
+ permissions:
+ - path: /var/log/gnocchi
+ owner: gnocchi:gnocchi
+ recurse: true
docker_config:
step_4:
gnocchi_metricd:
@@ -68,15 +81,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/gnocchi-metricd.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/gnocchi-metricd.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ - /var/log/containers/gnocchi:/var/log/gnocchi
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/gnocchi
+ state: directory
upgrade_tasks:
- name: Stop and disable openstack-gnocchi-metricd service
tags: step2
diff --git a/docker/services/gnocchi-statsd.yaml b/docker/services/gnocchi-statsd.yaml
index 40023a60..99a94960 100644
--- a/docker/services/gnocchi-statsd.yaml
+++ b/docker/services/gnocchi-statsd.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Gnocchi Statsd service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -60,6 +69,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/gnocchi-statsd.json:
command: /usr/bin/gnocchi-statsd
+ permissions:
+ - path: /var/log/gnocchi
+ owner: gnocchi:gnocchi
+ recurse: true
docker_config:
step_4:
gnocchi_statsd:
@@ -68,15 +81,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/gnocchi-statsd.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/gnocchi-statsd.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
+ - /var/log/containers/gnocchi:/var/log/gnocchi
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/gnocchi
+ state: directory
upgrade_tasks:
- name: Stop and disable openstack-gnocchi-statsd service
tags: step2
diff --git a/docker/services/heat-api-cfn.yaml b/docker/services/heat-api-cfn.yaml
index 8f7bb144..6cfc8ecc 100644
--- a/docker/services/heat-api-cfn.yaml
+++ b/docker/services/heat-api-cfn.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Heat API CFN service
@@ -12,10 +12,10 @@ parameters:
description: image
default: 'centos-binary-heat-api-cfn:latest'
type: string
- # we configure all heat services in the same heat engine container
+ # puppet needs the heat-wsgi-api-cfn binary from centos-binary-heat-api-cfn
DockerHeatConfigImage:
description: image
- default: 'centos-binary-heat-engine:latest'
+ default: 'centos-binary-heat-api-cfn:latest'
type: string
EndpointMap:
default: {}
@@ -31,7 +31,20 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ EnableInternalTLS:
+ type: boolean
+ default: false
+
+conditions:
+ internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
resources:
@@ -44,6 +57,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -59,7 +74,7 @@ outputs:
service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
- config_volume: heat
+ config_volume: heat_api_cfn
puppet_tags: heat_config,file,concat,file_line
step_config: *step_config
config_image:
@@ -68,7 +83,11 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config:
/var/lib/kolla/config_files/heat_api_cfn.json:
- command: /usr/bin/heat-api-cfn --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+ command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/heat
+ owner: heat:heat
+ recurse: true
docker_config:
step_4:
heat_api_cfn:
@@ -79,19 +98,36 @@ outputs:
net: host
privileged: false
restart: always
+ # NOTE(mandre) kolla image changes the user to 'heat', we need it
+ # to be root to run httpd
+ user: root
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
- - /dev:/dev
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/heat_api_cfn/etc/heat/:/etc/heat/:ro
+ - /var/lib/config-data/heat_api_cfn/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/heat_api_cfn/var/www/:/var/www/:ro
+ - /var/log/containers/heat:/var/log/heat
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/heat
+ state: directory
upgrade_tasks:
- name: Stop and disable heat_api_cfn service
tags: step2
- service: name=openstack-heat-api-cfn state=stopped enabled=no
+ service: name=httpd state=stopped enabled=no
diff --git a/docker/services/heat-api.yaml b/docker/services/heat-api.yaml
index 0e668ce1..9c0ec23c 100644
--- a/docker/services/heat-api.yaml
+++ b/docker/services/heat-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Heat API service
@@ -12,10 +12,10 @@ parameters:
description: image
default: 'centos-binary-heat-api:latest'
type: string
- # we configure all heat services in the same heat engine container
+ # puppet needs the heat-wsgi-api binary from centos-binary-heat-api
DockerHeatConfigImage:
description: image
- default: 'centos-binary-heat-engine:latest'
+ default: 'centos-binary-heat-api:latest'
type: string
EndpointMap:
default: {}
@@ -31,7 +31,20 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ EnableInternalTLS:
+ type: boolean
+ default: false
+
+conditions:
+ internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
resources:
@@ -44,6 +57,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -59,7 +74,7 @@ outputs:
service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
puppet_config:
- config_volume: heat
+ config_volume: heat_api
puppet_tags: heat_config,file,concat,file_line
step_config: *step_config
config_image:
@@ -68,7 +83,11 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerHeatConfigImage} ]
kolla_config:
/var/lib/kolla/config_files/heat_api.json:
- command: /usr/bin/heat-api --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+ command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/heat
+ owner: heat:heat
+ recurse: true
docker_config:
step_4:
heat_api:
@@ -79,19 +98,36 @@ outputs:
net: host
privileged: false
restart: always
+ # NOTE(mandre) kolla image changes the user to 'heat', we need it
+ # to be root to run httpd
+ user: root
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
- - /dev:/dev
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/heat_api/etc/heat/:/etc/heat/:ro
+ - /var/lib/config-data/heat_api/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/heat_api/var/www/:/var/www/:ro
+ - /var/log/containers/heat:/var/log/heat
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/heat
+ state: directory
upgrade_tasks:
- name: Stop and disable heat_api service
tags: step2
- service: name=openstack-heat-api state=stopped enabled=no
+ service: name=httpd state=stopped enabled=no
diff --git a/docker/services/heat-engine.yaml b/docker/services/heat-engine.yaml
index 5a1f011d..02f7febe 100644
--- a/docker/services/heat-engine.yaml
+++ b/docker/services/heat-engine.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Heat Engine service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -39,6 +46,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -64,20 +73,32 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/heat_engine.json:
command: /usr/bin/heat-engine --config-file /usr/share/heat/heat-dist.conf --config-file /etc/heat/heat.conf
+ permissions:
+ - path: /var/log/heat
+ owner: heat:heat
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
+ heat_init_log:
+ start_order: 0
+ image: *heat_engine_image
+ user: root
+ volumes:
+ - /var/log/containers/heat:/var/log/heat
+ command: ['/bin/bash', '-c', 'chown -R heat:heat /var/log/heat']
heat_engine_db_sync:
+ start_order: 1
image: *heat_engine_image
net: host
privileged: false
detach: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
+ - /var/log/containers/heat:/var/log/heat
command: ['heat-manage', 'db_sync']
step_4:
heat_engine:
@@ -86,16 +107,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/heat_engine.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/heat/etc/heat/:/etc/heat/:ro
+ - /var/log/containers/heat:/var/log/heat
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/heat
+ state: directory
upgrade_tasks:
- name: Stop and disable heat_engine service
tags: step2
diff --git a/docker/services/ironic-api.yaml b/docker/services/ironic-api.yaml
index a019a61e..8d2f6221 100644
--- a/docker/services/ironic-api.yaml
+++ b/docker/services/ironic-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Ironic API service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -66,23 +75,36 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/ironic_api.json:
command: /usr/bin/ironic-api
+ permissions:
+ - path: /var/log/ironic
+ owner: ironic:ironic
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
- ironic_db_sync:
+ ironic_init_logs:
+ start_order: 0
image: &ironic_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerIronicApiImage} ]
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/ironic:/var/log/ironic
+ command: ['/bin/bash', '-c', 'chown -R ironic:ironic /var/log/ironic']
+ ironic_db_sync:
+ start_order: 1
+ image: *ironic_image
net: host
privileged: false
detach: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/ironic/etc/:/etc/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/ironic/etc/:/etc/:ro
+ - /var/log/containers/ironic:/var/log/ironic
command: ['ironic-dbsync', '--config-file', '/etc/ironic/ironic.conf']
step_4:
ironic_api:
@@ -92,15 +114,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/ironic_api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/ironic/etc/:/etc/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/ironic_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/ironic/etc/:/etc/:ro
+ - /var/log/containers/ironic:/var/log/ironic
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/ironic
+ state: directory
upgrade_tasks:
- name: Stop and disable ironic_api service
tags: step2
diff --git a/docker/services/ironic-conductor.yaml b/docker/services/ironic-conductor.yaml
index 1e1316f3..70367615 100644
--- a/docker/services/ironic-conductor.yaml
+++ b/docker/services/ironic-conductor.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Ironic Conductor service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -78,6 +87,9 @@ outputs:
- path: /var/lib/ironic
owner: ironic:ironic
recurse: true
+ - path: /var/log/ironic
+ owner: ironic:ironic
+ recurse: true
docker_config:
step_4:
ironic_conductor:
@@ -90,25 +102,27 @@ outputs:
privileged: true
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
- - /lib/modules:/lib/modules:ro
- - /sys:/sys
- - /dev:/dev
- - /run:/run #shared?
- - /var/lib/ironic:/var/lib/ironic
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/ironic_conductor.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
+ - /lib/modules:/lib/modules:ro
+ - /sys:/sys
+ - /dev:/dev
+ - /run:/run #shared?
+ - /var/lib/ironic:/var/lib/ironic
+ - /var/log/containers/ironic:/var/log/ironic
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- - name: create ironic persistent data directory
+ - name: create persistent directories
file:
- path: /var/lib/ironic
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/ironic
+ - /var/lib/ironic
- name: stat /httpboot
stat: path=/httpboot
register: stat_httpboot
diff --git a/docker/services/ironic-pxe.yaml b/docker/services/ironic-pxe.yaml
index 6ec80397..baf03c0f 100644
--- a/docker/services/ironic-pxe.yaml
+++ b/docker/services/ironic-pxe.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Ironic PXE service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -58,6 +65,10 @@ outputs:
command: /usr/sbin/httpd -DFOREGROUND
/var/lib/kolla/config_files/ironic_pxe_tftp.json:
command: /usr/sbin/in.tftpd --foreground --user root --address 0.0.0.0:69 --map-file /var/lib/ironic/tftpboot/map-file /var/lib/ironic/tftpboot
+ permissions:
+ - path: /var/log/ironic
+ owner: ironic:ironic
+ recurse: true
docker_config:
step_4:
ironic_pxe_tftp:
@@ -70,24 +81,23 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/ironic_pxe_tftp.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
- # TODO(mandre) check how docker like mounting in a bind-mounted tree
- # This directory may contain migrated data from BM
- - /var/lib/ironic:/var/lib/ironic/
- # These files were generated by puppet inside the config container
- # TODO(mandre) check the mount permission (ro/rw)
- - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/chain.c32:/var/lib/ironic/tftpboot/chain.c32
- - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/pxelinux.0:/var/lib/ironic/tftpboot/pxelinux.0
- - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/ipxe.efi:/var/lib/ironic/tftpboot/ipxe.efi
- - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/undionly.kpxe:/var/lib/ironic/tftpboot/undionly.kpxe
- - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/map-file:/var/lib/ironic/tftpboot/map-file
- - /dev/log:/dev/log
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/ironic_pxe_tftp.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
+ # TODO(mandre) check how docker like mounting in a bind-mounted tree
+ # This directory may contain migrated data from BM
+ - /var/lib/ironic:/var/lib/ironic/
+ # These files were generated by puppet inside the config container
+ # TODO(mandre) check the mount permission (ro/rw)
+ - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/chain.c32:/var/lib/ironic/tftpboot/chain.c32
+ - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/pxelinux.0:/var/lib/ironic/tftpboot/pxelinux.0
+ - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/ipxe.efi:/var/lib/ironic/tftpboot/ipxe.efi
+ - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/undionly.kpxe:/var/lib/ironic/tftpboot/undionly.kpxe
+ - /var/lib/config-data/ironic/var/lib/ironic/tftpboot/map-file:/var/lib/ironic/tftpboot/map-file
+ - /dev/log:/dev/log
+ - /var/log/containers/ironic:/var/log/ironic
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
ironic_pxe_http:
@@ -97,19 +107,22 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/ironic_pxe_http.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
- - /var/lib/config-data/ironic/etc/httpd/:/etc/httpd/:ro
- - /var/lib/ironic:/var/lib/ironic/
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/ironic_pxe_http.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/ironic/etc/ironic/:/etc/ironic/:ro
+ - /var/lib/config-data/ironic/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/ironic/var/www/:/var/www/:ro
+ - /var/lib/ironic:/var/lib/ironic/
+ - /var/log/containers/ironic:/var/log/ironic
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- - name: create ironic persistent data directory
+ - name: create persistent directories
file:
- path: /var/lib/ironic
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/lib/ironic
+ - /var/log/containers/ironic
diff --git a/docker/services/keystone.yaml b/docker/services/keystone.yaml
index e7717ab0..86ef094c 100644
--- a/docker/services/keystone.yaml
+++ b/docker/services/keystone.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Keystone service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
AdminPassword:
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
type: string
@@ -51,6 +58,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
conditions:
@@ -84,14 +93,15 @@ outputs:
/var/lib/kolla/config_files/keystone.json:
command: /usr/sbin/httpd -DFOREGROUND
docker_config:
+ # Kolla_bootstrap/db sync runs before permissions set by kolla_config
step_3:
- keystone-init-log:
+ keystone_init_log:
start_order: 0
image: *keystone_image
user: root
- command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && mkdir -p /var/log/keystone && chown keystone:keystone /var/log/keystone']
+ command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R keystone:keystone /var/log/keystone']
volumes:
- - logs:/var/log
+ - /var/log/containers/keystone:/var/log/keystone
keystone_db_sync:
start_order: 1
image: *keystone_image
@@ -99,26 +109,24 @@ outputs:
privileged: false
detach: false
volumes: &keystone_volumes
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/keystone.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/keystone/var/www/:/var/www/:ro
- - /var/lib/config-data/keystone/etc/keystone/:/etc/keystone/:ro
- - /var/lib/config-data/keystone/etc/httpd/:/etc/httpd/:ro
- - logs:/var/log
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- - ''
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
- - ''
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/keystone.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/keystone/var/www/:/var/www/:ro
+ - /var/lib/config-data/keystone/etc/keystone/:/etc/keystone/:ro
+ - /var/lib/config-data/keystone/etc/httpd/:/etc/httpd/:ro
+ - /var/log/containers/keystone:/var/log/keystone
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_BOOTSTRAP=True
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
@@ -143,6 +151,11 @@ outputs:
puppet_tags: 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
step_config: 'include ::tripleo::profile::base::keystone'
config_image: *keystone_image
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/keystone
+ state: directory
upgrade_tasks:
- name: Stop and disable keystone service (running under httpd)
tags: step2
diff --git a/docker/services/memcached.yaml b/docker/services/memcached.yaml
index 87b5f408..38a75d2d 100644
--- a/docker/services/memcached.yaml
+++ b/docker/services/memcached.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Memcached services
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -60,18 +69,27 @@ outputs:
kolla_config: {}
docker_config:
step_1:
+ memcached_init_logs:
+ start_order: 0
+ image: *memcached_image
+ privileged: false
+ user: root
+ volumes:
+ - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro
+ - /var/log/memcached.log:/var/log/memcached.log
+ command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; chown ${USER} /var/log/memcached.log']
memcached:
+ start_order: 1
image: *memcached_image
net: host
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro
+ # TODO(bogdando) capture memcached syslog logs from a container
command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS']
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
diff --git a/docker/services/mistral-api.yaml b/docker/services/mistral-api.yaml
index 7c2413dd..e5e2ff0b 100644
--- a/docker/services/mistral-api.yaml
+++ b/docker/services/mistral-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Mistral API service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -66,24 +75,36 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mistral_api.json:
command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/api.log --server=api
+ permissions:
+ - path: /var/log/mistral
+ owner: mistral:mistral
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
- mistral_db_sync:
- start_order: 1
+ mistral_init_logs:
+ start_order: 0
image: &mistral_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerMistralApiImage} ]
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/mistral:/var/log/mistral
+ command: ['/bin/bash', '-c', 'chown -R mistral:mistral /var/log/mistral']
+ mistral_db_sync:
+ start_order: 1
+ image: *mistral_image
net: host
privileged: false
detach: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/mistral/etc/:/etc/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/mistral/etc/:/etc/:ro
+ - /var/log/containers/mistral:/var/log/mistral
command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'upgrade', 'head']
mistral_db_populate:
start_order: 2
@@ -92,12 +113,11 @@ outputs:
privileged: false
detach: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/mistral/etc/:/etc/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/mistral/etc/:/etc/:ro
+ - /var/log/containers/mistral:/var/log/mistral
# NOTE: dprince this requires that we install openstack-tripleo-common into
# the Mistral API image so that we get tripleo* actions
command: ['mistral-db-manage', '--config-file', '/etc/mistral/mistral.conf', 'populate']
@@ -109,15 +129,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/mistral_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+ - /var/log/containers/mistral:/var/log/mistral
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/mistral
+ state: directory
upgrade_tasks:
- name: Stop and disable mistral_api service
tags: step2
diff --git a/docker/services/mistral-engine.yaml b/docker/services/mistral-engine.yaml
index 01ca3f0a..feef9c81 100644
--- a/docker/services/mistral-engine.yaml
+++ b/docker/services/mistral-engine.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Mistral Engine service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -67,6 +76,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mistral_engine.json:
command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/engine.log --server=engine
+ permissions:
+ - path: /var/log/mistral
+ owner: mistral:mistral
+ recurse: true
docker_config:
step_4:
mistral_engine:
@@ -78,16 +91,20 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /run:/run
- - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /run:/run
+ - /var/lib/kolla/config_files/mistral_engine.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+ - /var/log/containers/mistral:/var/log/mistral
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/mistral
+ state: directory
upgrade_tasks:
- name: Stop and disable mistral_engine service
tags: step2
diff --git a/docker/services/mistral-executor.yaml b/docker/services/mistral-executor.yaml
index 374b0be7..90415874 100644
--- a/docker/services/mistral-executor.yaml
+++ b/docker/services/mistral-executor.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Mistral Executor service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -67,6 +76,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/mistral_executor.json:
command: /usr/bin/mistral-server --config-file=/etc/mistral/mistral.conf --log-file=/var/log/mistral/executor.log --server=executor
+ permissions:
+ - path: /var/log/mistral
+ owner: mistral:mistral
+ recurse: true
docker_config:
step_4:
mistral_executor:
@@ -78,20 +91,24 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/mistral_executor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
- - /run:/run
- # FIXME: this is required in order for Nova cells
- # initialization workflows on the Undercloud. Need to
- # exclude this on the overcloud for security reasons.
- - /var/lib/config-data/nova/etc/nova:/etc/nova:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/mistral_executor.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/mistral/etc/mistral/:/etc/mistral/:ro
+ - /run:/run
+ # FIXME: this is required in order for Nova cells
+ # initialization workflows on the Undercloud. Need to
+ # exclude this on the overcloud for security reasons.
+ - /var/lib/config-data/nova/etc/nova:/etc/nova:ro
+ - /var/log/containers/mistral:/var/log/mistral
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/mistral
+ state: directory
upgrade_tasks:
- name: Stop and disable mistral_executor service
tags: step2
diff --git a/docker/services/neutron-api.yaml b/docker/services/neutron-api.yaml
index 00b1f857..485b02e6 100644
--- a/docker/services/neutron-api.yaml
+++ b/docker/services/neutron-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Neutron API service
@@ -31,6 +31,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -67,13 +76,27 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/neutron_api.json:
command: /usr/bin/neutron-server --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini
+ permissions:
+ - path: /var/log/neutron
+ owner: neutron:neutron
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
- neutron_db_sync:
+ neutron_init_logs:
+ start_order: 0
image: &neutron_api_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNeutronApiImage} ]
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/neutron:/var/log/neutron
+ command: ['/bin/bash', '-c', 'chown -R neutron:neutron /var/log/neutron']
+ neutron_db_sync:
+ start_order: 1
+ image: *neutron_api_image
net: host
privileged: false
detach: false
@@ -81,13 +104,12 @@ outputs:
# and run as neutron user
user: root
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/neutron/etc/neutron:/etc/neutron:ro
- - /var/lib/config-data/neutron/usr/share/neutron:/usr/share/neutron:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/neutron/etc/neutron:/etc/neutron:ro
+ - /var/lib/config-data/neutron/usr/share/neutron:/usr/share/neutron:ro
+ - /var/log/containers/neutron:/var/log/neutron
command: ['neutron-db-manage', 'upgrade', 'heads']
step_4:
neutron_api:
@@ -96,15 +118,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/neutron_api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/neutron_api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
+ - /var/log/containers/neutron:/var/log/neutron
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/neutron
+ state: directory
upgrade_tasks:
- name: Stop and disable neutron_api service
tags: step2
diff --git a/docker/services/neutron-dhcp.yaml b/docker/services/neutron-dhcp.yaml
index e48f53b4..68d9994e 100644
--- a/docker/services/neutron-dhcp.yaml
+++ b/docker/services/neutron-dhcp.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Neutron DHCP service
@@ -31,6 +31,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -67,6 +76,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/neutron_dhcp.json:
command: /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file /var/log/neutron/dhcp-agent.log
+ permissions:
+ - path: /var/log/neutron
+ owner: neutron:neutron
+ recurse: true
docker_config:
step_4:
neutron_dhcp:
@@ -79,17 +92,21 @@ outputs:
privileged: true
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/neutron_dhcp.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
- - /lib/modules:/lib/modules:ro
- - /run/:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/neutron_dhcp.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
+ - /lib/modules:/lib/modules:ro
+ - /run/:/run
+ - /var/log/containers/neutron:/var/log/neutron
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/neutron
+ state: directory
upgrade_tasks:
- name: Stop and disable neutron_dhcp service
tags: step2
diff --git a/docker/services/neutron-l3.yaml b/docker/services/neutron-l3.yaml
index 90fe65f6..83dae627 100644
--- a/docker/services/neutron-l3.yaml
+++ b/docker/services/neutron-l3.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Neutron L3 agent
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -63,6 +72,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/neutron-l3-agent.json:
command: /usr/bin/neutron-l3-agent --config-file /usr/share/neutron/neutron-dist.conf --config-dir /usr/share/neutron/l3_agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini
+ permissions:
+ - path: /var/log/neutron
+ owner: neutron:neutron
+ recurse: true
docker_config:
step_4:
neutronl3agent:
@@ -75,14 +88,18 @@ outputs:
privileged: true
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/neutron-l3-agent.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
- - /lib/modules:/lib/modules:ro
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/neutron-l3-agent.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
+ - /lib/modules:/lib/modules:ro
+ - /run:/run
+ - /var/log/containers/neutron:/var/log/neutron
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/neutron
+ state: directory
diff --git a/docker/services/neutron-ovs-agent.yaml b/docker/services/neutron-ovs-agent.yaml
index c40ef8bf..ac52b378 100644
--- a/docker/services/neutron-ovs-agent.yaml
+++ b/docker/services/neutron-ovs-agent.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack Neutron openvswitch service
@@ -21,6 +21,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -57,7 +66,11 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
kolla_config:
/var/lib/kolla/config_files/neutron-openvswitch-agent.json:
- command: /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
+ command: /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
+ permissions:
+ - path: /var/log/neutron
+ owner: neutron:neutron
+ recurse: true
docker_config:
step_4:
neutronovsagent:
@@ -67,17 +80,21 @@ outputs:
privileged: true
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/neutron-openvswitch-agent.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
- - /lib/modules:/lib/modules:ro
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/neutron-openvswitch-agent.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/neutron/etc/neutron/:/etc/neutron/:ro
+ - /lib/modules:/lib/modules:ro
+ - /run:/run
+ - /var/log/containers/neutron:/var/log/neutron
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/neutron
+ state: directory
upgrade_tasks:
- name: Stop and disable neutron_ovs_agent service
tags: step2
diff --git a/docker/services/neutron-plugin-ml2.yaml b/docker/services/neutron-plugin-ml2.yaml
index 34864d3a..66a1397c 100644
--- a/docker/services/neutron-plugin-ml2.yaml
+++ b/docker/services/neutron-plugin-ml2.yaml
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -35,6 +42,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml
index 8621bb65..627d1b48 100644
--- a/docker/services/nova-api.yaml
+++ b/docker/services/nova-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova API service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -70,20 +79,36 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_api.json:
command: /usr/bin/nova-api
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
docker_config:
+ # db sync runs before permissions set by kolla_config
step_3:
- nova_api_db_sync:
- start_order: 1
+ nova_init_logs:
+ start_order: 0
image: &nova_api_image
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerNovaApiImage} ]
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/nova:/var/log/nova
+ command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
+ nova_api_db_sync:
+ start_order: 1
+ image: *nova_api_image
net: host
detach: false
volumes: &nova_api_volumes
- - /var/lib/config-data/nova/etc/:/etc/:ro
- - /etc/hosts:/etc/hosts:ro
- - /etc/localtime:/etc/localtime:ro
+ 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/nova-manage', 'api_db', 'sync']
# FIXME: we probably want to wait on the 'cell_v2 update' in order for this
# to be capable of upgrading a baremetal setup. This is to ensure the name
@@ -128,14 +153,7 @@ outputs:
user: nova
privileged: true
restart: always
- volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /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
+ volumes: *nova_api_volumes
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
step_5:
@@ -149,6 +167,11 @@ outputs:
- '/usr/bin/nova-manage'
- 'cell_v2'
- 'discover_hosts'
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/nova
+ state: directory
upgrade_tasks:
- name: Stop and disable nova_api service
tags: step2
diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml
index a695ce2a..540e831a 100644
--- a/docker/services/nova-compute.yaml
+++ b/docker/services/nova-compute.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova Compute service
@@ -21,6 +21,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -66,6 +75,13 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova-compute.json:
command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
+ - path: /var/lib/nova
+ owner: nova:nova
+ recurse: true
docker_config:
# FIXME: run discover hosts here
step_4:
@@ -76,26 +92,29 @@ outputs:
user: root
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova-compute.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
- - /dev:/dev
- - /etc/iscsi:/etc/iscsi
- - /lib/modules:/lib/modules:ro
- - /run:/run
- - /var/lib/nova:/var/lib/nova
- - /var/lib/libvirt:/var/lib/libvirt
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova-compute.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
+ - /dev:/dev
+ - /etc/iscsi:/etc/iscsi
+ - /lib/modules:/lib/modules:ro
+ - /run:/run
+ - /var/lib/nova:/var/lib/nova
+ - /var/lib/libvirt:/var/lib/libvirt
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- - name: create /var/lib/libvirt
+ - name: create persistent directories
file:
- path: /var/lib/libvirt
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/nova
+ - /var/lib/nova
+ - /var/lib/libvirt
upgrade_tasks:
- name: Stop and disable nova-compute service
tags: step2
diff --git a/docker/services/nova-conductor.yaml b/docker/services/nova-conductor.yaml
index e414b216..1a0e8641 100644
--- a/docker/services/nova-conductor.yaml
+++ b/docker/services/nova-conductor.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova Conductor service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -43,6 +50,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -65,6 +74,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_conductor.json:
command: /usr/bin/nova-conductor
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
docker_config:
step_4:
nova_conductor:
@@ -76,16 +89,19 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova_conductor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_conductor.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
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/nova
+ state: directory
upgrade_tasks:
- name: Stop and disable nova_conductor service
tags: step2
diff --git a/docker/services/nova-ironic.yaml b/docker/services/nova-ironic.yaml
index 2f4da6c0..668cbf00 100644
--- a/docker/services/nova-ironic.yaml
+++ b/docker/services/nova-ironic.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova Ironic Compute service
@@ -25,6 +25,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -39,7 +46,11 @@ resources:
NovaIronicBase:
type: ../../puppet/services/nova-ironic.yaml
properties:
+ ServiceNetMap: {get_param: ServiceNetMap}
+ DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -59,7 +70,14 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
kolla_config:
/var/lib/kolla/config_files/nova_ironic.json:
- command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
+ command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
+ - path: /var/lib/nova
+ owner: nova:nova
+ recurse: true
docker_config:
step_5:
novacompute:
@@ -72,19 +90,26 @@ outputs:
user: root
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
- - /run:/run
- - /dev:/dev
- - /etc/iscsi:/etc/iscsi
- - /var/lib/nova/:/var/lib/nova
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
+ - /run:/run
+ - /dev:/dev
+ - /etc/iscsi:/etc/iscsi
+ - /var/lib/nova/:/var/lib/nova
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent directories
+ file:
+ path: "{{ item }}"
+ state: directory
+ with_items:
+ - /var/log/containers/nova
+ - /var/lib/nova
upgrade_tasks:
- name: Stop and disable nova-compute service
tags: step2
diff --git a/docker/services/nova-libvirt.yaml b/docker/services/nova-libvirt.yaml
index 1f7205ba..cc0640de 100644
--- a/docker/services/nova-libvirt.yaml
+++ b/docker/services/nova-libvirt.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack Libvirt Service
@@ -27,6 +27,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -44,6 +51,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -72,6 +81,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova-libvirt.json:
command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
docker_config:
step_3:
nova_libvirt:
@@ -84,22 +97,21 @@ outputs:
privileged: true
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova_libvirt/etc/libvirt/:/etc/libvirt/:ro
- - /lib/modules:/lib/modules:ro
- - /dev:/dev
- - /run:/run
- - /sys/fs/cgroup:/sys/fs/cgroup
- - /var/lib/nova:/var/lib/nova
- # Needed to use host's virtlogd
- - /var/run/libvirt:/var/run/libvirt
- - /var/lib/libvirt:/var/lib/libvirt
- - /etc/libvirt/qemu:/etc/libvirt/qemu
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/nova_libvirt/etc/libvirt/:/etc/libvirt/:ro
+ - /lib/modules:/lib/modules:ro
+ - /dev:/dev
+ - /run:/run
+ - /sys/fs/cgroup:/sys/fs/cgroup
+ - /var/lib/nova:/var/lib/nova
+ # Needed to use host's virtlogd
+ - /var/run/libvirt:/var/run/libvirt
+ - /var/lib/libvirt:/var/lib/libvirt
+ - /etc/libvirt/qemu:/etc/libvirt/qemu
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
@@ -110,6 +122,7 @@ outputs:
with_items:
- /etc/libvirt/qemu
- /var/lib/libvirt
+ - /var/log/containers/nova
upgrade_tasks:
- name: Stop and disable libvirtd service
tags: step2
diff --git a/docker/services/nova-metadata.yaml b/docker/services/nova-metadata.yaml
index b452c61b..95d781c7 100644
--- a/docker/services/nova-metadata.yaml
+++ b/docker/services/nova-metadata.yaml
@@ -18,6 +18,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -28,6 +35,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
diff --git a/docker/services/nova-placement.yaml b/docker/services/nova-placement.yaml
index e579e158..528a20ea 100644
--- a/docker/services/nova-placement.yaml
+++ b/docker/services/nova-placement.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova Placement API service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -63,6 +72,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_placement.json:
command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
docker_config:
# start this early so it is up before computes start reporting
step_3:
@@ -73,17 +86,21 @@ outputs:
user: root
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova_placement.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova_placement/etc/nova/:/etc/nova/:ro
- - /var/lib/config-data/nova_placement/etc/httpd/:/etc/httpd/:ro
- - /var/lib/config-data/nova_placement/var/www/:/var/www/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_placement.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/nova_placement/etc/nova/:/etc/nova/:ro
+ - /var/lib/config-data/nova_placement/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/nova_placement/var/www/:/var/www/:ro
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/nova
+ state: directory
upgrade_tasks:
- name: Stop and disable nova_placement service (running under httpd)
tags: step2
diff --git a/docker/services/nova-scheduler.yaml b/docker/services/nova-scheduler.yaml
index 54f30abd..bcd9f7b5 100644
--- a/docker/services/nova-scheduler.yaml
+++ b/docker/services/nova-scheduler.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Nova Scheduler service
@@ -30,6 +30,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -64,6 +73,10 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/nova_scheduler.json:
command: /usr/bin/nova-scheduler
+ permissions:
+ - path: /var/log/nova
+ owner: nova:nova
+ recurse: true
docker_config:
step_4:
nova_scheduler:
@@ -75,16 +88,20 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/nova_scheduler.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
- - /run:/run
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/nova_scheduler.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
+ - /run:/run
+ - /var/log/containers/nova:/var/log/nova
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/nova
+ state: directory
upgrade_tasks:
- name: Stop and disable nova_scheduler service
tags: step2
diff --git a/docker/services/panko-api.yaml b/docker/services/panko-api.yaml
index cd0ee3c6..b2abc068 100644
--- a/docker/services/panko-api.yaml
+++ b/docker/services/panko-api.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack Panko service configured with docker.
@@ -28,6 +28,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EnableInternalTLS:
type: boolean
default: false
@@ -47,6 +54,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -72,15 +81,19 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/panko-api.json:
command: /usr/sbin/httpd -DFOREGROUND
+ permissions:
+ - path: /var/log/panko
+ owner: panko:panko
+ recurse: true
docker_config:
step_3:
panko-init-log:
start_order: 0
image: *panko_image
user: root
- command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && mkdir -p /var/log/panko && chown panko:panko /var/log/panko']
volumes:
- - logs:/var/log
+ - /var/log/containers/panko:/var/log/panko
+ command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd; chown -R panko:panko /var/log/panko']
panko_db_sync:
start_order: 1
image: *panko_image
@@ -88,13 +101,11 @@ outputs:
detach: false
privileged: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/config-data/panko/etc/panko:/etc/panko:ro
- - logs:/var/log
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/config-data/panko/etc/panko:/etc/panko:ro
+ - /var/log/containers/panko:/var/log/panko
command: /usr/bin/panko-dbsync
step_4:
panko_api:
@@ -104,26 +115,30 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/panko-api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/panko/etc/panko/:/etc/panko/:ro
- - /var/lib/config-data/panko/etc/httpd/:/etc/httpd/:ro
- - /var/lib/config-data/panko/var/www/:/var/www/:ro
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- - ''
- -
- if:
- - internal_tls_enabled
- - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
- - ''
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/panko-api.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/panko/etc/panko/:/etc/panko/:ro
+ - /var/lib/config-data/panko/etc/httpd/:/etc/httpd/:ro
+ - /var/lib/config-data/panko/var/www/:/var/www/:ro
+ - /var/log/containers/panko:/var/log/panko
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - ''
+ -
+ if:
+ - internal_tls_enabled
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ - ''
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/panko
+ state: directory
metadata_settings:
get_attr: [PankoApiPuppetBase, role_data, metadata_settings]
diff --git a/docker/services/rabbitmq.yaml b/docker/services/rabbitmq.yaml
index e0952470..92c8d9f6 100644
--- a/docker/services/rabbitmq.yaml
+++ b/docker/services/rabbitmq.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Rabbitmq service
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
RabbitCookie:
type: string
default: ''
@@ -42,6 +49,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -70,22 +79,34 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/rabbitmq.json:
command: /usr/lib/rabbitmq/bin/rabbitmq-server
+ permissions:
+ - path: /var/lib/rabbitmq
+ owner: rabbitmq:rabbitmq
+ recurse: true
docker_config:
+ # Kolla_bootstrap runs before permissions set by kolla_config
step_1:
- rabbitmq_bootstrap:
+ rabbitmq_init_logs:
start_order: 0
image: *rabbitmq_image
+ privileged: false
+ user: root
+ volumes:
+ - /var/log/containers/rabbitmq:/var/log/rabbitmq
+ command: ['/bin/bash', '-c', 'chown -R rabbitmq:rabbitmq /var/log/rabbitmq']
+ rabbitmq_bootstrap:
+ start_order: 1
+ image: *rabbitmq_image
net: host
privileged: false
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/rabbitmq/etc/rabbitmq/:/etc/rabbitmq/:ro
- - /var/lib/rabbitmq:/var/lib/rabbitmq
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/rabbitmq/etc/rabbitmq/:/etc/rabbitmq/:ro
+ - /var/lib/rabbitmq:/var/lib/rabbitmq
+ - /var/log/containers/rabbitmq:/var/log/rabbitmq
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
- KOLLA_BOOTSTRAP=True
@@ -101,20 +122,19 @@ outputs:
- {get_param: RabbitCookie}
- {get_param: [DefaultPasswords, rabbit_cookie]}
rabbitmq:
- start_order: 1
+ start_order: 2
image: *rabbitmq_image
net: host
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/rabbitmq/etc/rabbitmq/:/etc/rabbitmq/:ro
- - /var/lib/rabbitmq:/var/lib/rabbitmq
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/rabbitmq.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/rabbitmq/etc/rabbitmq/:/etc/rabbitmq/:ro
+ - /var/lib/rabbitmq:/var/lib/rabbitmq
+ - /var/log/containers/rabbitmq:/var/log/rabbitmq
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
docker_puppet_tasks:
@@ -128,10 +148,13 @@ outputs:
- /var/lib/config-data/rabbitmq/etc/:/etc/
- /var/lib/rabbitmq:/var/lib/rabbitmq:ro
host_prep_tasks:
- - name: create /var/lib/rabbitmq
+ - name: create persistent directories
file:
- path: /var/lib/rabbitmq
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/rabbitmq
+ - /var/lib/rabbitmq
upgrade_tasks:
- name: Stop and disable rabbitmq service
tags: step2
diff --git a/docker/services/services.yaml b/docker/services/services.yaml
index 21387c9b..31def7f3 100644
--- a/docker/services/services.yaml
+++ b/docker/services/services.yaml
@@ -26,6 +26,13 @@ parameters:
description: Mapping of service -> default password. Used to help
pass top level passwords managed by Heat into services.
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -36,6 +43,8 @@ resources:
ServiceNetMap: {get_param: ServiceNetMap}
EndpointMap: {get_param: EndpointMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
ServiceChain:
type: OS::Heat::ResourceChain
@@ -46,6 +55,8 @@ resources:
ServiceNetMap: {get_param: ServiceNetMap}
EndpointMap: {get_param: EndpointMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
diff --git a/docker/services/swift-proxy.yaml b/docker/services/swift-proxy.yaml
index 6e8d6eb9..988bb399 100644
--- a/docker/services/swift-proxy.yaml
+++ b/docker/services/swift-proxy.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized swift proxy service
@@ -26,6 +26,20 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
+ EnableInternalTLS:
+ type: boolean
+ default: false
+
+conditions:
+
+ internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
resources:
@@ -38,6 +52,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -60,33 +76,60 @@ outputs:
kolla_config:
/var/lib/kolla/config_files/swift_proxy.json:
command: /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
+ permissions:
+ - path: /var/log/swift
+ owner: swift:swift
+ recurse: true
+ /var/lib/kolla/config_files/swift_proxy_tls_proxy.json:
+ command: /usr/sbin/httpd -DFOREGROUND
docker_config:
step_4:
- swift_proxy:
- image: *swift_proxy_image
- net: host
- user: swift
- restart: always
- volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_proxy.json:/var/lib/kolla/config_files/config.json:ro
- # FIXME I'm mounting /etc/swift as rw. Are the rings written to
- # at all during runtime?
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
- environment:
- - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ map_merge:
+ - swift_proxy:
+ image: *swift_proxy_image
+ net: host
+ user: swift
+ restart: always
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_proxy.json:/var/lib/kolla/config_files/config.json:ro
+ # FIXME I'm mounting /etc/swift as rw. Are the rings written to
+ # at all during runtime?
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ - if:
+ - internal_tls_enabled
+ - swift_proxy_tls_proxy:
+ image: *swift_proxy_image
+ net: host
+ user: root
+ restart: always
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_proxy_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/httpd/:/etc/httpd/:ro
+ - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+ - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ - {}
host_prep_tasks:
- - name: create /srv/node
+ - name: create persistent directories
file:
- path: /srv/node
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/swift
+ - /srv/node
upgrade_tasks:
- name: Stop and disable swift_proxy service
tags: step2
diff --git a/docker/services/swift-ringbuilder.yaml b/docker/services/swift-ringbuilder.yaml
index 21102505..f98e23fd 100644
--- a/docker/services/swift-ringbuilder.yaml
+++ b/docker/services/swift-ringbuilder.yaml
@@ -21,6 +21,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
@@ -59,6 +66,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
diff --git a/docker/services/swift-storage.yaml b/docker/services/swift-storage.yaml
index 5044c54c..f99eb068 100644
--- a/docker/services/swift-storage.yaml
+++ b/docker/services/swift-storage.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Swift Storage services.
@@ -32,6 +32,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
@@ -50,6 +57,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -96,6 +105,10 @@ outputs:
command: /usr/bin/swift-object-updater /etc/swift/object-server.conf
/var/lib/kolla/config_files/swift_object_server.json:
command: /usr/bin/swift-object-server /etc/swift/object-server.conf
+ permissions:
+ - path: /var/log/swift
+ owner: swift:swift
+ recurse: true
docker_config:
step_3:
# The puppet config sets this up but we don't have a way to mount the named
@@ -117,16 +130,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_account_auditor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_account_auditor.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: &kolla_env
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
swift_account_reaper:
@@ -135,16 +147,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_account_reaper.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_account_reaper.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_account_replicator:
image: *swift_account_image
@@ -152,16 +163,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_account_replicator.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_account_replicator.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_account_server:
image: *swift_account_image
@@ -169,16 +179,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_account_server.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_account_server.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_auditor:
image: &swift_container_image
@@ -189,16 +198,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_container_auditor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_container_auditor.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_replicator:
image: *swift_container_image
@@ -206,16 +214,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_container_replicator.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_container_replicator.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_updater:
image: *swift_container_image
@@ -223,16 +230,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_container_updater.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_container_updater.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_container_server:
image: *swift_container_image
@@ -240,16 +246,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_container_server.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_container_server.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_auditor:
image: &swift_object_image
@@ -260,16 +265,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_object_auditor.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_object_auditor.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_expirer:
image: *swift_proxy_image
@@ -277,16 +281,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_object_expirer.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_object_expirer.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_replicator:
image: *swift_object_image
@@ -294,16 +297,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_object_replicator.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_object_replicator.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_updater:
image: *swift_object_image
@@ -311,16 +313,15 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_object_updater.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_object_updater.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
swift_object_server:
image: *swift_object_image
@@ -328,22 +329,24 @@ outputs:
user: swift
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/swift_object_server.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
- - /run:/run
- - /srv/node:/srv/node
- - /dev:/dev
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/swift_object_server.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/swift/etc/swift:/etc/swift:rw
+ - /run:/run
+ - /srv/node:/srv/node
+ - /dev:/dev
+ - /var/log/containers/swift:/var/log/swift
environment: *kolla_env
host_prep_tasks:
- - name: create /srv/node
+ - name: create persistent directories
file:
- path: /srv/node
+ path: "{{ item }}"
state: directory
+ with_items:
+ - /var/log/containers/swift
+ - /srv/node
upgrade_tasks:
- name: Stop and disable swift storage services
tags: step2
diff --git a/docker/services/zaqar.yaml b/docker/services/zaqar.yaml
index fdb353bc..744a0c1e 100644
--- a/docker/services/zaqar.yaml
+++ b/docker/services/zaqar.yaml
@@ -1,4 +1,4 @@
-heat_template_version: ocata
+heat_template_version: pike
description: >
OpenStack containerized Zaqar services
@@ -26,6 +26,13 @@ parameters:
DefaultPasswords:
default: {}
type: json
+ RoleName:
+ default: ''
+ description: Role name on which the service is applied
+ type: string
+ RoleParameters:
+ default: {}
+ description: Parameters specific to the role
resources:
@@ -38,6 +45,8 @@ resources:
EndpointMap: {get_param: EndpointMap}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
+ RoleName: {get_param: RoleName}
+ RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
@@ -59,9 +68,13 @@ outputs:
- [ {get_param: DockerNamespace}, {get_param: DockerZaqarImage} ]
kolla_config:
/var/lib/kolla/config_files/zaqar.json:
- command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf
+ command: /usr/sbin/httpd -DFOREGROUND
/var/lib/kolla/config_files/zaqar_websocket.json:
command: /usr/bin/zaqar-server --config-file /etc/zaqar/zaqar.conf --config-file /etc/zaqar/1.conf
+ permissions:
+ - path: /var/log/zaqar
+ owner: zaqar:zaqar
+ recurse: true
docker_config:
step_4:
zaqar:
@@ -69,14 +82,18 @@ outputs:
net: host
privileged: false
restart: always
+ # NOTE(mandre) kolla image changes the user to 'zaqar', we need it
+ # to be root to run httpd
+ user: root
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/zaqar.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
+ - /var/lib/config-data/zaqar/var/www/:/var/www/:ro
+ - /var/lib/config-data/zaqar/etc/httpd/:/etc/httpd/:ro
+ - /var/log/containers/zaqar:/var/log/zaqar
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
zaqar_websocket:
@@ -85,17 +102,22 @@ outputs:
privileged: false
restart: always
volumes:
- yaql:
- expression: $.data.common.concat($.data.service)
- data:
- common: {get_attr: [ContainersCommon, volumes]}
- service:
- - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/zaqar_websocket.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/zaqar/etc/zaqar/:/etc/zaqar/:ro
+ - /var/lib/config-data/zaqar/var/www/:/var/www/:ro
+ - /var/lib/config-data/zaqar/etc/httpd/:/etc/httpd/:ro
+ - /var/log/containers/zaqar:/var/log/zaqar
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create persistent logs directory
+ file:
+ path: /var/log/containers/zaqar
+ state: directory
upgrade_tasks:
- name: Stop and disable zaqar service
tags: step2
- service: name=openstack-zaqar.service state=stopped enabled=no
-
+ service: name=httpd state=stopped enabled=no