Merge pull request #11329 from mvdbeek/drop_docker_testing_image

Drop docker testing image
This commit is contained in:
Dannon
2021-02-09 12:45:56 -05:00
committed by GitHub
28 changed files with 0 additions and 748 deletions
-1
View File
@@ -1 +0,0 @@
api
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
./run_tests.sh --dockerize --db postgres --clean_pyc --skip_flakey_fails -api "$@"
-1
View File
@@ -1 +0,0 @@
framework
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
./run_tests.sh --dockerize --db postgres --clean_pyc --framework "$@"
-1
View File
@@ -1 +0,0 @@
integration
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
DOCKER_RUN_EXTRA_ARGS="--privileged" ./run_tests.sh --dockerize --db postgres --clean_pyc --integration "$@"
-1
View File
@@ -1 +0,0 @@
main-tools
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
./run_tests.sh --dockerize --db postgres --clean_pyc -main "$@"
-24
View File
@@ -1,24 +0,0 @@
FROM toolshed/requirements
LABEL maintainer="John Chilton <jmchilton@gmail.com>"
RUN apt-get -qq update && \
apt-get install --no-install-recommends -y postgresql-client python-pip libffi-dev python-cffi && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV GALAXY_ROOT=/galaxy \
GALAXY_CONFIG_OVERRIDE_ADMIN_USERS=admin@galaxy.org,test@bx.psu.edu \
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DATASET_PURGE=true \
GALAXY_CONFIG_OVERRIDE_ALLOW_LIBRARY_PATH_PASTE=true \
GALAXY_CONFIG_OVERRIDE_ENABLE_BETA_WORKFLOW_MODULES=true \
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DELETION=true \
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION=postgresql://postgres@postgres/galaxy \
GALAXY_CONFIG_OVERRIDE_MASTER_API_KEY=94a548bea347a35e457a804bf75bec53 \
GALAXY_CONFIG_OVERRIDE_JOB_CONFIG_FILE=/galaxy/config/job_conf.xml.sample_basic \
GALAXY_CONFIG_OVERRIDE_DATATYPES_CONFIG_FILE=/galaxy/test/functional/tools/sample_datatypes_conf.xml \
GALAXY_CONFIG_OVERRIDE_TOOL_CONFIG_FILE=/galaxy/test/functional/tools/samples_tool_conf.xml \
GALAXY_CONFIG_FILE=/galaxy/.ci/jenkins/selenium/galaxy.ini \
GALAXY_VIRTUAL_ENV=/galaxy_env
ADD run_galaxy.bash /run_galaxy.bash
EXPOSE 8080
CMD /run_galaxy.bash
@@ -1,21 +0,0 @@
version: '2'
services:
postgres:
image: postgres
galaxy:
build: .
image: ubuntu
volumes:
- "${TARGET_ROOT}:${TARGET_PATH}"
links:
- postgres
ports:
- "${GALAXY_PORT}:8080"
environment:
GALAXY_TEST_UID: "${MY_UID}"
selenium:
image: selenium/standalone-chrome:3.5.2
ports:
- "${SELENIUM_PORT}:4444"
links:
- galaxy
-17
View File
@@ -1,17 +0,0 @@
[server:main]
use = egg:Paste#http
port = 8080
host = 0.0.0.0
use_threadpool = True
threadpool_kill_thread_limit = 10800
[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /galaxypf
[app:main]
paste.app_factory = galaxy.web.buildapp:app_factory
filter-with = proxy-prefix
@@ -1,39 +0,0 @@
#!/bin/bash
set -e
# Same hacks to setup a Galaxy user as used in test/docker/base/run_test_wrapper.sh
# We want to make sure Galaxy runs as the same user as the external user so the files have the correct permission.
echo "Deleting galaxy user - it may not exist and this is fine."
deluser galaxy | true
: ${GALAXY_TEST_UID:-"1"}
echo "Creating galaxy group with gid $GALAXY_TEST_UID - it may already exist and this is fine."
groupadd -r galaxy -g "$GALAXY_TEST_UID" | true
echo "Creating galaxy user with uid $GALAXY_TEST_UID - it may already exist and this is fine."
useradd -u $GALAXY_TEST_UID -r -g galaxy -d /home/galaxy -c "Galaxy User" galaxy -s /bin/bash | true
echo "Setting galaxy user password - the operation may fail."
echo "galaxy:galaxy" | chpasswd | true
virtualenv "$GALAXY_VIRTUAL_ENV"
chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" "$GALAXY_VIRTUAL_ENV"
cd /galaxy
sudo -E -H -u "#${GALAXY_TEST_UID}" ./scripts/common_startup.sh || { echo "common_startup.sh failed"; exit 1; }
echo "Waiting for postgres to become available"
while ! nc -z postgres 5432;
do
sleep 1
printf "."
done
echo "Creating postgres database for Galaxy"
createdb -w -U postgres -h postgres galaxy
echo "Starting and waiting for Galaxy daemon(s)"
sudo -E -H -u "#${GALAXY_TEST_UID}" GALAXY_RUN_ALL=1 bash "$GALAXY_ROOT/run.sh" --daemon --wait
echo "Galaxy daemon ready, monitoring Galaxy logs"
tail -f "$GALAXY_ROOT/main.log"
-124
View File
@@ -1,124 +0,0 @@
#!/bin/bash
TEST_DIRECTORY=`dirname $0`
DEFAULT_COMPOSE_PROJECT_NAME=`basename $TEST_DIRECTORY`
COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-$DEFAULT_COMPOSE_PROJECT_NAME}
# If in Jenkins environment, append ${BUILD_NUMBER} to project so builds don't interfer.
if [ ! -z "$BUILD_NUMBER" ];
then
COMPOSE_PROJECT_NAME="${COMPOSE_PROJECT_NAME}${BUILD_NUMBER}"
fi
export COMPOSE_PROJECT_NAME
echo "Running Jenkins test from $TEST_DIRECTORY with compose project name $COMPOSE_PROJECT_NAME"
find lib -iname '*pyc' -exec rm -rf {} \;
find test -iname '*pyc' -exec rm -rf {} \;
./scripts/common_startup.sh --dev-wheels
. .venv/bin/activate
pip install docker-compose
# TODO: Let docker-compose pick these at random.
export GALAXY_PORT=`python -c 'from __future__ import print_function; import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'`
export SELENIUM_PORT=`python -c 'from __future__ import print_function; import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'`
export TARGET_ROOT=`pwd`
export TARGET_PATH=/galaxy
export MY_UID=$(id -u)
cd $TEST_DIRECTORY
echo "Cleaning up previous executions if needed."
docker-compose down | true
docker-compose build galaxy
docker-compose up -d
function tear_down {
docker-compose down
}
trap tear_down EXIT
for service_name in postgres galaxy selenium
do
echo "Waiting on service ${service_name}"
while true
do
if docker ps | grep -q "${COMPOSE_PROJECT_NAME}_${service_name}"
then
container_id=`docker ps | grep "${COMPOSE_PROJECT_NAME}_${service_name}" | cut -d " " -f 1`
eval "${service_name}_container_id=${container_id}"
echo "Service ${service_name} ready - with container ID ${container_id}"
break
fi
printf "."
sleep 1;
done
done
if [ "$1" = "--debug-running-containers" ];
then
env
exit 0
fi
export GALAXY_TEST_EXTERNAL="http://localhost:$GALAXY_PORT/"
echo "Waiting on docker-compose managed Galaxy server - $GALAXY_TEST_EXTERNAL."
while ! curl -s "$GALAXY_TEST_EXTERNAL";
do
for service_name in postgres galaxy selenium
do
if ! docker ps | grep -q "${COMPOSE_PROJECT_NAME}_${service_name}"
then
echo "Service ${service_name} stopped before Galaxy came up, exiting and halting containers."
for service_name in postgres galaxy selenium
do
container_id_var="${service_name}_container_id"
container_id="${!container_id_var}"
echo "Dumping logs for $service_name container (${container_id})..."
echo "---"
docker logs "${container_id}"
echo "---"
done
exit 1
fi
done
printf "."
sleep 4;
done;
# Access Selenium on localhost via port $SELENIUM_PORT
export GALAXY_TEST_SELENIUM_REMOTE=1
export GALAXY_TEST_SELENIUM_REMOTE_PORT="${SELENIUM_PORT}"
# Retry all failed Selenium tests a second time to deal
# with transiently failing tests. Failure information for
# first tests is still populated in database/test_errors
# and available at the top of the Jenkins test report.
export GALAXY_TEST_SELENIUM_RETRIES=1
# Access Galaxy on localhost via port $GALAXY_PORT
export GALAXY_TEST_PORT="${GALAXY_PORT}"
# Have Selenium access Galaxy at this URL
export GALAXY_TEST_EXTERNAL_FROM_SELENIUM="http://galaxy:8080/galaxypf"
export GALAXY_TEST_EXTERNAL="http://localhost:${GALAXY_TEST_PORT}/galaxypf"
# Point tests at the Master API Key configured in the Dockerfile.
export GALAXY_CONFIG_MASTER_API_KEY=94a548bea347a35e457a804bf75bec53
cd ../../..
./run_tests.sh --selenium "$@"
exit_code=$?
cd $TEST_DIRECTORY
exit $exit_code
-1
View File
@@ -1 +0,0 @@
selenium
-26
View File
@@ -1,26 +0,0 @@
#!/bin/bash
# Enable retries on tests to reduce chances of transient failures.
: ${GALAXY_TEST_SELENIUM_RETRIES:=1}
# If in Jenkins environment, use it for artifacts.
if [ -n "$BUILD_NUMBER" ];
then
: ${GALAXY_TEST_ERRORS_DIRECTORY:=${BUILD_NUMBER}-test-errors}
: ${GALAXY_TEST_SCREENSHOTS_DIRECTORY:=${BUILD_NUMBER}-test-screenshots}
else
: ${GALAXY_TEST_ERRORS_DIRECTORY:=database/test-errors}
: ${GALAXY_TEST_SCREENSHOTS_DIRECTORY:=database/test-screenshots}
fi
mkdir -p "$GALAXY_TEST_ERRORS_DIRECTORY"
mkdir -p "$GALAXY_TEST_SCREENSHOTS_DIRECTORY"
mkdir -p ~/.jenkins-yarn-cache
YARN_CACHE_FOLDER=~/.jenkins-yarn-cache
# Start Selenium server in the test Docker container.
DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} --shm-size=2g -v $YARN_CACHE_FOLDER:$YARN_CACHE_FOLDER -e YARN_CACHE_FOLDER=$YARN_CACHE_FOLDER -e USE_SELENIUM=1 -e GALAXY_TEST_SELENIUM_RETRIES=${GALAXY_TEST_SELENIUM_RETRIES} -e GALAXY_TEST_ERRORS_DIRECTORY=${GALAXY_TEST_ERRORS_DIRECTORY} -e GALAXY_TEST_SCREENSHOTS_DIRECTORY=${GALAXY_TEST_SCREENSHOTS_DIRECTORY}"
export DOCKER_RUN_EXTRA_ARGS
./run_tests.sh --dockerize --db postgres --clean_pyc --skip_flakey_fails --selenium "$@"
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
./run_tests.sh --dockerize --db postgres --clean_pyc --toolshed "$@"
-61
View File
@@ -162,10 +162,6 @@ Extra options:
functional tests).
--skip-venv Do not create .venv (passes this flag to
common_startup.sh)
--dockerize Run tests in a pre-configured Docker container (must be
first argument if present).
--db <type> For use with --dockerize, run tests using partially
migrated 'postgres', 'mysql', or 'sqlite' databases.
--external_url External URL to use for Galaxy testing (only certain
tests).
--external_master_key Master API key used to configure external tests.
@@ -270,8 +266,6 @@ exists() {
type "$1" >/dev/null 2>/dev/null
}
DOCKER_DEFAULT_IMAGE='galaxy/testing-base:20.05.00'
test_script="./scripts/functional_tests.py"
report_file="run_functional_tests.html"
coverage_arg=""
@@ -285,61 +279,6 @@ else
skip_client_build=""
fi
if [ "$1" = "--dockerize" ];
then
shift
DOCKER_EXTRA_ARGS=${DOCKER_ARGS:-""}
DOCKER_RUN_EXTRA_ARGS=${DOCKER_RUN_EXTRA_ARGS:-""}
DOCKER_IMAGE=${DOCKER_IMAGE:-${DOCKER_DEFAULT_IMAGE}}
db_type="sqlite"
while [ $# -gt 0 ]; do
case "$1" in
--python3)
DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} -e GALAXY_VIRTUAL_ENV=/galaxy_venv3"
shift 1
;;
--db)
db_type=$2
shift 2
;;
*)
break
;;
esac
done
# Skip client build process in the Docker container for all tests except Selenium
GALAXY_SKIP_CLIENT_BUILD=1
case "$*" in
*-selenium*)
GALAXY_SKIP_CLIENT_BUILD=0
;;
esac
MY_UID=$(id -u)
DOCKER_RUN_EXTRA_ARGS="${DOCKER_RUN_EXTRA_ARGS} -e GALAXY_TEST_UID=${MY_UID} -e GALAXY_SKIP_CLIENT_BUILD=${GALAXY_SKIP_CLIENT_BUILD}"
echo "Docker version:"
docker --version
echo "Launching docker container for testing with extra args ${DOCKER_RUN_EXTRA_ARGS}..."
name=$(python -c 'import re; import uuid; print(re.sub("-", "", str(uuid.uuid4())))')
# Create a cache dir for pip, so it has the right owner
DOCKER_PIP_CACHE_DIR="$HOME"/.cache/docker_galaxy_pip
mkdir -p "$DOCKER_PIP_CACHE_DIR"
_on_exit() {
docker kill "$name"
}
trap _on_exit 0
docker $DOCKER_EXTRA_ARGS run $DOCKER_RUN_EXTRA_ARGS \
-e "BUILD_NUMBER=$BUILD_NUMBER" \
-e "GALAXY_TEST_DATABASE_TYPE=$db_type" \
-e "LC_ALL=C" \
-e "PIP_CACHE_DIR=/pip_cache_dir" \
--rm \
--name="$name" \
-v "$DOCKER_PIP_CACHE_DIR":/pip_cache_dir \
-v "$(pwd)":/galaxy \
-v "$(pwd)"/test/docker/base/run_test_wrapper.sh:/usr/local/bin/run_test_wrapper.sh "$DOCKER_IMAGE" "$@"
exit $?
fi
# If in Jenkins environment, create xunit-${BUILD_NUMBER}.xml by default.
if [ -n "$BUILD_NUMBER" ];
then
-40
View File
@@ -1,40 +0,0 @@
## Overview
Setup Docker environment for use with testing using the following
commands.
% cd test/docker/base
% docker build -t galaxy/testing-base .
Alternatively, this can be fetched from [Dockerhub](https://hub.docker.com/).
% docker pull galaxy/testing-base
The resulting docker container is ready to run most of Galaxy tests
(functional tests for specific bioinformatics tools may still fail for
now until they are migrated out of Galaxy and to the tool shed).
## Tagging a New Image
The Galaxy team maintains a password store that contains the password
for the Galaxy user on Docker Hub. Docker Hub can be used to trigger a
manual build against the dev branch. Once built, it can be pulled,
tagged, and tested as follows:
% docker pull galaxy/testing-base:latest # notice latest digest
% docker tag <digest> galaxy/testing-base:<version>
% export DOCKER_IMAGE=galaxy/testing-base:<version>
% ./run_tests.sh --dockerize --api # or whatever test suite you wish
Once verified, the tag must be pushed back to Docker Hub with:
% docker login # Put in galaxy as the username and the secret password
% docker push galaxy/testing-base:<version>
The version should be the next dot release with the current dev Galaxy
version as the major and minor release (e.g. 17.01 from Galaxy and .0
for the first published image - so 17.01.0, .1 for the second published
image - so 17.01.1, etc...).
A pull request to Galaxy updating the default Docker image to target should
be made.
-137
View File
@@ -1,137 +0,0 @@
FROM ubuntu:18.04
LABEL maintainer="John Chilton <jmchilton@gmail.com>"
ARG CHROME_VERSION="google-chrome-beta"
ARG CHROME_DRIVER_VERSION="2.38"
# TODO: merge with first ENV statement.
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
MYSQL_MAJOR=5.7 \
POSTGRES_MAJOR=9.5 \
GALAXY_ROOT=/galaxy \
GALAXY_VIRTUAL_ENV=/galaxy_venv \
LC_ALL=C.UTF-8
# Pre-install a bunch of packages to speed up ansible steps.
RUN apt-get update -y && apt-get install -y software-properties-common apt-transport-https curl && \
apt-add-repository -y ppa:ansible/ansible && \
curl -s https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \
apt-get update -y && \
apt-get install -y --no-install-recommends postgresql postgresql-client ansible wget \
python3-dev \
git-core \
rsync swig sysstat unzip \
openssl \
bzip2 \
ca-certificates \
openjdk-8-jre-headless \
tzdata \
sudo \
locales \
xvfb \
${CHROME_VERSION:-google-chrome-stable} \
libnss3 libgconf-2-4 && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /tmp/ansible && \
mkdir -p /opt/galaxy/db && \
chown -R postgres:postgres /opt/galaxy/db
ADD ansible_vars.yml /tmp/ansible/ansible_vars.yml
ADD provision.yml /tmp/ansible/provision.yml
RUN mkdir /etc/galaxy && cd /tmp/ansible && mkdir roles && \
mkdir roles/galaxyprojectdotorg.galaxy-os && \
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-os/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-os && \
mkdir roles/galaxyprojectdotorg.cloudman-database && \
wget --quiet -O- https://github.com/galaxyproject/ansible-cloudman-database/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.cloudman-database && \
mkdir roles/galaxyprojectdotorg.galaxy && \
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy && \
mkdir roles/galaxyprojectdotorg.galaxy-extras && \
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-extras/archive/dynamic_uwsgi_config.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-extras && \
mkdir roles/galaxyprojectdotorg.galaxy-toolshed && \
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-toolshed/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-toolshed && \
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=image -c local -e "@ansible_vars.yml" && \
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=database -c local -e "@ansible_vars.yml" && \
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=galaxy -c local -e "@ansible_vars.yml" && \
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=toolshed -c local -e "@ansible_vars.yml" && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd $GALAXY_ROOT && \
virtualenv -p /usr/bin/python3 $GALAXY_VIRTUAL_ENV && \
./scripts/common_startup.sh --dev-wheels && \
$GALAXY_VIRTUAL_ENV/bin/pip install psycopg2-binary && \
rm -rf ~/.cache/pip
#========================================
# Add Selenium user with passwordless sudo
#========================================
RUN useradd seluser \
--shell /bin/bash \
--create-home \
&& usermod -a -G sudo seluser \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'seluser:secret' | chpasswd
USER seluser
#==========
# Selenium
#==========
RUN sudo mkdir -p /opt/selenium \
&& sudo chown seluser:seluser /opt/selenium \
&& wget --no-verbose https://selenium-release.storage.googleapis.com/3.6/selenium-server-standalone-3.6.0.jar \
-O /opt/selenium/selenium-server-standalone.jar
USER root
#==============================
# Scripts to run Selenium Node
#==============================
COPY selenium/entry_point.sh selenium/functions.sh selenium/wrap_chrome_binary selenium/generate_config /opt/bin/
RUN /opt/bin/wrap_chrome_binary
USER seluser
RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE); else echo $CHROME_DRIVER_VERSION; fi) \
&& echo "Using chromedriver version: "$CD_VERSION \
&& wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CD_VERSION/chromedriver_linux64.zip \
&& rm -rf /opt/selenium/chromedriver \
&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
&& rm /tmp/chromedriver_linux64.zip \
&& mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CD_VERSION \
&& chmod 755 /opt/selenium/chromedriver-$CD_VERSION \
&& sudo ln -fs /opt/selenium/chromedriver-$CD_VERSION /usr/bin/chromedriver
RUN /opt/bin/generate_config > /opt/selenium/config.json
#============================
# Some configuration options
#============================
ENV SCREEN_WIDTH=1360 \
SCREEN_HEIGHT=1020 \
SCREEN_DEPTH=24 \
DISPLAY=:99.0 \
NODE_MAX_INSTANCES=1 \
NODE_MAX_SESSION=1 \
NODE_PORT=5555 \
NODE_REGISTER_CYCLE=5000 \
NODE_POLLING=5000 \
NODE_UNREGISTER_IF_STILL_DOWN_AFTER=60000 \
NODE_DOWN_POLLING_LIMIT=2 \
NODE_APPLICATION_NAME="" \
DBUS_SESSION_BUS_ADDRESS=/dev/null
USER root
ADD run_test_wrapper.sh /usr/local/bin/run_test_wrapper.sh
EXPOSE 9009
EXPOSE 8080
EXPOSE 80
ENTRYPOINT ["/bin/bash", "/usr/local/bin/run_test_wrapper.sh"]
-50
View File
@@ -1,50 +0,0 @@
---
add_system_users: no
galaxyFS_base_dir: /opt/galaxy
# TODO: use GALAXY_ROOT via cmd line instead
galaxy_server_dir: "/galaxy"
galaxy_venv_dir: "/galaxy_venv"
galaxy_vcs: git
galaxy_git_repo: https://github.com/galaxyproject/galaxy.git
galaxy_changeset_id: dev
galaxy_download_url: https://codeload.github.com/galaxyproject/galaxy/tar.gz/dev
galaxy_manage_clone: no
galaxy_manage_download: yes
galaxy_root: "{{ galaxy_server_dir}}"
galaxy_db_dir: "{{ galaxyFS_base_dir }}/db"
galaxy_db_port: 5930
galaxy_db_log: /tmp/pSQL.log
psql_galaxyftp_password: ignoredthis
galaxy_config_file: "{{ galaxy_server_dir }}/config/galaxy.ini"
configure_docker: no
postgresql_bin_dir: /usr/lib/postgresql/10/bin
galaxy_manage_database: no
# avoid some packages unneeded packages install by ansible-galaxy-os
install_maintainance_packages: false
galaxy_user_name: "root"
galaxy_extras_install_packages: true
galaxy_job_conf_path: "/etc/galaxy/job_conf.xml"
galaxy_build_client: no
galaxy_virtualenv_python: python3
galaxy_web_processes: 1
galaxy_handler_processes: 2
galaxy_log_dir: "/root"
galaxy_extras_config_nginx: false
galaxy_extras_config_proftpd: false
galaxy_extras_config_slurm: true
galaxy_extras_config_supervisor: false
galaxy_extras_config_galaxy_root: false
galaxy_extras_config_galaxy_job_metrics: false
galaxy_extras_config_uwsgi: false
manage_shed_db: yes
galaxy_toolshed_manage_static_setup: yes
galaxy_toolshed_manage_database: no
galaxy_toolshed_server_dir: "/galaxy"
galaxy_toolshed_venv_dir: "{{ galaxy_venv_dir }}"
galaxy_toolshed_config_file: "{{ galaxy_toolshed_server_dir }}/config/tool_shed.ini"
galaxy_toolshed_config_templates:
- {dest: '{{ galaxy_toolshed_config_file }}', src: tool_shed.ini.j2}
-16
View File
@@ -1,16 +0,0 @@
- hosts: localhost
connection: local
roles:
- role: galaxyprojectdotorg.galaxy-os
become: true
tags: image
- role: galaxyprojectdotorg.cloudman-database
become: true
become_user: postgres
tags: database
- role: galaxyprojectdotorg.galaxy
become: true
tags: galaxy
- role: galaxyprojectdotorg.galaxy-toolshed
become: true
tags: toolshed
-98
View File
@@ -1,98 +0,0 @@
#!/bin/bash
set -e
if [ -n "$USE_SELENIUM" ]; then
# Start Selenium.
sudo -E -H -u seluser /opt/bin/entry_point.sh &
fi
echo "Deleting galaxy user - it may not exist and this is fine."
deluser galaxy || true
: "${GALAXY_TEST_UID:=1}"
: "${GALAXY_VIRTUAL_ENV:=/galaxy_venv}"
echo "Creating galaxy group with gid $GALAXY_TEST_UID - it may already exist and this is fine."
groupadd -r galaxy -g "$GALAXY_TEST_UID" || true
echo "Creating galaxy user with uid $GALAXY_TEST_UID - it may already exist and this is fine."
useradd -u $GALAXY_TEST_UID -r -g galaxy -d /home/galaxy -c "Galaxy User" galaxy -s /bin/bash || true
echo "Setting galaxy user password - the operation may fail."
echo "galaxy:galaxy" | chpasswd || true
chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" "$GALAXY_VIRTUAL_ENV"
: "${GALAXY_TEST_DATABASE_TYPE:=postgres}"
if [ "$GALAXY_TEST_DATABASE_TYPE" = "postgres" ]; then
echo "Starting postgres and then sleeping for 3 seconds"
su -c '/usr/lib/postgresql/10/bin/pg_ctl -o "-F" start -D /opt/galaxy/db' postgres
sleep 3
GALAXY_TEST_INSTALL_DB_MERGED="true"
GALAXY_TEST_DBURI="postgresql://root@localhost:5930/galaxy?client_encoding=utf8"
TOOL_SHED_TEST_DBURI="postgresql://root@localhost:5930/toolshed?client_encoding=utf8"
export GALAXY_CONFIG_OVERRIDE_DATABASE_ENCODING="UTF-8"
elif [ "$GALAXY_TEST_DATABASE_TYPE" = "sqlite" ]; then
GALAXY_TEST_INSTALL_DB_MERGED="true"
GALAXY_TEST_DBURI="sqlite:////opt/galaxy/galaxy.sqlite"
TOOL_SHED_TEST_DBURI="sqlite:////opt/galaxy/toolshed.sqlite"
chown -R "$GALAXY_TEST_UID:$GALAXY_TEST_UID" /opt/galaxy
else
echo "Unknown database type '$GALAXY_TEST_DATABASE_TYPE'"
exit 1
fi
export GALAXY_TEST_DBURI
export TOOL_SHED_TEST_DBURI
export GALAXY_TEST_INSTALL_DB_MERGED
cd /galaxy
echo "Running common startup for updated dependencies (if any)"
sudo -E -H -u "#${GALAXY_TEST_UID}" ./scripts/common_startup.sh --dev-wheels || { echo "common_startup.sh failed"; exit 1; }
# Ensure Selenium is running before starting tests.
if [ -n "$USE_SELENIUM" ]; then
while ! curl -s "http://localhost:4444";
do
printf "."
sleep 4;
done;
GALAXY_TEST_SELENIUM_REMOTE=1
GALAXY_TEST_SELENIUM_REMOTE_HOST=localhost
GALAXY_TEST_SELENIUM_REMOTE_PORT=4444
export GALAXY_TEST_SELENIUM_REMOTE
export GALAXY_TEST_SELENIUM_REMOTE_HOST
export GALAXY_TEST_SELENIUM_REMOTE_PORT
fi
if [ -z "$GALAXY_NO_TESTS" ]; then
sudo -E -H -u "#${GALAXY_TEST_UID}" ./run_tests.sh --skip-common-startup $@
else
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION="$GALAXY_TEST_DBURI"
TOOL_SHED_CONFIG_OVERRIDE_DATABASE_CONNECTION="$TOOL_SHED_TEST_DBURI"
: "${GALAXY_CONFIG_MASTER_API_KEY:=testmasterapikey}"
# This is a path baked inside of Docker it seems, so we should support both ini and
# YAML for some time.
: "${GALAXY_CONFIG_FILE:=config/galaxy.ini.sample}"
if [ ! -f "$GALAXY_CONFIG_FILE" ]; then
GALAXY_CONFIG_FILE=config/galaxy.yml.sample
fi
TOOL_SHED_CONFIG_FILE=${GALAXY_CONFIG_FILE:-config/tool_shed.ini.sample}
if [ ! -f "$TOOL_SHED_CONFIG_FILE" ]; then
TOOL_SHED_CONFIG_FILE=config/tool_shed.yml.sample
fi
GALAXY_CONFIG_CHECK_MIGRATE_TOOLS=false
: "${GALAXY_CONFIG_JOB_CONFIG_FILE:=config/job_conf.xml.sample}"
: "${GALAXY_CONFIG_FILE_PATH:=/tmp/gx1}"
: "${GALAXY_CONFIG_NEW_FILE_PATH:=/tmp/gxtmp}"
export GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION
export TOOL_SHED_CONFIG_OVERRIDE_DATABASE_CONNECTION
export GALAXY_CONFIG_MASTER_API_KEY
export GALAXY_CONFIG_FILE
export TOOL_SHED_CONFIG_FILE
export GALAXY_CONFIG_CHECK_MIGRATE_TOOLS
export GALAXY_CONFIG_JOB_CONFIG_FILE
export GALAXY_CONFIG_FILE_PATH
export GALAXY_CONFIG_NEW_FILE_PATH
sh run.sh $@
fi
-2
View File
@@ -1,2 +0,0 @@
The files in this directory are from https://github.com/SeleniumHQ/docker-selenium and as such
fall under the Apache Version 2.0 license as described here https://github.com/SeleniumHQ/docker-selenium/blob/master/LICENSE.md.
-1
View File
@@ -1 +0,0 @@
LICENSE
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
#
# IMPORTANT: Change this file only in directory Standalone!
source /opt/bin/functions.sh
export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH"
function shutdown {
kill -s SIGTERM $NODE_PID
wait $NODE_PID
}
if [ ! -z "$SE_OPTS" ]; then
echo "appending selenium options: ${SE_OPTS}"
fi
SERVERNUM=$(get_server_num)
rm -f /tmp/.X*lock
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
${SE_OPTS} &
NODE_PID=$!
trap shutdown SIGTERM SIGINT
wait $NODE_PID
-6
View File
@@ -1,6 +0,0 @@
#!/bin/bash
# https://github.com/SeleniumHQ/docker-selenium/issues/184
function get_server_num() {
echo $(echo $DISPLAY | sed -r -e 's/([^:]+)?:([0-9]+)(\.[0-9]+)?/\2/')
}
-25
View File
@@ -1,25 +0,0 @@
#!/bin/bash
CHROME_VERSION=$(/usr/bin/google-chrome -version | awk '{ print $3 }')
cat <<_EOF
{
"capabilities": [
{
"version": "$CHROME_VERSION",
"browserName": "chrome",
"maxInstances": $NODE_MAX_INSTANCES,
"seleniumProtocol": "WebDriver",
"applicationName": "$NODE_APPLICATION_NAME"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": $NODE_MAX_SESSION,
"port": $NODE_PORT,
"register": true,
"registerCycle": $NODE_REGISTER_CYCLE,
"nodePolling": $NODE_POLLING,
"unregisterIfStillDownAfter": $NODE_UNREGISTER_IF_STILL_DOWN_AFTER,
"downPollingLimit": $NODE_DOWN_POLLING_LIMIT
}
_EOF
@@ -1,13 +0,0 @@
#!/bin/bash
WRAPPER_PATH=$(readlink -f /usr/bin/google-chrome)
BASE_PATH="$WRAPPER_PATH-base"
mv "$WRAPPER_PATH" "$BASE_PATH"
cat > "$WRAPPER_PATH" <<_EOF
#!/bin/bash
# Note: exec -a below is a bashism.
exec -a "\$0" "$BASE_PATH" --no-sandbox "\$@"
_EOF
chmod +x "$WRAPPER_PATH"