Giter Site home page Giter Site logo

cbci's Introduction

cbci

Ansible code used to deploy openstack for CI testing, uses devstack and Hyper-V 2016

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need 2 machines if live migration is not required.

For live migration two or more compute nodes and active directory are required.

For this example i will be using 4 VMs in VMware Workstation

  • ubuntu 16.04 devstack - 1 NAT interface and one VMnet1 (host only)
  • Hyper-V 2016 compute - 1 NAT interface and one VMnet1 (host only)
  • Hyper-V 2016 compute - 1 NAT interface and one VMnet1 (host only)
  • Server 2016 active directory - 1 NAT interface
  • management network 192.168.171.0/24
  • data network 192.168.112.0/24 VMnet1 (host only)

Installing

  1. Install ansible 2.3+ on your control machine
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
  1. Clone this repo

  2. Change zuul-params.yaml

zuul_head_only: true means no change will be applied on top of zuul-branch
  1. Change group variables in group_vars folder to your liking. (ie: ssh/winrm password) For this example i will just make sure data_network(group_vars/all) is set to my VMnet1 subnet

  2. Update inventory file with the correct IPs

  3. Configure your machines to work with ansible. For windows just run this script

ansible -i inventory devstack -m ping
192.168.171.134 | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

ansible -i inventory ad -m win_ping
192.168.171.139 | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

  1. (Optional) Create snapshots for all VMs to be able to revert and run the build again

Running ansible examples

ansible-playbook -i inventory build-devstack.yaml
ansible-playbook -i inventory build-win2016-compute.yaml
ansible-playbook -i inventory build-ad.yaml

or

Using the parallel_task_runner.py (takes care of killing all other unfinished tasks if one fails)

python3 parallel_task_runner.py --tasks '{"Build devstack": {"cmd": "ansible-playbook -i inventory build-devstack.yaml", "log": "dvsm.log"}, "Build compute": {"cmd": "ansible-playbook -i inventory build-win2016-compute.yaml", "log": "hv.log"}, "Build ad": {"cmd": "ansible-playbook -i inventory build-ad.yaml", "log": "ad.log"}}'

Running the tests

ansible-playbook -i inventory post-stack.yaml

Check log files are in /home/ubuntu/tempest on devstack node

tail -f /home/ubuntu/tempest/run-tests.sh.log

cbci's People

Contributors

gandrei95 avatar andreibacos avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

gandrei95

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.