aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-09-25 12:58:37 +0000
committerSam Yaple <sam@yaple.net>2015-09-25 12:58:44 +0000
commit3d81353706d262b673193d9ba44163917cc21636 (patch)
treee20b38a7b1ace52f479af4d1100da3e041809245
parent0cc328c625498192d5eeaeaac04d5a397737b271 (diff)
downloadkolla-3d81353706d262b673193d9ba44163917cc21636.tar.gz
kolla-3d81353706d262b673193d9ba44163917cc21636.zip
Replace config-external - swift
Change-Id: I785cb53d64cbf8dbc0fad97882f9fd0307982e5d Partially-Implements: blueprint replace-config-external
-rw-r--r--ansible/roles/swift/tasks/config.yml84
-rw-r--r--ansible/roles/swift/tasks/start.yml30
-rw-r--r--ansible/roles/swift/templates/swift-account-auditor.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-account-reaper.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-account-replicator.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-account-server.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-container-auditor.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-container-replicator.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-container-server.json.j223
-rw-r--r--ansible/roles/swift/templates/swift-container-updater.json.j229
-rw-r--r--ansible/roles/swift/templates/swift-object-auditor.json.j229
-rw-r--r--ansible/roles/swift/templates/swift-object-expirer.json.j235
-rw-r--r--ansible/roles/swift/templates/swift-object-replicator.json.j229
-rw-r--r--ansible/roles/swift/templates/swift-object-server.json.j229
-rw-r--r--ansible/roles/swift/templates/swift-object-updater.json.j229
-rw-r--r--ansible/roles/swift/templates/swift-proxy-server.json.j235
-rw-r--r--ansible/roles/swift/templates/swift-rsyncd.json.j211
-rwxr-xr-xdocker/swift/swift-account-auditor/start.sh11
-rwxr-xr-xdocker/swift/swift-account-reaper/start.sh11
-rwxr-xr-xdocker/swift/swift-account-replicator/start.sh11
-rwxr-xr-xdocker/swift/swift-account-server/start.sh13
-rwxr-xr-xdocker/swift/swift-container-auditor/start.sh11
-rwxr-xr-xdocker/swift/swift-container-replicator/start.sh11
-rwxr-xr-xdocker/swift/swift-container-server/start.sh13
-rwxr-xr-xdocker/swift/swift-container-updater/start.sh11
-rwxr-xr-xdocker/swift/swift-object-auditor/start.sh11
-rwxr-xr-xdocker/swift/swift-object-expirer/start.sh11
-rwxr-xr-xdocker/swift/swift-object-replicator/start.sh11
-rwxr-xr-xdocker/swift/swift-object-server/start.sh13
-rwxr-xr-xdocker/swift/swift-object-updater/start.sh11
-rwxr-xr-xdocker/swift/swift-proxy-server/start.sh12
-rwxr-xr-xdocker/swift/swift-rsyncd/start.sh11
32 files changed, 546 insertions, 127 deletions
diff --git a/ansible/roles/swift/tasks/config.yml b/ansible/roles/swift/tasks/config.yml
index b48b51bd0..4ebce9e36 100644
--- a/ansible/roles/swift/tasks/config.yml
+++ b/ansible/roles/swift/tasks/config.yml
@@ -28,6 +28,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/proxy-server.conf"
when: inventory_hostname in groups['swift-proxy-server']
+- name: Copying over swift-proxy-server JSON configuration file
+ template:
+ src: "swift-proxy-server.json.j2"
+ dest: "{{ node_config_directory }}/swift-proxy-server/config.json"
+ when: inventory_hostname in groups['swift-proxy-server']
+
- include: ../../config.yml
vars:
service_name: "swift-account-server"
@@ -42,6 +48,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-server.conf"
when: inventory_hostname in groups['swift-account-server']
+- name: Copying over swift-account-server JSON configuration file
+ template:
+ src: "swift-account-server.json.j2"
+ dest: "{{ node_config_directory }}/swift-account-server/config.json"
+ when: inventory_hostname in groups['swift-account-server']
+
- include: ../../config.yml
vars:
service_name: "swift-account-auditor"
@@ -56,6 +68,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-auditor.conf"
when: inventory_hostname in groups['swift-account-server']
+- name: Copying over swift-account-auditor JSON configuration file
+ template:
+ src: "swift-account-auditor.json.j2"
+ dest: "{{ node_config_directory }}/swift-account-auditor/config.json"
+ when: inventory_hostname in groups['swift-account-server']
+
- include: ../../config.yml
vars:
service_name: "swift-account-replicator"
@@ -70,6 +88,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-replicator.conf"
when: inventory_hostname in groups['swift-account-server']
+- name: Copying over swift-account-replicator JSON configuration file
+ template:
+ src: "swift-account-replicator.json.j2"
+ dest: "{{ node_config_directory }}/swift-account-replicator/config.json"
+ when: inventory_hostname in groups['swift-account-server']
+
- include: ../../config.yml
vars:
service_name: "swift-account-reaper"
@@ -84,6 +108,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-reaper.conf"
when: inventory_hostname in groups['swift-account-server']
+- name: Copying over swift-account-reaper JSON configuration file
+ template:
+ src: "swift-account-reaper.j2"
+ dest: "{{ node_config_directory }}/swift-account-reaper/config.json"
+ when: inventory_hostname in groups['swift-account-server']
+
- include: ../../config.yml
vars:
service_name: "swift-container-server"
@@ -98,6 +128,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-server.conf"
when: inventory_hostname in groups['swift-container-server']
+- name: Copying over swift-container-server JSON configuration file
+ template:
+ src: "swift-container-server.json.j2"
+ dest: "{{ node_config_directory }}/swift-container-server/config.json"
+ when: inventory_hostname in groups['swift-container-server']
+
- include: ../../config.yml
vars:
service_name: "swift-container-auditor"
@@ -112,6 +148,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-auditor.conf"
when: inventory_hostname in groups['swift-container-server']
+- name: Copying over swift-container-auditor JSON configuration file
+ template:
+ src: "swift-container-auditor.json.j2"
+ dest: "{{ node_config_directory }}/swift-container-auditor/config.json"
+ when: inventory_hostname in groups['swift-container-server']
+
- include: ../../config.yml
vars:
service_name: "swift-container-replicator"
@@ -126,6 +168,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-replicator.conf"
when: inventory_hostname in groups['swift-container-server']
+- name: Copying over swift-container-replicator JSON configuration file
+ template:
+ src: "swift-container-replicator.json.j2"
+ dest: "{{ node_config_directory }}/swift-container-replicator/config.json"
+ when: inventory_hostname in groups['swift-container-server']
+
- include: ../../config.yml
vars:
service_name: "swift-container-updater"
@@ -140,6 +188,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-updater.conf"
when: inventory_hostname in groups['swift-container-server']
+- name: Copying over swift-container-updater JSON configuration file
+ template:
+ src: "swift-container-updater.json.j2"
+ dest: "{{ node_config_directory }}/swift-container-updater/config.json"
+ when: inventory_hostname in groups['swift-container-server']
+
- include: ../../config.yml
vars:
service_name: "swift-object-server"
@@ -154,6 +208,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-server.conf"
when: inventory_hostname in groups['swift-object-server']
+- name: Copying over swift-object-server JSON configuration file
+ template:
+ src: "swift-object-server.json.j2"
+ dest: "{{ node_config_directory }}/swift-object-server/config.json"
+ when: inventory_hostname in groups['swift-object-server']
+
- include: ../../config.yml
vars:
service_name: "swift-object-auditor"
@@ -168,6 +228,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-auditor.conf"
when: inventory_hostname in groups['swift-object-server']
+- name: Copying over swift-object-auditor JSON configuration file
+ template:
+ src: "swift-object-auditor.json.j2"
+ dest: "{{ node_config_directory }}/swift-object-auditor/config.json"
+ when: inventory_hostname in groups['swift-object-server']
+
- include: ../../config.yml
vars:
service_name: "swift-object-replicator"
@@ -182,6 +248,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-replicator.conf"
when: inventory_hostname in groups['swift-object-server']
+- name: Copying over swift-object-replicator JSON configuration file
+ template:
+ src: "swift-object-replicator.json.j2"
+ dest: "{{ node_config_directory }}/swift-object-replicator/config.json"
+ when: inventory_hostname in groups['swift-object-server']
+
- include: ../../config.yml
vars:
service_name: "swift-object-updater"
@@ -196,6 +268,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-updater.conf"
when: inventory_hostname in groups['swift-object-server']
+- name: Copying over swift-object-updater JSON configuration file
+ template:
+ src: "swift-object-updater.json.j2"
+ dest: "{{ node_config_directory }}/swift-object-updater/config.json"
+ when: inventory_hostname in groups['swift-object-server']
+
- include: ../../config.yml
vars:
service_name: "swift-object-expirer"
@@ -210,6 +288,12 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-expirer.conf"
when: inventory_hostname in groups['swift-object-server']
+- name: Copying over swift-object-expirer JSON configuration file
+ template:
+ src: "swift-object-expirer.json.j2"
+ dest: "{{ node_config_directory }}/swift-object-expirer/config.json"
+ when: inventory_hostname in groups['swift-object-server']
+
- name: Copying over Swift ring files
copy:
src: "{{ item.src }}"
diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml
index dd86fb243..0f0f72fe5 100644
--- a/ansible/roles/swift/tasks/start.yml
+++ b/ansible/roles/swift/tasks/start.yml
@@ -13,7 +13,7 @@
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_rsyncd
image: "{{ swift_rsyncd_image_full }}"
- volumes: "{{ node_config_directory }}/swift-rsyncd/:/opt/kolla/swift-rsyncd/:ro"
+ volumes: "{{ node_config_directory }}/swift-rsyncd/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -35,7 +35,7 @@
image: "{{ swift_proxy_server_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-proxy-server/:/opt/kolla/swift-proxy-server/:ro"
+ - "{{ node_config_directory }}/swift-proxy-server/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -58,7 +58,7 @@
image: "{{ swift_account_server_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-account-server/:/opt/kolla/swift-account-server/:ro"
+ - "{{ node_config_directory }}/swift-account-server/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -81,7 +81,7 @@
image: "{{ swift_account_auditor_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-account-auditor/:/opt/kolla/swift-account-auditor/:ro"
+ - "{{ node_config_directory }}/swift-account-auditor/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -104,7 +104,7 @@
image: "{{ swift_account_replicator_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-account-replicator/:/opt/kolla/swift-account-replicator/:ro"
+ - "{{ node_config_directory }}/swift-account-replicator/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -127,7 +127,7 @@
image: "{{ swift_account_reaper_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-account-reaper/:/opt/kolla/swift-account-reaper/:ro"
+ - "{{ node_config_directory }}/swift-account-reaper/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -150,7 +150,7 @@
image: "{{ swift_container_server_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-container-server/:/opt/kolla/swift-container-server/:ro"
+ - "{{ node_config_directory }}/swift-container-server/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -173,7 +173,7 @@
image: "{{ swift_container_auditor_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-container-auditor/:/opt/kolla/swift-container-auditor/:ro"
+ - "{{ node_config_directory }}/swift-container-auditor/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -196,7 +196,7 @@
image: "{{ swift_container_replicator_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-container-replicator/:/opt/kolla/swift-container-replicator/:ro"
+ - "{{ node_config_directory }}/swift-container-replicator/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -219,7 +219,7 @@
image: "{{ swift_container_updater_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-container-updater/:/opt/kolla/swift-container-updater/:ro"
+ - "{{ node_config_directory }}/swift-container-updater/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -242,7 +242,7 @@
image: "{{ swift_object_server_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-object-server/:/opt/kolla/swift-object-server/:ro"
+ - "{{ node_config_directory }}/swift-object-server/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -265,7 +265,7 @@
image: "{{ swift_object_auditor_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-object-auditor/:/opt/kolla/swift-object-auditor/:ro"
+ - "{{ node_config_directory }}/swift-object-auditor/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -288,7 +288,7 @@
image: "{{ swift_object_replicator_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-object-replicator/:/opt/kolla/swift-object-replicator/:ro"
+ - "{{ node_config_directory }}/swift-object-replicator/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -311,7 +311,7 @@
image: "{{ swift_object_updater_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-object-updater/:/opt/kolla/swift-object-updater/:ro"
+ - "{{ node_config_directory }}/swift-object-updater/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
@@ -334,7 +334,7 @@
image: "{{ swift_object_expirer_image_full }}"
volumes:
- "{{ node_config_directory }}/swift/:/opt/kolla/swift/:ro"
- - "{{ node_config_directory }}/swift-object-expirer/:/opt/kolla/swift-object-expirer/:ro"
+ - "{{ node_config_directory }}/swift-object-expirer/:/opt/kolla/config_files/:ro"
volumes_from:
- swift_data
env:
diff --git a/ansible/roles/swift/templates/swift-account-auditor.json.j2 b/ansible/roles/swift/templates/swift-account-auditor.json.j2
new file mode 100644
index 000000000..36ae6cd69
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-account-auditor.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-account-auditor /etc/swift/account-auditor.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account-auditor.conf",
+ "dest": "/etc/swift/account-auditor.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-account-reaper.json.j2 b/ansible/roles/swift/templates/swift-account-reaper.json.j2
new file mode 100644
index 000000000..0d88070ce
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-account-reaper.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-account-reaper /etc/swift/account-reaper.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account-reaper.conf",
+ "dest": "/etc/swift/account-reaper.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-account-replicator.json.j2 b/ansible/roles/swift/templates/swift-account-replicator.json.j2
new file mode 100644
index 000000000..4fc3de956
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-account-replicator.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-account-replicator /etc/swift/account-replicator.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account-replicator.conf",
+ "dest": "/etc/swift/account-replicator.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-account-server.json.j2 b/ansible/roles/swift/templates/swift-account-server.json.j2
new file mode 100644
index 000000000..eb28365ea
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-account-server.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-account-server /etc/swift/account-server.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account-server.conf",
+ "dest": "/etc/swift/account-server.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-container-auditor.json.j2 b/ansible/roles/swift/templates/swift-container-auditor.json.j2
new file mode 100644
index 000000000..6fb280b84
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-container-auditor.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-container-auditor /etc/swift/container-auditor.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container-auditor.conf",
+ "dest": "/etc/swift/container-auditor.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-container-replicator.json.j2 b/ansible/roles/swift/templates/swift-container-replicator.json.j2
new file mode 100644
index 000000000..d9f0cc619
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-container-replicator.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-container-replicator /etc/swift/container-replicator.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container-replicator.conf",
+ "dest": "/etc/swift/container-replicator.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-container-server.json.j2 b/ansible/roles/swift/templates/swift-container-server.json.j2
new file mode 100644
index 000000000..62959aa61
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-container-server.json.j2
@@ -0,0 +1,23 @@
+{
+ "command": "/usr/bin/swift-container-server /etc/swift/container-server.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container-server.conf",
+ "dest": "/etc/swift/container-server.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-container-updater.json.j2 b/ansible/roles/swift/templates/swift-container-updater.json.j2
new file mode 100644
index 000000000..6329d5778
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-container-updater.json.j2
@@ -0,0 +1,29 @@
+{
+ "command": "/usr/bin/swift-container-updater /etc/swift/container-updater.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container-updater.conf",
+ "dest": "/etc/swift/container-updater.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-object-auditor.json.j2 b/ansible/roles/swift/templates/swift-object-auditor.json.j2
new file mode 100644
index 000000000..e9c4888b2
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-object-auditor.json.j2
@@ -0,0 +1,29 @@
+{
+ "command": "/usr/bin/swift-object-auditor /etc/swift/object-auditor.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object-auditor.conf",
+ "dest": "/etc/swift/object-auditor.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-object-expirer.json.j2 b/ansible/roles/swift/templates/swift-object-expirer.json.j2
new file mode 100644
index 000000000..33719b96c
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-object-expirer.json.j2
@@ -0,0 +1,35 @@
+{
+ "command": "/usr/bin/swift-object-expirer /etc/swift/object-expirer.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object-expirer.conf",
+ "dest": "/etc/swift/object-expirer.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-object-replicator.json.j2 b/ansible/roles/swift/templates/swift-object-replicator.json.j2
new file mode 100644
index 000000000..83758ff13
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-object-replicator.json.j2
@@ -0,0 +1,29 @@
+{
+ "command": "/usr/bin/swift-object-replicator /etc/swift/object-replicator.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object-replicator.conf",
+ "dest": "/etc/swift/object-replicator.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-object-server.json.j2 b/ansible/roles/swift/templates/swift-object-server.json.j2
new file mode 100644
index 000000000..2e6a5cad9
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-object-server.json.j2
@@ -0,0 +1,29 @@
+{
+ "command": "/usr/bin/swift-object-server /etc/swift/object-server.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object-server.conf",
+ "dest": "/etc/swift/object-server.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-object-updater.json.j2 b/ansible/roles/swift/templates/swift-object-updater.json.j2
new file mode 100644
index 000000000..a1bbfc0fc
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-object-updater.json.j2
@@ -0,0 +1,29 @@
+{
+ "command": "/usr/bin/swift-object-updater /etc/swift/object-updater.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object-updater.conf",
+ "dest": "/etc/swift/object-updater.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-proxy-server.json.j2 b/ansible/roles/swift/templates/swift-proxy-server.json.j2
new file mode 100644
index 000000000..84b00e3aa
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-proxy-server.json.j2
@@ -0,0 +1,35 @@
+{
+ "command": "/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf --verbose",
+ "config_files": [
+ {
+ "source": "/opt/kolla/swift/swift.conf",
+ "dest": "/etc/swift/swift.conf",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/account.ring.gz",
+ "dest": "/etc/swift/account.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/container.ring.gz",
+ "dest": "/etc/swift/container.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/object.ring.gz",
+ "dest": "/etc/swift/object.ring.gz",
+ "owner": "swift",
+ "perm": "0640"
+ },
+ {
+ "source": "/opt/kolla/config_files/proxy-server.conf",
+ "dest": "/etc/swift/proxy-server.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/ansible/roles/swift/templates/swift-rsyncd.json.j2 b/ansible/roles/swift/templates/swift-rsyncd.json.j2
new file mode 100644
index 000000000..3fa839812
--- /dev/null
+++ b/ansible/roles/swift/templates/swift-rsyncd.json.j2
@@ -0,0 +1,11 @@
+{
+ "command": "/usr/bin/rsync --daemon --no-detach --config=/etc/rsyncd.conf",
+ "config_files": [
+ {
+ "source": "/opt/kolla/config_files/rsyncd.conf",
+ "dest": "/etc/rsyncd.conf",
+ "owner": "swift",
+ "perm": "0640"
+ }
+ ]
+}
diff --git a/docker/swift/swift-account-auditor/start.sh b/docker/swift/swift-account-auditor/start.sh
index c83000da1..d43e03581 100755
--- a/docker/swift/swift-account-auditor/start.sh
+++ b/docker/swift/swift-account-auditor/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-account-auditor"
-ARGS="/etc/swift/account-auditor.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-account-reaper/start.sh b/docker/swift/swift-account-reaper/start.sh
index fb6dcfe36..d43e03581 100755
--- a/docker/swift/swift-account-reaper/start.sh
+++ b/docker/swift/swift-account-reaper/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-account-reaper"
-ARGS="/etc/swift/account-reaper.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-account-replicator/start.sh b/docker/swift/swift-account-replicator/start.sh
index c820209e2..d43e03581 100755
--- a/docker/swift/swift-account-replicator/start.sh
+++ b/docker/swift/swift-account-replicator/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-account-replicator"
-ARGS="/etc/swift/account-replicator.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-account-server/start.sh b/docker/swift/swift-account-server/start.sh
index 402ee6f44..d43e03581 100755
--- a/docker/swift/swift-account-server/start.sh
+++ b/docker/swift/swift-account-server/start.sh
@@ -1,16 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-account-server"
-ARGS="/etc/swift/account-server.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-source /opt/kolla/config-swift.sh
-
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-container-auditor/start.sh b/docker/swift/swift-container-auditor/start.sh
index 27dfd0e6b..d43e03581 100755
--- a/docker/swift/swift-container-auditor/start.sh
+++ b/docker/swift/swift-container-auditor/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-container-auditor"
-ARGS="/etc/swift/container-auditor.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-container-replicator/start.sh b/docker/swift/swift-container-replicator/start.sh
index b110ab8af..d43e03581 100755
--- a/docker/swift/swift-container-replicator/start.sh
+++ b/docker/swift/swift-container-replicator/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-container-replicator"
-ARGS="/etc/swift/container-replicator.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-container-server/start.sh b/docker/swift/swift-container-server/start.sh
index 78070ab29..d43e03581 100755
--- a/docker/swift/swift-container-server/start.sh
+++ b/docker/swift/swift-container-server/start.sh
@@ -1,16 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-container-server"
-ARGS="/etc/swift/container-server.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-source /opt/kolla/config-swift.sh
-
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-container-updater/start.sh b/docker/swift/swift-container-updater/start.sh
index d2fe2eb8c..d43e03581 100755
--- a/docker/swift/swift-container-updater/start.sh
+++ b/docker/swift/swift-container-updater/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-container-updater"
-ARGS="/etc/swift/container-updater.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-object-auditor/start.sh b/docker/swift/swift-object-auditor/start.sh
index 0f0111a8e..d43e03581 100755
--- a/docker/swift/swift-object-auditor/start.sh
+++ b/docker/swift/swift-object-auditor/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-object-auditor"
-ARGS="/etc/swift/object-auditor.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-object-expirer/start.sh b/docker/swift/swift-object-expirer/start.sh
index 366525d11..d43e03581 100755
--- a/docker/swift/swift-object-expirer/start.sh
+++ b/docker/swift/swift-object-expirer/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-object-expirer"
-ARGS="/etc/swift/object-expirer.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-object-replicator/start.sh b/docker/swift/swift-object-replicator/start.sh
index dbb142499..d43e03581 100755
--- a/docker/swift/swift-object-replicator/start.sh
+++ b/docker/swift/swift-object-replicator/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-object-replicator"
-ARGS="/etc/swift/object-replicator.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-object-server/start.sh b/docker/swift/swift-object-server/start.sh
index f2a32b4d3..d43e03581 100755
--- a/docker/swift/swift-object-server/start.sh
+++ b/docker/swift/swift-object-server/start.sh
@@ -1,16 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-object-server"
-ARGS="/etc/swift/object-server.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-source /opt/kolla/config-swift.sh
-
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-object-updater/start.sh b/docker/swift/swift-object-updater/start.sh
index 5e970b416..d43e03581 100755
--- a/docker/swift/swift-object-updater/start.sh
+++ b/docker/swift/swift-object-updater/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-object-updater"
-ARGS="/etc/swift/object-updater.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-proxy-server/start.sh b/docker/swift/swift-proxy-server/start.sh
index 99a142e52..7adad007a 100755
--- a/docker/swift/swift-proxy-server/start.sh
+++ b/docker/swift/swift-proxy-server/start.sh
@@ -1,16 +1,12 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/swift-proxy-server"
-ARGS="/etc/swift/proxy-server.conf --verbose"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-
source /opt/kolla/config-swift.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/swift/swift-rsyncd/start.sh b/docker/swift/swift-rsyncd/start.sh
index 2267bb59f..d43e03581 100755
--- a/docker/swift/swift-rsyncd/start.sh
+++ b/docker/swift/swift-rsyncd/start.sh
@@ -1,14 +1,11 @@
#!/bin/bash
-
set -o errexit
-CMD="/usr/bin/rsync"
-ARGS="--daemon --no-detach --config=/etc/rsyncd.conf"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+# Generate run command
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-exec $CMD $ARGS
+exec $CMD