Nova Kilofication Work

* API Versions 1.1 and 3 have been deprecated from nova, plays
  have been modified to completely remove v1.1 and make v3
  optional via nova_v3_deprecated_but_enabled boolean.
* Addition of v2.1 api configuration.
* Elimination of the unused nova_api_ec2 container.
* nova_spice_console has been renamed to nova_console and
  nova_spice_console_container has been renamed to
  nova_console_container to facilitate different consoles in
  the future.
* Spice has been made the default console.
* A standalone task and init scripts for nova_spice.

- Fixed some typos
- Modified HAProxy role to remove nova_api_ec2 and rename
  nova_spice_console to nova_console
- Updated user_secrets.yml
- Unbroke things that I broke

Partially Implements Blueprint: master-kilofication

Change-Id: Ia87dfb1e8c0316103a30e2121f11996a9ca87c25
This commit is contained in:
d34dh0r53 2015-04-06 13:41:11 -05:00
parent 4544f00783
commit 5cce6b59ff
12 changed files with 106 additions and 45 deletions

View File

@ -74,9 +74,6 @@ component_skel:
neutron_server:
belongs_to:
- neutron_all
nova_api_ec2:
belongs_to:
- nova_all
nova_api_metadata:
belongs_to:
- nova_all
@ -95,7 +92,7 @@ component_skel:
nova_scheduler:
belongs_to:
- nova_all
nova_spice_console:
nova_console:
belongs_to:
- nova_all
pkg_repo:
@ -230,15 +227,6 @@ container_skel:
properties:
service_name: neutron
container_release: trusty
nova_api_ec2_container:
belongs_to:
- infra_containers
- os-infra_containers
contains:
- nova_api_ec2
properties:
service_name: nova
container_release: trusty
nova_api_metadata_container:
belongs_to:
- infra_containers
@ -294,12 +282,12 @@ container_skel:
properties:
service_name: nova
container_release: trusty
nova_spice_console_container:
nova_console_container:
belongs_to:
- infra_containers
- os-infra_containers
contains:
- nova_spice_console
- nova_console
properties:
service_name: nova
container_release: trusty

View File

@ -1,5 +1,5 @@
---
environment_version: 5fd612951c8a374e709305f29dd92054
environment_version: a09bd162bf75ed2044b054c33b777929
cidr_networks:
container: 172.29.236.0/22

View File

@ -72,6 +72,7 @@ nova_metadata_proxy_secret:
nova_ec2_service_password:
nova_service_password:
nova_v3_service_password:
nova_v21_service_password:
nova_s3_service_password:
## Swift Options:

View File

@ -74,6 +74,20 @@ nova_v3_service_adminuri: "{{ nova_v3_service_proto }}://{{ internal_lb_vip_addr
nova_v3_service_adminurl: "{{ nova_v3_service_adminuri }}/v3"
nova_v3_service_internaluri: "{{ nova_v3_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_v3_service_port }}"
nova_v3_service_internalurl: "{{ nova_v3_service_internaluri }}/v3"
nova_v3_deprecated_but_enabled: false
## Nova v2.1
nova_v21_service_name: novav21
nova_v21_service_type: computev21
nova_v21_service_proto: http
nova_v21_service_port: 8774
nova_v21_service_description: "Nova Compute Service V2.1"
nova_v21_service_publicuri: "{{ nova_v21_service_proto }}://{{ external_lb_vip_address }}:{{ nova_v21_service_port }}"
nova_v21_service_publicurl: "{{ nova_v21_service_publicuri }}/v2.1"
nova_v21_service_adminuri: "{{ nova_v21_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_v21_service_port }}"
nova_v21_service_adminurl: "{{ nova_v21_service_adminuri }}/v2.1"
nova_v21_service_internaluri: "{{ nova_v21_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_v21_service_port }}"
nova_v21_service_internalurl: "{{ nova_v21_service_internaluri }}/v2.1"
## Nova v2
nova_service_name: nova
@ -134,6 +148,8 @@ nova_console_agent_enabled: True
nova_consoleauth_program_name: nova-consoleauth
nova_console_agent_enabled: True
nova_console_keymap: en-us
# Set the console type. Presently the only option is ["spice"].
nova_console_type: spice
## Nova global config
nova_cpu_mode: host-model
@ -206,6 +222,9 @@ nova_apt_packages:
- genisoimage
- git
- libpq-dev
# Spice console apt packages
nova_spice_apt_packages:
- spice-html5
nova_compute_kvm_apt_packages:

