Ensure that OpenStack-CI mirror is used for UCA

The role test implements a test to verify whether it is running in
OpenStack-CI, then discovers the appropriate URL for UCA and
implements it as a fact for the os_nova role to consume.

Depends-On: Iffa32adb971f281e7e274209ee500b1756fbf0a1
Change-Id: I60c5575a5ad02d0fa958912bdbc596f2f44e48b0
This commit is contained in:
Jesse Pretorius 2016-07-16 22:05:29 +01:00 committed by Jesse Pretorius (odyssey4me)
parent ed6fbb1d84
commit a2732b20cc
3 changed files with 26 additions and 1 deletions

View File

@ -107,6 +107,21 @@
when: inventory_hostname == groups['nova_all'][0]
tags:
- nova-db-setup
- name: Check if this is an OpenStack-CI nodepool instance
stat:
path: /etc/nodepool/provider
register: nodepool
delegate_to: localhost
- name: Determine the existing Ubuntu repo URL (only on OpenStack-CI)
shell: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /etc/apt/sources.list'
register: ubuntu_repo_url
changed_when: false
when: nodepool.stat.exists | bool
delegate_to: localhost
- name: Set Ubuntu Cloud Archive repo URL based on discovered information
set_fact:
uca_apt_repo_url: "{{ ubuntu_repo_url.stdout | netorigin }}/ubuntu-cloud-archive"
when: nodepool.stat.exists | bool
roles:
- role: os_nova
vars_files:

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Perform baisc LXC host setup
- name: Perform basic LXC host setup
hosts: localhost
pre_tasks:
- name: Ensure root's new public ssh key is in authorized_keys

View File

@ -42,12 +42,16 @@ nova_developer_mode: true
nova_galera_address: 10.100.100.2
nova_galera_database: nova
nova_git_install_branch: master
nova_glance_api_servers: "http://{{ glance_host }}:{{ glance_service_port }}"
nova_keystone_auth_plugin: password
nova_management_address: "10.100.100.3"
nova_metadata_port: 8775
nova_metadata_proxy_secret: "secrete"
nova_novncproxy_vncserver_listen: localhost
nova_novncproxy_vncserver_proxyclient_address: localhost
nova_rabbitmq_port: "{{ rabbitmq_port }}"
nova_rabbitmq_servers: "{{ rabbitmq_servers }}"
nova_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
nova_rabbitmq_password: "secrete"
nova_rabbitmq_userid: nova
nova_rabbitmq_vhost: /nova
@ -80,6 +84,7 @@ keystone_service_internaluri: "http://{{ internal_lb_vip_address }}:5000"
keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3"
keystone_service_adminuri: "http://{{ internal_lb_vip_address }}:35357"
keystone_service_adminurl: "{{ keystone_service_adminuri }}/v3"
keystone_service_region: RegionOne
keystone_rabbitmq_vhost: /keystone
keystone_rabbitmq_userid: keystone
keystone_rabbitmq_password: "secrete"
@ -90,6 +95,11 @@ keystone_requirements_git_install_branch: master
openrc_os_auth_url: "{{ keystone_service_internalurl }}"
openrc_os_password: "{{ keystone_auth_admin_password }}"
openrc_os_domain_name: "Default"
# This ensures that libvirt-python is built from source. A pre-built wheel
# can be missing libvirt capabilities from the installed version of
# libvirt-bin, leading to nova-compute failing to start.
# TODO(jmccrory) Revisit this at some point
pip_install_options: "--no-binary libvirt-python"
sahara_venv_tag: "testing"
sahara_developer_mode: true
sahara_git_install_branch: master