
Flavors are being moved to the API database for CellsV2. Add a task to perform online data migrations as required for both the initial migration of flavors to the Nova API database in a new Newton deployment and for all required migrations when upgrading from Mitaka. Also include the creation and use of a new flavor in this role's functional testing. Change-Id: I6b562476a6db8fdbaba81f5872734e5efdb522e1
94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Create DB for service
|
|
mysql_db:
|
|
login_user: "{{ galera_root_user }}"
|
|
login_password: "{{ galera_root_password }}"
|
|
login_host: "{{ nova_galera_address }}"
|
|
name: "{{ nova_galera_database }}"
|
|
state: "present"
|
|
tags:
|
|
- nova-db-setup
|
|
|
|
- name: Grant access to the DB for the service
|
|
mysql_user:
|
|
login_user: "{{ galera_root_user }}"
|
|
login_password: "{{ galera_root_password }}"
|
|
login_host: "{{ nova_galera_address }}"
|
|
name: "{{ nova_galera_user }}"
|
|
password: "{{ nova_container_mysql_password }}"
|
|
host: "{{ item }}"
|
|
state: "present"
|
|
priv: "{{ nova_galera_database }}.*:ALL"
|
|
with_items:
|
|
- "localhost"
|
|
- "%"
|
|
tags:
|
|
- nova-db-setup
|
|
|
|
- name: Create API DB for service
|
|
mysql_db:
|
|
login_user: "{{ galera_root_user }}"
|
|
login_password: "{{ galera_root_password }}"
|
|
login_host: "{{ nova_api_galera_address }}"
|
|
name: "{{ nova_api_galera_database }}"
|
|
state: "present"
|
|
tags:
|
|
- nova-db-setup
|
|
|
|
- name: Grant access to the API DB for the service
|
|
mysql_user:
|
|
login_user: "{{ galera_root_user }}"
|
|
login_password: "{{ galera_root_password }}"
|
|
login_host: "{{ nova_api_galera_address }}"
|
|
name: "{{ nova_api_galera_user }}"
|
|
password: "{{ nova_api_container_mysql_password }}"
|
|
host: "{{ item }}"
|
|
state: "present"
|
|
priv: "{{ nova_api_galera_database }}.*:ALL"
|
|
with_items:
|
|
- "localhost"
|
|
- "%"
|
|
tags:
|
|
- nova-db-setup
|
|
|
|
- name: Perform a Nova DB sync
|
|
command: "{{ nova_bin }}/nova-manage db sync"
|
|
become: yes
|
|
become_user: "{{ nova_system_user_name }}"
|
|
tags:
|
|
- nova-db-setup
|
|
- nova-setup
|
|
- nova-command-bin
|
|
|
|
- name: Perform a Nova API DB sync
|
|
command: "{{ nova_bin }}/nova-manage api_db sync"
|
|
become: yes
|
|
become_user: "{{ nova_system_user_name }}"
|
|
tags:
|
|
- nova-db-setup
|
|
- nova-setup
|
|
- nova-command-bin
|
|
|
|
- name: Perform Nova online data migrations
|
|
command: "{{ nova_bin }}/nova-manage db online_data_migrations"
|
|
become: yes
|
|
become_user: "{{ nova_system_user_name }}"
|
|
tags:
|
|
- nova-db-setup
|
|
- nova-setup
|
|
- nova-command-bin
|