diff --git a/ansible/roles/swift/tasks/config.yml b/ansible/roles/swift/tasks/config.yml index b48b51bd041f9ab0d938e31839abf8fc2d9628e6..4ebce9e36ec11047d70d58b951ecf8abc55631d4 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 dd86fb2433cb40d4c4490a864ce80c1282da2290..0f0f72fe534983ce4904d990a6b61d6866500eb2 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 0000000000000000000000000000000000000000..36ae6cd69b123841311ac91fe1f863c43d1ff5ec --- /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 0000000000000000000000000000000000000000..0d88070ce62e97fc50e3907ba9587299cf032453 --- /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 0000000000000000000000000000000000000000..4fc3de95647fffdf9522c37cd60463bbac8d04e0 --- /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 0000000000000000000000000000000000000000..eb28365ea5d75e74ed909896f4bd344bf57ccdb8 --- /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 0000000000000000000000000000000000000000..6fb280b84828e774acc4c8b79d6bcda73adcede7 --- /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 0000000000000000000000000000000000000000..d9f0cc61967aff2f65e2b967acab55c56b9a9fb1 --- /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 0000000000000000000000000000000000000000..62959aa610ced4e8bcca03adf116bb25ce9ec532 --- /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 0000000000000000000000000000000000000000..6329d5778f4872adeea67d4a9a59dfc7af4c7543 --- /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 0000000000000000000000000000000000000000..e9c4888b27829012f4b531f2a0309ac31896e5d3 --- /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 0000000000000000000000000000000000000000..33719b96cb5145b1a138e933291d59fd9fe9958d --- /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 0000000000000000000000000000000000000000..83758ff13b7c50f951b60d94ccf855461bae2b6c --- /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 0000000000000000000000000000000000000000..2e6a5cad9be74ef46b02270895c64a2a4cecc8af --- /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 0000000000000000000000000000000000000000..a1bbfc0fc40fb92c8a74d1cdd1e1975ae55155ea --- /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 0000000000000000000000000000000000000000..84b00e3aab8adc6a2e7b3acb6cfa62b39d7c1b60 --- /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 0000000000000000000000000000000000000000..3fa83981254060c780fa1f030fff3de3157f46d0 --- /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 c83000da11581679af32ab06f96803f174418cdc..d43e035812d1eef27daf45c0254ea4b6d105b148 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 fb6dcfe367eb8df0669b773427ecfd663cde1228..d43e035812d1eef27daf45c0254ea4b6d105b148 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 c820209e26f9868777715e0b0b1541612b4c8c28..d43e035812d1eef27daf45c0254ea4b6d105b148 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 402ee6f44fa2abcfae6cd9c1ece74f350a7514f5..d43e035812d1eef27daf45c0254ea4b6d105b148 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 27dfd0e6bd8f8e1a6d2d71496ca3a24bb442ff28..d43e035812d1eef27daf45c0254ea4b6d105b148 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 b110ab8af87d426b55ca2270410521fc19942906..d43e035812d1eef27daf45c0254ea4b6d105b148 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 78070ab29c8c24456319e1d408ae8120d511cc59..d43e035812d1eef27daf45c0254ea4b6d105b148 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 d2fe2eb8ca56a7855ea15ff830d670ff9c4fbac4..d43e035812d1eef27daf45c0254ea4b6d105b148 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 0f0111a8e3d699c265cfe2634f4be14c5d750196..d43e035812d1eef27daf45c0254ea4b6d105b148 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 366525d1188eb074d233a2a15f06b7f26e4b32c9..d43e035812d1eef27daf45c0254ea4b6d105b148 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 dbb1424990a1f1b3c0baf1f6b3c639738793a671..d43e035812d1eef27daf45c0254ea4b6d105b148 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 f2a32b4d370c4a056fe2445bf06e9c87cd1e4e7e..d43e035812d1eef27daf45c0254ea4b6d105b148 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 5e970b416512f90759c1b79760e05456bb1a0b02..d43e035812d1eef27daf45c0254ea4b6d105b148 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 99a142e526575ac19b305c6fc411706bef32b7bc..7adad007aee7fbf3e389163ef8da9353d950c8ed 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 2267bb59f393f10f36f195cbb05fe9a36fc98daa..d43e035812d1eef27daf45c0254ea4b6d105b148 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