From 596f32e3dc73343dd0544662d149c397bee3ef43 Mon Sep 17 00:00:00 2001 From: Kamoltat Sirivadhna Date: Wed, 15 Sep 2021 15:33:05 -0400 Subject: [PATCH] Initialize README files + changes reflecting Zack's review Signed-off-by: Kamoltat Sirivadhna --- Dockerfile | 12 ++--- docs/docker-compose/README.md | 70 ++++++++++++++++++++++++++ docs/docker-compose/docker-compose.yml | 15 ++++-- docs/docker-compose/start.sh | 15 +++++- 4 files changed, 98 insertions(+), 14 deletions(-) create mode 100644 docs/docker-compose/README.md diff --git a/Dockerfile b/Dockerfile index 414fa90de0..09c6c68f13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,21 @@ FROM ubuntu:latest ENV DEBIAN_FRONTEND=nonintercative COPY . /teuthology +COPY .teuthology.yaml ./root WORKDIR /teuthology RUN chmod +x /teuthology/bootstrap RUN apt-get update && apt-get install -y \ - git qemu-utils python3-dev libssl-dev \ + git qemu-utils python3-dev libssl-dev ipmitool \ python3-pip python3-virtualenv vim \ libev-dev libvirt-dev libffi-dev \ libyaml-dev lsb-release && apt-get \ clean all -RUN echo -e 'lock_server: http://paddles:8080\n\ -results_server: http://paddles:8080\n\ -queue_host: 0.0.0.0\n\ -queue_port: 11300\n\ -teuthology_path: ./' >> ~/.teuthology.yaml -RUN mkdir archive_dir +RUN mkdir ../archive_dir RUN mkdir log CMD ./bootstrap && ./virtualenv/bin/teuthology-suite \ -v --ceph-repo https://github.com/ceph/ceph.git \ --suite-repo https://github.com/ceph/ceph.git \ -c master -m smithi --subset 9000/100000 --limit 1 \ ---suite rados:mgr -k distro --filter 'tasks/progress' \ +--suite dummy \ --suite-branch master -p 75 --force-priority -n 100 \ && tail -f /dev/null \ No newline at end of file diff --git a/docs/docker-compose/README.md b/docs/docker-compose/README.md new file mode 100644 index 0000000000..a54a4afdbf --- /dev/null +++ b/docs/docker-compose/README.md @@ -0,0 +1,70 @@ +# Teuthology Development Environment Instruction + +The purpose of this guide is to help developers set +up a development environment for Teuthology 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 + +For Docker installation see: +https://docs.docker.com/get-docker/ + +# Add id_rsa private key + +Add your id_rsa private key that you use to +ssh into teuthology.front.sepia.com 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. + +Enable permission: +```bash +chmod 600 ~/.ssh/id_rsa +``` + + +Add the follow line to ~/.ssh/config: + +```bash +Host * + StrictHostKeyChecking no + UserKnownHostsFile=/dev/null +``` + +# Reserve 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 + +```bash +./virtualenv/bin/teuthology-lock --lock many 1 --machine-type smithi +``` + +# Adding testnodes to Paddles + +```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 + +python docs/_static/create_nodes.py +``` + + + + + + + + + diff --git a/docs/docker-compose/docker-compose.yml b/docs/docker-compose/docker-compose.yml index 9d1705e507..849e9c69c4 100644 --- a/docs/docker-compose/docker-compose.yml +++ b/docs/docker-compose/docker-compose.yml @@ -1,4 +1,4 @@ -version: '1' +version: '3.8' services: postgres: @@ -36,7 +36,7 @@ services: ports: - 8080:8080 pulpito: - build: ./pulpito + image: quay.io/ceph-infra/pulpito environment: PULPITO_PADDLES_ADDRESS: http://paddles:8080 depends_on: @@ -51,10 +51,17 @@ services: retries: 2 ports: - 8081:8081 - teutholgy: + teuthology: build: ./teuthology depends_on: pulpito: condition: service_healthy links: - - paddles \ No newline at end of file + - paddles + beanstalk: + build: ../../beanstalk/alpine + depends_on: + pulpito: + condition: service_healthy + ports: + - "11300:11300" \ No newline at end of file diff --git a/docs/docker-compose/start.sh b/docs/docker-compose/start.sh index 1cdb9aadf1..c5934d88db 100755 --- a/docs/docker-compose/start.sh +++ b/docs/docker-compose/start.sh @@ -4,9 +4,20 @@ cd paddles git fetch origin pull/94/head:wip-amathuria-removing-beanstalkd git checkout wip-amathuria-removing-beanstalkd cd ../ -git clone https://github.com/ceph/pulpito.git git clone https://github.com/ceph/teuthology.git cd teuthology git fetch origin pull/1650/head:wip-amathuria-replace-beanstalkd-paddles +git fetch origin pull/94/head:wip-amathuria-removing-beanstalkd git checkout wip-amathuria-replace-beanstalkd-paddles -docker-compose up \ No newline at end of file +cd .. +if [ -f ".teuthology.yaml" ]; +then + cp .teuthology.yaml teuthology/. +else + echo ".teuthology.yaml doesn't exists" + exit 1 +fi + +# until the branch we check out above has a Dockerfile of its own +cp ../../Dockerfile teuthology/. +docker-compose up --build -- 2.39.5