Move to non stand-alone ironic

We want to add virtual bmc testing and a full stack test of Ironic, as a
first step lets set it up with all the integrated components.

Change-Id: If4db7ada81e3ce54a6f28db6a67e7e0b4d679cce
This commit is contained in:
Andy McCrae 2016-09-23 10:46:43 +01:00 committed by Michael Carden
parent fe1d51f13b
commit 729fbca6bf
14 changed files with 322 additions and 156 deletions

View File

@ -38,8 +38,28 @@
src: https://git.openstack.org/openstack/openstack-ansible-openstack_openrc
scm: git
version: master
- name: "openstack_hosts"
src: "https://github.com/openstack/openstack-ansible-openstack_hosts"
- name: openstack_hosts
src: https://github.com/openstack/openstack-ansible-openstack_hosts
scm: git
version: "master"
version: master
- name: os_swift
src: https://git.openstack.org/openstack/openstack-ansible-os_swift
scm: git
version: master
- name: os_neutron
src: https://git.openstack.org/openstack/openstack-ansible-os_neutron
scm: git
version: master
- name: os_glance
src: https://git.openstack.org/openstack/openstack-ansible-os_glance
scm: git
version: master
- name: os_nova
src: https://git.openstack.org/openstack/openstack-ansible-os_nova
scm: git
version: master
- name: etcd # dependency of os_neutron role
scm: git
src: https://github.com/logan2211/ansible-etcd
version: master

View File

@ -14,13 +14,6 @@
# limitations under the License.
container_name: "{{ inventory_hostname }}"
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "lxcbr0"
interface: "eth1"
netmask: "255.255.252.0"
type: "veth"
physical_host: localhost
properties:
service_name: "{{ inventory_hostname }}"

View File

@ -0,0 +1,25 @@
---
# Copyright 2016, 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.
ansible_host: 10.1.1.101
ansible_become: True
ansible_user: root
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmt"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"

View File

@ -0,0 +1,43 @@
---
# Copyright 2016, 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.
ansible_host: 10.1.1.104
ansible_become: True
ansible_user: root
tunnel_address: 10.1.2.104
neutron_local_ip: 10.1.2.104
neutron_provider_networks:
network_types: "vxlan,flat"
network_mappings: "flat:eth12"
network_vxlan_ranges: "1:1000"
container_name: "{{ inventory_hostname }}"
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmt"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
tunnel_address:
address: "{{ tunnel_address }}"
bridge: "br-vxlan"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
vlan_address:
bridge: "br-vlan"
interface: "eth12"
netmask: null
type: "veth"

View File

@ -13,7 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
bridges:
- "br-mgmt"
neutron_provider_networks:
network_types: "vxlan,flat"
network_mappings: "flat:eth12"
network_vxlan_ranges: "1:1000"
ansible_become: True
neutron_local_ip: 10.1.2.1
ansible_python_interpreter: "/usr/bin/python2"
bridges:
- name: "br-mgmt"
ip_addr: "10.1.1.1"
- name: "br-vxlan"
ip_addr: "10.1.2.1"
- name: "br-vlan"
ip_addr: "10.1.3.1"
veth_peer: "eth12"

View File

@ -0,0 +1,43 @@
---
# Copyright 2016, 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.
ansible_host: 10.1.1.102
ansible_become: True
ansible_user: root
tunnel_address: 10.1.2.102
neutron_local_ip: 10.1.2.102
neutron_provider_networks:
network_types: "vxlan,flat"
network_mappings: "flat:eth12"
network_vxlan_ranges: "1:1000"
container_name: "{{ inventory_hostname }}"
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmt"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
tunnel_address:
address: "{{ tunnel_address }}"
bridge: "br-vxlan"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"
vlan_address:
bridge: "br-vlan"
interface: "eth12"
netmask: null
type: "veth"

View File

@ -0,0 +1,32 @@
---
# Copyright 2016, 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.
ansible_host: 10.1.1.103
storage_address: 10.1.2.103
ansible_user: root
ansible_become: True
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "br-mgmt"
interface: "eth1"
netmask: "255.255.255.0"
type: "veth"
storage_address:
address: "{{ storage_address }}"
bridge: "br-vxlan"
interface: "eth2"
netmask: "255.255.255.0"
type: "veth"

View File

@ -1,13 +1,29 @@
[all]
localhost ansible_become=True
infra1 ansible_host=10.100.100.101 ansible_become=True ansible_user=root
ironic1 ansible_host=10.100.100.102 ansible_become=True ansible_user=root
localhost
infra1
openstack1
swift-storage1
ironic1
# Note(mrda): 'ironicinstallhost' will need to externally resolve to where
# you want to do an 'allinone' install, and the root account will need to have
# your ssh public_key in it's /root/.ssh/authorized_keys file
[installhost]
installhost ansible_user=root ansible_port=22 ansible_host=ironicinstallhost
[all_containers]
infra1
openstack1
swift-storage1
ironic1
[rabbitmq_all]
infra1
[galera_all]
infra1
[memcached_all]
infra1
[service_all:children]
rabbitmq_all
galera_all
memcached_all
[ironic_all:children]
ironic_api
@ -23,29 +39,109 @@ ironic1
[ironic_server]
ironic1
[hosts]
[keystone_all]
openstack1
[glance_api]
openstack1
[glance_registry]
openstack1
[glance_all:children]
glance_api
glance_registry
[neutron_agent]
openstack1
[neutron_dhcp_agent]
openstack1
[neutron_linuxbridge_agent]
openstack1
localhost
[all_containers]
infra1
ironic1
[neutron_openvswitch_agent]
[keystone_all]
infra1
[neutron_metering_agent]
openstack1
[service_all:children]
rabbitmq_all
galera_all
memcached_all
[neutron_l3_agent]
openstack1
[rabbitmq_all]
infra1
[neutron_lbaas_agent]
openstack1
[galera_all]
infra1
[neutron_metadata_agent]
openstack1
[memcached_all]
infra1
[neutron_server]
openstack1
[neutron_all:children]
neutron_agent
neutron_dhcp_agent
neutron_linuxbridge_agent
neutron_openvswitch_agent
neutron_metering_agent
neutron_l3_agent
neutron_lbaas_agent
neutron_metadata_agent
neutron_server
[nova_api_metadata]
openstack1
[nova_api_os_compute]
openstack1
[nova_cert]
openstack1
[nova_compute]
localhost
[nova_conductor]
openstack1
[nova_console]
openstack1
[nova_scheduler]
openstack1
[nova_all:children]
nova_api_metadata
nova_api_os_compute
nova_cert
nova_compute
nova_conductor
nova_console
nova_scheduler
[swift_hosts]
swift-storage1
[swift_proxy]
openstack1
[swift_acc]
swift-storage1
[swift_cont]
swift-storage1
[swift_obj]
swift-storage1
[swift_all:children]
swift_acc
swift_proxy
swift_cont
swift_obj
[swift_remote_all]
[utility_all]
localhost
infra1

