diff --git a/docs/docker-compose/README.md b/docs/docker-compose/README.md index a54a4afdbf..1a1fc370aa 100644 --- a/docs/docker-compose/README.md +++ b/docs/docker-compose/README.md @@ -1,33 +1,41 @@ # Teuthology Development Environment Instruction The purpose of this guide is to help developers set -up a development environment for Teuthology using +up a development environment for Teuthology. We will be using Dockers to set up all the containers for Postgres, Paddles, Pulpito, Beanstalk, Teuthology. For now, this guide will rely on the sepia lab cluster for test nodes. -# Installing Docker +# Installing and Running Docker For Docker installation see: https://docs.docker.com/get-docker/ -# Add id_rsa private key +Make sure you are connected to Sepia lab VPN +before starting Docker, so that the containers +will use the VPN network route when executing +SSH commands. -Add your id_rsa private key that you use to -ssh into teuthology.front.sepia.com your running +To start building images and running containers: +```bash +./start.sh +``` + +# Adding id_rsa private key + +Add your `id_rsa` key that you use to +ssh into teuthology.front.sepia.com to your running teuthology container. You can find the key in -~/.ssh/id_rsa on your local machine. -File should be in the same location in your -running teuthology container. +`~/.ssh/id_rsa` on your local machine. -Enable permission: +Enable read & write permissions: ```bash chmod 600 ~/.ssh/id_rsa ``` -Add the follow line to ~/.ssh/config: +Add the follow line to `~/.ssh/config`: ```bash Host * @@ -35,32 +43,72 @@ Host * UserKnownHostsFile=/dev/null ``` -# Reserve a machine in Sepia - -ssh into teuthology.front.sepia.com +# Reserving a machine in Sepia +ssh into teuthology.front.sepia.com, lock a random machine, mark it down and give it an -appropriate description so that other teuthology users -are aware of why you are locking that machine +appropriate description of why you are locking a machine. +For example, to lock 1 random smithi machine use: ```bash ./virtualenv/bin/teuthology-lock --lock many 1 --machine-type smithi ``` -# Adding testnodes to Paddles +# Adding test-nodes to Paddles + +After reserving your machine, you can now add the machine +into your paddles inventory by following these steps +in your teuthology container: ```bash cd ~/teuthology source ./virtualenv/bin/activate +``` -# Edit docs/_static/create_nodes.py -# (paddles_url, machine_type, lab_domain, and machine_index_range) -# These can all be found in teuthology.yaml on a teuthology host +In `docs/_static/create_nodes.py` +Edit (paddles_url, machine_type, lab_domain, and machine_index_range) +Here is what the file should look like when you trying to add smithi022: +```python +11 from teuthology.lock.ops import update_inventory +12 +13 paddles_url = 'http://paddles:8080' +14 +15 machine_type = 'smithi' +16 lab_domain = 'front.sepia.ceph.com' +17 # Don't change the user. It won't work at this time. +18 user = 'ubuntu' +19 # We are populating 'typica003' -> 'typica192' +20 machine_index_range = range(22, 23) +21 +22 log = logging.getLogger(sys.argv[0]) +``` +Run the command: +```bash python docs/_static/create_nodes.py ``` +Output should look this when successful: - +```bash +$ python docs/_static/create_nodes.py +INFO:docs/_static/create_nodes.py:Creating smithi022.front.sepia.ceph.com +INFO:teuthology.orchestra.remote:Trying to reconnect to host +INFO:teuthology.orchestra.run.smithi022.stdout:x86_64 +INFO:teuthology.orchestra.run.smithi022.stdout:NAME="Ubuntu" +INFO:teuthology.orchestra.run.smithi022.stdout:VERSION="18.04.5 LTS (Bionic Beaver)" +INFO:teuthology.orchestra.run.smithi022.stdout:ID=ubuntu +NFO:teuthology.orchestra.run.smithi022.stdout:ID_LIKE=debian +INFO:teuthology.orchestra.run.smithi022.stdout:PRETTY_NAME="Ubuntu 18.04.5 LTS" +INFO:teuthology.orchestra.run.smithi022.stdout:VERSION_ID="18.04" +INFO:teuthology.orchestra.run.smithi022.stdout:HOME_URL="https://www.ubuntu.com/" +INFO:teuthology.orchestra.run.smithi022.stdout:SUPPORT_URL="https://help.ubuntu.com/" +INFO:teuthology.orchestra.run.smithi022.stdout:BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +INFO:teuthology.orchestra.run.smithi022.stdout:PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +INFO:teuthology.orchestra.run.smithi022.stdout:VERSION_CODENAME=bionic +INFO:teuthology.orchestra.run.smithi022.stdout:UBUNTU_CODENAME=bionic +INFO:teuthology.lock.ops:Updating smithi022.front.sepia.ceph.com on lock server +INFO:teuthology.lock.ops:Creating new node smithi022.front.sepia.ceph.com on lock server +```