Use openstack-ansible-tests repository for Swift
Move to use the openstack-ansible-tests repository for Swift. Make changes use Ansible 2.1.1 (These are required for gating to work properly, since the majority of repositories have already changed). Additionally, lets set this up to work with 1 infra host in the MR swift gate to improve efficiency. Change-Id: Ic0d35bcf8bafb90a986c7cdda3987f70580af165
This commit is contained in:
parent
98cb749139
commit
2257044bc0
.gitignoremanual-test.rcrun_tests.sh
tasks
templates
tests
ansible-role-requirements.yml
tox.inihost_vars
infra1.ymlinfraMR.ymllocalhost.ymlswift-proxy.ymlswift-proxyA.ymlswift-proxyB.ymlswift-storage1.ymlswift-storage2.ymlswift-storage3.ymlswift-storage4.ymlswift-storageA1.ymlswift-storageA2.ymlswift-storageB1.ymlswift-storageB2.yml
inventoryinventory_MR_Ainventory_MR_Bswift-overrides-MR-A.ymlswift-overrides-MR-B.ymlswift-overrides.ymlswift_test.conf.j2test-install-keystone.ymltest-install-swift.ymltest-prepare-host.ymltest-prepare-keys.ymltest-setup-swifthosts.ymltest-swift-MR-interfaces.cfg.j2test-swift-functional.ymltest-swift-interfaces.cfg.j2test-vars-MR-A.ymltest-vars-MR-B.ymltest-vars.ymltest.yml
5
.gitignore
vendored
5
.gitignore
vendored
@ -29,6 +29,7 @@ doc/build/
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
logs/*
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
@ -61,6 +62,8 @@ releasenotes/build
|
||||
|
||||
# Test temp files
|
||||
tests/plugins
|
||||
tests/playbooks
|
||||
tests/test.retry
|
||||
|
||||
# Vagrant testing artifacts
|
||||
# Vagrant artifacts
|
||||
.vagrant
|
||||
|
33
manual-test.rc
Normal file
33
manual-test.rc
Normal file
@ -0,0 +1,33 @@
|
||||
export VIRTUAL_ENV=$(pwd)
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r
|
||||
|
||||
# TODO (odyssey4me) These are only here as they are non-standard folder
|
||||
# names for Ansible 1.9.x. We are using the standard folder names for
|
||||
# Ansible v2.x. We can remove this when we move to Ansible 2.x.
|
||||
export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action
|
||||
export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback
|
||||
export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter
|
||||
export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup
|
||||
|
||||
# This is required as the default is the current path or a path specified
|
||||
# in ansible.cfg
|
||||
export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library
|
||||
|
||||
# This is required as the default is '/etc/ansible/roles' or a path
|
||||
# specified in ansible.cfg
|
||||
export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/..
|
||||
|
||||
export ANSIBLE_SSH_ARGS="-o ControlMaster=no \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o ServerAliveInterval=64 \
|
||||
-o ServerAliveCountMax=1024 \
|
||||
-o Compression=no \
|
||||
-o TCPKeepAlive=yes \
|
||||
-o VerifyHostKeyDNS=no \
|
||||
-o ForwardX11=no \
|
||||
-o ForwardAgent=yes"
|
||||
|
||||
echo "Run manual functional tests by executing the following:"
|
||||
echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""
|
10
run_tests.sh
10
run_tests.sh
@ -24,23 +24,23 @@ if [ ! "$(which pip)" ]; then
|
||||
fi
|
||||
|
||||
# Install bindep and tox
|
||||
pip install bindep tox
|
||||
sudo pip install bindep tox
|
||||
|
||||
# CentOS 7 requires two additional packages:
|
||||
# redhat-lsb-core - for bindep profile support
|
||||
# epel-release - required to install python-ndg_httpsclient/python2-pyasn1
|
||||
if [ "$(which yum)" ]; then
|
||||
yum -y install redhat-lsb-core epel-release
|
||||
sudo yum -y install redhat-lsb-core epel-release
|
||||
fi
|
||||
|
||||
# Install OS packages using bindep
|
||||
if apt-get -v >/dev/null 2>&1 ; then
|
||||
apt-get update
|
||||
sudo apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -q --option "Dpkg::Options::=--force-confold" \
|
||||
sudo apt-get -q --option "Dpkg::Options::=--force-confold" \
|
||||
--assume-yes install `bindep -b -f bindep.txt test`
|
||||
else
|
||||
yum install -y `bindep -b -f bindep.txt test`
|
||||
sudo yum install -y `bindep -b -f bindep.txt test`
|
||||
fi
|
||||
|
||||
# run through each tox env and execute the test
|
||||
|
@ -20,7 +20,7 @@
|
||||
- name: "Get swift rings"
|
||||
command: |
|
||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_ssh_host'] }}:/etc/swift/ring_build_files/ \
|
||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_host'] }}:/etc/swift/ring_build_files/ \
|
||||
/etc/swift/
|
||||
become: yes
|
||||
become_user: "{{ swift_system_user_name }}"
|
||||
@ -28,7 +28,7 @@
|
||||
- name: "Get swift rings for backup in ring_build_files directory"
|
||||
command: |
|
||||
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
|
||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_ssh_host'] }}:/etc/swift/ring_build_files/ \
|
||||
-avz {{ swift_system_user_name }}@{{ hostvars[groups['swift_hosts'][0]]['ansible_host'] }}:/etc/swift/ring_build_files/ \
|
||||
/etc/swift/ring_build_files/
|
||||
become: yes
|
||||
become_user: "{{ swift_system_user_name }}"
|
||||
|
@ -47,10 +47,10 @@
|
||||
{### Loop through the swift_hosts #}
|
||||
{% for host in groups['swift_hosts'] %}
|
||||
{### Set the default storage_ip #}
|
||||
{% set def_storage_ip = hostvars[host]['ansible_ssh_host'] %}
|
||||
{% set def_storage_ip = hostvars[host]['ansible_host'] %}
|
||||
{% if swift.storage_network is defined %}
|
||||
{% set storage_bridge = 'ansible_' + swift.storage_network|replace('-', '_') %}
|
||||
{% set def_storage_ip = hostvars[host][storage_bridge]['ipv4']['address'] | default(hostvars[host]['ansible_ssh_host']) %}
|
||||
{% set def_storage_ip = hostvars[host][storage_bridge]['ipv4']['address'] | default(hostvars[host]['ansible_host']) %}
|
||||
{% endif %}
|
||||
{### Set the default replication_ip #}
|
||||
{% set def_repl_ip = def_storage_ip %}
|
||||
@ -84,9 +84,9 @@
|
||||
{% set storage_port = drive.storage_port | default(swift_vars.storage_port | default(port)) %}
|
||||
{### Update the device with the appropriate values #}
|
||||
{% set _update = device.update({'device':drive.name}) %}
|
||||
{% set _update = device.update({'weight': weight}) %}
|
||||
{% set _update = device.update({'region': region}) %}
|
||||
{% set _update = device.update({'zone': zone}) %}
|
||||
{% set _update = device.update({'weight': weight|int}) %}
|
||||
{% set _update = device.update({'region': region|int}) %}
|
||||
{% set _update = device.update({'zone': zone|int}) %}
|
||||
{% set _update = device.update({'replication_ip': repl_ip}) %}
|
||||
{% set _update = device.update({'replication_port': repl_port|int}) %}
|
||||
{% set _update = device.update({'ip': storage_ip}) %}
|
||||
|
@ -30,6 +30,14 @@
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-galera_server
|
||||
scm: git
|
||||
version: master
|
||||
- name: rabbitmq_server
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-rabbitmq_server
|
||||
scm: git
|
||||
version: master
|
||||
- name: openstack_hosts
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
|
||||
scm: git
|
||||
version: master
|
||||
- name: os_keystone
|
||||
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
|
||||
scm: git
|
||||
|
@ -13,11 +13,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.101
|
||||
ansible_host: 10.1.1.101
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,11 +13,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.101
|
||||
ansible_host: 10.1.1.101
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtA"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
@ -13,12 +13,5 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.11.101
|
||||
ansible_host: 10.1.11.101
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
bridge: "br-mgmtB"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
ansible_python_interpreter: "/usr/bin/python2"
|
||||
ansible_become: True
|
@ -13,12 +13,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.102
|
||||
ansible_host: 10.1.1.102
|
||||
storage_address: 10.1.2.102
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,16 +13,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.102
|
||||
ansible_host: 10.1.1.102
|
||||
storage_address: 10.1.2.102
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtA"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.11.0/24"
|
||||
gateway: "10.1.1.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageA"
|
||||
|
@ -13,16 +13,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.11.102
|
||||
ansible_host: 10.1.11.102
|
||||
storage_address: 10.1.12.102
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtB"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.1.0/24"
|
||||
gateway: "10.1.11.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageB"
|
||||
|
@ -13,13 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.103
|
||||
ansible_host: 10.1.1.103
|
||||
storage_address: 10.1.2.103
|
||||
replication_address: 10.1.3.103
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,13 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.104
|
||||
ansible_host: 10.1.1.104
|
||||
storage_address: 10.1.2.104
|
||||
replication_address: 10.1.3.104
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,13 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.105
|
||||
ansible_host: 10.1.1.105
|
||||
storage_address: 10.1.2.105
|
||||
replication_address: 10.1.3.105
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,13 +13,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.106
|
||||
ansible_host: 10.1.1.106
|
||||
storage_address: 10.1.2.106
|
||||
replication_address: 10.1.3.106
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmt"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
|
@ -13,17 +13,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.103
|
||||
ansible_host: 10.1.1.103
|
||||
storage_address: 10.1.2.103
|
||||
replication_address: 10.1.3.103
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtA"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.11.0/24"
|
||||
gateway: "10.1.1.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageA"
|
||||
|
@ -13,17 +13,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.1.104
|
||||
ansible_host: 10.1.1.104
|
||||
storage_address: 10.1.2.104
|
||||
replication_address: 10.1.3.104
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtA"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.11.0/24"
|
||||
gateway: "10.1.1.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageA"
|
||||
|
@ -13,17 +13,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.11.103
|
||||
ansible_host: 10.1.11.103
|
||||
storage_address: 10.1.12.103
|
||||
replication_address: 10.1.13.103
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtB"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.1.0/24"
|
||||
gateway: "10.1.11.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageB"
|
||||
|
@ -13,17 +13,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ansible_ssh_host: 10.1.11.104
|
||||
ansible_host: 10.1.11.104
|
||||
storage_address: 10.1.12.104
|
||||
replication_address: 10.1.13.104
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ ansible_ssh_host }}"
|
||||
address: "{{ ansible_host }}"
|
||||
bridge: "br-mgmtB"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.255.0"
|
||||
type: "veth"
|
||||
static_routes:
|
||||
- cidr: "10.1.1.0/24"
|
||||
gateway: "10.1.11.1"
|
||||
storage_address:
|
||||
address: "{{ storage_address }}"
|
||||
bridge: "br-storageB"
|
||||
|
@ -1,5 +1,5 @@
|
||||
[all]
|
||||
localhost ansible_connection=local ansible_become=True
|
||||
localhost
|
||||
infra1
|
||||
swift-proxy
|
||||
swift-storage1
|
||||
@ -21,9 +21,13 @@ infra1
|
||||
[memcached_all]
|
||||
infra1
|
||||
|
||||
[rabbitmq_all]
|
||||
infra1
|
||||
|
||||
[service_all:children]
|
||||
galera_all
|
||||
memcached_all
|
||||
rabbitmq_all
|
||||
|
||||
[keystone_all]
|
||||
infra1
|
||||
|
@ -1,28 +1,35 @@
|
||||
[all]
|
||||
localhost ansible_connection=local ansible_become=True
|
||||
infraA1
|
||||
localhost
|
||||
infraMR
|
||||
swift-proxyA
|
||||
swift-storageA1
|
||||
swift-storageA2
|
||||
|
||||
[all_containers]
|
||||
infraA1
|
||||
infraMR
|
||||
swift-proxyA
|
||||
swift-storageA1
|
||||
swift-storageA2
|
||||
swift-proxyB
|
||||
swift-storageB1
|
||||
swift-storageB2
|
||||
|
||||
[galera_all]
|
||||
infraA1
|
||||
infraMR
|
||||
|
||||
[memcached_all]
|
||||
infraA1
|
||||
infraMR
|
||||
|
||||
[rabbitmq_all]
|
||||
infraMR
|
||||
|
||||
[service_all:children]
|
||||
galera_all
|
||||
memcached_all
|
||||
rabbitmq_all
|
||||
|
||||
[keystone_all]
|
||||
infraA1
|
||||
infraMR
|
||||
|
||||
[swift_hosts]
|
||||
swift-storageA1
|
||||
|
@ -1,28 +1,32 @@
|
||||
[all]
|
||||
localhost ansible_connection=local ansible_become=True
|
||||
infraB1
|
||||
localhost
|
||||
infraMR
|
||||
swift-proxyB
|
||||
swift-storageB1
|
||||
swift-storageB2
|
||||
|
||||
[all_containers]
|
||||
infraB1
|
||||
infraMR
|
||||
swift-proxyB
|
||||
swift-storageB1
|
||||
swift-storageB2
|
||||
|
||||
[galera_all]
|
||||
infraB1
|
||||
infraMR
|
||||
|
||||
[memcached_all]
|
||||
infraB1
|
||||
infraMR
|
||||
|
||||
[rabbitmq_all]
|
||||
infraMR
|
||||
|
||||
[service_all:children]
|
||||
galera_all
|
||||
memcached_all
|
||||
rabbitmq_all
|
||||
|
||||
[keystone_all]
|
||||
infraB1
|
||||
infraMR
|
||||
|
||||
[swift_hosts]
|
||||
swift-storageB1
|
||||
|
@ -13,19 +13,19 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Playbook for creating containers
|
||||
hosts: all_containers
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: "lxc_container_create"
|
||||
lxc_container_backing_store: dir
|
||||
global_environment_variables:
|
||||
PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
post_tasks:
|
||||
- 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
|
||||
# Only MR-A needs the bridges as it does the host setup
|
||||
bridges:
|
||||
- name: "br-mgmtA"
|
||||
ip_addr: "10.1.1.1"
|
||||
- name: "br-storageA"
|
||||
ip_addr: "10.1.2.1"
|
||||
- name: "br-replA"
|
||||
ip_addr: "10.1.3.1"
|
||||
- name: "br-mgmtB"
|
||||
ip_addr: "10.1.11.1"
|
||||
- name: "br-storageB"
|
||||
ip_addr: "10.1.12.1"
|
||||
- name: "br-replB"
|
||||
ip_addr: "10.1.13.1"
|
||||
|
||||
test_swift_region: 1
|
@ -13,10 +13,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Playbook for deploying infra services
|
||||
hosts: service_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
roles:
|
||||
- role: "memcached_server"
|
||||
- role: "galera_server"
|
||||
test_swift_region: 2
|
22
tests/swift-overrides.yml
Normal file
22
tests/swift-overrides.yml
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
bridges:
|
||||
- name: "br-mgmt"
|
||||
ip_addr: "10.1.1.1"
|
||||
- name: "br-storage"
|
||||
ip_addr: "10.1.2.1"
|
||||
- name: "br-repl"
|
||||
ip_addr: "10.1.3.1"
|
@ -8,7 +8,7 @@
|
||||
# For keystone v2 change auth_version to 2 and auth_prefix to /v2.0/
|
||||
# And "allow_account_management" should not be set "true"
|
||||
auth_version = 3
|
||||
auth_host = {{ internal_lb_vip_address }}
|
||||
auth_host = {{ hostvars[groups['keystone_all'][0]]['ansible_host'] }}
|
||||
auth_port = 5000
|
||||
auth_ssl = no
|
||||
auth_prefix = /v3/
|
||||
|
@ -1,50 +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 deploying keystone
|
||||
hosts: keystone_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ keystone_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['keystone_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "{{ galera_root_user }}"
|
||||
login_password: "{{ galera_root_password }}"
|
||||
login_host: "localhost"
|
||||
name: "{{ keystone_galera_database }}"
|
||||
password: "{{ keystone_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ keystone_galera_database }}.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
delegate_to: "{{ groups['galera_all'][0] }}"
|
||||
when: inventory_hostname == groups['keystone_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
roles:
|
||||
- role: os_keystone
|
@ -1,30 +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.
|
||||
|
||||
# We can set the swift_groups so that the multi-region test will run against only the local hosts
|
||||
# when the remote hosts haven't been created yet.
|
||||
- name: Playbook for deploying swift
|
||||
hosts: "{{ swift_groups | default('swift_all:swift_remote_all') }}"
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Set swift replication address (container)
|
||||
set_fact:
|
||||
replication_address: "{{ hostvars[inventory_hostname]['container_networks']['replication_address']['address'] }}"
|
||||
when:
|
||||
- inventory_hostname in groups['swift_all']
|
||||
- hostvars[inventory_hostname]['container_networks']['replication_address']['address'] is defined
|
||||
roles:
|
||||
- role: "{{ rolename | basename }}"
|
@ -1,70 +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 configuring the LXC host
|
||||
hosts: localhost
|
||||
pre_tasks:
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
- name: Ensure root's new public ssh key is in authorized_keys
|
||||
authorized_key:
|
||||
user: root
|
||||
key: "{{ hostvars['localhost']['lxc_container_ssh_key'] }}"
|
||||
manage_dir: no
|
||||
- set_fact:
|
||||
lxc_container_ssh_key: "{{ hostvars['localhost']['lxc_container_ssh_key'] }}"
|
||||
- name: Check if this is an OpenStack-CI nodepool instance
|
||||
stat:
|
||||
path: /etc/nodepool/provider
|
||||
register: nodepool
|
||||
- name: Set the files to copy into the container cache for OpenStack-CI instances
|
||||
set_fact:
|
||||
lxc_container_cache_files:
|
||||
- { src: '/etc/pip.conf', dest: '/etc/pip.conf' }
|
||||
when: nodepool.stat.exists | bool
|
||||
post_tasks:
|
||||
- name: Ensure that /etc/network/interfaces.d/ exists
|
||||
file:
|
||||
path: /etc/network/interfaces.d/
|
||||
state: directory
|
||||
- name: Copy network configuration
|
||||
template:
|
||||
src: "{{ interfaces_file }}"
|
||||
dest: /etc/network/interfaces.d/swift_interfaces.cfg
|
||||
register: swift_interfaces
|
||||
|
||||
- name: Ensure our interfaces.d configuration files are loaded automatically
|
||||
lineinfile:
|
||||
dest: /etc/network/interfaces
|
||||
line: "source /etc/network/interfaces.d/*.cfg"
|
||||
|
||||
- name: Shut down the network interfaces
|
||||
command: "ifdown {{ item }}"
|
||||
when: swift_interfaces | changed
|
||||
with_items:
|
||||
- "{{ bridges }}"
|
||||
|
||||
- name: Start the network interfaces
|
||||
command: "ifup {{ item }}"
|
||||
when: swift_interfaces | changed
|
||||
with_items:
|
||||
- "{{ bridges }}"
|
||||
|
||||
- name: Add iptables rule to ensure ssh checksum is correct
|
||||
command: /sbin/iptables -A POSTROUTING -t mangle -p tcp --dport 22 -j CHECKSUM --checksum-fill
|
||||
roles:
|
||||
- role: "lxc_hosts"
|
@ -1,33 +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.
|
||||
|
||||
# NOTE: we use become_user because setting become: no or become: false
|
||||
# doesn't seem to override the ansible_become=true in the
|
||||
# inventory
|
||||
- name: Playbook for establishing ssh keys
|
||||
hosts: localhost
|
||||
become_user: "{{ ansible_ssh_user }}"
|
||||
pre_tasks:
|
||||
- name: Create ssh key pair for root
|
||||
user:
|
||||
name: "{{ ansible_ssh_user }}"
|
||||
generate_ssh_key: "yes"
|
||||
ssh_key_bits: 2048
|
||||
ssh_key_file: ".ssh/id_rsa"
|
||||
- name: Get the calling user's key
|
||||
command: cat ~/.ssh/id_rsa.pub
|
||||
register: key_get
|
||||
- set_fact:
|
||||
lxc_container_ssh_key: "{{ key_get.stdout }}"
|
@ -1,90 +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: Swift setup
|
||||
hosts: swift_hosts
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Ensure xfsprogs is installed on localhost
|
||||
apt:
|
||||
name: xfsprogs
|
||||
state: present
|
||||
delegate_to: "{{ physical_host }}"
|
||||
run_once: true
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- name: Ensure xfsprogs is installed on containers
|
||||
apt:
|
||||
name: xfsprogs
|
||||
state: present
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- name: Openstack directory Create
|
||||
file:
|
||||
state: directory
|
||||
path: "/openstack/{{ item }}"
|
||||
with_items:
|
||||
- 'swift1'
|
||||
- 'swift2'
|
||||
- name: Create sparse Swift files
|
||||
shell: "truncate -s 1024G /opt/{{container_name}}_{{ item }}.img"
|
||||
args:
|
||||
creates: "/opt/{{ container_name}}_{{ item }}.img"
|
||||
with_items:
|
||||
- 'swift1'
|
||||
- 'swift2'
|
||||
register: swift_create
|
||||
delegate_to: "{{ physical_host }}"
|
||||
- name: Format the Swift files
|
||||
filesystem:
|
||||
fstype: xfs
|
||||
dev: "/opt/{{ container_name}}_{{ item }}.img"
|
||||
when: swift_create | changed
|
||||
with_items:
|
||||
- 'swift1'
|
||||
- 'swift2'
|
||||
delegate_to: "{{ physical_host }}"
|
||||
- name: Create the Swift fstab entries and mount the file systems
|
||||
mount:
|
||||
name: "/srv/{{ container_name }}_{{ item }}"
|
||||
src: "/opt/{{ container_name }}_{{ item }}.img"
|
||||
fstype: xfs
|
||||
opts: 'loop,noatime,nodiratime,nobarrier,logbufs=8'
|
||||
passno: 0
|
||||
dump: 0
|
||||
state: mounted
|
||||
with_items:
|
||||
- 'swift1'
|
||||
- 'swift2'
|
||||
register: mount_status
|
||||
until: mount_status | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
delegate_to: "{{ physical_host }}"
|
||||
- name: Swift extra lxc config
|
||||
lxc_container:
|
||||
name: "{{ container_name }}"
|
||||
container_config:
|
||||
- "lxc.mount.entry=/srv/{{ container_name }}_swift1 openstack/swift1 none bind 0 0"
|
||||
- "lxc.mount.entry=/srv/{{ container_name }}_swift2 openstack/swift2 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
|
@ -1,67 +0,0 @@
|
||||
## The default networking requires several bridges. These bridges were named to be informative
|
||||
## however they can be named what ever you like and is adaptable to any network infrastructure
|
||||
## environment. This file serves as an example of how to setup basic networking and was ONLY
|
||||
## built for the purpose of being an example and used expressly in the building of an ALL IN
|
||||
## ONE development environment.
|
||||
|
||||
auto br-mgmtA
|
||||
iface br-mgmtA inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
# Notice the bridge port is the vlan tagged interface
|
||||
bridge_ports none
|
||||
address 10.1.1.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-storageA
|
||||
iface br-storageA inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.2.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-replA
|
||||
iface br-replA inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.3.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-mgmtB
|
||||
iface br-mgmtB inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
# Notice the bridge port is the vlan tagged interface
|
||||
bridge_ports none
|
||||
address 10.1.11.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-storageB
|
||||
iface br-storageB inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.12.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-replB
|
||||
iface br-replB inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.13.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
---
|
||||
- name: Setup testing - run Swift functional tests
|
||||
hosts: swift_proxy[0]
|
||||
user: root
|
||||
@ -101,7 +100,7 @@
|
||||
- name: Install requirements for swift
|
||||
pip:
|
||||
requirements: "{{ item }}"
|
||||
virtualenv: "{{ swift_bin | dirname }}"
|
||||
virtualenv: "{{ swift_venv_bin | dirname }}"
|
||||
with_items:
|
||||
- "/opt/swift/test-requirements.txt"
|
||||
- name: Setup test.conf for testing
|
||||
@ -115,3 +114,5 @@
|
||||
args:
|
||||
chdir: "/opt/swift/"
|
||||
executable: "/bin/bash"
|
||||
vars_files:
|
||||
- playbooks/test-vars.yml
|
||||
|
@ -1,36 +0,0 @@
|
||||
## The default networking requires several bridges. These bridges were named to be informative
|
||||
## however they can be named what ever you like and is adaptable to any network infrastructure
|
||||
## environment. This file serves as an example of how to setup basic networking and was ONLY
|
||||
## built for the purpose of being an example and used expressly in the building of an ALL IN
|
||||
## ONE development environment.
|
||||
|
||||
auto br-mgmt
|
||||
iface br-mgmt inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
# Notice the bridge port is the vlan tagged interface
|
||||
bridge_ports none
|
||||
address 10.1.1.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-storage
|
||||
iface br-storage inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.2.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
||||
|
||||
auto br-repl
|
||||
iface br-repl inet static
|
||||
bridge_stp off
|
||||
bridge_waitport 0
|
||||
bridge_fd 0
|
||||
bridge_ports none
|
||||
address 10.1.3.1
|
||||
netmask 255.255.255.0
|
||||
offload-sg off
|
@ -1,124 +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.
|
||||
|
||||
# General Environment Settings
|
||||
external_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
internal_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
debug: true
|
||||
|
||||
# LXC Settings
|
||||
lxc_net_address: 10.100.100.1
|
||||
lxc_net_netmask: 255.255.255.0
|
||||
lxc_net_dhcp_range: 10.100.100.2,10.100.100.99
|
||||
lxc_net_bridge: lxcbr0
|
||||
lxc_kernel_options:
|
||||
- { key: 'fs.inotify.max_user_instances', value: 1024 }
|
||||
|
||||
# Galera Settings
|
||||
galera_root_password: secrete
|
||||
galera_root_user: root
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
||||
galera_innodb_buffer_pool_size: 512M
|
||||
galera_innodb_log_buffer_size: 32M
|
||||
galera_wsrep_provider_options:
|
||||
- { option: "gcache.size", value: "32M" }
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
|
||||
# Memcache Settings
|
||||
memcached_listen: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_servers: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_encryption_key: "secrete"
|
||||
|
||||
# Network interface settings
|
||||
interfaces_file: "test-swift-MR-interfaces.cfg.j2"
|
||||
bridges:
|
||||
- br-mgmtA
|
||||
- br-storageA
|
||||
- br-replA
|
||||
- br-mgmtB
|
||||
- br-storageB
|
||||
- br-replB
|
||||
|
||||
# Keystone Settings
|
||||
keystone_messaging_enabled: false
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
keystone_auth_admin_password: "SuperSecretePassword"
|
||||
keystone_service_adminuri_insecure: false
|
||||
keystone_service_internaluri_insecure: false
|
||||
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_password: "secrete"
|
||||
keystone_galera_database: keystone
|
||||
keystone_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
keystone_container_mysql_password: "SuperSecrete"
|
||||
keystone_venv_tag: "testing"
|
||||
keystone_developer_mode: true
|
||||
keystone_git_install_branch: master
|
||||
keystone_requirements_git_install_branch: master
|
||||
keystone_service_region: RegionOne
|
||||
keystone_httpd_mpm_thread_limit: 20
|
||||
keystone_httpd_mpm_min_spare_threads: 2
|
||||
keystone_httpd_mpm_max_spare_threads: 10
|
||||
|
||||
# Optimization for MR Swift memory usage
|
||||
keystone_wsgi_processes: 2
|
||||
swift_account_server_workers: 2
|
||||
swift_container_server_workers: 2
|
||||
swift_object_server_workers: 2
|
||||
swift_proxy_server_workers: 2
|
||||
|
||||
# Swift specific settings
|
||||
swift_storage_address: "{{ ansible_ssh_host }}"
|
||||
swift_container_mysql_password: "SuperSecrete"
|
||||
swift_dispersion_password: "secrete"
|
||||
swift_hash_path_prefix: "secrete_prefx"
|
||||
swift_hash_path_suffix: "secrete_suffix"
|
||||
swift_service_password: "secrete"
|
||||
swift_developer_mode: true
|
||||
swift_git_install_branch: master
|
||||
swift_venv_tag: untagged
|
||||
swift_bin: "/openstack/venvs/swift-{{ swift_venv_tag }}/bin"
|
||||
swift_service_publicuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_adminuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_internaluri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_replication_address: "{{ replication_address }}"
|
||||
swift:
|
||||
storage_network: eth1
|
||||
replication_network: eth3
|
||||
part_power: 8
|
||||
region: 1
|
||||
drives:
|
||||
- name: swift1
|
||||
- name: swift2
|
||||
mount_point: /openstack
|
||||
storage_policies:
|
||||
- policy:
|
||||
name: gold
|
||||
index: 0
|
||||
repl_number: 3
|
||||
default: True
|
||||
swift_proxy_server_conf_overrides:
|
||||
"filter:keystoneauth":
|
||||
reseller_prefix: "AUTH, SERVICE"
|
||||
"SERVICE_service_roles": "test5"
|
||||
|
||||
# openrc settings
|
||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||
openrc_os_domain_name: "Default"
|
||||
openrc_os_auth_url: "http://{{ internal_lb_vip_address }}:5000/v3"
|
@ -1,124 +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.
|
||||
|
||||
# General Environment Settings
|
||||
external_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
internal_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
debug: true
|
||||
|
||||
# LXC Settings
|
||||
lxc_net_address: 10.100.100.1
|
||||
lxc_net_netmask: 255.255.255.0
|
||||
lxc_net_dhcp_range: 10.100.100.2,10.100.100.99
|
||||
lxc_net_bridge: lxcbr0
|
||||
lxc_kernel_options:
|
||||
- { key: 'fs.inotify.max_user_instances', value: 1024 }
|
||||
|
||||
# Galera Settings
|
||||
galera_root_password: secrete
|
||||
galera_root_user: root
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
||||
galera_innodb_buffer_pool_size: 512M
|
||||
galera_innodb_log_buffer_size: 32M
|
||||
galera_wsrep_provider_options:
|
||||
- { option: "gcache.size", value: "32M" }
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
|
||||
# Memcache Settings
|
||||
memcached_listen: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_servers: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_encryption_key: "secrete"
|
||||
|
||||
# Network interface settings
|
||||
interfaces_file: "test-swift-MR-interfaces.cfg.j2"
|
||||
bridges:
|
||||
- br-mgmtA
|
||||
- br-storageA
|
||||
- br-replA
|
||||
- br-mgmtB
|
||||
- br-storageB
|
||||
- br-replB
|
||||
|
||||
# Keystone Settings
|
||||
keystone_messaging_enabled: false
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
keystone_auth_admin_password: "SuperSecretePassword"
|
||||
keystone_service_adminuri_insecure: false
|
||||
keystone_service_internaluri_insecure: false
|
||||
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_password: "secrete"
|
||||
keystone_galera_database: keystone
|
||||
keystone_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
keystone_container_mysql_password: "SuperSecrete"
|
||||
keystone_venv_tag: "testing"
|
||||
keystone_developer_mode: true
|
||||
keystone_git_install_branch: master
|
||||
keystone_requirements_git_install_branch: master
|
||||
keystone_service_region: RegionOne
|
||||
keystone_httpd_mpm_thread_limit: 20
|
||||
keystone_httpd_mpm_min_spare_threads: 2
|
||||
keystone_httpd_mpm_max_spare_threads: 10
|
||||
|
||||
# Optimization for MR Swift memory usage
|
||||
keystone_wsgi_processes: 2
|
||||
swift_account_server_workers: 2
|
||||
swift_container_server_workers: 2
|
||||
swift_object_server_workers: 2
|
||||
swift_proxy_server_workers: 2
|
||||
|
||||
# Swift specific settings
|
||||
swift_storage_address: "{{ ansible_ssh_host }}"
|
||||
swift_container_mysql_password: "SuperSecrete"
|
||||
swift_dispersion_password: "secrete"
|
||||
swift_hash_path_prefix: "secrete_prefx"
|
||||
swift_hash_path_suffix: "secrete_suffix"
|
||||
swift_service_password: "secrete"
|
||||
swift_developer_mode: true
|
||||
swift_git_install_branch: master
|
||||
swift_venv_tag: untagged
|
||||
swift_bin: "/openstack/venvs/swift-{{ swift_venv_tag }}/bin"
|
||||
swift_service_publicuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_adminuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_internaluri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_replication_address: "{{ replication_address }}"
|
||||
swift:
|
||||
storage_network: eth1
|
||||
replication_network: eth3
|
||||
part_power: 8
|
||||
region: 2
|
||||
drives:
|
||||
- name: swift1
|
||||
- name: swift2
|
||||
mount_point: /openstack
|
||||
storage_policies:
|
||||
- policy:
|
||||
name: gold
|
||||
index: 0
|
||||
repl_number: 3
|
||||
default: True
|
||||
swift_proxy_server_conf_overrides:
|
||||
"filter:keystoneauth":
|
||||
reseller_prefix: "AUTH, SERVICE"
|
||||
"SERVICE_service_roles": "test5"
|
||||
|
||||
# openrc settings
|
||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||
openrc_os_domain_name: "Default"
|
||||
openrc_os_auth_url: "http://{{ internal_lb_vip_address }}:5000/v3"
|
@ -1,108 +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.
|
||||
|
||||
# General Environment Settings
|
||||
external_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
internal_lb_vip_address: "{{ hostvars[groups['keystone_all'][0]]['ansible_ssh_host'] }}"
|
||||
debug: true
|
||||
|
||||
# LXC Settings
|
||||
lxc_net_address: 10.100.100.1
|
||||
lxc_net_netmask: 255.255.255.0
|
||||
lxc_net_dhcp_range: 10.100.100.2,10.100.100.99
|
||||
lxc_net_bridge: lxcbr0
|
||||
lxc_kernel_options:
|
||||
- { key: 'fs.inotify.max_user_instances', value: 1024 }
|
||||
|
||||
# Galera Settings
|
||||
galera_root_password: secrete
|
||||
galera_root_user: root
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
galera_wsrep_node_name: "{{ inventory_hostname }}"
|
||||
galera_wsrep_provider_options:
|
||||
- { option: "gcache.size", value: "32M" }
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
|
||||
# Memcache Settings
|
||||
memcached_listen: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_servers: "{{ hostvars[groups['memcached_all'][0]]['ansible_ssh_host'] }}"
|
||||
memcached_encryption_key: "secrete"
|
||||
|
||||
# Network interface settings
|
||||
interfaces_file: "test-swift-interfaces.cfg.j2"
|
||||
bridges:
|
||||
- br-mgmt
|
||||
- br-storage
|
||||
- br-repl
|
||||
|
||||
# Keystone Settings
|
||||
keystone_messaging_enabled: false
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
keystone_auth_admin_password: "SuperSecretePassword"
|
||||
keystone_service_adminuri_insecure: false
|
||||
keystone_service_internaluri_insecure: false
|
||||
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_password: "secrete"
|
||||
keystone_galera_database: keystone
|
||||
keystone_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_ssh_host'] }}"
|
||||
keystone_container_mysql_password: "SuperSecrete"
|
||||
keystone_venv_tag: "testing"
|
||||
keystone_developer_mode: true
|
||||
keystone_git_install_branch: master
|
||||
keystone_requirements_git_install_branch: master
|
||||
keystone_service_region: RegionOne
|
||||
|
||||
# Swift specific settings
|
||||
swift_storage_address: "{{ ansible_ssh_host }}"
|
||||
swift_container_mysql_password: "SuperSecrete"
|
||||
swift_dispersion_password: "secrete"
|
||||
swift_hash_path_prefix: "secrete_prefx"
|
||||
swift_hash_path_suffix: "secrete_suffix"
|
||||
swift_service_password: "secrete"
|
||||
swift_developer_mode: true
|
||||
swift_git_install_branch: master
|
||||
swift_venv_tag: untagged
|
||||
swift_bin: "/openstack/venvs/swift-{{ swift_venv_tag }}/bin"
|
||||
swift_service_publicuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_adminuri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_service_internaluri: "http://{{ hostvars[groups['swift_proxy'][0]]['ansible_ssh_host'] }}:8080"
|
||||
swift_replication_address: "{{ replication_address }}"
|
||||
swift:
|
||||
storage_network: eth1
|
||||
replication_network: eth3
|
||||
part_power: 8
|
||||
drives:
|
||||
- name: swift1
|
||||
- name: swift2
|
||||
mount_point: /openstack
|
||||
storage_policies:
|
||||
- policy:
|
||||
name: gold
|
||||
index: 0
|
||||
repl_number: 3
|
||||
default: True
|
||||
swift_proxy_server_conf_overrides:
|
||||
"filter:keystoneauth":
|
||||
reseller_prefix: "AUTH, SERVICE"
|
||||
"SERVICE_service_roles": "test5"
|
||||
|
||||
# openrc settings
|
||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||
openrc_os_domain_name: "Default"
|
||||
openrc_os_auth_url: "http://{{ internal_lb_vip_address }}:5000/v3"
|
@ -13,23 +13,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Prepare the user ssh keys
|
||||
- include: test-prepare-keys.yml
|
||||
# Setup the keys, host and containers
|
||||
- include: playbooks/test-setup-host.yml
|
||||
|
||||
# Prepare the host
|
||||
- include: test-prepare-host.yml
|
||||
|
||||
# Prepare the containers
|
||||
- include: test-prepare-containers.yml
|
||||
|
||||
# Install MariaDB/Memcached
|
||||
- include: test-install-infra.yml
|
||||
# Install Memcached/Galera/Rabbitmq
|
||||
- include: playbooks/test-install-infra.yml
|
||||
|
||||
# Install Keystone
|
||||
- include: test-install-keystone.yml
|
||||
|
||||
# Setup Swift hosts
|
||||
- include: test-setup-swifthosts.yml
|
||||
- include: playbooks/test-install-keystone.yml
|
||||
|
||||
# Install Swift
|
||||
- include: test-install-swift.yml
|
||||
- include: playbooks/test-install-swift.yml
|
||||
|
60
tox.ini
60
tox.ini
@ -97,7 +97,7 @@ commands =
|
||||
[testenv:ansible]
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
ansible==1.9.4
|
||||
ansible==2.1.1
|
||||
ansible-lint>=2.7.0,<3.0.0
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
@ -116,6 +116,7 @@ setenv =
|
||||
# This is required as the default is '/etc/ansible/roles' or a path
|
||||
# specified in ansible.cfg
|
||||
ANSIBLE_ROLES_PATH = {homedir}/.ansible/roles:{toxinidir}/..
|
||||
ANSIBLE_TRANSPORT = "ssh"
|
||||
commands =
|
||||
rm -rf {homedir}/.ansible/plugins
|
||||
git clone https://git.openstack.org/openstack/openstack-ansible-plugins \
|
||||
@ -124,6 +125,9 @@ commands =
|
||||
ansible-galaxy install \
|
||||
--role-file={toxinidir}/tests/ansible-role-requirements.yml \
|
||||
--force
|
||||
rm -rf {toxinidir}/tests/playbooks
|
||||
git clone https://git.openstack.org/openstack/openstack-ansible-tests \
|
||||
{toxinidir}/tests/playbooks
|
||||
|
||||
|
||||
[testenv:ansible-syntax]
|
||||
@ -136,7 +140,7 @@ commands =
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
--syntax-check \
|
||||
--list-tasks \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
{toxinidir}/tests/test.yml
|
||||
|
||||
|
||||
@ -180,14 +184,14 @@ setenv =
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides.yml \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides.yml \
|
||||
{toxinidir}/tests/test-swift-functional.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
|
||||
@ -208,15 +212,15 @@ setenv =
|
||||
commands =
|
||||
{[testenv:ansible]commands}
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides.yml \
|
||||
-e "swift_pypy_enabled=True" \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides.yml \
|
||||
-e "swift_pypy_enabled=True" \
|
||||
{toxinidir}/tests/test-swift-functional.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
@ -240,48 +244,38 @@ commands =
|
||||
# Setup the host and Region A
|
||||
# NB we run against swift_all only since region B hosts don't exist yet.
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_A \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e "swift_do_setup=True" \
|
||||
-e "swift_do_sync=False" \
|
||||
-e "swift_groups='swift_all'" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-A.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides-MR-A.yml \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
# Setup region B
|
||||
# Setup region B Swift only and sync rings.
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_B \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e "swift_do_setup=True" \
|
||||
-e "swift_do_sync=False" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-B.yml \
|
||||
{toxinidir}/tests/test.yml -vvvv
|
||||
-e @{toxinidir}/tests/swift-overrides-MR-B.yml \
|
||||
{toxinidir}/tests/playbooks/test-install-swift.yml -vvvv
|
||||
# Sync rings from region A
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_A \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e "swift_do_setup=False" \
|
||||
-e "swift_do_sync=True" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-A.yml \
|
||||
{toxinidir}/tests/test-install-swift.yml -vvvv
|
||||
# Sync rings from region B
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_B \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e "swift_do_setup=False" \
|
||||
-e "swift_do_sync=True" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-B.yml \
|
||||
{toxinidir}/tests/test-install-swift.yml -vvvv
|
||||
-e @{toxinidir}/tests/swift-overrides-MR-A.yml \
|
||||
{toxinidir}/tests/playbooks/test-install-swift.yml -vvvv
|
||||
# Run functional tests against region A
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_A \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-A.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides-MR-A.yml \
|
||||
{toxinidir}/tests/test-swift-functional.yml -vvvv
|
||||
# Run functional tests against region B
|
||||
ansible-playbook -i {toxinidir}/tests/inventory_MR_B \
|
||||
-e "rolename={toxinidir}" \
|
||||
-e "swift_rolename={toxinidir}" \
|
||||
-e "install_test_packages=True" \
|
||||
-e @{toxinidir}/tests/test-vars-MR-B.yml \
|
||||
-e @{toxinidir}/tests/swift-overrides-MR-B.yml \
|
||||
{toxinidir}/tests/test-swift-functional.yml -vvvv
|
||||
{[testenv:func_logs]commands}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user