View File

@ -13,5 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
properties:
service_name: ironic
test_swift_repl_network: "eth2"
nova_virt_type: ironic
glance_file_store: swift
test_swift_repl_number: 2

View File

@ -1,63 +0,0 @@
---
# 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 installing Ironic
hosts: ironic_all
remote_user: root
pre_tasks:
- name: Ensure Rabbitmq vhost
rabbitmq_vhost:
name: "{{ ironic_rabbitmq_vhost }}"
state: "present"
delegate_to: "10.100.100.101"
- name: Ensure rabbitmq user
rabbitmq_user:
user: "{{ ironic_rabbitmq_userid }}"
password: "{{ ironic_rabbitmq_password }}"
vhost: "{{ ironic_rabbitmq_vhost }}"
configure_priv: ".*"
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "10.100.100.101"
- name: Create database for ironic
mysql_db:
login_user: "{{ galera_root_user }}"
login_password: "{{ galera_root_password }}"
login_host: "localhost"
name: "{{ ironic_galera_database }}"
state: "present"
delegate_to: "10.100.100.101"
run_once: true
- name: Grant access to the DB
mysql_user:
login_user: "{{ galera_root_user }}"
login_password: "{{ galera_root_password }}"
login_host: "localhost"
name: "{{ ironic_galera_user }}"
password: "{{ ironic_container_mysql_password }}"
host: "{{ item }}"
state: "present"
priv: "{{ ironic_galera_database }}.*:ALL"
with_items:
- "localhost"
- "%"
delegate_to: "10.100.100.101"
run_once: true
roles:
- role: "os_ironic"
vars_files:
- common/test-vars.yml
- test-vars.yml

View File

@ -2,7 +2,7 @@
- name: Playbook for functional testing ironic via its REST API
hosts: localhost
user: root
gather_facts: false
gather_facts: true
roles:
- role: "openstack_openrc"
post_tasks:
@ -169,4 +169,3 @@
# return_content: yes
vars_files:
- common/test-vars.yml
- test-vars.yml

View File

@ -1,49 +0,0 @@
---
# Copyright 2016, 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.
ironic_venv_tag: "testing"
ironic_developer_mode: True
ironic_git_install_branch: master
ironic_requirements_git_install_branch: master
ironic_service_publicuri: "http://10.100.100.102:6385"
ironic_service_adminuri: "{{ ironic_service_publicuri }}"
ironic_service_internaluri: "{{ ironic_service_publicuri }}"
ironic_service_password: "secrete"
ironic_galera_address: 10.100.100.101
ironic_galera_database: ironic
ironic_galera_user: ironic
ironic_container_mysql_password: "secrete"
ironic_rabbitmq_password: "secrete"
ironic_rabbitmq_userid: ironic
ironic_rabbitmq_vhost: /ironic
ironic_rabbitmq_servers: "{{ rabbitmq_servers }}"
ironic_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
ironic_rabbitmq_port: "{{ rabbitmq_port }}"
ironic_standalone: True
ironic_swift_endpoint: "http://localhost:8080"
ironic_swift_auth_account: "AUTH_1234567890"
ironic_swift_temp_url_secret_key: secrete
ironic_rabbitmq_userid: ironic
ironic_rabbitmq_password: secrete
ironic_rabbitmq_vhost: /ironic
# required for ironic.conf
glance_api_servers: http://localhost:9292
neutron_service_adminurl: http://localhost:9696
neutron_service_region: RegionOne
neutron_service_password: secrete
neutron_service_project_name: ironic
neutron_service_user_name: ironic

View File

@ -22,12 +22,24 @@
# Install Keystone
- include: common/test-install-keystone.yml
# Install Swift
- include: common/test-install-swift.yml
# Install Glance
- include: common/test-install-glance.yml
# Install Neutron
- include: common/test-install-neutron.yml
# Install Nova
- include: common/test-install-nova.yml
# Install Ironic
- include: test-install-ironic.yml
- include: common/test-install-ironic.yml
# Test REST API
- include: test-rest-api.yml
# Test the ironicclient CLI
# Omitted for now, unclear purpose
# - include: test-ironic-cli.yml
- include: test-ironic-cli.yml

View File

@ -137,6 +137,8 @@ commands =
{[testenv:ansible]commands}
ansible-playbook -i {toxinidir}/tests/inventory \
-e "install_test_packages=True" \
-e "ironic_rolename={toxinidir}" \
-e @{toxinidir}/tests/ironic-overrides.yml \
{toxinidir}/tests/test.yml -vvvv
{[testenv:func_logs]commands}