diff --git a/etc/openstack_deploy/openstack_environment.yml b/etc/openstack_deploy/openstack_environment.yml index fe8508c50b..f3350c91f5 100644 --- a/etc/openstack_deploy/openstack_environment.yml +++ b/etc/openstack_deploy/openstack_environment.yml @@ -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 diff --git a/etc/openstack_deploy/openstack_user_config.yml b/etc/openstack_deploy/openstack_user_config.yml index b02369cf0e..ee27da8708 100644 --- a/etc/openstack_deploy/openstack_user_config.yml +++ b/etc/openstack_deploy/openstack_user_config.yml @@ -1,5 +1,5 @@ --- -environment_version: 5fd612951c8a374e709305f29dd92054 +environment_version: a09bd162bf75ed2044b054c33b777929 cidr_networks: container: 172.29.236.0/22 diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml index 5a57edfab6..9ee4d4fcc9 100644 --- a/etc/openstack_deploy/user_secrets.yml +++ b/etc/openstack_deploy/user_secrets.yml @@ -74,6 +74,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: diff --git a/playbooks/roles/os_nova/defaults/main.yml b/playbooks/roles/os_nova/defaults/main.yml index 2a8bd23964..aef4f2d8bf 100644 --- a/playbooks/roles/os_nova/defaults/main.yml +++ b/playbooks/roles/os_nova/defaults/main.yml @@ -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: diff --git a/playbooks/roles/os_nova/files/api-paste.ini b/playbooks/roles/os_nova/files/api-paste.ini index 0d5598a853..6405abee28 100644 --- a/playbooks/roles/os_nova/files/api-paste.ini +++ b/playbooks/roles/os_nova/files/api-paste.ini @@ -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 \ No newline at end of file +paste.filter_factory = keystonemiddleware.auth_token:filter_factory diff --git a/playbooks/roles/os_nova/tasks/main.yml b/playbooks/roles/os_nova/tasks/main.yml index 327955f18d..57a464c49b 100644 --- a/playbooks/roles/os_nova/tasks/main.yml +++ b/playbooks/roles/os_nova/tasks/main.yml @@ -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 \ No newline at end of file + - nova-compute + diff --git a/playbooks/roles/os_nova/tasks/nova_compute.yml b/playbooks/roles/os_nova/tasks/nova_compute.yml index 4bd7d53c50..fd4b343271 100644 --- a/playbooks/roles/os_nova/tasks/nova_compute.yml +++ b/playbooks/roles/os_nova/tasks/nova_compute.yml @@ -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 diff --git a/playbooks/roles/os_nova/tasks/nova_service_setup.yml b/playbooks/roles/os_nova/tasks/nova_service_setup.yml index 3f487506a7..5292b847b3 100644 --- a/playbooks/roles/os_nova/tasks/nova_service_setup.yml +++ b/playbooks/roles/os_nova/tasks/nova_service_setup.yml @@ -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 diff --git a/playbooks/roles/os_nova/tasks/nova_spice_console_install.yml b/playbooks/roles/os_nova/tasks/nova_spice_console_install.yml new file mode 100644 index 0000000000..df48523d58 --- /dev/null +++ b/playbooks/roles/os_nova/tasks/nova_spice_console_install.yml @@ -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 + diff --git a/playbooks/roles/os_nova/tasks/nova_upstart_init.yml b/playbooks/roles/os_nova/tasks/nova_upstart_init.yml index 249cdd219b..5da7ae974e 100644 --- a/playbooks/roles/os_nova/tasks/nova_upstart_init.yml +++ b/playbooks/roles/os_nova/tasks/nova_upstart_init.yml @@ -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'] + diff --git a/playbooks/roles/os_nova/templates/nova.conf.j2 b/playbooks/roles/os_nova/templates/nova.conf.j2 index 56066f7e91..2c8c5c74b0 100644 --- a/playbooks/roles/os_nova/templates/nova.conf.j2 +++ b/playbooks/roles/os_nova/templates/nova.conf.j2 @@ -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] diff --git a/playbooks/vars/configs/haproxy_config.yml b/playbooks/vars/configs/haproxy_config.yml index 0395e373fa..beef6e7bd7 100644 --- a/playbooks/vars/configs/haproxy_config.yml +++ b/playbooks/vars/configs/haproxy_config.yml @@ -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