Merge "Add missing Swift services, also ansible configuration"

This commit is contained in:
Jenkins 2015-09-13 20:09:59 +00:00 committed by Gerrit Code Review
commit 31594eef5b
42 changed files with 859 additions and 60 deletions

View File

@ -16,10 +16,34 @@ swift_account_server_image: "{{ docker_registry ~ '/' if docker_registry else ''
swift_account_server_tag: "{{ openstack_release }}"
swift_account_server_image_full: "{{ swift_account_server_image }}:{{ swift_account_server_tag }}"
swift_account_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-auditor"
swift_account_auditor_tag: "{{ openstack_release }}"
swift_account_auditor_image_full: "{{ swift_account_auditor_image }}:{{ swift_account_auditor_tag }}"
swift_account_replicator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-replicator"
swift_account_replicator_tag: "{{ openstack_release }}"
swift_account_replicator_image_full: "{{ swift_account_replicator_image }}:{{ swift_account_replicator_tag }}"
swift_account_reaper_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-account-reaper"
swift_account_reaper_tag: "{{ openstack_release }}"
swift_account_reaper_image_full: "{{ swift_account_reaper_image }}:{{ swift_account_reaper_tag }}"
swift_container_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-server"
swift_container_server_tag: "{{ openstack_release }}"
swift_container_server_image_full: "{{ swift_container_server_image }}:{{ swift_container_server_tag }}"
swift_container_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-auditor"
swift_container_auditor_tag: "{{ openstack_release }}"
swift_container_auditor_image_full: "{{ swift_container_auditor_image }}:{{ swift_container_auditor_tag }}"
swift_container_replicator_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-replicator"
swift_container_replicator_tag: "{{ openstack_release }}"
swift_container_replicator_image_full: "{{ swift_container_replicator_image }}:{{ swift_container_replicator_tag }}"
swift_container_updater_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-container-updater"
swift_container_updater_tag: "{{ openstack_release }}"
swift_container_updater_image_full: "{{ swift_container_updater_image }}:{{ swift_container_updater_tag }}"
swift_object_auditor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-swift-object-auditor"
swift_object_auditor_tag: "{{ openstack_release }}"
swift_object_auditor_image_full: "{{ swift_object_auditor_image }}:{{ swift_object_auditor_tag }}"

View File

@ -42,6 +42,48 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-server.conf"
when: inventory_hostname in groups['swift-account-server']
- include: ../../config.yml
vars:
service_name: "swift-account-auditor"
config_source:
- "roles/swift/templates/account-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/account-auditor.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/account-auditor.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/account-auditor.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/account-auditor.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-auditor.conf"
when: inventory_hostname in groups['swift-account-server']
- include: ../../config.yml
vars:
service_name: "swift-account-replicator"
config_source:
- "roles/swift/templates/account-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/account-replicator.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/account-replicator.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/account-replicator.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/account-replicator.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-replicator.conf"
when: inventory_hostname in groups['swift-account-server']
- include: ../../config.yml
vars:
service_name: "swift-account-reaper"
config_source:
- "roles/swift/templates/account-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/account-reaper.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/account-reaper.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/account-reaper.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/account-reaper.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/account-reaper.conf"
when: inventory_hostname in groups['swift-account-server']
- include: ../../config.yml
vars:
service_name: "swift-container-server"
@ -56,6 +98,48 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-server.conf"
when: inventory_hostname in groups['swift-container-server']
- include: ../../config.yml
vars:
service_name: "swift-container-auditor"
config_source:
- "roles/swift/templates/container-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/container-auditor.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/container-auditor.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/container-auditor.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/container-auditor.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-auditor.conf"
when: inventory_hostname in groups['swift-container-server']
- include: ../../config.yml
vars:
service_name: "swift-container-replicator"
config_source:
- "roles/swift/templates/container-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/container-replicator.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/container-replicator.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/container-replicator.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/container-replicator.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-replicator.conf"
when: inventory_hostname in groups['swift-container-server']
- include: ../../config.yml
vars:
service_name: "swift-container-updater"
config_source:
- "roles/swift/templates/container-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/container-updater.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/container-updater.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/container-updater.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/container-updater.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/container-updater.conf"
when: inventory_hostname in groups['swift-container-server']
- include: ../../config.yml
vars:
service_name: "swift-object-server"
@ -70,6 +154,62 @@
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-server.conf"
when: inventory_hostname in groups['swift-object-server']
- include: ../../config.yml
vars:
service_name: "swift-object-auditor"
config_source:
- "roles/swift/templates/object-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/object-auditor.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/object-auditor.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/object-auditor.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/object-auditor.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-auditor.conf"
when: inventory_hostname in groups['swift-object-server']
- include: ../../config.yml
vars:
service_name: "swift-object-replicator"
config_source:
- "roles/swift/templates/object-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/object-replicator.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/object-replicator.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/object-replicator.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/object-replicator.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-replicator.conf"
when: inventory_hostname in groups['swift-object-server']
- include: ../../config.yml
vars:
service_name: "swift-object-updater"
config_source:
- "roles/swift/templates/object-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/object-updater.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/object-updater.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/object-updater.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/object-updater.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-updater.conf"
when: inventory_hostname in groups['swift-object-server']
- include: ../../config.yml
vars:
service_name: "swift-object-expirer"
config_source:
- "roles/swift/templates/object-server.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/swift/object-expirer.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/object-expirer.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/object-expirer.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/object-expirer.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/object-expirer.conf"
when: inventory_hostname in groups['swift-object-server']
- name: Copying over Swift ring files
copy:
src: "{{ item.src }}"

