Add Nova vars/plays
This commit is contained in:
parent
ec28d2a6e2
commit
7e95e72303
113
test-install-neutron.yml
Normal file
113
test-install-neutron.yml
Normal file
@ -0,0 +1,113 @@
|
||||
---
|
||||
# Copyright 2015, 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: Make /lib/modules accessible on neutron_agent containers
|
||||
hosts: neutron_agent
|
||||
user: root
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Use the unconfined aa profile
|
||||
lxc_container:
|
||||
name: "{{ container_name }}"
|
||||
container_config:
|
||||
- "lxc.aa_profile=unconfined"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
- name: Neutron extra lxc config
|
||||
lxc_container:
|
||||
name: "{{ container_name }}"
|
||||
container_command: |
|
||||
[[ ! -d "/lib/modules" ]] && mkdir -p "/lib/modules"
|
||||
container_config:
|
||||
- "lxc.cgroup.devices.allow=a *:* rmw"
|
||||
- "lxc.mount.entry=/lib/modules lib/modules none bind 0 0"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
- name: Wait for ssh to be available
|
||||
local_action:
|
||||
module: wait_for
|
||||
port: "{{ ansible_ssh_port | default('22') }}"
|
||||
host: "{{ ansible_ssh_host | default(inventory_hostname) }}"
|
||||
search_regex: OpenSSH
|
||||
delay: 1
|
||||
- name: Add iptables rule for communication w/ metadata agent
|
||||
command: /sbin/iptables -t mangle -A POSTROUTING -p tcp --sport 80 -j CHECKSUM --checksum-fill
|
||||
|
||||
- name: Deploy neutron
|
||||
hosts: neutron_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
# NOTE: These are typically installed in the repo server where we build the
|
||||
# neutron wheel
|
||||
- name: Install packages required to build neutron python package
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- libffi-dev
|
||||
when: inventory_hostname in groups['neutron_all']
|
||||
- name: Ensure rabbitmq vhost
|
||||
rabbitmq_vhost:
|
||||
name: "{{ neutron_rabbitmq_vhost }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when: inventory_hostname == groups['neutron_all'][0]
|
||||
tags:
|
||||
- neutron-rabbitmq
|
||||
- neutron-rabbitmq-vhost
|
||||
- name: Ensure rabbitmq user
|
||||
rabbitmq_user:
|
||||
user: "{{ neutron_rabbitmq_userid }}"
|
||||
password: "{{ neutron_rabbitmq_password }}"
|
||||
vhost: "{{ neutron_rabbitmq_vhost }}"
|
||||
configure_priv: ".*"
|
||||
read_priv: ".*"
|
||||
write_priv: ".*"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when: inventory_hostname == groups['neutron_all'][0]
|
||||
tags:
|
||||
- neutron-rabbitmq
|
||||
- neutron-rabbitmq-user
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ neutron_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['neutron_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ neutron_galera_database }}"
|
||||
password: "{{ neutron_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ neutron_galera_database }}.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['neutron_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
roles:
|
||||
- role: "{{ neutron_rolename | default('os_neutron') }}"
|
||||
vars_files:
|
||||
- test-vars.yml
|
87
test-install-nova.yml
Normal file
87
test-install-nova.yml
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
# Copyright 2015, 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: Playbook for deploying nova
|
||||
hosts: nova_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
# NOTE: These are typically installed in the repo server where we build the
|
||||
# nova wheel
|
||||
- name: Install packages required to build nova python package
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- libxml2-dev
|
||||
- libxslt-dev
|
||||
- libffi-dev
|
||||
- pkg-config
|
||||
- libvirt-dev
|
||||
when: inventory_hostname in groups['nova_all']
|
||||
- name: Ensure rabbitmq vhost
|
||||
rabbitmq_vhost:
|
||||
name: "{{ nova_rabbitmq_vhost }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when: inventory_hostname == groups['nova_all'][0]
|
||||
tags:
|
||||
- aodh-rabbitmq
|
||||
- aodh-rabbitmq-vhost
|
||||
- name: Ensure rabbitmq user
|
||||
rabbitmq_user:
|
||||
user: "{{ nova_rabbitmq_userid }}"
|
||||
password: "{{ nova_rabbitmq_password }}"
|
||||
vhost: "{{ nova_rabbitmq_vhost }}"
|
||||
configure_priv: ".*"
|
||||
read_priv: ".*"
|
||||
write_priv: ".*"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when: inventory_hostname == groups['nova_all'][0]
|
||||
tags:
|
||||
- aodh-rabbitmq
|
||||
- aodh-rabbitmq-user
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ nova_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['nova_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ nova_galera_database }}"
|
||||
password: "{{ nova_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ nova_galera_database }}.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['nova_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
roles:
|
||||
- role: "{{ nova_rolename | default('os_nova') }}"
|
||||
vars_files:
|
||||
- test-vars.yml
|
23
test-install-tempest.yml
Normal file
23
test-install-tempest.yml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
# Copyright 2015, 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: Playbook for deploying tempest
|
||||
hosts: utility_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: "os_tempest"
|
||||
vars_files:
|
||||
- test-vars.yml
|
@ -50,6 +50,7 @@ memcached_servers: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host']
|
||||
memcached_encryption_key: "secrete"
|
||||
|
||||
# Keystone Settings
|
||||
keystone_ssl: True
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
keystone_auth_admin_password: "SuperSecretePassword"
|
||||
@ -96,6 +97,74 @@ glance_rabbitmq_vhost: /glance
|
||||
glance_requirements_git_install_branch: master
|
||||
glance_service_password: "secrete"
|
||||
glance_venv_tag: "testing"
|
||||
glance_host: "{{ hostvars[groups['glance_all'][0]]['ansible_ssh_host'] }}"
|
||||
glance_service_port: 9292
|
||||
|
||||
# Nova specific settings
|
||||
nova_api_container_mysql_password: "SuperSecrete"
|
||||
nova_api_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
nova_container_mysql_password: "SuperSecrete"
|
||||
nova_developer_mode: true
|
||||
nova_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
nova_galera_database: nova
|
||||
nova_git_install_branch: master
|
||||
nova_keystone_auth_plugin: password
|
||||
nova_management_address: "{{ ansible_ssh_host }}"
|
||||
nova_metadata_port: 8775
|
||||
nova_metadata_host: "{{ hostvars[groups['nova_api_metadata'][0]]['ansible_ssh_host'] }}"
|
||||
nova_metadata_proxy_secret: "secrete"
|
||||
nova_novncproxy_vncserver_listen: localhost
|
||||
nova_novncproxy_vncserver_proxyclient_address: localhost
|
||||
nova_rabbitmq_password: "secrete"
|
||||
nova_rabbitmq_userid: nova
|
||||
nova_rabbitmq_vhost: /nova
|
||||
nova_requirements_git_install_branch: master
|
||||
nova_program_name: nova-api-os-compute
|
||||
nova_service_adminuri: "http://{{ hostvars[groups['nova_api_os_compute'][0]]['ansible_ssh_host'] }}:8774"
|
||||
nova_service_adminurl: "{{ nova_service_adminuri }}/v2.1/%(tenant_id)s"
|
||||
nova_service_publicuri: "http://{{ hostvars[groups['nova_api_os_compute'][0]]['ansible_ssh_host'] }}:8774"
|
||||
nova_service_publicurl: "{{ nova_service_publicuri }}/v2.1/%(tenant_id)s"
|
||||
nova_service_internaluri: "http://{{ hostvars[groups['nova_api_os_compute'][0]]['ansible_ssh_host'] }}:8774"
|
||||
nova_service_internalurl: "{{ nova_service_internaluri }}/v2.1/%(tenant_id)s"
|
||||
nova_spice_html5proxy_base_uri: "http://{{ hostvars[groups['nova_console'][0]]['ansible_ssh_host'] }}:6082"
|
||||
nova_spice_html5proxy_base_url: "{{ nova_spice_html5proxy_base_uri }}/spice_auto.html"
|
||||
nova_service_password: "secrete"
|
||||
nova_service_project_domain_id: default
|
||||
nova_service_project_name: service
|
||||
nova_service_region: RegionOne
|
||||
nova_service_user_domain_id: default
|
||||
nova_service_user_name: nova
|
||||
nova_venv_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
||||
nova_venv_tag: "testing"
|
||||
nova_virt_type: qemu
|
||||
|
||||
# Neutron specific settings
|
||||
neutron_container_mysql_password: SuperSecrete
|
||||
neutron_developer_mode: true
|
||||
neutron_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
neutron_galera_database: neutron
|
||||
neutron_git_install_branch: master
|
||||
neutron_ha_vrrp_auth_password: secrete
|
||||
neutron_management_address: "{{ hostvars[groups['neutron_agent'][0]]['ansible_ssh_host'] }}"
|
||||
neutron_rabbitmq_password: secrete
|
||||
neutron_rabbitmq_userid: neutron
|
||||
neutron_rabbitmq_vhost: /neutron
|
||||
neutron_requirements_git_install_branch: master
|
||||
neutron_service_publicuri: "http://{{ hostvars[groups['neutron_agent'][0]]['ansible_ssh_host'] }}:9696"
|
||||
neutron_service_publicurl: "{{ neutron_service_publicuri }}"
|
||||
neutron_service_adminuri: "http://{{ hostvars[groups['neutron_agent'][0]]['ansible_ssh_host'] }}:9696"
|
||||
neutron_service_adminurl: "{{ neutron_service_adminuri }}"
|
||||
neutron_service_internaluri: "http://{{ hostvars[groups['neutron_agent'][0]]['ansible_ssh_host'] }}:9696"
|
||||
neutron_serivce_internalurl: "{{ neutron_service_internaluri }}"
|
||||
neutron_service_password: "secrete"
|
||||
neutron_service_project_name: service
|
||||
neutron_service_region: RegionOne
|
||||
neutron_service_user_name: neutron
|
||||
neutron_venv_tag: testing
|
||||
|
||||
# Cinder specific settings
|
||||
cinder_backends_rbd_inuse: false
|
||||
cinder_ceph_client: cinder
|
||||
|
||||
# Swift specific settings
|
||||
swift_storage_address: "{{ ansible_ssh_host }}"
|
||||
@ -131,6 +200,25 @@ swift_proxy_server_conf_overrides:
|
||||
reseller_prefix: "AUTH, SERVICE"
|
||||
"SERVICE_service_roles": "test5"
|
||||
|
||||
# Tempest specific settings
|
||||
tempest_developer_mode: True
|
||||
tempest_git_install_branch: master
|
||||
tempest_venv_tag: "{{ tempest_git_install_branch }}"
|
||||
# tempest_venv_bin is the same as the default in os_tempest role, but we set
|
||||
# it again here so we can refer to it in test-nova-functional.yml
|
||||
tempest_venv_bin: "/opt/tempest_{{ tempest_venv_tag }}/bin"
|
||||
tempest_log_dir: "/var/log/"
|
||||
tempest_main_group: glance_all
|
||||
tempest_service_available_aodh: False
|
||||
tempest_service_available_ceilometer: False
|
||||
tempest_service_available_cinder: False
|
||||
tempest_service_available_glance: True
|
||||
tempest_service_available_heat: False
|
||||
tempest_service_available_horizon: False
|
||||
tempest_service_available_neutron: True
|
||||
tempest_service_available_nova: True
|
||||
tempest_service_available_swift: False
|
||||
|
||||
# openrc settings
|
||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||
openrc_os_domain_name: "Default"
|
||||
|
Loading…
x
Reference in New Issue
Block a user