Add Swift container sharder service

This is a new service required for sharding containers.

It is disabled by default and can be enabled by setting the
SwiftContainerSharderEnabled to true.

Change-Id: I73119496ca6dd99b2f42f97529ad91273735c848
This commit is contained in:
Christian Schwede 2018-06-11 09:05:50 +02:00
parent 6a81b393c9
commit ef1b85702a
2 changed files with 37 additions and 0 deletions

View File

@ -57,6 +57,10 @@ parameters:
default: true
description: 'Use a local directory for Swift storage services when building rings'
type: boolean
SwiftContainerSharderEnabled:
description: Set to True to enable Swift container sharder service
default: false
type: boolean
UpgradeRemoveUnusedPackages:
default: false
description: Remove package if the service is being disabled during upgrade
@ -64,6 +68,7 @@ parameters:
conditions:
single_replica_mode: {equals: [{get_param: SwiftReplicas}, 1]}
swift_container_sharder_enabled: {equals : [{get_param: SwiftContainerSharderEnabled}, true]}
resources:
@ -159,6 +164,13 @@ outputs:
dest: "/"
merge: true
preserve_properties: true
/var/lib/kolla/config_files/swift_container_sharder.json:
command: /usr/bin/swift-container-sharder /etc/swift/container-server.conf
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
/var/lib/kolla/config_files/swift_object_auditor.json:
command: /usr/bin/swift-object-auditor /etc/swift/object-server.conf
config_files:
@ -292,6 +304,7 @@ outputs:
- /dev:/dev
- /var/cache/swift:/var/cache/swift
environment: *kolla_env
swift_object_auditor:
image: &swift_object_image {get_param: DockerSwiftObjectImage}
net: host
@ -450,6 +463,24 @@ outputs:
- /dev:/dev
# /var/cache/swift not needed in this container
environment: *kolla_env
- if:
- swift_container_sharder_enabled
-
swift_container_sharder:
image: *swift_container_image
net: host
user: swift
restart: always
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/swift_container_sharder.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/swift/:/var/lib/kolla/config_files/src:ro
- /srv/node:/srv/node
- /dev:/dev
- /var/cache/swift:/var/cache/swift
- {}
host_prep_tasks:
- name: create persistent directories

View File

@ -0,0 +1,6 @@
---
features:
- |
Add container for the Swift container sharder service. This service is
required for sharding containers. It is disabled by default and can be
enabled by setting the SwiftContainerSharderEnabled to true.