parent
b81ea77f9f
commit
98655d1675
32
doc/tcup.md
32
doc/tcup.md
|
@ -1,22 +1,24 @@
|
|||
TCUP Configuration
|
||||
===========================
|
||||
|
||||
# Install Docker using [[https://www.docker.io/gettingstarted/#h_installation]]
|
||||
The following instructions are designs run RefStack/Tempest in a container with minimal setup on your system.
|
||||
|
||||
# Get the code
|
||||
> 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. Install Docker using [[https://www.docker.io/gettingstarted/#h_installation]]
|
||||
|
||||
1. Get the code: `wget https://raw.githubusercontent.com/stackforge/refstack/master/t-container/tcup.py`
|
||||
1. note: you can also get the code by cloning the RefStack and running the code in `/t-container`
|
||||
|
||||
1. Set your environment variables to access the test target cloud
|
||||
1. generally, you will `source openrc.sh` to load the cloud credentials and URLs
|
||||
|
||||
1. Run TCUP: `sudo python tcup.py`
|
||||
1. If you want to watch the process, you will need to `docker attach [container id]`
|
||||
git clone http://github.com/stackforge/refstack
|
||||
|
||||
# enter RefStack
|
||||
cd refstack
|
||||
|
||||
# create/copy your OpenStack credentials into openrc.sh an file
|
||||
|
||||
# Create the TCUP container
|
||||
docker build t-container
|
||||
|
||||
# Run the container
|
||||
docker run -v `pwd`:/tcup:rw -i -t 32fe2d733d51 /bin/bash
|
||||
|
||||
# Inside the container run the following
|
||||
source tcup/openrc.sh
|
||||
tcup/run_in_tcup.py
|
||||
Notes:
|
||||
1. Orphaned Containers: Over time, you may end up with [orphaned contaniers](http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html), use the following to clean them up
|
||||
1. `sudo docker rm $(docker ps -a -q)`
|
||||
1. `sudo docker rmi $(docker images | grep "^<none>" | awk "{print $3}")`
|
|
@ -31,9 +31,12 @@ RUN pip install ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.9.tar.gz
|
|||
# Cloning tempest
|
||||
#RUN git clone https://github.com/openstack/tempest
|
||||
|
||||
# Cloning refstack
|
||||
RUN git clone https://github.com/stackforge/refstack.git
|
||||
|
||||
# Get tempest code
|
||||
RUN wget https://github.com/openstack/tempest/archive/stable/havana.zip
|
||||
RUN unzip havana.zip
|
||||
RUN wget https://github.com/openstack/tempest/archive/stable/havana.zip
|
||||
RUN unzip havana.zip
|
||||
RUN mv /tempest-stable-havana /tempest
|
||||
|
||||
#running setup
|
||||
|
@ -54,15 +57,4 @@ RUN mv /tempest-stable-havana /tempest
|
|||
RUN pip install -r /tempest/requirements.txt
|
||||
RUN pip install -r /tempest/test-requirements.txt
|
||||
|
||||
#Running tempest config creator
|
||||
#CMD 'cd /tempest && git checkout stable/havana && /tempest/run_tests.sh -C /tempest/tempest.conf -N -- tempest'
|
||||
#CMD 'cd /tempest && /tempest/run_tests.sh -C /tempest/tempest.conf -N -- tempest'
|
||||
|
||||
#Publishing to refstack
|
||||
#ADD <url> /temp/
|
||||
|
||||
#rest of file
|
||||
|
||||
#eof
|
||||
|
||||
# To start the image, docker run -i -t [image id] /bin/bash
|
|
@ -40,17 +40,19 @@ if __name__ == "__main__":
|
|||
if not api_addr:
|
||||
api_addr = "http://refstack.org/result"
|
||||
|
||||
|
||||
# build the container
|
||||
print "Downloading & Building TCUP Image...(the first run takes time)"
|
||||
build_output = commands.getoutput("docker build t-container")
|
||||
image = re.search("Successfully built (.*)", build_output).group(1)
|
||||
print "TCUP Built Docker Image ID: "+image
|
||||
|
||||
|
||||
docker_run = "docker run -i -t "+image
|
||||
# create the docker run
|
||||
docker_run = "docker run -name tcup -d -i -t "+image
|
||||
for e in os.environ:
|
||||
docker_run += ' -e '+e+'="'+os.environ[e]+'"'
|
||||
docker_run += ' -x "'+e+'='+os.environ[e]+'"'
|
||||
|
||||
docker_run += " python refstack/tools/execute_test.py --callback ${api_addr} ${test_id}"
|
||||
print docker_run
|
||||
docker_output = commands.getoutput(docker_run)
|
||||
print docker_output
|
||||
print "You can monitor the TCUP results using \n\tsudo docker attach tcup"
|
Loading…
Reference in New Issue