diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..414fa90de0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM ubuntu:latest +ENV DEBIAN_FRONTEND=nonintercative +COPY . /teuthology +WORKDIR /teuthology +RUN chmod +x /teuthology/bootstrap +RUN apt-get update && apt-get install -y \ + git qemu-utils python3-dev libssl-dev \ + 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 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-branch master -p 75 --force-priority -n 100 \ +&& tail -f /dev/null \ No newline at end of file diff --git a/docs/docker-compose/db/01-init.sh b/docs/docker-compose/db/01-init.sh new file mode 100755 index 0000000000..b9e5adc2ff --- /dev/null +++ b/docs/docker-compose/db/01-init.sh @@ -0,0 +1,8 @@ +set -e +export PGPASSWORD=$POSTGRES_PASSWORD; +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL + CREATE USER $APP_DB_USER WITH PASSWORD '$APP_DB_PASS'; + CREATE DATABASE $APP_DB_NAME; + GRANT ALL PRIVILEGES ON DATABASE $APP_DB_NAME TO $APP_DB_USER; + \connect $APP_DB_NAME $APP_DB_USER +EOSQL \ No newline at end of file diff --git a/docs/docker-compose/docker-compose.yml b/docs/docker-compose/docker-compose.yml new file mode 100644 index 0000000000..9d1705e507 --- /dev/null +++ b/docs/docker-compose/docker-compose.yml @@ -0,0 +1,60 @@ +version: '1' + +services: + postgres: + image: postgres:latest + healthcheck: + test: [ "CMD", "pg_isready", "-q", "-d", "paddles", "-U", "admin" ] + timeout: 5s + interval: 10s + retries: 2 + environment: + - POSTGRES_USER=root + - POSTGRES_PASSWORD=password + - APP_DB_USER=admin + - APP_DB_PASS=password + - APP_DB_NAME=paddles + volumes: + - ./db:/docker-entrypoint-initdb.d/ + ports: + - 5432:5432 + paddles: + build: ./paddles + environment: + PADDLES_SERVER_HOST: 0.0.0.0 + PADDLES_SQLALCHEMY_URL: postgresql+psycopg2://admin:password@postgres:5432/paddles + depends_on: + postgres: + condition: service_healthy + links: + - postgres + healthcheck: + test: ["CMD", "curl", "-f", "http://0.0.0.0:8080"] + timeout: 5s + interval: 10s + retries: 2 + ports: + - 8080:8080 + pulpito: + build: ./pulpito + environment: + PULPITO_PADDLES_ADDRESS: http://paddles:8080 + depends_on: + paddles: + condition: service_healthy + links: + - paddles + healthcheck: + test: ["CMD", "curl", "-f", "http://0.0.0.0:8081"] + timeout: 5s + interval: 10s + retries: 2 + ports: + - 8081:8081 + teutholgy: + build: ./teuthology + depends_on: + pulpito: + condition: service_healthy + links: + - paddles \ No newline at end of file diff --git a/docs/docker-compose/start.sh b/docs/docker-compose/start.sh new file mode 100755 index 0000000000..1cdb9aadf1 --- /dev/null +++ b/docs/docker-compose/start.sh @@ -0,0 +1,12 @@ +#!/bin/bash +git clone https://github.com/ceph/paddles.git +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 checkout wip-amathuria-replace-beanstalkd-paddles +docker-compose up \ No newline at end of file