Commit e7ef4912 authored by Julian Gründner's avatar Julian Gründner

feat: update to newest version and improve install scripts

parent ece403b5
Pipeline #5492 failed with stages
in 11 seconds
......@@ -47,12 +47,14 @@ createInstallPackages:
stage: build
script:
- export VERSION=$(cat .VERSION)
- sh -c "cd deploy && ./create_install_packages.sh $VERSION"
- sh -c "cd deploy && ./create_install_packages.sh v$VERSION"
artifacts:
paths:
- ./deploy/*.tgz
- .VERSION
expire_in: 1 day
except:
- tags
deployInstallPackages:
stage: deploy
......@@ -60,7 +62,9 @@ deployInstallPackages:
- createInstallPackages
script:
- export VERSION=$(cat .VERSION)
- sh -c "cd deploy && ./deploy_install_packages.sh $VERSION"
- sh -c "cd deploy && ./deploy_install_packages.sh v$VERSION"
except:
- tags
create project release:
image: docker.miracum.org/miracum-devops/semantic-release
......
......@@ -16,7 +16,7 @@ services:
rstudio:
container_name: ds_rstudio
restart: unless-stopped
image: docker.miracum.org/datashield_miracum/ds_analysis:v0.7.5
image: docker.miracum.org/datashield_miracum/ds_analysis:v0.8.0
environment:
- RSTUDIO_USERS=${RSTUDIO_USERS}
volumes:
......
......@@ -10,6 +10,10 @@ mkdir -p $QP_DATA_DIR
mkdir -p /etc/dsqp/auth
mkdir -p /etc/dsqp/scripts
cp $QP_HOME_DIR/.env /etc/dsqp/.env
cp $QP_HOME_DIR/docker-compose.yml /etc/dsqp/docker-compose.yml
cp $QP_HOME_DIR/start.sh /etc/dsqp/start.sh
cp $QP_HOME_DIR/stop.sh /etc/dsqp/stop.sh
cp $QP_HOME_DIR/update.sh /etc/dsqp/update.sh
cp -R $QP_HOME_DIR/auth/* /etc/dsqp/auth
cp -R $QP_HOME_DIR/scripts/* /etc/dsqp/scripts
......
......@@ -2,15 +2,31 @@
source .env
VERSION=$1
QP_HOME_DIR=${QP_HOME_DIR:-"$HOME/ds_deployment"}
QP_HOME_DIR=$2
if [ -n "$VERSION" ]; then
wget -N "https://gitlab.miracum.org/miracum-uc2-datashield/ds_develop/tree/$VERSION/deploy/analysis/docker-compose.yml"
wget -N "https://gitlab.miracum.org/miracum/uc2/datashield/ds_develop/tree/$VERSION/deploy/analysis/docker-compose.yml"
elif [ -n "$QP_HOME_DIR" ]; then
printf "****\n no version specified updating with data from this folder \n"
printf "****\n note that config and data files will be kept - if config files have changed you have to transfer them manually\n"
printf "**** Creating directories and copying files...\n\n"
mkdir -p $QP_DATA_DIR
mkdir -p /etc/dsqp/scripts
cp $QP_HOME_DIR/docker-compose.yml /etc/dsqp/docker-compose.yml
cp $QP_HOME_DIR/start.sh /etc/dsqp/start.sh
cp $QP_HOME_DIR/stop.sh /etc/dsqp/stop.sh
cp $QP_HOME_DIR/update.sh /etc/dsqp/update.sh
cp -R $QP_HOME_DIR/scripts/* /etc/dsqp/scripts
else
printf "**** no version specified just restarting servers\n\n"
printf "\n no version and no install dir given => not doing anything"
exit()
fi
cd /etc/dsqp
docker-compose down
docker-compose up -d
......
......@@ -4,7 +4,7 @@ services:
opal:
container_name: datashield_opal
restart: unless-stopped
image: docker.miracum.org/datashield_miracum/ds_opal:v0.7.5
image: docker.miracum.org/datashield_miracum/ds_opal:v0.8.0
ports:
- "443:8443"
networks:
......@@ -38,7 +38,7 @@ services:
poll_server:
container_name: poll_server
restart: unless-stopped
image: docker.miracum.org/datashield_miracum/ds_poll:v0.8.0
image: docker.miracum.org/datashield_miracum/ds_poll:v0.9.1
environment:
- POLL_QUEUE_SERVER=${POLL_QUEUE_SERVER}
- POLL_OPAL_SERVER=${POLL_OPAL_SERVER}
......
#!/bin/bash
source .env
VERSION=$1
QP_HOME_DIR=$2
if [ -n "$VERSION" ]; then
wget -N "https://gitlab.miracum.org/miracum-uc2-datashield/ds_develop/tree/$VERSION/deploy/opal_poll/docker-compose.yml"
wget -N "https://gitlab.miracum.org/miracum/uc2/datashield/ds_develop/tree/$VERSION/deploy/opal_poll/docker-compose.yml"
elif [ -n "$QP_HOME_DIR" ]; then
printf "****\n no version specified updating with data from this folder \n"
printf "****\n note that config and data files will be kept - if config files have changed you have to transfer them manually\n"
printf "**** Creating directories and copying files...\n\n"
mkdir -p $QP_DATA_DIR
mkdir -p /etc/dsqp/miracum_users
mkdir -p /etc/dsqp/scripts
cp $QP_HOME_DIR/docker-compose.yml /etc/dsqp/docker-compose.yml
cp $QP_HOME_DIR/start.sh /etc/dsqp/start.sh
cp $QP_HOME_DIR/stop.sh /etc/dsqp/stop.sh
cp $QP_HOME_DIR/update.sh /etc/dsqp/update.sh
cp -R $QP_HOME_DIR/scripts/* /etc/dsqp/scripts
else
printf "\n no version given => not updating"
printf "\n no version and no install dir given => not doing anything"
exit()
fi
cd /etc/dsqp
docker-compose down
docker-compose up -d
printf "\n - visit your server IP or domain + port 8787 in your browser to access the analysis client \n"
printf "\n the first time opal starts it takes a while to be ready as we are loading test data and configuring the servers for you, so please be patient\n"
printf "\n - visit $OPAL_SERVER_IP:8443 in your browser to access the poll server user interface \n"
......
......@@ -3,6 +3,7 @@
QP_HOME_DIR=
QP_DATA_DIR=/opt/dsqp
LOG_LEVEL=20
## Timeout
# TIMEOUT_QUEUE_AND_POLL sets the timeout for the queue
......
......@@ -4,7 +4,7 @@ services:
nginx_queue:
container_name: nginx_queue
restart: unless-stopped
image: docker.miracum.org/datashield_miracum/nginx_queue:v0.7.5
image: docker.miracum.org/datashield_miracum/nginx_queue:v0.8.4
ports:
- "443:8443"
networks:
......@@ -18,15 +18,16 @@ services:
- /etc/dsqp/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
queue_server:
container_name: queue_server_prod
container_name: queue_server
restart: unless-stopped
image: docker.miracum.org/datashield_miracum/ds_queue:v0.7.5
image: docker.miracum.org/datashield_miracum/ds_queue:v0.8.4
volumes:
- ${QP_DATA_DIR}/queue_logging:/home/dsqueue/ds_queue/logging
- /etc/dsqp/auth/queue.pem:/root/ds_queue/cert/do_cert/queue.pem
environment:
- TIMEOUT_QUEUE_AND_POLL=${TIMEOUT_QUEUE_AND_POLL} # define timeout for requests
- ALLOWED_IPS=${ALLOWED_IPS}
- LOG_LEVEL='-l 1' # define log level
- LOG_LEVEL=${LOG_LEVEL} # define log level
networks:
- queue_net
......
......@@ -17,6 +17,7 @@ fi
printf "**** Creating directory /etc/dsqp for config files and copying unzipped config files to /etc/dsqp directory ...\n\n"
mkdir -p /etc/dsqp/auth
mkdir /etc/dsqp/nginx
mkdir -p $QP_DATA_DIR
cp $QP_HOME_DIR/.env /etc/dsqp/.env
cp $QP_HOME_DIR/docker-compose.yml /etc/dsqp/docker-compose.yml
cp $QP_HOME_DIR/start.sh /etc/dsqp/start.sh
......
#!/bin/bash
source .env
VERSION=$1
QP_HOME_DIR=$2
if [ -n "$VERSION" ]; then
wget -N docker-compose.yml "https://gitlab.miracum.org/miracum-uc2-datashield/ds_develop/tree/$VERSION/deploy/queue/docker-compose.yml"
wget -N "https://gitlab.miracum.org/miracum/uc2/datashield/ds_develop/tree/$VERSION/deploy/queue/docker-compose.yml"
elif [ -n "$QP_HOME_DIR" ]; then
printf "****\n no version specified updating with data from this folder \n"
printf "****\n note that config and data files will be kept - if config files have changed you have to transfer them manually\n"
printf "**** Creating directories and copying files...\n\n"
mkdir -p $QP_DATA_DIR
cp $QP_HOME_DIR/docker-compose.yml /etc/dsqp/docker-compose.yml
cp $QP_HOME_DIR/start.sh /etc/dsqp/start.sh
cp $QP_HOME_DIR/stop.sh /etc/dsqp/stop.sh
cp $QP_HOME_DIR/update.sh /etc/dsqp/update.sh
else
printf "\n no version and no install dir given => not doing anything"
exit()
fi
docker-compose down
cd /etc/dsqp
./start.sh
docker-compose down
docker-compose up -d
printf "\n - check if queue is running by typing 'docker ps' into the command line \n"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment