]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
FIXME docs/docker-compose: Move to new containers/ dir
authorZack Cerza <zack@redhat.com>
Tue, 2 Aug 2022 17:06:47 +0000 (11:06 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 20 Feb 2023 20:17:49 +0000 (13:17 -0700)
the dir is not yet empty

20 files changed:
beanstalk/alpine/Dockerfile [deleted file]
containers/beanstalk/alpine/Dockerfile [new file with mode: 0644]
containers/postgres/db/01-init.sh [new file with mode: 0755]
containers/testnode/Dockerfile [new file with mode: 0644]
containers/testnode/testnode_start.sh [new file with mode: 0755]
containers/testnode/testnode_stop.sh [new file with mode: 0755]
containers/testnode/testnode_sudoers [new file with mode: 0644]
containers/teuthology-dev/.teuthology.yaml [new file with mode: 0644]
containers/teuthology-dev/Dockerfile [new file with mode: 0644]
containers/teuthology-dev/containerized_node.yaml [new file with mode: 0644]
containers/teuthology-dev/teuthology.sh [new file with mode: 0755]
docs/docker-compose/db/01-init.sh [deleted file]
docs/docker-compose/testnode/Dockerfile [deleted file]
docs/docker-compose/testnode/testnode_start.sh [deleted file]
docs/docker-compose/testnode/testnode_stop.sh [deleted file]
docs/docker-compose/testnode/testnode_sudoers [deleted file]
docs/docker-compose/teuthology/.teuthology.yaml [deleted file]
docs/docker-compose/teuthology/Dockerfile [deleted file]
docs/docker-compose/teuthology/containerized_node.yaml [deleted file]
docs/docker-compose/teuthology/teuthology.sh [deleted file]

diff --git a/beanstalk/alpine/Dockerfile b/beanstalk/alpine/Dockerfile
deleted file mode 100644 (file)
index 7afb000..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# For beanstalkd 1.12 use edge branch
-#FROM alpine:edge
-
-FROM alpine:3.12.3
-
-MAINTAINER Kyrylo Shatskyy <kyrylo.shatskyy@suse.com>
-
-RUN apk update && apk add beanstalkd beanstalkd-doc
-
-ENV BEANSTALK_ADDR "0.0.0.0"
-ENV BEANSTALK_PORT "11300"
-
-CMD /usr/bin/beanstalkd -V -l $BEANSTALK_ADDR -p $BEANSTALK_PORT
diff --git a/containers/beanstalk/alpine/Dockerfile b/containers/beanstalk/alpine/Dockerfile
new file mode 100644 (file)
index 0000000..7afb000
--- /dev/null
@@ -0,0 +1,13 @@
+# For beanstalkd 1.12 use edge branch
+#FROM alpine:edge
+
+FROM alpine:3.12.3
+
+MAINTAINER Kyrylo Shatskyy <kyrylo.shatskyy@suse.com>
+
+RUN apk update && apk add beanstalkd beanstalkd-doc
+
+ENV BEANSTALK_ADDR "0.0.0.0"
+ENV BEANSTALK_PORT "11300"
+
+CMD /usr/bin/beanstalkd -V -l $BEANSTALK_ADDR -p $BEANSTALK_PORT
diff --git a/containers/postgres/db/01-init.sh b/containers/postgres/db/01-init.sh
new file mode 100755 (executable)
index 0000000..b9e5adc
--- /dev/null
@@ -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/containers/testnode/Dockerfile b/containers/testnode/Dockerfile
new file mode 100644 (file)
index 0000000..016d321
--- /dev/null
@@ -0,0 +1,26 @@
+FROM ubuntu:focal
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt update && \
+    apt -y install \
+        sudo \
+        openssh-server \
+        hostname \
+        curl \
+        python3-pip \
+        apache2 \
+        nfs-kernel-server && \
+    apt clean all
+COPY testnode_start.sh /
+COPY testnode_stop.sh /
+COPY testnode_sudoers /etc/sudoers.d/teuthology
+RUN \
+    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' && \
+    sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config && \
+    mkdir -p /root/.ssh && \
+    chmod 700 /root/.ssh && \
+    useradd -g sudo ubuntu && \
+    mkdir -p /home/ubuntu/.ssh && \
+    chmod 700 /home/ubuntu/.ssh && \
+    chown -R ubuntu /home/ubuntu
+EXPOSE 22
+ENTRYPOINT /testnode_start.sh
diff --git a/containers/testnode/testnode_start.sh b/containers/testnode/testnode_start.sh
new file mode 100755 (executable)
index 0000000..d29c3b6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/usr/bin/bash
+set -x
+echo "$SSH_PUBKEY" > /root/.ssh/authorized_keys
+echo "$SSH_PUBKEY" > /home/ubuntu/.ssh/authorized_keys
+chown ubuntu /home/ubuntu/.ssh/authorized_keys
+payload="{\"name\": \"$(hostname)\", \"machine_type\": \"testnode\", \"up\": true, \"locked\": false, \"os_type\": \"ubuntu\", \"os_version\": \"20.04\"}"
+for i in $(seq 1 5); do
+    echo "attempt $i"
+    curl -v -f -d "$payload" http://paddles:8080/nodes/ && break
+    sleep 1
+done
+mkdir -p /run/sshd
+exec /usr/sbin/sshd -D
diff --git a/containers/testnode/testnode_stop.sh b/containers/testnode/testnode_stop.sh
new file mode 100755 (executable)
index 0000000..2e1044d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/bash
+set -x
+hostname=$(hostname)
+payload="{\"name\": \"$hostname\", \"machine_type\": \"testnode\", \"up\": false}"
+for i in $(seq 1 5); do
+    echo "attempt $i"
+    curl -s -f -X PUT -d "$payload" http://paddles:8080/nodes/$hostname/ && break
+    sleep 1
+done
+pkill sshd
\ No newline at end of file
diff --git a/containers/testnode/testnode_sudoers b/containers/testnode/testnode_sudoers
new file mode 100644 (file)
index 0000000..35828ad
--- /dev/null
@@ -0,0 +1,4 @@
+%sudo ALL=(ALL) NOPASSWD: ALL
+# For ansible pipelining
+Defaults !requiretty
+Defaults visiblepw
diff --git a/containers/teuthology-dev/.teuthology.yaml b/containers/teuthology-dev/.teuthology.yaml
new file mode 100644 (file)
index 0000000..bac8ec1
--- /dev/null
@@ -0,0 +1,9 @@
+queue_host: beanstalk
+queue_port: 11300
+lock_server: http://paddles:8080
+results_server: http://paddles:8080
+results_ui_server: http://pulpito:8081/
+teuthology_path: /teuthology
+archive_base: /archive_dir
+reserve_machines: 0
+lab_domain: ''
\ No newline at end of file
diff --git a/containers/teuthology-dev/Dockerfile b/containers/teuthology-dev/Dockerfile
new file mode 100644 (file)
index 0000000..f350b31
--- /dev/null
@@ -0,0 +1,43 @@
+FROM ubuntu:latest
+ARG SSH_PRIVKEY_FILE=id_ed25519
+ENV DEBIAN_FRONTEND=noninteractive
+RUN apt-get update && \
+    apt-get install -y \
+    git \
+    qemu-utils \
+    python3-dev \
+    libssl-dev \
+    ipmitool \
+    python3-pip \
+    python3-venv \
+    vim \
+    libev-dev \
+    libvirt-dev \
+    libffi-dev \
+    libyaml-dev \
+    lsb-release && \
+    apt-get clean all
+WORKDIR /teuthology
+COPY requirements.txt bootstrap /teuthology/
+RUN \
+    cd /teuthology && \
+    mkdir ../archive_dir && \
+    mkdir log && \
+    chmod +x /teuthology/bootstrap && \
+    PIP_INSTALL_FLAGS="-r requirements.txt" ./bootstrap
+COPY . /teuthology
+RUN \
+    ./bootstrap
+COPY containers/teuthology-dev/containerized_node.yaml /teuthology
+COPY containers/teuthology-dev/.teuthology.yaml /root
+COPY containers/teuthology-dev/teuthology.sh /
+RUN mkdir -p /etc/ansible
+COPY containers/teuthology-dev/ansible_inventory/hosts /etc/ansible/
+COPY containers/teuthology-dev/ansible_inventory/secrets /etc/ansible/
+RUN \
+    mkdir $HOME/.ssh && \
+    touch $HOME/.ssh/${SSH_PRIVKEY_FILE} && \
+    chmod 600 $HOME/.ssh/${SSH_PRIVKEY_FILE} && \
+    echo "StrictHostKeyChecking=no" > $HOME/.ssh/config && \
+    echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config
+ENTRYPOINT /teuthology.sh
\ No newline at end of file
diff --git a/containers/teuthology-dev/containerized_node.yaml b/containers/teuthology-dev/containerized_node.yaml
new file mode 100644 (file)
index 0000000..0230488
--- /dev/null
@@ -0,0 +1,8 @@
+overrides:
+  ansible.cephlab:
+    skip_tags: "timezone,nagios,monitoring-scripts,ssh,hostname,pubkeys,zap,sudoers,kerberos,selinux,lvm,ntp-client,resolvconf,packages,cpan,nfs"
+    vars:
+      containerized_node: true
+      ansible_user: root
+      cm_user: root
+      start_rpcbind: false
diff --git a/containers/teuthology-dev/teuthology.sh b/containers/teuthology-dev/teuthology.sh
new file mode 100755 (executable)
index 0000000..0378f93
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/bin/bash
+set -e
+# We don't want -x yet, in case the private key is sensitive
+if [ -n "$SSH_PRIVKEY_FILE" ]; then
+    echo "$SSH_PRIVKEY" > $HOME/.ssh/$SSH_PRIVKEY_FILE
+fi
+source /teuthology/virtualenv/bin/activate
+set -x
+if [ -n "$TESTNODES" ]; then
+    for node in $(echo $TESTNODES | tr , ' '); do
+        teuthology-update-inventory -m $MACHINE_TYPE $node
+    done
+    CUSTOM_CONF=${CUSTOM_CONF:-}
+else
+    CUSTOM_CONF=/teuthology/containerized_node.yaml
+fi
+export MACHINE_TYPE=${MACHINE_TYPE:-testnode}
+if [ -z "$TEUTHOLOGY_WAIT" ]; then
+    if [ -n "$TEUTH_BRANCH" ]; then
+      TEUTH_BRANCH_FLAG="--teuthology-branch $TEUTH_BRANCH"
+    fi
+    teuthology-suite -v \
+        $TEUTH_BRANCH_FLAG \
+        --ceph-repo https://github.com/ceph/ceph.git \
+        --suite-repo https://github.com/ceph/ceph.git \
+        -c main \
+        -m $MACHINE_TYPE \
+        --limit 1 \
+        -n 100 \
+        --suite teuthology:no-ceph \
+        --filter-out "libcephfs,kclient,stream,centos,rhel" \
+        -d ubuntu -D 20.04 \
+        --suite-branch main \
+        --subset 9000/100000 \
+        -p 75 \
+        --seed 349 \
+        --force-priority \
+        $CUSTOM_CONF
+    DISPATCHER_EXIT_FLAG='--exit-on-empty-queue'
+    teuthology-queue -m $MACHINE_TYPE -s | \
+      python3 -c "import sys, json; assert json.loads(sys.stdin.read())['count'] > 0, 'queue is empty!'"
+fi
+teuthology-dispatcher -v \
+    --log-dir /teuthology/log \
+    --tube $MACHINE_TYPE \
+    $DISPATCHER_EXIT_FLAG
diff --git a/docs/docker-compose/db/01-init.sh b/docs/docker-compose/db/01-init.sh
deleted file mode 100755 (executable)
index b9e5adc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-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/testnode/Dockerfile b/docs/docker-compose/testnode/Dockerfile
deleted file mode 100644 (file)
index 016d321..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-FROM ubuntu:focal
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt update && \
-    apt -y install \
-        sudo \
-        openssh-server \
-        hostname \
-        curl \
-        python3-pip \
-        apache2 \
-        nfs-kernel-server && \
-    apt clean all
-COPY testnode_start.sh /
-COPY testnode_stop.sh /
-COPY testnode_sudoers /etc/sudoers.d/teuthology
-RUN \
-    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' && \
-    sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config && \
-    mkdir -p /root/.ssh && \
-    chmod 700 /root/.ssh && \
-    useradd -g sudo ubuntu && \
-    mkdir -p /home/ubuntu/.ssh && \
-    chmod 700 /home/ubuntu/.ssh && \
-    chown -R ubuntu /home/ubuntu
-EXPOSE 22
-ENTRYPOINT /testnode_start.sh
diff --git a/docs/docker-compose/testnode/testnode_start.sh b/docs/docker-compose/testnode/testnode_start.sh
deleted file mode 100755 (executable)
index d29c3b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/bash
-set -x
-echo "$SSH_PUBKEY" > /root/.ssh/authorized_keys
-echo "$SSH_PUBKEY" > /home/ubuntu/.ssh/authorized_keys
-chown ubuntu /home/ubuntu/.ssh/authorized_keys
-payload="{\"name\": \"$(hostname)\", \"machine_type\": \"testnode\", \"up\": true, \"locked\": false, \"os_type\": \"ubuntu\", \"os_version\": \"20.04\"}"
-for i in $(seq 1 5); do
-    echo "attempt $i"
-    curl -v -f -d "$payload" http://paddles:8080/nodes/ && break
-    sleep 1
-done
-mkdir -p /run/sshd
-exec /usr/sbin/sshd -D
diff --git a/docs/docker-compose/testnode/testnode_stop.sh b/docs/docker-compose/testnode/testnode_stop.sh
deleted file mode 100755 (executable)
index 2e1044d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/bash
-set -x
-hostname=$(hostname)
-payload="{\"name\": \"$hostname\", \"machine_type\": \"testnode\", \"up\": false}"
-for i in $(seq 1 5); do
-    echo "attempt $i"
-    curl -s -f -X PUT -d "$payload" http://paddles:8080/nodes/$hostname/ && break
-    sleep 1
-done
-pkill sshd
\ No newline at end of file
diff --git a/docs/docker-compose/testnode/testnode_sudoers b/docs/docker-compose/testnode/testnode_sudoers
deleted file mode 100644 (file)
index 35828ad..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-%sudo ALL=(ALL) NOPASSWD: ALL
-# For ansible pipelining
-Defaults !requiretty
-Defaults visiblepw
diff --git a/docs/docker-compose/teuthology/.teuthology.yaml b/docs/docker-compose/teuthology/.teuthology.yaml
deleted file mode 100644 (file)
index bac8ec1..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-queue_host: beanstalk
-queue_port: 11300
-lock_server: http://paddles:8080
-results_server: http://paddles:8080
-results_ui_server: http://pulpito:8081/
-teuthology_path: /teuthology
-archive_base: /archive_dir
-reserve_machines: 0
-lab_domain: ''
\ No newline at end of file
diff --git a/docs/docker-compose/teuthology/Dockerfile b/docs/docker-compose/teuthology/Dockerfile
deleted file mode 100644 (file)
index 5587489..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-FROM ubuntu:latest
-ARG SSH_PRIVKEY_FILE=id_ed25519
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get update && \
-    apt-get install -y \
-    git \
-    qemu-utils \
-    python3-dev \
-    libssl-dev \
-    ipmitool \
-    python3-pip \
-    python3-venv \
-    vim \
-    libev-dev \
-    libvirt-dev \
-    libffi-dev \
-    libyaml-dev \
-    lsb-release && \
-    apt-get clean all
-WORKDIR /teuthology
-COPY requirements.txt bootstrap /teuthology/
-RUN \
-    cd /teuthology && \
-    mkdir ../archive_dir && \
-    mkdir log && \
-    chmod +x /teuthology/bootstrap && \
-    PIP_INSTALL_FLAGS="-r requirements.txt" ./bootstrap
-COPY . /teuthology
-RUN \
-    ./bootstrap
-COPY docs/docker-compose/teuthology/containerized_node.yaml /teuthology
-COPY docs/docker-compose/teuthology/.teuthology.yaml /root
-COPY docs/docker-compose/teuthology/teuthology.sh /
-RUN mkdir -p /etc/ansible
-COPY docs/docker-compose/teuthology/ansible_inventory/hosts /etc/ansible/
-COPY docs/docker-compose/teuthology/ansible_inventory/secrets /etc/ansible/
-RUN \
-    mkdir $HOME/.ssh && \
-    touch $HOME/.ssh/${SSH_PRIVKEY_FILE} && \
-    chmod 600 $HOME/.ssh/${SSH_PRIVKEY_FILE} && \
-    echo "StrictHostKeyChecking=no" > $HOME/.ssh/config && \
-    echo "UserKnownHostsFile=/dev/null" >> $HOME/.ssh/config
-ENTRYPOINT /teuthology.sh
\ No newline at end of file
diff --git a/docs/docker-compose/teuthology/containerized_node.yaml b/docs/docker-compose/teuthology/containerized_node.yaml
deleted file mode 100644 (file)
index 0230488..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-overrides:
-  ansible.cephlab:
-    skip_tags: "timezone,nagios,monitoring-scripts,ssh,hostname,pubkeys,zap,sudoers,kerberos,selinux,lvm,ntp-client,resolvconf,packages,cpan,nfs"
-    vars:
-      containerized_node: true
-      ansible_user: root
-      cm_user: root
-      start_rpcbind: false
diff --git a/docs/docker-compose/teuthology/teuthology.sh b/docs/docker-compose/teuthology/teuthology.sh
deleted file mode 100755 (executable)
index 0378f93..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/bash
-set -e
-# We don't want -x yet, in case the private key is sensitive
-if [ -n "$SSH_PRIVKEY_FILE" ]; then
-    echo "$SSH_PRIVKEY" > $HOME/.ssh/$SSH_PRIVKEY_FILE
-fi
-source /teuthology/virtualenv/bin/activate
-set -x
-if [ -n "$TESTNODES" ]; then
-    for node in $(echo $TESTNODES | tr , ' '); do
-        teuthology-update-inventory -m $MACHINE_TYPE $node
-    done
-    CUSTOM_CONF=${CUSTOM_CONF:-}
-else
-    CUSTOM_CONF=/teuthology/containerized_node.yaml
-fi
-export MACHINE_TYPE=${MACHINE_TYPE:-testnode}
-if [ -z "$TEUTHOLOGY_WAIT" ]; then
-    if [ -n "$TEUTH_BRANCH" ]; then
-      TEUTH_BRANCH_FLAG="--teuthology-branch $TEUTH_BRANCH"
-    fi
-    teuthology-suite -v \
-        $TEUTH_BRANCH_FLAG \
-        --ceph-repo https://github.com/ceph/ceph.git \
-        --suite-repo https://github.com/ceph/ceph.git \
-        -c main \
-        -m $MACHINE_TYPE \
-        --limit 1 \
-        -n 100 \
-        --suite teuthology:no-ceph \
-        --filter-out "libcephfs,kclient,stream,centos,rhel" \
-        -d ubuntu -D 20.04 \
-        --suite-branch main \
-        --subset 9000/100000 \
-        -p 75 \
-        --seed 349 \
-        --force-priority \
-        $CUSTOM_CONF
-    DISPATCHER_EXIT_FLAG='--exit-on-empty-queue'
-    teuthology-queue -m $MACHINE_TYPE -s | \
-      python3 -c "import sys, json; assert json.loads(sys.stdin.read())['count'] > 0, 'queue is empty!'"
-fi
-teuthology-dispatcher -v \
-    --log-dir /teuthology/log \
-    --tube $MACHINE_TYPE \
-    $DISPATCHER_EXIT_FLAG