diff options
Diffstat (limited to 'ansible/roles/swift/tasks')
| -rw-r--r-- | ansible/roles/swift/tasks/check.yml | 19 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/config.yml | 180 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/deploy.yml | 24 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/main.yml | 2 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/precheck.yml | 1 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/pull.yml | 37 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/reconfigure.yml | 144 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/register.yml | 40 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/start.yml | 242 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/stop_and_start.yml | 28 | ||||
| -rw-r--r-- | ansible/roles/swift/tasks/upgrade.yml | 4 |
11 files changed, 0 insertions, 721 deletions
diff --git a/ansible/roles/swift/tasks/check.yml b/ansible/roles/swift/tasks/check.yml deleted file mode 100644 index e655ac0e7..000000000 --- a/ansible/roles/swift/tasks/check.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Swift sanity checks - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_sanity - -a "service=swift - project=service - user=admin - password={{ swift_keystone_password }} - role=admin - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_swift_auth }}' }}" - -e "{'openstack_swift_auth':{{ openstack_swift_auth }}}" - register: swift_sanity - changed_when: "{{ swift_sanity.stdout.find('localhost | SUCCESS => ') != -1 and (swift_sanity.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: swift_sanity.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True - when: kolla_enable_sanity_swift | bool diff --git a/ansible/roles/swift/tasks/config.yml b/ansible/roles/swift/tasks/config.yml deleted file mode 100644 index 3b81038ee..000000000 --- a/ansible/roles/swift/tasks/config.yml +++ /dev/null @@ -1,180 +0,0 @@ ---- -- name: Ensuring config directories exist - file: - path: "{{ node_config_directory }}/{{ item }}" - state: "directory" - recurse: yes - with_items: - - "swift" - - "swift-account-auditor" - - "swift-account-reaper" - - "swift-account-replicator" - - "swift-account-server" - - "swift-container-auditor" - - "swift-container-replicator" - - "swift-container-server" - - "swift-container-updater" - - "swift-object-auditor" - - "swift-object-expirer" - - "swift-object-replicator" - - "swift-object-server" - - "swift-object-updater" - - "swift-proxy-server" - - "swift-rsyncd" - -- name: Copying over config.json files for services - template: - src: "{{ item }}.json.j2" - dest: "{{ node_config_directory }}/{{ item }}/config.json" - with_items: - - "swift-account-auditor" - - "swift-account-reaper" - - "swift-account-replicator" - - "swift-account-server" - - "swift-container-auditor" - - "swift-container-replicator" - - "swift-container-server" - - "swift-container-updater" - - "swift-object-auditor" - - "swift-object-expirer" - - "swift-object-replicator" - - "swift-object-server" - - "swift-object-updater" - - "swift-proxy-server" - - "swift-rsyncd" - -- name: Copying over swift.conf - merge_configs: - vars: - service_name: "swift-{{ item }}" - sources: - - "{{ role_path }}/templates/swift.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/swift.conf" - - "{{ node_custom_config }}/swift/{{ item }}.conf" - - "{{ node_custom_config }}/swift/{{ inventory_hostname }}/{{ item }}.conf" - dest: "{{ node_config_directory }}/swift-{{ item }}/swift.conf" - with_items: - - "account-auditor" - - "account-reaper" - - "account-replicator" - - "account-server" - - "container-auditor" - - "container-replicator" - - "container-server" - - "container-updater" - - "object-auditor" - - "object-expirer" - - "object-replicator" - - "object-server" - - "object-updater" - - "proxy-server" - -- name: Copying over account-*.conf - merge_configs: - vars: - service_name: "swift-{{ item }}" - sources: - - "{{ role_path }}/templates/account.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/swift/account.conf" - - "{{ node_custom_config }}/swift/{{ item }}.conf" - - "{{ node_custom_config }}/swift/{{ inventory_hostname }}/{{ item }}.conf" - dest: "{{ node_config_directory }}/swift-{{ item }}/{{ item }}.conf" - with_items: - - "account-auditor" - - "account-reaper" - - "account-replicator" - - "account-server" - -- name: Copying over container-*.conf - merge_configs: - vars: - service_name: "swift-{{ item }}" - sources: - - "{{ role_path }}/templates/container.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/swift/container.conf" - - "{{ node_custom_config }}/swift/{{ item }}.conf" - - "{{ node_custom_config }}/swift/{{ inventory_hostname }}/{{ item }}.conf" - dest: "{{ node_config_directory }}/swift-{{ item }}/{{ item }}.conf" - with_items: - - "container-auditor" - - "container-replicator" - - "container-server" - - "container-updater" - -- name: Copying over object-*.conf - merge_configs: - vars: - service_name: "swift-{{ item }}" - sources: - - "{{ role_path }}/templates/object.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/swift/object.conf" - - "{{ node_custom_config }}/swift/{{ item }}.conf" - - "{{ node_custom_config }}/swift/{{ inventory_hostname }}/{{ item }}.conf" - dest: "{{ node_config_directory }}/swift-{{ item }}/{{ item }}.conf" - with_items: - - "object-auditor" - - "object-expirer" - - "object-replicator" - - "object-server" - - "object-updater" - -- name: Copying over proxy-server.conf - merge_configs: - vars: - service_name: "swift-{{ item }}" - sources: - - "{{ role_path }}/templates/proxy-server.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/swift/{{ item }}.conf" - - "{{ node_custom_config }}/swift/{{ inventory_hostname }}/{{ item }}.conf" - dest: "{{ node_config_directory }}/swift-{{ item }}/{{ item }}.conf" - with_items: - - "proxy-server" - -- name: Copying over rsyncd.conf - template: - src: "rsyncd.conf.j2" - dest: "{{ node_config_directory }}/swift-rsyncd/rsyncd.conf" - -- name: Copying over Swift ring files - copy: - src: "{{ node_custom_config }}/swift/{{ item }}" - dest: "{{ node_config_directory }}/swift/{{ item }}" - backup: yes - with_items: - - "account.builder" - - "account.ring.gz" - - "container.builder" - - "container.ring.gz" - - "object.builder" - - "object.ring.gz" - -- name: Check if policies shall be overwritten - local_action: stat path="{{ node_custom_config }}/swift/policy.json" - register: swift_policy - -- name: Copying over existing policy.json - template: - src: "{{ node_custom_config }}/swift/policy.json" - dest: "{{ node_config_directory }}/{{ item }}/policy.json" - with_items: - - "swift-account-auditor" - - "swift-account-reaper" - - "swift-account-replicator" - - "swift-account-server" - - "swift-container-auditor" - - "swift-container-replicator" - - "swift-container-server" - - "swift-container-updater" - - "swift-object-auditor" - - "swift-object-expirer" - - "swift-object-replicator" - - "swift-object-server" - - "swift-object-updater" - - "swift-proxy-server" - when: - swift_policy.stat.exists diff --git a/ansible/roles/swift/tasks/deploy.yml b/ansible/roles/swift/tasks/deploy.yml deleted file mode 100644 index 0a9ab4fed..000000000 --- a/ansible/roles/swift/tasks/deploy.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- include: register.yml - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] or - inventory_hostname in groups['swift-proxy-server'] - -- include: config.yml - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] or - inventory_hostname in groups['swift-proxy-server'] - -- include: start.yml - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] or - inventory_hostname in groups['swift-proxy-server'] - -- include: check.yml - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] or - inventory_hostname in groups['swift-proxy-server'] diff --git a/ansible/roles/swift/tasks/main.yml b/ansible/roles/swift/tasks/main.yml deleted file mode 100644 index b017e8b4a..000000000 --- a/ansible/roles/swift/tasks/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- include: "{{ action }}.yml" diff --git a/ansible/roles/swift/tasks/precheck.yml b/ansible/roles/swift/tasks/precheck.yml deleted file mode 100644 index ed97d539c..000000000 --- a/ansible/roles/swift/tasks/precheck.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/ansible/roles/swift/tasks/pull.yml b/ansible/roles/swift/tasks/pull.yml deleted file mode 100644 index 65cd6bb34..000000000 --- a/ansible/roles/swift/tasks/pull.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: Pulling rsyncd image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ swift_rsyncd_image_full }}" - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] - -- name: Pulling swift-proxy-server image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ swift_proxy_server_image_full }}" - when: inventory_hostname in groups['swift-proxy-server'] - -- name: Pulling swift-account image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ swift_account_image_full }}" - when: inventory_hostname in groups['swift-account-server'] - -- name: Pulling swift-container image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ swift_container_image_full }}" - when: inventory_hostname in groups['swift-container-server'] - -- name: Pulling swift-object image - kolla_docker: - action: "pull_image" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" - when: inventory_hostname in groups['swift-object-server'] diff --git a/ansible/roles/swift/tasks/reconfigure.yml b/ansible/roles/swift/tasks/reconfigure.yml deleted file mode 100644 index 3cb6ebe54..000000000 --- a/ansible/roles/swift/tasks/reconfigure.yml +++ /dev/null @@ -1,144 +0,0 @@ ---- -- name: Ensuring the containers up - kolla_docker: - name: "{{ item.name }}" - action: "get_container_state" - register: container_state - failed_when: container_state.Running == false - when: inventory_hostname in groups[item.group] - with_items: - - { name: swift_account_server, group: swift-account-server } - - { name: swift_account_auditor, group: swift-account-server } - - { name: swift_account_replicator, group: swift-account-server } - - { name: swift_account_reaper, group: swift-account-server } - - { name: swift_rsyncd, group: swift-account-server } - - { name: swift_container_server, group: swift-container-server } - - { name: swift_container_auditor, group: swift-container-server } - - { name: swift_container_replicator, group: swift-container-server } - - { name: swift_container_updater, group: swift-container-server } - - { name: swift_rsyncd, group: swift-container-server } - - { name: swift_object_server, group: swift-object-server } - - { name: swift_object_auditor, group: swift-object-server } - - { name: swift_object_replicator, group: swift-object-server } - - { name: swift_object_updater, group: swift-object-server } - - { name: swift_object_expirer, group: swift-object-server } - - { name: swift_rsyncd, group: swift-object-server } - - { name: swift_proxy_server, group: swift-proxy-server } - -- include: config.yml - -- name: Check the configs - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check - changed_when: false - failed_when: false - register: check_results - when: inventory_hostname in groups[item.group] - with_items: - - { name: swift_account_server, group: swift-account-server } - - { name: swift_account_auditor, group: swift-account-server } - - { name: swift_account_replicator, group: swift-account-server } - - { name: swift_account_reaper, group: swift-account-server } - - { name: swift_rsyncd, group: swift-account-server } - - { name: swift_container_server, group: swift-container-server } - - { name: swift_container_auditor, group: swift-container-server } - - { name: swift_container_replicator, group: swift-container-server } - - { name: swift_container_updater, group: swift-container-server } - - { name: swift_rsyncd, group: swift-container-server } - - { name: swift_object_server, group: swift-object-server } - - { name: swift_object_auditor, group: swift-object-server } - - { name: swift_object_replicator, group: swift-object-server } - - { name: swift_object_updater, group: swift-object-server } - - { name: swift_object_expirer, group: swift-object-server } - - { name: swift_rsyncd, group: swift-object-server } - - { name: swift_proxy_server, group: swift-proxy-server } - -# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS' -# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE', -# just remove the container and start again -- name: Containers config strategy - kolla_docker: - name: "{{ item.name }}" - action: "get_container_env" - register: container_envs - when: inventory_hostname in groups[item.group] - with_items: - - { name: swift_account_server, group: swift-account-server } - - { name: swift_account_auditor, group: swift-account-server } - - { name: swift_account_replicator, group: swift-account-server } - - { name: swift_account_reaper, group: swift-account-server } - - { name: swift_rsyncd, group: swift-account-server } - - { name: swift_container_server, group: swift-container-server } - - { name: swift_container_auditor, group: swift-container-server } - - { name: swift_container_replicator, group: swift-container-server } - - { name: swift_container_updater, group: swift-container-server } - - { name: swift_rsyncd, group: swift-container-server } - - { name: swift_object_server, group: swift-object-server } - - { name: swift_object_auditor, group: swift-object-server } - - { name: swift_object_replicator, group: swift-object-server } - - { name: swift_object_updater, group: swift-object-server } - - { name: swift_object_expirer, group: swift-object-server } - - { name: swift_rsyncd, group: swift-object-server } - - { name: swift_proxy_server, group: swift-proxy-server } - -- name: Remove the containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "remove_container" - register: remove_containers - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: swift_account_server, group: swift-account-server }, - { name: swift_account_auditor, group: swift-account-server }, - { name: swift_account_replicator, group: swift-account-server }, - { name: swift_account_reaper, group: swift-account-server }, - { name: swift_rsyncd, group: swift-account-server }, - { name: swift_container_server, group: swift-container-server }, - { name: swift_container_auditor, group: swift-container-server }, - { name: swift_container_replicator, group: swift-container-server }, - { name: swift_container_updater, group: swift-container-server }, - { name: swift_rsyncd, group: swift-container-server }, - { name: swift_object_server, group: swift-object-server }, - { name: swift_object_auditor, group: swift-object-server }, - { name: swift_object_replicator, group: swift-object-server }, - { name: swift_object_updater, group: swift-object-server }, - { name: swift_object_expirer, group: swift-object-server }, - { name: swift_rsyncd, group: swift-object-server }, - { name: swift_proxy_server, group: swift-proxy-server }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" - -- include: start.yml - when: remove_containers.changed - -- name: Restart containers - kolla_docker: - name: "{{ item[0]['name'] }}" - action: "restart_container" - when: - - inventory_hostname in groups[item[0]['group']] - - config_strategy == 'COPY_ALWAYS' - - item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE' - - item[2]['rc'] == 1 - with_together: - - [{ name: swift_account_server, group: swift-account-server }, - { name: swift_account_auditor, group: swift-account-server }, - { name: swift_account_replicator, group: swift-account-server }, - { name: swift_account_reaper, group: swift-account-server }, - { name: swift_rsyncd, group: swift-account-server }, - { name: swift_container_server, group: swift-container-server }, - { name: swift_container_auditor, group: swift-container-server }, - { name: swift_container_replicator, group: swift-container-server }, - { name: swift_container_updater, group: swift-container-server }, - { name: swift_rsyncd, group: swift-container-server }, - { name: swift_object_server, group: swift-object-server }, - { name: swift_object_auditor, group: swift-object-server }, - { name: swift_object_replicator, group: swift-object-server }, - { name: swift_object_updater, group: swift-object-server }, - { name: swift_object_expirer, group: swift-object-server }, - { name: swift_rsyncd, group: swift-object-server }, - { name: swift_proxy_server, group: swift-proxy-server }] - - "{{ container_envs.results }}" - - "{{ check_results.results }}" diff --git a/ansible/roles/swift/tasks/register.yml b/ansible/roles/swift/tasks/register.yml deleted file mode 100644 index 628e8aea6..000000000 --- a/ansible/roles/swift/tasks/register.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- name: Creating the Swift service and endpoint - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_service - -a "service_name=swift - service_type=object-store - description='Openstack Object Storage' - endpoint_region={{ openstack_region_name }} - url='{{ item.url }}' - interface='{{ item.interface }}' - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_swift_auth }}' }}" - -e "{'openstack_swift_auth':{{ openstack_swift_auth }}}" - register: swift_endpoint - changed_when: "{{ swift_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (swift_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: swift_endpoint.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True - with_items: - - {'interface': 'admin', 'url': '{{ swift_admin_endpoint }}'} - - {'interface': 'internal', 'url': '{{ swift_internal_endpoint }}'} - - {'interface': 'public', 'url': '{{ swift_public_endpoint }}'} - -- name: Creating the Swift project, user, and role - command: docker exec -t kolla_toolbox /usr/bin/ansible localhost - -m kolla_keystone_user - -a "project=service - user={{ swift_keystone_user }} - password={{ swift_keystone_password }} - role={{ swift_admin_tenant_name }} - region_name={{ openstack_region_name }} - auth={{ '{{ openstack_swift_auth }}' }}" - -e "{'openstack_swift_auth':{{ openstack_swift_auth }}}" - register: swift_user - changed_when: "{{ swift_user.stdout.find('localhost | SUCCESS => ') != -1 and (swift_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - until: swift_user.stdout.split()[2] == 'SUCCESS' - retries: 10 - delay: 5 - run_once: True diff --git a/ansible/roles/swift/tasks/start.yml b/ansible/roles/swift/tasks/start.yml deleted file mode 100644 index 39b08f174..000000000 --- a/ansible/roles/swift/tasks/start.yml +++ /dev/null @@ -1,242 +0,0 @@ ---- -- name: Looking up disks for Swift - command: docker exec -t kolla_toolbox sudo -E /usr/bin/ansible localhost - -m find_disks - -a "name={{ swift_devices_name }} - match_mode={{ swift_devices_match_mode }}" - register: swift_disk_lookup - changed_when: "{{ swift_disk_lookup.stdout.find('localhost | SUCCESS => ') != -1 and - (swift_disk_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" - failed_when: swift_disk_lookup.stdout.split()[2] != 'SUCCESS' - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] - -- name: Reading data from variable - set_fact: - swift_disks: "{{ (swift_disk_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).disks|from_json }}" - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] - -- name: Mounting Swift disks - mount: - src: "UUID={{ item.fs_uuid }}" - fstype: xfs - opts: "noatime,nodiratime,nobarrier,logbufs=8" - state: mounted - name: "{{ swift_devices_mount_point }}/{{ item['fs_label'] }}" - with_items: "{{ swift_disks }}" - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-rsyncd container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_rsyncd_image_full }}" - name: "swift_rsyncd" - volumes: - - "{{ node_config_directory }}/swift-rsyncd/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-account-server'] or - inventory_hostname in groups['swift-container-server'] or - inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-account-server container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - name: "swift_account_server" - image: "{{ swift_account_image_full }}" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-account-server/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-account-server'] - -- name: Starting swift-account-auditor container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_account_image_full }}" - name: "swift_account_auditor" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-account-auditor/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-account-server'] - -- name: Starting swift-account-replicator container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_account_image_full }}" - name: "swift_account_replicator" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-account-replicator/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-account-server'] - -- name: Starting swift-account-reaper container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_account_image_full }}" - name: "swift_account_reaper" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-account-reaper/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-account-server'] - -- name: Starting swift-container-server container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_container_image_full }}" - name: "swift_container_server" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-container-server/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-container-server'] - -- name: Starting swift-container-auditor container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_container_image_full }}" - name: "swift_container_auditor" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-container-auditor/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-container-server'] - -- name: Starting swift-container-replicator container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_container_image_full }}" - name: "swift_container_replicator" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-container-replicator/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-container-server'] - -- name: Starting swift-container-updater container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_container_image_full }}" - name: "swift_container_updater" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-container-updater/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-container-server'] - -- name: Starting swift-object-server container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" - name: "swift_object_server" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-object-server/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-object-auditor container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" - name: "swift_object_auditor" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-object-auditor/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-object-replicator container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" - name: "swift_object_replicator" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-object-replicator/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-object-updater container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_image_full }}" - name: "swift_object_updater" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-object-updater/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-object-expirer container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_object_expirer_image_full }}" - name: "swift_object_expirer" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-object-expirer/:{{ container_config_directory }}/:ro" - - "{{ swift_devices_mount_point }}:{{ swift_devices_mount_point }}" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-object-server'] - -- name: Starting swift-proxy-server container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - image: "{{ swift_proxy_server_image_full }}" - name: "swift_proxy_server" - volumes: - - "{{ node_config_directory }}/swift/:/var/lib/kolla/swift/:ro" - - "{{ node_config_directory }}/swift-proxy-server/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "heka_socket:/var/lib/kolla/heka/" - when: inventory_hostname in groups['swift-proxy-server'] diff --git a/ansible/roles/swift/tasks/stop_and_start.yml b/ansible/roles/swift/tasks/stop_and_start.yml deleted file mode 100644 index fca139f57..000000000 --- a/ansible/roles/swift/tasks/stop_and_start.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -# NOTE(pbourke): because the images that are used to start Swift containers -# were refactored for Mitaka, we need to completely remove the existing -# containers or we get a conflict when attempting to start the new ones. -- name: "Cleaning out old Swift containers" - kolla_docker: - name: "{{ item }}" - # TODO(pbourke): Swift recommend using a SIGHUP to gracefully stop the - # services. Update once kolla_docker supports this. - action: remove_container - with_items: - - "swift_rsyncd" - - "swift_account_server" - - "swift_account_auditor" - - "swift_account_replicator" - - "swift_account_reaper" - - "swift_container_server" - - "swift_container_auditor" - - "swift_container_replicator" - - "swift_container_updater" - - "swift_object_server" - - "swift_object_auditor" - - "swift_object_replicator" - - "swift_object_updater" - - "swift_object_expirer" - - "swift_proxy_server" - -- include: start.yml diff --git a/ansible/roles/swift/tasks/upgrade.yml b/ansible/roles/swift/tasks/upgrade.yml deleted file mode 100644 index 667a6d45e..000000000 --- a/ansible/roles/swift/tasks/upgrade.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- include: config.yml - -- include: stop_and_start.yml |
