refstack/doc/tcup.md
Rob Hirschfeld c7fd7ae3cb Basics of TCUP that is used OUTSIDE of RefStack to run RefStack
This simple set of scripts will
1) build a usable RefStack container using the /scripts/dockerfile
2) assemble the correct environment variables and other run command params
3) run the container in the background
4) provide the user the right command to attach to the container
5) could be used WITHOUT cloning RefStack
6) DEBUG mode using DEBUG env variable
7) Debug mode will map PWD to /dev to make code edits easier

TODO:
1) the command to start tempest is NOT working, needs to get fixed

Change-Id: I2c1d895c3da8cefbf5a023f513c6cf6119161f8b
2014-04-03 19:44:04 -05:00

2.3 KiB

TCUP Configuration

The following instructions are designs run Refstack/Tempest in a container with minimal setup on your system.

These steps are not do not install Refstack for contributions or development, they are intended for a user who wants to just run and report test results.

  1. Make sure you have python and wget installed for your operating system.

  2. Install Docker using https://www.docker.io/gettingstarted/#h_installation

  3. Note: if you are in an environment with a proxy, make sure you configure /etc/default/docker to leverage the proxy too!

  4. You may want to prep-the environment using

  5. Get the code: wget https://raw.githubusercontent.com/stackforge/refstack/master/scripts/tcup.py

  6. note: you can also get the code by cloning the Refstack and running the code in /scripts/tcup.py

  7. Set your environment variables to access the test target cloud

  8. generally, you will source openrc.sh to load the cloud credentials and URLs

  9. Run TCUP: sudo python tcup.py

  10. if you want to work on the code from Refstack, use `sudo python scripts/tcup.py'

Trouble Shooting TCUP

There are several ways to trouble shoot, TCUP.

  1. Enter your docker container using run -i -t [image id from tcup.py] /bin/bash
  2. Check your environment variables include the OS_* values using export
  3. Make sure you can access Keystone using curl $OS_AUTH_URL
  4. Make sure your credentials are working using keystone catalog

Docker Tips

  1. You can run Docker without sudo!

  2. sudo usermod -a -G docker <your-user> (to permanently run Docker without sudo)

  3. you will need to reboot after this change (but you can wait until we tell you to reboot later)

  4. if you don't want this to be permanent or active before the reboot use, sudo chmod 666 /var/run/docker.sock

  5. You can inspect which containers are running!

  6. sudo docker ps shows the running containers

  7. sudo docker attach allows you to connect to a container (may have to press enter)

  8. exit from inside the container with Ctrl-p + Ctrl-q

  9. Orphaned Containers: Over time, you may end up with orphaned contaniers, use the following to clean them up

  10. sudo docker rm $(docker ps -a -q)

  11. sudo docker rmi $(docker images | grep "^<none>" | awk "{print $3}")