Skip to content

Commit 118556a

Browse files
committed
Merge branch 'release/1.14'
2 parents 06503ef + 6f68328 commit 118556a

19 files changed

+52
-317
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
**Description**
22
A description of the PR, should include a decent explanation as to why this change was needed and a decent explanation as to what this change does
33

4+
5+
**Review Instructions**
6+
Describe if this ticket needs review and if so, how one may go about it in qa and/or staging environments.
7+
For example, a ticket based on Security Hub, Snyk, or Dependabot may not need review since those services will generate new warnings if the issue has not been resolved properly. On the other hand, an infrastructure ticket that results in visible changes to the end-user will definitely require review. Many tickets will likely be between these two extremes, so some judgement may be required.
8+
49
**Issue**
510
A link to a github issue or SEAB- ticket (using that as a prefix)
611

.github/workflows/docker-image.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
python -m pip install --upgrade pip
3030
pip install requests
3131
- name: Set up Ruby 2.6
32-
uses: actions/setup-ruby@v1
32+
uses: ruby/setup-ruby@v1
3333
with:
3434
ruby-version: 2.6
3535
- name: Build environment
@@ -38,8 +38,4 @@ jobs:
3838
- name: Run script to generate templates
3939
run: bash install_bootstrap --script
4040
- name: Run Docker image to validate nginx config
41-
run: docker run -v $PWD/config/default.nginx_http.conf:/etc/nginx/conf.d/default.conf:ro -v $PWD/config/default.nginx_http.shared.conf:/etc/nginx/conf.d/default.nginx_http.shared.conf:ro -v $PWD/config/default.nginx_http.security.conf:/etc/nginx/conf.d/default.nginx_http.security.conf:ro nginx:1.13.1 nginx -t -c /etc/nginx/nginx.conf
42-
- name: Test image digest script
43-
run: |
44-
cd scripts/tests
45-
python test-webservice-image-digest.py
41+
run: docker run -v $PWD/config/nginx-conf/default.nginx_http.conf:/etc/nginx/conf.d/default.conf:ro -v $PWD/config/nginx-conf/default.nginx_http.shared.conf:/etc/nginx/conf.d/default.nginx_http.shared.conf:ro -v $PWD/config/nginx-conf/default.nginx_http.security.conf:/etc/nginx/conf.d/default.nginx_http.security.conf:ro nginx:1.13.1 nginx -t -c /etc/nginx/nginx.conf

DEV-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ There are 3 different sets of metric logs being sent to logstash's elasticsearch
1111

1212
## Apache HTTP Logs
1313

14-
Currently, install\_bootstrap and docker-compose handles all necessary configuration
14+
Currently, install\_bootstrap and docker compose handles all necessary configuration
1515

1616
<!-- Long term, will likely move to AWS RDS, making postgres setup simpler
1717
## Postgres

