Keep existing data for containerized Swift

Use mounts instead of docker volumes to preserve existing data when
moving from baremetal to containerized Swift.

Change-Id: Ib7cbca2ef674a0245a67b69ee2c77f574d74c181
This commit is contained in:
Jiri Stransky 2017-03-08 13:46:07 +01:00
parent 0d407a5c9a
commit 03e39d668f
2 changed files with 26 additions and 16 deletions

View File

@ -72,10 +72,15 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create /srv/node
file:
path: /srv/node
state: directory
upgrade_tasks:
- name: Stop and disable swift_proxy service
tags: step2

View File

@ -104,9 +104,9 @@ outputs:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerSwiftAccountImage} ]
user: root
command: ['/bin/bash', '-c', 'mkdir /srv/node && chown swift:swift /srv/node']
command: ['chown', '-R', 'swift:', '/srv/node']
volumes:
- swift-srv:/srv
- /srv/node:/srv/node
step_4:
swift_account_auditor:
image:
@ -123,7 +123,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: &kolla_env
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
@ -142,7 +142,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_account_replicator:
@ -160,7 +160,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_account_server:
@ -178,7 +178,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_container_auditor:
@ -196,7 +196,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_container_replicator:
@ -214,7 +214,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_container_updater:
@ -232,7 +232,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_container_server:
@ -250,7 +250,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_object_auditor:
@ -268,7 +268,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_object_expirer:
@ -286,7 +286,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_object_replicator:
@ -304,7 +304,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_object_updater:
@ -322,7 +322,7 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
swift_object_server:
@ -340,9 +340,14 @@ outputs:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
- /run:/run
- swift-srv:/srv
- /srv/node:/srv/node
- /dev:/dev
environment: *kolla_env
host_prep_tasks:
- name: create /srv/node
file:
path: /srv/node
state: directory
upgrade_tasks:
- name: Stop and disable swift storage services
tags: step2