Add support cell_v2 api
This patch adds support cell_v2 api in nova. For ocata cell_v2 api should be enabled. Change-Id: I8b10555cea82bbd870d24d919bdddac74dc96f91
This commit is contained in:
parent
d686c164c3
commit
e8519e545d
|
@ -27,6 +27,11 @@ configs:
|
||||||
- DifferentHostFilter
|
- DifferentHostFilter
|
||||||
debug: false
|
debug: false
|
||||||
console: "novnc"
|
console: "novnc"
|
||||||
|
|
||||||
|
cells_v2:
|
||||||
|
enabled: false
|
||||||
|
cell_name: cell0
|
||||||
|
|
||||||
virt_type: "kvm"
|
virt_type: "kvm"
|
||||||
|
|
||||||
libvirt:
|
libvirt:
|
||||||
|
|
|
@ -16,12 +16,15 @@ service:
|
||||||
type: single
|
type: single
|
||||||
command: mysql -v -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ nova.db.name }}`;
|
command: mysql -v -u root -p{{ db.root_password }} -h {{ address("database") }} -e 'create database `{{ nova.db.name }}`;
|
||||||
create database `{{ nova.db.api_name }}`;
|
create database `{{ nova.db.api_name }}`;
|
||||||
|
{% if nova.cells_v2.enabled %} create database `nova_{{ nova.cells_v2.cell_name }}`; {% endif -%}
|
||||||
create user "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
create user "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
{% if db.tls.enabled %} require ssl {% endif %};
|
{% if db.tls.enabled %} require ssl {% endif %};
|
||||||
grant all privileges on `{{ nova.db.name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
grant all privileges on `{{ nova.db.name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
{% if db.tls.enabled %} require ssl {% endif %};
|
{% if db.tls.enabled %} require ssl {% endif %};
|
||||||
grant all privileges on `{{ nova.db.api_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
grant all privileges on `{{ nova.db.api_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
{% if db.tls.enabled %} require ssl {% endif %};'
|
{% if db.tls.enabled %} require ssl {% endif %};
|
||||||
|
{% if nova.cells_v2.enabled %} grant all privileges on `nova_{{ nova.cells_v2.cell_name }}`.* to "{{ nova.db.username }}"@"%" identified by "{{ nova.db.password }}"
|
||||||
|
{% if db.tls.enabled %} require ssl {% endif %}; {% endif %}'
|
||||||
dependencies:
|
dependencies:
|
||||||
- database
|
- database
|
||||||
files:
|
files:
|
||||||
|
@ -37,7 +40,7 @@ service:
|
||||||
type: single
|
type: single
|
||||||
command: nova-manage api_db sync
|
command: nova-manage api_db sync
|
||||||
dependencies:
|
dependencies:
|
||||||
- nova-db-sync
|
- nova-db-create
|
||||||
files:
|
files:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
- name: nova-db-migrations
|
- name: nova-db-migrations
|
||||||
|
@ -47,6 +50,16 @@ service:
|
||||||
- nova-api-db-sync
|
- nova-api-db-sync
|
||||||
files:
|
files:
|
||||||
- nova.conf
|
- nova.conf
|
||||||
|
# {% if nova.cells_v2.enabled %}
|
||||||
|
- name: nova-cell-create
|
||||||
|
type: single
|
||||||
|
dependencies:
|
||||||
|
- nova-api-db-sync
|
||||||
|
- nova-db-sync
|
||||||
|
command: nova-manage cell_v2 create_cell --name {{ nova.cells_v2.cell_name }}
|
||||||
|
files:
|
||||||
|
- nova.conf
|
||||||
|
# {% endif %}
|
||||||
- name: nova-user-create
|
- name: nova-user-create
|
||||||
type: single
|
type: single
|
||||||
command: openstack user create --domain {{ service_account.domain }} --password {{ nova.password }} {{ nova.username }}
|
command: openstack user create --domain {{ service_account.domain }} --password {{ nova.password }} {{ nova.username }}
|
||||||
|
|
|
@ -47,6 +47,11 @@ service:
|
||||||
# {% if keystone.tls.enabled %}
|
# {% if keystone.tls.enabled %}
|
||||||
- ca-cert
|
- ca-cert
|
||||||
# {% endif %}
|
# {% endif %}
|
||||||
|
# {% if nova.cells_v2.enabled %}
|
||||||
|
post:
|
||||||
|
- name: add-host-to-cell
|
||||||
|
command: nova-manage cell_v2 map_cell_and_hosts
|
||||||
|
# {% endif %}
|
||||||
|
|
||||||
files:
|
files:
|
||||||
nova.conf:
|
nova.conf:
|
||||||
|
|
Loading…
Reference in New Issue