GithubHelp home page GithubHelp logo

dparalen / devstack-gate-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnvillalovos/devstack-gate-test

0.0 1.0 0.0 85 KB

License: Apache License 2.0

Ruby 8.77% Python 12.43% Vim Script 12.76% Shell 66.03%

devstack-gate-test's Introduction

Please create the directory /opt/git and have it owned by the user that will be running Vagrant. It is highly recommended to setup a cache of files here. Please see Git Cache for information on setting up the git cache.

I recommend if on Ubuntu 14.04 to get the latest version of Vagrant from https://www.vagrantup.com/downloads.html and download the Debian 64-bit flavor.

Inside the created Virtual Machine a 'backdoor' user is created and is able sudo to root. The user's SSH public key is copied to the 'backdoor' and the 'jenkins' user. This is because the puppet script will remove the ability to SSH as root. This is a problem if you decide to use just the ansible portion to run on an OpenStack VM, as you would not be able to login.

For those users who want to run this on a VM without using Vagrant, it can be done. This is not yet fully documented though. I am assuming a good knowledge of how to use Ansible.

There is a fairly simple bash script to do the work. It is vm-setup.sh. It takes care of installing the required dependencies and runs the devstack-gate VM setup to the point where it is ready to be snapshotted.

If not using the vm-setup.sh script then the following will apply.

In the directory ansible/ there is a playbook ansible/playbook.yml. Change into the directory ansible. Create an inventory file in the directory, for example hosts and put the name of the host you want to run the ansible playbook against.

Then you can do:

$ ansible-playbook -vvv -i hosts playbook.yml

Note

Ansible 2.0 or higher is required on the target VM. You can use Ansible 1.5.4 on the system that connects to the VM. But if the target and the host are the same, please install Ansible 2.0 or higher.

Note

There is an assumption that the sudo can happen without needing a password. So you may need to use the -K flag if you require a password to sudo.

Note

The puppet scripts that get run effectively lock down the root user. They also change the SSH host key on the system. Because of this the Ansible scripts create a user called 'backdoor' and copy the authorized_keys file that existed for the root user. You can SSH in as the 'backdoor' user and then sudo.

Pre-requisites needed for running devstack-gate (assuming Ubuntu 14.04):

  1. Vagrant - latest version can be downloaded from www.vagrantup.com/downloads.html), Debian 64-bit flavor
  2. VirtualBox - latest version. Can be done by running sudo apt-get install virtualbox. Once you have it installed you probably want to install guest additions in the guest OS. And you probably also want the extension pack which you can get from here: www.virtualbox.org/wiki/Downloads.
  3. NFS server - /opt/git is synced with the VM via NFS. On Ubuntu, may be installed by running sudo apt-get install nfs-kernel-server.

The two important scripts:

ironic-grenade.sh - This file clones the devstack-gate into your workspace. References the update-projects.sh in an export statement. It exports all local modules grenade things, and runs baremetal tests.

update-projects.sh - This file is used to do various updates after the /opt/stack/old and /opt/stack/new are set up. Again, this file is referenced and sourced into ironic-grenade.sh.

To run the tests:

  1. Create the guest VM:

    $ vagrant up

  2. SSH into the vm using vagrant.

    $ vagrant ssh

  3. Switch to the jenkins user, and run the ironic-grenade.sh script.

    $ sudo su - jenkins

    $ ./ironic-grenade.sh

Running takes about 30-40 mins unfortunately. After the run, you can see the logs in /home/jenkins/workspace/testing/logs/. Specifically, grenade.sh.txt.gz.

Any time major changes are made to files, the image for the VM box needs to be recreated as follows:

Pull the latest changes. Create a package.box by doing:

$ vagrant package

This will create a package.box in your current directory. You must now add this box so that vagrant can find it and use it:

$ vagrant box add --name devstack-gate package.box

After this you should have your directory called devstack-gate-test with everything, and also a Vagrantfile.package file in it.

To avoid doing a rebuild every single time any minor changes are made, create a new directory devstack-gate-packaged, copy the Vagrantfile.package and rename it to Vagrantfile. In this file, update the name of the box to whatever you named when you created add the box with the "vagrant box add" command. This way you would only be dealing with two directories, devstack-gate devstack-gate-packaged.

Use the script setup_git_cache.sh to populate your /opt/git/ directory.

devstack-gate-test's People

Contributors

johnvillalovos avatar dparalen avatar cinerama70 avatar sommishra avatar

Watchers

 avatar

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.