View File

@ -65,6 +65,75 @@
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-account-server']
- name: Starting Swift Account Auditor container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_account_auditor
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-account-server']
- name: Starting Swift Account Replicator container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_account_replicator
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-account-server']
- name: Starting Swift Account Reaper container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_account_reaper
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-account-server']
- name: Starting Swift Container Server container
docker:
docker_api_version: "{{ docker_api_version }}"
@ -88,6 +157,75 @@
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-container-server']
- name: Starting Swift Container Auditor container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_container_auditor
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-container-server']
- name: Starting Swift Container Replicator container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_container_replicator
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-container-server']
- name: Starting Swift Container Updater container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_container_updater
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-container-server']
- name: Starting Swift Object Server container
docker:
docker_api_version: "{{ docker_api_version }}"
@ -110,3 +248,95 @@
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-object-server']
- name: Starting Swift Object Auditor container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_object_auditor
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-object-server']
- name: Starting Swift Object Replicator container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_object_replicator
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-object-server']
- name: Starting Swift Object Updater container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_object_updater
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-object-server']
- name: Starting Swift Object Expirer container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: swift_object_expirer
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"
volumes_from:
- swift_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['swift-object-server']

View File

@ -9,3 +9,15 @@ pipeline = account-server
[app:account-server]
use = egg:swift#account
{% if service_name == 'swift-account-auditor' %}
[account-auditor]
{% endif %}
{% if service_name == 'swift-account-replicator' %}
[account-replicator]
{% endif %}
{% if service_name == 'swift-account-reaper' %}
[account-reaper]
{% endif %}

View File

@ -9,3 +9,15 @@ pipeline = container-server
[app:container-server]
use = egg:swift#container
{% if service_name == 'swift-container-auditor' %}
[container-auditor]
{% endif %}
{% if service_name == 'swift-container-replicator' %}
[container-replicator]
{% endif %}
{% if service_name == 'swift-container-updater' %}
[container-updater]
{% endif %}

View File

