Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/buildContainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ jobs:
- name: Execute tests in the running services
run: |
sleep 5
docker compose exec ${{ matrix.plugin }} /bin/bash -c "bash /test_plugin.sh"
fork=`if [[ "${{ matrix.plugin }}" == "qp-deblur" || "${{ matrix.plugin }}" == "qp-target-gene" ]]; then echo "jlab"; else echo "qiita-spots"; fi`
branch=`if [[ "${{ matrix.plugin }}" == "qp-deblur" ]]; then echo "uncouplePlugins"; elif [[ "${{ matrix.plugin }}" == "qp-target-gene" ]]; then echo "uncouplePlugin"; elif [[ "${{ matrix.plugin }}" == "qtp-job-output-folder" ]]; then echo "main"; else echo "master"; fi`
docker compose exec ${{ matrix.plugin }} /bin/bash -c "PLUGIN_FORK=$fork PLUGIN_BRANCH=$branch bash /test_plugin.sh"

- name: Push image to ghcr (only if tests passed)
if: success()
Expand Down
9 changes: 7 additions & 2 deletions Images/qiita/qiita.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ RUN pip install \
psycopg2-binary


# Clone the Qiita Repo
# Clone the Qiita Repo: currently we need the oidc changes from our jlab fork + changes in the tornado_FetchFileFromCentralHandler branch, which send files if requested directly from tornado instead of nginx (happens in testing)
# RUN git clone -b master https://github.com/qiita-spots/qiita.git
RUN git clone -b auth_oidc https://github.com/jlab/qiita.git
RUN git clone -b auth_oidc https://github.com/jlab/qiita.git \
&& cd qiita \
&& git config pull.rebase false \
&& git config --global user.email "jlab@uni-giessen.de" \
&& git config --global user.name "Stefan" && \
git pull origin tornado_FetchFileFromCentralHandler

# should tests re-populate the DB, ensure private plugin, qtp-biom and qp-target-gene use the correct conda env
RUN sed -i "s|'source /home/runner/.profile; conda activate qiita'|'source /opt/conda/etc/profile.d/conda.sh; conda activate /opt/conda/envs/qiita'|" /qiita/qiita_db/support_files/populate_test_db.sql
Expand Down
7 changes: 4 additions & 3 deletions Images/qp-deblur/qp-deblur.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VERSION: 2025.08.22
# VERSION: 2025.09.12

# ==========================
# Stage 1: Build wheels
Expand Down Expand Up @@ -37,7 +37,8 @@ SHELL ["conda", "run", "-p", "/opt/conda/envs/deblur", "/bin/bash", "-c"]
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

RUN git clone -b master https://github.com/qiita-spots/qiita_client.git
# RUN git clone -b master https://github.com/qiita-spots/qiita_client.git
RUN git clone -b enable_pluginprotocol_change https://github.com/jlab/qiita_client.git
RUN sed -i "s/f'Entered BaseQiitaPlugin._register_command({command.name})'/'Entered BaseQiitaPlugin._register_command(%s)' % command.name/" qiita_client/qiita_client/plugin.py
RUN cd qiita_client && pip install --no-cache-dir .

Expand Down Expand Up @@ -130,7 +131,7 @@ RUN cd qiita_client && pip install .