View File

@ -62,10 +62,10 @@ paste.app_factory = nova.api.metadata.handler:MetadataRequestHandler.factory
[composite:osapi_compute]
use = call:nova.api.openstack.urlmap:urlmap_factory
/: oscomputeversions
/v1.1: openstack_compute_api_v2
#/v1.1: openstack_compute_api_v2
/v2: openstack_compute_api_v2
/v2.1: openstack_compute_api_v21
/v3: openstack_compute_api_v3
#/v3: openstack_compute_api_v3
[composite:openstack_compute_api_v2]
use = call:nova.api.auth:pipeline_factory
@ -80,11 +80,11 @@ noauth = compute_req_id faultwrap sizelimit noauth osapi_compute_app_v21
noauth2 = compute_req_id faultwrap sizelimit noauth2 osapi_compute_app_v21
keystone = compute_req_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v21
[composite:openstack_compute_api_v3]
use = call:nova.api.auth:pipeline_factory_v21
noauth = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
noauth2 = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
keystone = request_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v3
#[composite:openstack_compute_api_v3]
#use = call:nova.api.auth:pipeline_factory_v21
#noauth = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
#noauth2 = request_id faultwrap sizelimit noauth_v3 osapi_compute_app_v3
#keystone = request_id faultwrap sizelimit authtoken keystonecontext osapi_compute_app_v3
[filter:request_id]
paste.filter_factory = oslo.middleware:RequestId.factory
@ -101,8 +101,8 @@ paste.filter_factory = nova.api.openstack.auth:NoAuthMiddlewareOld.factory
[filter:noauth2]
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddleware.factory
[filter:noauth_v3]
paste.filter_factory = nova.api.openstack.auth:NoAuthMiddlewareV3.factory
#[filter:noauth_v3]
#paste.filter_factory = nova.api.openstack.auth:NoAuthMiddlewareV3.factory
[filter:ratelimit]
paste.filter_factory = nova.api.openstack.compute.limits:RateLimitingMiddleware.factory
@ -116,8 +116,8 @@ paste.app_factory = nova.api.openstack.compute:APIRouter.factory
[app:osapi_compute_app_v21]
paste.app_factory = nova.api.openstack.compute:APIRouterV21.factory
[app:osapi_compute_app_v3]
paste.app_factory = nova.api.openstack.compute:APIRouterV3.factory
#[app:osapi_compute_app_v3]
#paste.app_factory = nova.api.openstack.compute:APIRouterV3.factory
[pipeline:oscomputeversions]
pipeline = faultwrap oscomputeversionapp
@ -133,4 +133,4 @@ paste.app_factory = nova.api.openstack.compute.versions:Versions.factory
paste.filter_factory = nova.api.auth:NovaKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
paste.filter_factory = keystonemiddleware.auth_token:filter_factory

View File

@ -15,6 +15,12 @@
- include: nova_pre_install.yml
- include: nova_install.yml
- include: nova_spice_console_install.yml
when: >
inventory_hostname in groups['nova_console'] and
nova_console_type == "spice"
- include: nova_post_install.yml
- include: nova_upstart_init.yml
@ -30,4 +36,5 @@
when: >
inventory_hostname in groups['nova_compute']
tags:
- nova-compute
- nova-compute

View File

@ -14,9 +14,7 @@
# limitations under the License.
- include: nova_compute_kvm.yml
when: >
nova_virt_type == 'kvm' or
nova_virt_type == 'qemu'
when: nova_virt_type == 'kvm' or nova_virt_type == 'qemu'
- include: nova_compute_key_create.yml

View File