README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# compose\_setup
2-
This project documents how to setup Dockstore staging and production using composed Docker containers.
2+
This project contains configuration template files needed to run Dockstore using AWS Fargate. View the [dockstore-deploy repository](https://github.com/dockstore/dockstore-deploy)
3+
for more information about how Dockstore is setup using AWS Fargate.
34
Log issues and see general documentation at [dockstore](https://github.com/ga4gh/dockstore/issues) and [docs.dockstore.org](https://docs.dockstore.org/) respectively
45

5-
Port 80 is exposed over http. This port should not be exposed to the public. A separately [configured load
6-
balancer](https://github.com/dockstore/dockstore-deploy) is responsible for SSL termination and forwarding traffic to this instance. Previously this repo handled the SSL termination with nginx and LetsEncrypt.
7-
86
If you are looking for how to run Dockstore locally as a developer, you are probably in the wrong place and should take a look at https://github.com/dockstore/dockstore/blob/develop/docker-compose.yml
97

108
## Prerequisities
@@ -17,24 +15,16 @@ If you are looking for how to run Dockstore locally as a developer, you are prob
1715

1816
## Usage
1917

20-
1. Call the install\_bootstrap script. This templates the contents of `templates` using mustache to the `config` directory while recording your answers for future use. Note that this will also
21-
rebuild your docker images without affecting existing running containers
18+
1. Call the install\_bootstrap script. This templates the contents of `templates` using mustache to the `config` directory while recording your answers for future use.
2219

2320
2. Some additional information on the answers requested in the script
2421
1. Each integration requires a client id and a secret, it is worth saying that you should not check these in
2522
2. The discourse URL is needed to link Dockstore to a discussion forum
2623
3. the Google verification code and tag manager ID are used if you want to properly track visitors to Dockstore and what pages they browse to
2724

28-
3. The bootstrap script can also rebuild your Docker images. Keep in mind the following handy commands:
29-
1. `install_bootstrap --script` will template and build everything using your previous answers (useful for quick iteration)
30-
2. `docker-compose down` will bring all containers down safely
31-
3. `nohup docker-compose up --force-recreate --remove-orphans >/dev/null 2>&1 &` will re-create all containers known to docker-compose and delete those volumes that no longer are associated with running containers
32-
4. `docker system prune` for cleaning out old containers and images
33-
5. To watch the logs `docker-compose logs --follow` while debugging
34-
35-
4. After following the instructions in the bootstrap script and starting up the site with `docker-compose`, you can browse to the Dockstore site hosted at port 443 by default. `https://<domain-name>` if you specified https or `http://<domain-name>:443` if you did not.
25+
3. After following the instructions in the bootstrap script and starting up the site with AWS Fargate, you can browse to the Dockstore site hosted at port 443 by default using `https://<domain-name>`.
3626

37-
The current setup relies upon an externally hosted database (currently AWS RDS) and externally hosted search (currently AWS Elasticsearch).
27+
The current setup relies upon an externally hosted container orchestration service (current AWS ECS with Fargate), externally hosted database (currently AWS RDS) and externally hosted search (currently AWS Elasticsearch).
3828

3929
### Loading Up a Database ###
4030

@@ -45,15 +35,15 @@ Note that database migration is run once during the startup process and is contr
4535

4636
## Logging Usage
4737

48-
If using with logstash in a container (for development), use `-f docker-compose.yml -f docker-compose.dev.yml` flags after each `docker-compose` command to merge docker-compose files (e.g. `docker-compose -f docker-compse.yml -f docker-compose.dev.yml build`)
38+
If using with logstash in a container (for development), use `-f docker-compose.yml -f docker-compose.dev.yml` flags after each `docker compose` command to merge docker-compose files (e.g. `docker compose -f docker-compse.yml -f docker-compose.dev.yml build`)
4939

5040
For example to deploy just logging
5141

5242
```
53-
docker-compose -f docker-compose.dev.yml build
54-
nohup docker-compose -f docker-compose.dev.yml up --force-recreate --remove-orphans >/dev/null 2>&1 &
55-
docker-compose -f docker-compose.dev.yml down
56-
docker-compose -f docker-compose.dev.yml kill
43+
docker compose -f docker-compose.dev.yml build
44+
nohup docker compose -f docker-compose.dev.yml up --force-recreate --remove-orphans >/dev/null 2>&1 &
45+
docker compose -f docker-compose.dev.yml down
46+
docker compose -f docker-compose.dev.yml kill
5747
```
5848

5949
### Kibana Dashboard Setup ###
@@ -72,3 +62,10 @@ npm run install-git secrets
7262
This should install git secrets into your local repository and perform a scan.
7363
If secrets are found, the run will error and output the potential secret to stdout.
7464
If you believe the scan is a false-positive, add the line glob to .gitallowed.
65+
66+
## Handy docker-compose commands:
67+
1. `install_bootstrap --script` will template and build everything using your previous answers (useful for quick iteration)
68+
2. `docker compose down` will bring all containers down safely
69+
3. `nohup docker compose up --force-recreate --remove-orphans >/dev/null 2>&1 &` will re-create all containers known to docker-compose and delete those volumes that no longer are associated with running containers
70+
4. `docker system prune` for cleaning out old containers and images
71+
5. To watch the logs `docker compose logs --follow` while debugging

docker-compose.yml

Lines changed: 0 additions & 76 deletions
This file was deleted.

dockstore_launcher_config/compose.config

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"EXTERNAL_GOOGLE_CLIENT_PREFIX1":"replaceme",
2929
"FEATURED_CONTENT_URL":"foobar",
3030
"FEATURED_NEWS_URL":"replaceme",
31-
"GALAXY_PLUGIN_VERSION":"0.0.6",
3231
"GITHUB_APP_ID": "1234",
3332
"GITHUB_APP_NAME": "foobar",
3433
"GITHUB_APP_PRIVATE_KEY_FILE": "/replaceme",
@@ -38,24 +37,16 @@
3837
"GITLAB_CLIENT_SECRET":"foobar",
3938
"GOOGLE_CLIENT_ID":"potato",
4039
"GOOGLE_CLIENT_SECRET":"potato",
41-
"HTTPS":false,
42-
"IS_FARGATE_DEPLOY":false,
4340
"LOGSTASH":false,
4441
"LOGSTASH_HOST":"replaceme",
42+
"METRICS_BUCKET_NAME":"replaceme",
4543
"NEXTFLOW_PARSING_LAMBDA_VERSION":"n/a",
46-
"BD_CATALYST_SEVEN_BRIDGES_IMPORT_URL":"replaceme",
47-
"BD_CATALYST_TERRA_IMPORT_URL":"replaceme",
48-
"AUTHORIZER_TYPE":"replaceme",
49-
"EXTERNAL_GOOGLE_CLIENT_PREFIX1":"replaceme",
50-
"SAM_PATH":"replaceme",
51-
"DATABASE_GENERATED":false,
5244
"ORCID_CLIENT_ID":"replaceme",
5345
"ORCID_CLIENT_SECRET":"replaceme",
5446
"ORCID_SCOPE":"replaceme",
5547
"ORCID_URL":"replaceme",
5648
"POSTGRES_DBPASSWORD":"replaceme",
5749
"PRODUCTION":false,
58-
"PUBLIC_LAUNCHER_IP_ADDRESS":"",
5950
"QUAY_CLIENT_ID":"foobared",
6051
"QUAY_CLIENT_SECRET":"foobared",
6152
"SAM_PATH":"replaceme",

install_bootstrap

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,19 @@ MSG
1919

2020
function template()
2121
{
22-
mkdir -p config
22+
# Place the config files into specific directories so they can be mounted to container paths as bind mounts
23+
NGINX_CONF_DIRECTORY="config/nginx-conf"
24+
NGINX_HTML2_DIRECTORY="config/nginx-html2"
25+
WEBSERVICE_DIRECTORY="config/webservice"
2326

24-
NGINX_CONF_DIRECTORY="config"
25-
NGINX_HTML2_DIRECTORY="config"
26-
WEBSERVICE_DIRECTORY="config"
27+
mkdir -p ${NGINX_CONF_DIRECTORY}
28+
mkdir -p ${NGINX_HTML2_DIRECTORY}
29+
mkdir -p ${WEBSERVICE_DIRECTORY}
2730

28-
if [ $IS_FARGATE_DEPLOY == "true" ]; then
29-
mkdir -p config/webservice
30-
mkdir -p config/nginx-conf
31-
mkdir -p config/nginx-html2
32-
# Place the config files into specific directories so they can be mounted to container paths as bind mounts
33-
NGINX_CONF_DIRECTORY="${NGINX_CONF_DIRECTORY}/nginx-conf"
34-
NGINX_HTML2_DIRECTORY="${NGINX_HTML2_DIRECTORY}/nginx-html2"
35-
WEBSERVICE_DIRECTORY="${WEBSERVICE_DIRECTORY}/webservice"
31+
# Download index.html for UI we will be serving
32+
wget -qO ${NGINX_HTML2_DIRECTORY}/index.html https://gui.dockstore.org/${UI2_HASH}/index.html
33+
wget -qO ${NGINX_HTML2_DIRECTORY}/manifest.json https://gui.dockstore.org/${UI2_HASH}/manifest.json
3634

37-
wget -qO ${NGINX_HTML2_DIRECTORY}/index.html https://gui.dockstore.org/${UI2_HASH}/index.html
38-
wget -qO ${NGINX_HTML2_DIRECTORY}/manifest.json https://gui.dockstore.org/${UI2_HASH}/manifest.json
39-
fi
40-
41-
mustache dockstore_launcher_config/compose.config templates/Dockerfile_ui2.template > config/Dockerfile_ui2
4235
mustache dockstore_launcher_config/compose.config templates/robots.txt.template > ${NGINX_HTML2_DIRECTORY}/robots.txt
4336
mustache dockstore_launcher_config/compose.config templates/default.nginx_http.conf.template > ${NGINX_CONF_DIRECTORY}/default.nginx_http.conf
4437
mustache dockstore_launcher_config/compose.config templates/default.nginx_http.shared.conf.template > ${NGINX_CONF_DIRECTORY}/default.nginx_http.shared.conf
@@ -59,8 +52,6 @@ function template()
5952
mustache dockstore_launcher_config/compose.config templates/jvm.options.logstash.template > config/jvm.options.logstash
6053
mustache dockstore_launcher_config/compose.config templates/postgres_backup.sh.template > scripts/postgres_backup.sh
6154
chmod a+rx scripts/postgres_backup.sh
62-
# .env file
63-
mustache dockstore_launcher_config/compose.config templates/env.template > .env
6455

6556
mkdir -p config/rules
6657
for f in $(ls templates/rules/); do mustache dockstore_launcher_config/compose.config templates/rules/$f > config/rules/$f; done
@@ -73,13 +64,4 @@ fi
7364

7465
template
7566

76-
if [ $IS_FARGATE_DEPLOY == "false" ]; then
77-
# We need to set the environment variable for the image digest
78-
source .env
79-
DOCKSTORE_IMAGE_DIGEST=$(scripts/webservice-image-digest.py $DOCKSTORE_VERSION)
80-
echo "DOCKSTORE_IMAGE_DIGEST=$DOCKSTORE_IMAGE_DIGEST" >> .env
81-
82-
docker-compose build
83-
fi
84-
8567
echo "Exiting now."

scripts/restart.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ set -o nounset
77
# Restarts stack by running commands from /home/ubuntu/compose_setup
88

99
cd /home/ubuntu/compose_setup
10-
docker-compose down
11-
nohup docker-compose up --force-recreate --remove-orphans >/dev/null 2>&1 &
10+
docker compose down
11+
nohup docker compose up --force-recreate --remove-orphans >/dev/null 2>&1 &

scripts/tests/test-webservice-image-digest.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)