Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devops deployment 6 create and test noctua developer deployment docs #13

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion docker-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tag: latest
minerva_tag: v7

# Ubuntu based image
noctua_tag: v5
noctua_tag: v6

#docker_hub_user: "{{ lookup('env', 'USER')|lower }}"
docker_hub_user: geneontology
Expand Down
496 changes: 416 additions & 80 deletions production/PRODUCTION_README.md

Large diffs are not rendered by default.

25 changes: 13 additions & 12 deletions production/config-stack.yaml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,28 @@ stack:

# download or create journal locally and specify full path here.
# cd /tmp && wget http://skyhook.berkeleybop.org/blazegraph-20230611.jnl
# see production/gen_journal.sh.sample to generate one
BLAZEGRAPH_JOURNAL: REPLACE_ME_FILE_PATH # /tmp/blazegraph-20230611.jnl

# HTTP OR HTTPS
noctua_host: REPLACE_ME # aes-test-noctua.geneontology.io
noctua_host_alias: REPLACE_ME
noctua_lookup_url: REPLACE_ME # https://golr-aux.geneontology.io/solr/
golr_neo_lookup_url: REPLACE_ME # https://aes-test-noctua.geneontology.io
# HTTPS
noctua_host: REPLACE_ME # noctua.geneontology.org or noctua.geneontology.io
noctua_host_alias: REPLACE_ME # noctua-production-2024-10-15.geneontology.org or aes-noctua-test-2024-10-15.geneontology.io
noctua_lookup_url: REPLACE_ME # https://noctua-production-2024-10-15.geneontology.org or https://aes-noctua-test-2024-10-15.geneontology.io
golr_neo_lookup_url: REPLACE_ME # https://golr-aux.geneontology.org/solr/ or https://golr-aux.geneontology.io/solr/


# HTTP OR HTTPS
# HTTPS
github_client_id: 'REPLACE_ME'
github_client_secret: 'REPLACE_ME'
github_callback_url: REPLACE_ME # https://aes-test-barista.geneontology.io/auth/github/callback
github_callback_url: REPLACE_ME # barista-production-2024-10-15.geneontology.org/auth/github/callback or https://aes-barista-test-2024-10-15.geneontology.io/auth/github/callback

# HTTP OR HTTPS
golr_lookup_url: REPLACE_ME # https://aes-test-golr.geneontology.io/solr
# HTTPS
golr_lookup_url: REPLACE_ME # https://golr-aux.geneontology.org/solr/ or https://golr-aux.geneontology.io/solr/

# HTTP OR HTTPS
barista_lookup_host: REPLACE_ME # aes-test-barista.geneontology.io
barista_lookup_host_alias: REPLACE_ME
barista_lookup_url: REPLACE_ME # https://aes-test-barista.geneontology.io
barista_lookup_host: REPLACE_ME # barista-production-2024-10-15.geneontology.org or aes-barista-test-2024-10-15.geneontology.io
barista_lookup_host_alias: REPLACE_ME barista-production-2024-10-15.geneontology.org or am-barista-test-2024-10-15.geneontology.io
barista_lookup_url: REPLACE_ME # https://barista-production-2024-10-15.geneontology.org or https://am-barista-test-2024-10-15.geneontology.io

USE_CLOUDFLARE: 0
scripts: [ stage.yaml, start_services.yaml]
16 changes: 12 additions & 4 deletions production/gen_journal.sh.sample
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Modify java maximum heap based on your machine
# Modify java maximum heap based on your machine and also update sdir such that it is same as path where git clone is executed. Note, sdir has to be modified in export and docker run commands
# If necessary, modify minerva version i.e. geneontology/minerva:v7
export CMD="java -Xmx4G -jar minerva-cli.jar --import-owl-models -j /sdir/blazegraph.jnl -f /sdir/noctua-models/models"

git clone https://github.com/geneontology/noctua-models.git
docker pull geneontology/minerva:v2
echo docker run --rm -v $PWD:/sdir -t geneontology/minerva:v2 $CMD
docker run --rm -v $PWD:/sdir -t geneontology/minerva:v2 $CMD
# If above command takes long to run or is unsuccessful, retrieve a shallow copy
# For testing puroses, only a subset of models in directory 'noctua-models/models' are required. Therefore, only about a ~1000 .ttl files are necessary in directory 'noctua-models/models'
#git clone https://github.com/geneontology/noctua-models.git --depth 1
docker pull geneontology/minerva:v7

# Modify sdir
echo docker run --rm -v $PWD:/sdir -t geneontology/minerva:v7 $CMD

# Modify sdir
docker run --rm -v $PWD:/sdir -t geneontology/minerva:v7 $CMD
exit 1

18 changes: 6 additions & 12 deletions templates/httpd-vhosts-prod-barista.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
ServerName {{ barista_lookup_host }}
ServerAlias {{ barista_lookup_host_alias }}

Alias /robots.txt /var/www/html/robots.txt
RewriteEngine On
RewriteRule ^/robots.txt /robots.txt

#Do not use permanent for testing Redirect permanent / https://{{barista_lookup_host_alias}}/
Redirect / https://{{barista_lookup_host_alias}}/

## Get aggressive with badly behaving bots.
RewriteCond %{HTTP_USER_AGENT} ^.*Adsbot.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*AhrefsBot.*$ [OR]
Expand All @@ -21,14 +20,9 @@
RewriteCond %{HTTP_USER_AGENT} ^.*semrush.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*WhatWeb.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*WhatWeb.*$
RewriteRule . - [R=403,L]
RewriteRule . - [R=403,L]




ErrorLog "/var/log/apache2/barista-error.log"
CustomLog "/var/log/apache2/barista-access.log" common
## Proxy.
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://barista:3400/
ProxyPassReverse / http://barista:3400/
</VirtualHost>
18 changes: 3 additions & 15 deletions templates/httpd-vhosts-prod-noctua.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
ServerName {{ noctua_host }}
ServerAlias {{ noctua_host_alias }}

## Setup robots.txt.
DocumentRoot /var/www/html
Alias /robots.txt /var/www/html/robots.txt
RewriteEngine On
RewriteRule ^/robots.txt /robots.txt
#Do not use permanent for testing Redirect permanent / https://{{noctua_host_alias}}/
Redirect / https://{{noctua_host_alias}}/

## Get aggressive with badly behaving bots.
RewriteCond %{HTTP_USER_AGENT} ^.*Adsbot.*$ [OR]
Expand All @@ -23,15 +20,6 @@
RewriteCond %{HTTP_USER_AGENT} ^.*semrush.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*WhatWeb.*$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^.*WhatWeb.*$
RewriteRule . - [R=403,L]
RewriteRule . - [R=403,L]


ErrorLog "/var/log/apache2/noctua-error.log"
CustomLog "/var/log/apache2/noctua-access.log" common

## Proxy.
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://noctua:8910/
ProxyPassReverse / http://noctua:8910/
</VirtualHost>