From 4d0a3328f3b89757d785609d888b41152efe8179 Mon Sep 17 00:00:00 2001 From: Mauricio Lima Date: Fri, 4 Mar 2016 11:07:41 -0500 Subject: [PATCH] Playbook for Manila upgrade Co-Authored-By: Michal Rostecki Change-Id: Iceed173c3c3abea93b954f8d3cb45641de2aaa0f Partially-Implements: blueprint upgrade-kolla Implements: blueprint upgrade-manila --- ansible/roles/manila/tasks/bootstrap.yml | 18 +----------------- .../roles/manila/tasks/bootstrap_service.yml | 19 +++++++++++++++++++ ansible/roles/manila/tasks/upgrade.yml | 6 ++++++ 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 ansible/roles/manila/tasks/bootstrap_service.yml diff --git a/ansible/roles/manila/tasks/bootstrap.yml b/ansible/roles/manila/tasks/bootstrap.yml index ee76ac18d8..31b8600e40 100644 --- a/ansible/roles/manila/tasks/bootstrap.yml +++ b/ansible/roles/manila/tasks/bootstrap.yml @@ -35,21 +35,5 @@ run_once: True delegate_to: "{{ groups['manila-api'][0] }}" -- name: Running Manila bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ manila_api_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_manila" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/manila-api/:{{ container_config_directory }}/:ro" - run_once: True - delegate_to: "{{ groups['manila-api'][0] }}" +- include: bootstrap_service.yml when: database_created diff --git a/ansible/roles/manila/tasks/bootstrap_service.yml b/ansible/roles/manila/tasks/bootstrap_service.yml new file mode 100644 index 0000000000..05e54ad16b --- /dev/null +++ b/ansible/roles/manila/tasks/bootstrap_service.yml @@ -0,0 +1,19 @@ +--- +- name: Running Manila bootstrap container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" + detach: False + environment: + KOLLA_BOOTSTRAP: + KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" + image: "{{ manila_api_image_full }}" + labels: + BOOTSTRAP: + name: "bootstrap_manila" + restart_policy: "never" + volumes: + - "{{ node_config_directory }}/manila-api/:{{ container_config_directory }}/:ro" + - "kolla_logs:/var/log/kolla/" + run_once: True + delegate_to: "{{ groups['manila-api'][0] }}" diff --git a/ansible/roles/manila/tasks/upgrade.yml b/ansible/roles/manila/tasks/upgrade.yml index ed97d539c0..c0e3b19a40 100644 --- a/ansible/roles/manila/tasks/upgrade.yml +++ b/ansible/roles/manila/tasks/upgrade.yml @@ -1 +1,7 @@ --- +- include: config.yml + +- include: bootstrap_service.yml + +- include: start.yml + serial: "30%"