From 50aafb8645a9918b8dc746711ac2a15429cb7bd9 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Wed, 3 Feb 2016 17:23:38 +0100 Subject: [PATCH] Playbook for magnum upgrade Change-Id: I5607d1a21d1eb4e4aaf83b0a09e3f50650f76fdb Partially-Implements: blueprint upgrade-kolla Implements: blueprint upgrade-magnum --- ansible/roles/magnum/tasks/bootstrap.yml | 19 +------------------ .../roles/magnum/tasks/bootstrap_service.yml | 19 +++++++++++++++++++ ansible/roles/magnum/tasks/upgrade.yml | 6 ++++++ 3 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 ansible/roles/magnum/tasks/bootstrap_service.yml diff --git a/ansible/roles/magnum/tasks/bootstrap.yml b/ansible/roles/magnum/tasks/bootstrap.yml index ac33dc4a32..bd91c161ba 100644 --- a/ansible/roles/magnum/tasks/bootstrap.yml +++ b/ansible/roles/magnum/tasks/bootstrap.yml @@ -35,22 +35,5 @@ run_once: True delegate_to: "{{ groups['magnum-api'][0] }}" -- name: Running Magnum bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ magnum_api_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_magnum" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro" - - "kolla_logs:/var/log/kolla/" - run_once: True - delegate_to: "{{ groups['magnum-api'][0] }}" +- include: bootstrap_service.yml when: database_created diff --git a/ansible/roles/magnum/tasks/bootstrap_service.yml b/ansible/roles/magnum/tasks/bootstrap_service.yml new file mode 100644 index 0000000000..01ba3ffbab --- /dev/null +++ b/ansible/roles/magnum/tasks/bootstrap_service.yml @@ -0,0 +1,19 @@ +--- +- name: Running Magnum bootstrap container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" + detach: False + environment: + KOLLA_BOOTSTRAP: + KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" + image: "{{ magnum_api_image_full }}" + labels: + BOOTSTRAP: + name: "bootstrap_magnum" + restart_policy: "never" + volumes: + - "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro" + - "kolla_logs:/var/log/kolla" + run_once: True + delegate_to: "{{ groups['magnum-api'][0] }}" diff --git a/ansible/roles/magnum/tasks/upgrade.yml b/ansible/roles/magnum/tasks/upgrade.yml index ed97d539c0..fb39089f55 100644 --- a/ansible/roles/magnum/tasks/upgrade.yml +++ b/ansible/roles/magnum/tasks/upgrade.yml @@ -1 +1,7 @@ --- +- include: config.yml + +- include: bootstrap_service.yml + +- include: start.tml + serial: "30%"