diff options
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/docker-puppet.py | 12 | ||||
-rw-r--r-- | docker/services/ceph-ansible/ceph-base.yaml | 20 | ||||
-rw-r--r-- | docker/services/ceph-ansible/ceph-mon.yaml | 1 | ||||
-rw-r--r-- | docker/services/ceph-ansible/ceph-osd.yaml | 1 | ||||
-rw-r--r-- | docker/services/glance-api.yaml | 23 | ||||
-rw-r--r-- | docker/services/horizon.yaml | 2 | ||||
-rw-r--r-- | docker/services/memcached.yaml | 16 | ||||
-rw-r--r-- | docker/services/mistral-api.yaml | 36 | ||||
-rw-r--r-- | docker/services/swift-storage.yaml | 5 |
9 files changed, 86 insertions, 30 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index cc247031..533ed07d 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -90,16 +90,17 @@ def match_config_volume(prefix, config): config_volume=None for v in volumes: if v.startswith(prefix): - config_volume = os.path.relpath( - v.split(":")[0], prefix).split("/")[0] + config_volume = os.path.dirname(v.split(":")[0]) break return config_volume -def get_config_hash(prefix, config_volume): - hashfile = os.path.join(prefix, "%s.md5sum" % config_volume) +def get_config_hash(config_volume): + hashfile = "%s.md5sum" % config_volume + log.debug("Looking for hashfile %s for config_volume %s" % (hashfile, config_volume)) hash_data = None if os.path.isfile(hashfile): + log.debug("Got hashfile %s for config_volume %s" % (hashfile, config_volume)) with open(hashfile) as f: hash_data = f.read().rstrip() return hash_data @@ -248,6 +249,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume # Write a checksum of the config-data dir, this is used as a # salt to trigger container restart when the config changes tar -c -f - /var/lib/config-data/${NAME} --mtime='1970-01-01' | md5sum | awk '{print $1}' > /var/lib/config-data/${NAME}.md5sum + tar -c -f - /var/lib/config-data/puppet-generated/${NAME} --mtime='1970-01-01' | md5sum | awk '{print $1}' > /var/lib/config-data/puppet-generated/${NAME}.md5sum fi """) @@ -371,7 +373,7 @@ for infile in infiles: for k, v in infile_data.iteritems(): config_volume = match_config_volume(config_volume_prefix, v) if config_volume: - config_hash = get_config_hash(config_volume_prefix, config_volume) + config_hash = get_config_hash(config_volume) if config_hash: env = v.get('environment', []) env.append("TRIPLEO_CONFIG_HASH=%s" % config_hash) diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index 8cc81fb0..4674ec14 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -73,15 +73,9 @@ parameters: description: > It can be used to override settings for one of the predefined pools, or to create additional ones. Example: - { - "volumes": { - "size": 5, - "pg_num": 128, - "pgp_num": 128 - } - } - default: {} - type: json + [{"name": "volumes", "pg_num": 64, "rule_name": ""}] + default: [] + type: comma_delimited_list CinderRbdPoolName: default: volumes type: string @@ -225,13 +219,7 @@ outputs: - {get_param: NovaRbdPoolName} - {get_param: GlanceRbdPoolName} - {get_param: GnocchiRbdPoolName} - - repeat: - template: - name: <%pool%> - pg_num: {get_param: CephPoolDefaultPgNum} - rule_name: "" - for_each: - <%pool%>: {get_param: CephPools} + - {get_param: CephPools} openstack_keys: &openstack_keys - name: list_join: diff --git a/docker/services/ceph-ansible/ceph-mon.yaml b/docker/services/ceph-ansible/ceph-mon.yaml index 45f939c2..90b2db3b 100644 --- a/docker/services/ceph-ansible/ceph-mon.yaml +++ b/docker/services/ceph-ansible/ceph-mon.yaml @@ -83,4 +83,3 @@ outputs: - {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]} - monitor_secret: {get_param: CephMonKey} admin_secret: {get_param: CephAdminKey} - monitor_interface: br_ex diff --git a/docker/services/ceph-ansible/ceph-osd.yaml b/docker/services/ceph-ansible/ceph-osd.yaml index a441f5c9..de55924b 100644 --- a/docker/services/ceph-ansible/ceph-osd.yaml +++ b/docker/services/ceph-ansible/ceph-osd.yaml @@ -37,7 +37,6 @@ parameters: devices: - /dev/vdb journal_size: 512 - journal_collocation: true osd_scenario: collocated resources: diff --git a/docker/services/glance-api.yaml b/docker/services/glance-api.yaml index e1a3827a..1a6f5c77 100644 --- a/docker/services/glance-api.yaml +++ b/docker/services/glance-api.yaml @@ -48,6 +48,16 @@ parameters: default: false description: Remove package if the service is being disabled during upgrade type: boolean + GlanceNfsShare: + default: '' + description: > + NFS share to mount for image storage (when GlanceNfsEnabled is true) + type: string + GlanceNfsOptions: + default: 'intr,context=system_u:object_r:glance_var_lib_t:s0' + description: > + NFS mount options for image storage (when GlanceNfsEnabled is true) + type: string conditions: @@ -108,6 +118,10 @@ outputs: dest: "/etc/ceph/" merge: true preserve_properties: true + permissions: + - path: /var/lib/glance + owner: glance:glance + recurse: true /var/lib/kolla/config_files/glance_api_tls_proxy.json: command: /usr/sbin/httpd -DFOREGROUND config_files: @@ -182,6 +196,15 @@ outputs: - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - {} host_prep_tasks: + - name: Mount NFS on host + vars: + nfs_backend_enable: {get_param: GlanceNfsEnabled} + mount: name=/var/lib/glance src="{{item.NFS_SHARE}}" fstype=nfs4 opts="{{item.NFS_OPTIONS}}" state=mounted + with_items: + - NFS_SHARE: {get_param: GlanceNfsShare} + NFS_OPTIONS: {get_param: GlanceNfsOptions} + when: + - nfs_backend_enable - name: create persistent logs directory file: path: "{{ item }}" diff --git a/docker/services/horizon.yaml b/docker/services/horizon.yaml index d6ffb6dc..2c7d7a74 100644 --- a/docker/services/horizon.yaml +++ b/docker/services/horizon.yaml @@ -113,7 +113,7 @@ outputs: volumes: - /var/log/containers/horizon:/var/log/horizon - /var/log/containers/httpd/horizon:/var/log/httpd - - /var/lib/config-data/horizon/etc/:/etc/ + - /var/lib/config-data/puppet-generated/horizon/etc/openstack-dashboard:/etc/openstack-dashboard step_3: horizon: image: *horizon_image diff --git a/docker/services/memcached.yaml b/docker/services/memcached.yaml index c78b85a6..67b84249 100644 --- a/docker/services/memcached.yaml +++ b/docker/services/memcached.yaml @@ -80,8 +80,8 @@ outputs: 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'] + - /var/log/containers/memcached:/var/log/ + command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; touch /var/log/memcached.log && chown ${USER} /var/log/memcached.log'] memcached: start_order: 1 image: *memcached_image @@ -93,8 +93,16 @@ outputs: - {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'] + - /var/log/containers/memcached:/var/log/ + # NOTE: We're adding the log redirection here, even though should + # already be part of the options. This is because the redirection + # via the options is not working and ends up being passed as a + # parameter to the memcached command (which it silently ignores). + # Thus the need for the explicit redirection here. The redirection + # will be removed from the $OPTIONS, which is done via the puppet + # module, but we'll only be able to do this once the following pull + # request merges: https://github.com/saz/puppet-memcached/pull/88 + command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS >> /var/log/memcached.log 2>&1'] upgrade_tasks: - name: Stop and disable memcached service tags: step2 diff --git a/docker/services/mistral-api.yaml b/docker/services/mistral-api.yaml index 50c80216..1b4b44f2 100644 --- a/docker/services/mistral-api.yaml +++ b/docker/services/mistral-api.yaml @@ -36,6 +36,16 @@ parameters: default: {} description: Parameters specific to the role type: json + MistralWorkers: + default: 1 + description: The number of workers for the mistral-api. + type: number + MistralApiPolicies: + description: | + A hash of policies to configure for Mistral API. + e.g. { mistral-context_is_admin: { key: context_is_admin, value: 'role:admin' } } + default: {} + type: json resources: @@ -45,6 +55,16 @@ resources: MySQLClient: type: ../../puppet/services/database/mysql-client.yaml + MistralBase: + type: ../../puppet/services/mistral-base.yaml + properties: + EndpointMap: {get_param: EndpointMap} + ServiceData: {get_param: ServiceData} + ServiceNetMap: {get_param: ServiceNetMap} + DefaultPasswords: {get_param: DefaultPasswords} + RoleName: {get_param: RoleName} + RoleParameters: {get_param: RoleParameters} + MistralApiBase: type: ../../puppet/services/mistral-api.yaml properties: @@ -60,9 +80,23 @@ outputs: description: Role data for the Mistral API role. value: service_name: {get_attr: [MistralApiBase, role_data, service_name]} + # FIXME(mandre) restore once mistral-api image has the necessary packages + # to run on top of apache + # config_settings: + # map_merge: + # - get_attr: [MistralApiBase, role_data, config_settings] config_settings: map_merge: - - get_attr: [MistralApiBase, role_data, config_settings] + - get_attr: [MistralBase, role_data, config_settings] + - mistral::api::api_workers: {get_param: MistralWorkers} + mistral::api::bind_host: {get_param: [ServiceNetMap, MistralApiNetwork]} + mistral::policy::policies: {get_param: MistralApiPolicies} + tripleo.mistral_api.firewall_rules: + '133 mistral': + dport: + - 8989 + - 13989 + mistral_wsgi_enabled: false logging_source: {get_attr: [MistralApiBase, role_data, logging_source]} logging_groups: {get_attr: [MistralApiBase, role_data, logging_groups]} step_config: &step_config diff --git a/docker/services/swift-storage.yaml b/docker/services/swift-storage.yaml index e0c1194a..2d7aff6e 100644 --- a/docker/services/swift-storage.yaml +++ b/docker/services/swift-storage.yaml @@ -83,7 +83,10 @@ outputs: logging_source: {get_attr: [SwiftStorageBase, role_data, logging_source]} logging_groups: {get_attr: [SwiftStorageBase, role_data, logging_groups]} step_config: &step_config - get_attr: [SwiftStorageBase, role_data, step_config] + list_join: + - "\n" + - - {get_attr: [SwiftStorageBase, role_data, step_config]} + - "class xinetd() {}" service_config_settings: {get_attr: [SwiftStorageBase, role_data, service_config_settings]} # BEGIN DOCKER SETTINGS puppet_config: |