@ -30,6 +30,24 @@
- nova-api
- nova-api-v2
- include: nova_service_add.yml
vars:
service_user_name: "{{ nova_service_user_name }}"
service_tenant_name: "{{ nova_service_tenant_name }}"
service_name: "{{ nova_v21_service_name }}"
service_type: "{{ nova_v21_service_type }}"
service_region: "{{ nova_service_region }}"
service_description: "{{ nova_v21_service_description }}"
service_password: "{{ nova_v21_service_password }}"
service_publicurl: "{{ nova_v21_service_publicurl }}"
service_internalurl: "{{ nova_v21_service_internalurl }}"
service_adminurl: "{{ nova_v21_service_adminurl }}"
role_name: "{{ nova_service_role_name }}"
tags:
- nova-api
- nova-api-v21
- include: nova_service_add.yml
vars:
service_user_name: "{{ nova_service_user_name }}"
@ -43,6 +61,8 @@
service_internalurl: "{{ nova_v3_service_internalurl }}"
service_adminurl: "{{ nova_v3_service_adminurl }}"
role_name: "{{ nova_service_role_name }}"
when: >
nova_v3_deprecated_but_enabled == true or nova_v3_deprecated_but_enabled == 'True'
tags:
- nova-api
- nova-api-v3

View File

@ -0,0 +1,29 @@
---
# 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: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items: nova_spice_apt_packages
tags:
- nova-spice-apt-packages

View File

@ -57,7 +57,7 @@
system_group: "{{ nova_system_group_name }}"
service_home: "{{ nova_system_home_folder }}"
when: >
inventory_hostname in groups['nova_api_ec2'] and
inventory_hostname in groups['nova_api_os_compute'] and
(nova_ec2_deprecated_but_enabled == true or nova_ec2_deprecated_but_enabled == 'True')
- include: nova_upstart_common_init.yml
@ -68,7 +68,7 @@
system_group: "{{ nova_system_group_name }}"
service_home: "{{ nova_system_home_folder }}"
when: >
inventory_hostname in groups['nova_api_ec2'] and
inventory_hostname in groups['nova_api_os_compute'] and
(nova_ec2_deprecated_but_enabled == true or nova_ec2_deprecated_but_enabled == 'True')
- include: nova_upstart_common_init.yml
@ -89,6 +89,7 @@
service_home: "{{ nova_system_home_folder }}"
when: inventory_hostname in groups['nova_compute']
# Upstart init script for spice console.
- include: nova_upstart_common_init.yml
vars:
program_name: "{{ nova_spice_program_name }}"
@ -96,7 +97,9 @@
system_user: "{{ nova_system_user_name }}"
system_group: "{{ nova_system_group_name }}"
service_home: "{{ nova_system_home_folder }}"
when: inventory_hostname in groups['nova_spice_console']
when: >
inventory_hostname in groups ['nova_console'] and
nova_console_type == "spice"
- include: nova_upstart_common_init.yml
vars:
@ -105,4 +108,5 @@
system_user: "{{ nova_system_user_name }}"
system_group: "{{ nova_system_group_name }}"
service_home: "{{ nova_system_home_folder }}"
when: inventory_hostname in groups['nova_spice_console']
when: inventory_hostname in groups['nova_console']

View File

@ -104,7 +104,7 @@ memcached_servers = {{ memcached_servers }}
catalog_info = volume:cinder:internalURL
{% if nova_spice_html5proxy_base_url is defined %}
{% if nova_spice_html5proxy_base_url is defined and nova_console_type == "spice" %}
[spice]
agent_enabled = {{ nova_console_agent_enabled }}
enabled = {{ nova_console_agent_enabled }}
@ -142,7 +142,7 @@ workers = {{ nova_conductor_workers | default(api_threads) }}
[osapi_v3]
enabled = True
enabled = False
[keystone_authtoken]

View File

@ -91,11 +91,6 @@ haproxy_service_configs:
- "forwardfor"
- "httpchk"
- "httplog"
- service:
haproxy_service_name: nova_api_ec2
haproxy_backend_nodes: "{{ groups['nova_api_ec2'] }}"
haproxy_port: 8773
haproxy_balance_type: http
- service:
haproxy_service_name: nova_api_metadata
haproxy_backend_nodes: "{{ groups['nova_api_metadata'] }}"
@ -114,8 +109,8 @@ haproxy_service_configs:
- "httpchk"
- "httplog"
- service:
haproxy_service_name: nova_spice_console
haproxy_backend_nodes: "{{ groups['nova_spice_console'] }}"
haproxy_service_name: nova_console
haproxy_backend_nodes: "{{ groups['nova_console'] }}"
haproxy_port: 6082
haproxy_balance_type: tcp
haproxy_timeout_client: 60m