RUN mkdir -p /qiita_server_certificates/
COPY qiita_server_certificates/*_server.* /qiita_server_certificates/
RUN /usr/local/bin/configure_deblur --env-script "true" --server-cert `find /qiita_server_certificates/ -name "*_server.crt" -type f` filesystem
RUN /usr/local/bin/configure_deblur --env-script "true" --server-cert `find /qiita_server_certificates/ -name "*_server.crt" -type f` https
RUN sed -i -E "s/^START_SCRIPT = .+/START_SCRIPT = python \/start_plugin.py qp-deblur/" /unshared_plugins/*.conf

# remove conda command from tigger.py
Expand Down
10 changes: 6 additions & 4 deletions Images/qp-target-gene/qp-target-gene.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VERSION: 2025.08.28
# VERSION: 2025.09.17

# ==========================
# Stage 1: Build wheels
Expand Down Expand Up @@ -44,11 +44,13 @@ RUN python2.7 get-pip2.7.py --force-reinstall

RUN pip install -U pip
#RUN pip install https://github.com/qiita-spots/qiita_client/archive/master.zip
RUN git clone -b master https://github.com/qiita-spots/qiita_client.git
#RUN git clone -b master https://github.com/qiita-spots/qiita_client.git
RUN git clone -b enable_pluginprotocol_change https://github.com/jlab/qiita_client.git

RUN cd /qiita_client && pip install --no-cache-dir .

RUN pip install https://github.com/qiita-spots/qiita-files/archive/master.zip
RUN git clone https://github.com/qiita-spots/qp-target-gene.git
RUN git clone -b uncouplePlugin https://github.com/jlab/qp-target-gene.git
WORKDIR /qp-target-gene
RUN pip install biom-format
RUN pip install -e .
Expand Down Expand Up @@ -127,7 +129,7 @@ RUN export QIITA_ROOTCA_CERT=/unshared_certificates/ci_rootca.crt
COPY qiita_server_certificates/*_server.* /qiita_server_certificates/
RUN sed -i "s|^#\!.*|#\!/usr/bin/python2|" /usr/local/bin/configure_target_gene
RUN sed -i "s|^#\!.*|#\!/usr/bin/python2|" /usr/local/bin/start_target_gene
RUN configure_target_gene --env-script "true" --server-cert `find /qiita_server_certificates/ -name "*_server.crt" -type f`
RUN configure_target_gene --env-script "true" --server-cert `find /qiita_server_certificates/ -name "*_server.crt" -type f` https
RUN sed -i -E "s/^START_SCRIPT = .+/START_SCRIPT = python \/start_plugin.py qp-target-gene/" /unshared_plugins/*.conf

# for testing
Expand Down
11 changes: 10 additions & 1 deletion Images/test_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

echo "plugin to be tested is: '$PLUGIN'"

# by default, clone from master. But can also clone different branches
branch="${PLUGIN_BRANCH:-master}"
# by default, clone from qiita-spots branch. But can also use alternative forks
fork="${PLUGIN_FORK:-qiita-spots}"

# install dependencies
apt-get update
apt-get -y --fix-missing install git
Expand All @@ -13,7 +18,8 @@ fi;

if [ "qp-qiime2" != "$PLUGIN" ]; then
# clone plugin repository
git clone https://github.com/qiita-spots/${PLUGIN}
git clone -b ${branch} https://github.com/${fork}/${PLUGIN};
echo "Clone from '${fork}', branch '${branch}'" 1>&2;
fi;

# NOTE: client api reset only works when communicating with Qitta Master,
Expand Down Expand Up @@ -43,6 +49,9 @@ done
export QIITA_PORT=21174
export QIITA_ROOTCA_CERT=$SSL_CERT_FILE

# either (old) plugins ignore this at all OR adapted plugins switch to https file transfer
export QIITA_PLUGINCOUPLING=https

# change into plugin source directory and execute actual tests
if [ "qp-qiime2" == "$PLUGIN" ]; then
source /opt/conda/etc/profile.d/conda.sh; conda activate /opt/conda/envs/qiime2; cd ${PLUGIN} && pytest;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Howto start-up qiita through docker compose
## Howto start-up qiita through docker compose
Note: this does currently **not** work with podman :-( So strictly stick to docker here.

1. We assume you operate on your local computer, i.e. not within the BCF cluster as you won't have docker, on a Ubuntu/Mint like OS. You will need approx. 55 GB free disk space.
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ services:
# tty: true
restart: no
volumes:
- qiita-data:/qiita_data
#- qiita-data:/qiita_data
- ./references/qiita_server_certificates:/qiita_server_certificates
- ./references/qp-deblur:/opt/conda/envs/deblur/share/fragment-insertion/ref
#- ./src/qtp-biom:/qtp-biom:U
Expand Down
6 changes: 3 additions & 3 deletions compose_github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ services:
# tty: true
restart: no
volumes:
- qiita-data:/qiita_data
#- qiita-data:/qiita_data
- ./references/qiita_server_certificates:/qiita_server_certificates
- test_tmp_dir:/tmp
- ./references/qp-target-gene:/databases/gg/13_8/rep_set
Expand Down Expand Up @@ -261,7 +261,7 @@ services:
command: ['./start_qp-deblur.sh']
restart: no
volumes:
- qiita-data:/qiita_data
# - qiita-data:/qiita_data
- ./references/qiita_server_certificates:/qiita_server_certificates
- ./references/qp-deblur:/opt/conda/envs/deblur/share/fragment-insertion/ref
- test_tmp_dir:/tmp
Expand Down Expand Up @@ -349,4 +349,4 @@ volumes:
server-plugin-configs: # a shared directory on qiita server side (master and workers) to collect qiita plugin configuration files
qiita-logs:
test_tmp_dir: # many of plugin tests are written under the assumption that they are executed on same machine as qiita main and thus share /tmp - which is not the case in our docker compose scenario!