- Pull the docker image.
docker pull douglasatjoyent/dayinthelifedockercent:tagname:latest
- Create an instance of the container.
docker create -it --name=setup douglasatjoyent/dayinthelifedockercent:latest
- Docker start -ia setup, this will start a bash shell.
- Copy & register key, the container has a key with the name sdc_docker_jmeter_id_rsa.pub, and is located in the /root/.ssh directory.
An example (using COAL and the container on my local machine) :
Then on the COAL machine :
scp $PUBLIC_KEY email@example.com:/tmp
sdc-useradm add-key --name=jmeter douglas.anderson sdc_docker_jmeter_id_rsa.pub
- Setup SDC, go back to the docker image, run the sdc-docker-setup.sh in the root directory.
example: ./sdc-docker-setup.sh coal douglas.anderson $PRIVATE_KEY
- Setup the environmental variables (Optional)
The variables that one can set are : HOST,DOCKER_HOST, DOCEKR_CERT, SDC_ACCOUNT, DURATION, TLS_FLAG, THREADS, OUTPUT_DIR.
This is an optional step, these variables can be controlled outside of the container as well.
- Exit the image.
- Commit the image.
docker commit setup douglasatjoyent/dayinthelifedockercent:local , note I usually use the tag local so that docker does not overwrite the latest version in case I have to do the setup again or if I need to setup against a different machine.
- Create a env file, I usually name mine env.txt.
The values that we are interested in are:
HOST,DOCKER_HOST, DOCEKR_CERT, SDC_ACCOUNT, DURATION, TLS_FLAG, THREADS, OUTPUT_DIR.
- Run JMeter
docker run —-name=runner --entrypoint=bash --env-file=env.txt douglasatjoyent/dayinthelifedockercent:local /DayInTheLifeOfTriton/runJMeter.sh
- Copy the output directory
docker cp <container_name>:/OUTPUT_DIR.
- Where the OUTPUT_DIR is the one that is set in the env.txt
- <container_name> - the name of the container.
The default value of any of these will be the value of the shell variable of the same name.
|HOST||Host address of the Triton that you are testing.|
|DOCKER_HOST||Host of the Docker that you are testing.|
|DOCEKR_CERT||The location of the cert. This will be displayed when running the sdc-setup script.|
|SDC_ACCOUNT||The name of the account that you|
|DURATION||The time in seconds that the test will run.|
|TLS_FLAG||true if you want the TLS flag included in calls.|
|THREADS||The number of threads to be used in the test.|
|OUTPUT_DIR||The location in the file system that the report will be put.|