@ -5,7 +5,30 @@ devices = {{ swift_devices_mount_point }}
mount_check = false
[pipeline:main]
{% if service_name == 'swift-object-expirer' %}
pipeline = proxy-server
{% else %}
pipeline = object-server
{% endif %}
[app:object-server]
use = egg:swift#object
{% if service_name == 'swift-object-auditor' %}
[object-auditor]
{% endif %}
{% if service_name == 'swift-object-replicator' %}
[object-replicator]
{% endif %}
{% if service_name == 'swift-object-updater' %}
[object-updater]
{% endif %}
{% if service_name == 'swift-object-expirer' %}
[object-expirer]
[app:proxy-server]
use = egg:swift#proxy
{% endif %}

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,19 @@
#!/bin/bash
if [[ -f /opt/kolla/swift/swift.conf ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/
chown swift: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then
cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz
chown swift: /etc/swift/account.ring.gz
chmod 0640 /etc/swift/account.ring.gz
fi
if [[ -f /opt/kolla/swift-account-auditor/account-auditor.conf ]]; then
cp /opt/kolla/swift-account-auditor/account-auditor.conf /etc/swift/
chown swift: /etc/swift/account-auditor.conf
chmod 0640 /etc/swift/account-auditor.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,19 @@
#!/bin/bash
if [[ -f /opt/kolla/swift/swift.conf ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/
chown swift: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then
cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz
chown swift: /etc/swift/account.ring.gz
chmod 0640 /etc/swift/account.ring.gz
fi
if [[ -f /opt/kolla/swift-account-reaper/account-reaper.conf ]]; then
cp /opt/kolla/swift-account-reaper/account-reaper.conf /etc/swift/
chown swift: /etc/swift/account-reaper.conf
chmod 0640 /etc/swift/account-reaper.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-account \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,19 @@
#!/bin/bash
if [[ -f /opt/kolla/swift/swift.conf ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/
chown swift: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then
cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz
chown swift: /etc/swift/account.ring.gz
chmod 0640 /etc/swift/account.ring.gz
fi
if [[ -f /opt/kolla/swift-account-replicator/account-replicator.conf ]]; then
cp /opt/kolla/swift-account-replicator/account-replicator.conf /etc/swift/
chown swift: /etc/swift/account-replicator.conf
chmod 0640 /etc/swift/account-replicator.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,21 @@
#!/bin/bash
OWNER="swift"
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-container-auditor/container-auditor.conf" ]]; then
cp /opt/kolla/swift-container-auditor/container-auditor.conf /etc/swift/container-auditor.conf
chown ${OWNER}: /etc/swift/container-auditor.conf
chmod 0640 /etc/swift/container-auditor.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,21 @@
#!/bin/bash
OWNER="swift"
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-container-replicator/container-replicator.conf" ]]; then
cp /opt/kolla/swift-container-replicator/container-replicator.conf /etc/swift/container-replicator.conf
chown ${OWNER}: /etc/swift/container-replicator.conf
chmod 0640 /etc/swift/container-replicator.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-swift-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux'] %}
RUN yum -y install \
openstack-swift-container \
&& yum clean all
{% endif %}
{% endif %}
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
{{ include_footer }}

View File

@ -0,0 +1,27 @@
#!/bin/bash
OWNER="swift"
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then
cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz
chown swift: /etc/swift/account.ring.gz
chmod 0640 /etc/swift/account.ring.gz
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-container-updater/container-updater.conf" ]]; then
cp /opt/kolla/swift-container-updater/container-updater.conf /etc/swift/container-updater.conf
chown ${OWNER}: /etc/swift/container-updater.conf
chmod 0640 /etc/swift/container-updater.conf
fi

View File

@ -0,0 +1,14 @@
#!/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
exec $CMD $ARGS

View File

@ -1,18 +1,27 @@
#!/bin/bash
SOURCE="/opt/kolla/swift/swift.conf"
TARGET="/etc/swift/swift.conf"
SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf"
TARGET_OBJECT_SERVER="/etc/swift/object-server.conf"
OWNER="swift"
if [[ -f "$SOURCE" ]]; then
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0640 $TARGET
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then
cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER
chown ${OWNER}: $TARGET_OBJECT_SERVER
chmod 0640 $TARGET_OBJECT_SERVER
if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then
cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz
chown ${OWNER}: /etc/swift/object.ring.gz
chmod 0640 /etc/swift/object.ring.gz
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-object-auditor/object-auditor.conf" ]]; then
cp /opt/kolla/swift-object-auditor/object-auditor.conf /etc/swift/object-auditor.conf
chown ${OWNER}: /etc/swift/object-auditor.conf
chmod 0640 /etc/swift/object-auditor.conf
fi

View File

@ -3,13 +3,11 @@
set -o errexit
CMD="/usr/bin/swift-object-auditor"
ARGS="/etc/swift/object-server.conf --verbose"
ARGS="/etc/swift/object-auditor.conf --verbose"
# Loading common functions.
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-swift.sh
# Execute config strategy
set_configs

View File

@ -1,18 +1,33 @@
#!/bin/bash
SOURCE="/opt/kolla/swift/swift.conf"
TARGET="/etc/swift/swift.conf"
SOURCE_OBJECT_EXPIRER="/opt/kolla/swift/object-expirer.conf"
TARGET_OBJECT_EXPIRER="/etc/swift/object-expirer.conf"
OWNER="swift"
if [[ -f "$SOURCE" ]]; then
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0640 $TARGET
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "$SOURCE_OBJECT_EXPIRER" ]]; then
cp $SOURCE_OBJECT_EXPIRER $TARGET_OBJECT_EXPIRER
chown ${OWNER}: $TARGET_OBJECT_EXPIRER
chmod 0640 $TARGET_OBJECT_EXPIRER
if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then
cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz
chown ${OWNER}: /etc/swift/object.ring.gz
chmod 0640 /etc/swift/object.ring.gz
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift/account.ring.gz" ]]; then
cp /opt/kolla/swift/account.ring.gz /etc/swift/account.ring.gz
chown ${OWNER}: /etc/swift/account.ring.gz
chmod 0640 /etc/swift/account.ring.gz
fi
if [[ -f "/opt/kolla/swift-object-expirer/object-expirer.conf" ]]; then
cp /opt/kolla/swift-object-expirer/object-expirer.conf /etc/swift/object-expirer.conf
chown ${OWNER}: /etc/swift/object-expirer.conf
chmod 0640 /etc/swift/object-expirer.conf
fi

View File

@ -3,13 +3,11 @@
set -o errexit
CMD="/usr/bin/swift-object-expirer"
ARGS="/etc/swift/object-server.conf --verbose"
ARGS="/etc/swift/object-expirer.conf --verbose"
# Loading common functions.
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-swift.sh
# Execute config strategy
set_configs

View File

@ -1,18 +1,27 @@
#!/bin/bash
SOURCE="/opt/kolla/swift/swift.conf"
TARGET="/etc/swift/swift.conf"
SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf"
TARGET_OBJECT_SERVER="/etc/swift/object-server.conf"
OWNER="swift"
if [[ -f "$SOURCE" ]]; then
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0640 $TARGET
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then
cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER
chown ${OWNER}: $TARGET_OBJECT_SERVER
chmod 0640 $TARGET_OBJECT_SERVER
if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then
cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz
chown ${OWNER}: /etc/swift/object.ring.gz
chmod 0640 /etc/swift/object.ring.gz
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-object-replicator/object-replicator.conf" ]]; then
cp /opt/kolla/swift-object-replicator/object-replicator.conf /etc/swift/object-replicator.conf
chown ${OWNER}: /etc/swift/object-replicator.conf
chmod 0640 /etc/swift/object-replicator.conf
fi

View File

@ -3,13 +3,11 @@
set -o errexit
CMD="/usr/bin/swift-object-replicator"
ARGS="/etc/swift/object-server.conf --verbose"
ARGS="/etc/swift/object-replicator.conf --verbose"
# Loading common functions.
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-swift.sh
# Execute config strategy
set_configs

View File

@ -1,18 +1,27 @@
#!/bin/bash
SOURCE="/opt/kolla/swift/swift.conf"
TARGET="/etc/swift/swift.conf"
SOURCE_OBJECT_SERVER="/opt/kolla/swift/object-server.conf"
TARGET_OBJECT_SERVER="/etc/swift/object-server.conf"
OWNER="swift"
if [[ -f "$SOURCE" ]]; then
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0640 $TARGET
if [[ -f "/opt/kolla/swift/swift.conf" ]]; then
cp /opt/kolla/swift/swift.conf /etc/swift/swift.conf
chown ${OWNER}: /etc/swift/swift.conf
chmod 0640 /etc/swift/swift.conf
fi
if [[ -f "$SOURCE_OBJECT_SERVER" ]]; then
cp $SOURCE_OBJECT_SERVER $TARGET_OBJECT_SERVER
chown ${OWNER}: $TARGET_OBJECT_SERVER
chmod 0640 $TARGET_OBJECT_SERVER
if [[ -f "/opt/kolla/swift/object.ring.gz" ]]; then
cp /opt/kolla/swift/object.ring.gz /etc/swift/object.ring.gz
chown ${OWNER}: /etc/swift/object.ring.gz
chmod 0640 /etc/swift/object.ring.gz
fi
if [[ -f "/opt/kolla/swift/container.ring.gz" ]]; then
cp /opt/kolla/swift/container.ring.gz /etc/swift/container.ring.gz
chown ${OWNER}: /etc/swift/container.ring.gz
chmod 0640 /etc/swift/container.ring.gz
fi
if [[ -f "/opt/kolla/swift-object-updater/object-updater.conf" ]]; then
cp /opt/kolla/swift-object-updater/object-updater.conf /etc/swift/object-updater.conf
chown ${OWNER}: /etc/swift/object-updater.conf
chmod 0640 /etc/swift/object-updater.conf
fi

View File

@ -3,13 +3,11 @@
set -o errexit
CMD="/usr/bin/swift-object-updater"
ARGS="/etc/swift/object-server.conf --verbose"
ARGS="/etc/swift/object-updater.conf --verbose"
# Loading common functions.
source /opt/kolla/kolla-common.sh
source /opt/kolla/config-swift.sh
# Execute config strategy
set_configs