diff --git a/.travis.yml b/.travis.yml index e8408eb38..d603cabcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: python python: "2.7" -# Use the new container infrastructure +# Run jobs in containers. sudo: false # Install ansible @@ -11,18 +11,24 @@ addons: packages: - gcc - python-virtualenv + - realpath + +# Create a build matrix for the different test jobs. +env: + matrix: + # Run python style checks. + - TOX_ENV=pep8 + # Build documentation. + - TOX_ENV=docs + # Run python2.7 unit tests. + - TOX_ENV=py27 install: + # Install a virtualenv for tox. - virtualenv venv - venv/bin/pip install -U pip - venv/bin/pip install tox script: - # Run python style checks. - - venv/bin/tox -e pep8 - - # Build documentation. - - venv/bin/tox -e docs - - # Run python2.7 unit tests. - - venv/bin/tox -e py27 + # Run the tox environment. + - venv/bin/tox -e ${TOX_ENV} diff --git a/tools/configure-kayobe.sh b/tools/configure-kayobe.sh deleted file mode 100755 index 4ba068f91..000000000 --- a/tools/configure-kayobe.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -set -e - -function configure_kayobe { - KAYOBE_CONFIG_PATH=${KAYOBE_CONFIG_PATH:-/etc/kayobe} - sudo yum -y install python-netaddr - sudo mkdir -p ${KAYOBE_CONFIG_PATH} - sudo chown ${USER}:${USER} ${KAYOBE_CONFIG_PATH} - chmod 755 ${KAYOBE_CONFIG_PATH} - cp -r etc/kayobe/* ${KAYOBE_CONFIG_PATH} - my_interface=$(ip route get 8.8.8.8 | awk '{ print $5 }') - my_ip=$(ip route get 8.8.8.8 | awk '{ print $7 }') - gateway=$(ip route get 8.8.8.8 | awk '{ print $3 }') - cidr=$(ip a show $my_interface | awk '$1 == "inet" { print $2 }') - vip=$(python -c "import netaddr; a = netaddr.IPAddress('$my_ip'); print a+2") - cat >> ${KAYOBE_CONFIG_PATH}/ntp.yml << EOF - -####################################################### -# Local config -timezone: GMT -EOF - - cat >> ${KAYOBE_CONFIG_PATH}/networks.yml << EOF - -####################################################### -# Local config -provision_oc_net_name: 'the_net' -provision_wl_net_name: 'the_net' -internal_net_name: 'the_net' -public_net_name: 'the_net' -external_net_name: 'the_net' -storage_net_name: 'the_net' -storage_mgmt_net_name: 'the_net' - -the_net_vip_address: ${vip} -the_net_cidr: ${cidr} -the_net_gateway: ${gateway} -EOF - - cat > ${KAYOBE_CONFIG_PATH}/network-allocation.yml << EOF ---- -the_net_ips: - localhost: ${my_ip} -EOF - - cat > ${KAYOBE_CONFIG_PATH}/inventory/hosts << EOF -[config-mgmt] -# This host acts as the configuration management control host. This must be -# localhost. -localhost ansible_connection=local - -[seed] -# This host will provide the Bifrost undercloud. -localhost ansible_host=127.0.0.1 - -[controllers] -# These hosts will provide the OpenStack overcloud. -EOF - - if [[ -e ~/kayobe-env ]] ; then - for controller_ip in $(python -c "import json -with open('/home/centos/kayobe-env') as f: - cfg = json.load(f) -for ctl_ip in cfg['controller_ips']: - print ctl_ip"); do - echo " '$controller_ip': $controller_ip" >> ${KAYOBE_CONFIG_PATH}/network-allocation.yml - echo $controller_ip >> ${KAYOBE_CONFIG_PATH}/inventory/hosts - done - fi -} - -function main { - configure_kayobe -} - -main $@