refstack/doc/tcup.md
Rob Hirschfeld 3f4311be67 add debug flag to tcup
Change-Id: I79a2019b47d2f138cd7fd3a4f26d137ab2f31c40

Change-Id: Id4ae3b8b904cd4a0f2b78a0631f2b7b958974ff1
2014-05-08 17:43:23 +00:00

2.6 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 sudo docker pull ubuntu:13.10

  5. Setup Docker to run without sudo

  6. permanently (recommended): 1. sudo usermod -a -G docker <your-user> 1. you will need to reboot after this change

  7. short term: sudo chmod 666 /var/run/docker.sock

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

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

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

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

  12. Run TCUP: python tcup.py

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

Troubleshooting TCUP

There are several ways to trouble shoot, TCUP.

  1. Run TCUP using the debug flag: tcup.py --debug
  2. Attach to the container as instructed at the end of the TCUP script
  3. Inside the container:
  4. Check your environment variables include the OS_* values using export
  5. Make sure you can access Keystone using curl $OS_AUTH_URL
  6. Make sure your credentials are working using keystone catalog

Docker Tips

  1. You can inspect which containers are running!
  2. docker ps shows the running containers
  3. docker attach allows you to connect to a container (may have to press enter)
  4. exit from inside the container with Ctrl-p + Ctrl-q
  5. Orphaned Containers: Over time, you may end up with orphaned contaniers, use the following to clean them up
  6. docker rm $(docker ps -a -q)
  7. docker rmi $(docker images | grep "^<none>" | awk "{print $3}")

For Developers

If you run TCUP in debug mode (export DEBUG=true or using --debug parameter) then TCUP will automatically mount your PWD as /dev. If you run TCUP from your Refstack clone, then you can work directly in Refstack code from inside a TCUP container from the /dev directory.