test_taxondir #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test_taxondir | |
on: workflow_dispatch | |
env: | |
RELEASE: ${{ github.ref_name }} | |
DOCKERVERSION: develop | |
jobs: | |
run_test: | |
runs-on: [self-hosted, runner3] | |
steps: | |
- name: Get dockers | |
run: | | |
docker pull genomehubs/genomehubs:$DOCKERVERSION | |
docker run --rm genomehubs/genomehubs sh -c 'echo $CONTAINER_VERSION' | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Check es health | |
run: curl -s "es1:9200/_cat/health" | |
- name: Delete indices on this server | |
run: | | |
curl -s -X DELETE "es1:9200/*" | |
- name: Add "latest" snapshot repo if it isn't there | |
run: | | |
curl -s -X PUT "es1:9200/_snapshot/latest" \ | |
-H 'Content-Type: application/json' \ | |
-d' { "type": "fs", "settings": { "location": "/usr/share/elasticsearch/snapshots/latest" } }' || exit 0 | |
- name: Restore and rename snapshot to current branch | |
run: | | |
curl -s -X POST "es1:9200/_snapshot/latest/initassembly/_restore?wait_for_completion=true&pretty" \ | |
-H 'Content-Type: application/json' \ | |
-d' { | |
"ignore_unavailable": true, | |
"include_global_state": false, | |
"include_aliases": false, | |
"rename_pattern" : "--goat--202.*", | |
"rename_replacement" : "--goat--${{ env.RELEASE }}" | |
}' | |
- name: Add ES index.mapping.nested_objects.limit 1000000 | |
run: | | |
curl -s -X PUT "es1:9200/taxon--ncbi--goat--${RELEASE}/_settings" \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "index.mapping.nested_objects.limit" : 1000000 }' | |
- name: update config.yaml version | |
run: | | |
perl -i -plne 's/^(\s*version:) .*/$1 ${{ env.RELEASE }}/' sources/goat.yaml | |
- name: genomehubs index test_taxondir | |
run: | | |
docker run --rm --network=host \ | |
-v `pwd`/sources:/genomehubs/sources \ | |
genomehubs/genomehubs:$DOCKERVERSION bash -c \ | |
"genomehubs index \ | |
--es-host es1:9200 \ | |
--taxonomy-source ncbi \ | |
--config-file sources/goat.yaml \ | |
--taxon-dir sources/test_taxondir \ | |
--taxon-lookup any --taxon-spellcheck" | |
- name: genomehubs index taxon assembly-data-taxon | |
run: | | |
docker run --rm --network=host \ | |
-v `pwd`/sources:/genomehubs/sources \ | |
genomehubs/genomehubs:$DOCKERVERSION bash -c \ | |
"genomehubs index \ | |
--es-host es1:9200 \ | |
--taxonomy-source ncbi \ | |
--config-file sources/goat.yaml \ | |
--taxon-dir sources/assembly-data-taxon" | |
- name: genomehubs fill | |
run: | | |
docker run --rm --network=host \ | |
-v `pwd`/sources:/genomehubs/sources \ | |
genomehubs/genomehubs:$DOCKERVERSION bash -c \ | |
"genomehubs fill \ | |
--es-host es1:9200 \ | |
--taxonomy-source ncbi \ | |
--config-file sources/goat.yaml \ | |
--traverse-root 2759 \ | |
--traverse-infer-both" | |
- name: restart dockers | |
run: | | |
mkdir -p /volumes/docker/logs/$RELEASE | |
docker pull genomehubs/genomehubs-api:$DOCKERVERSION | |
docker rm -f goat-api | |
docker run -d \ | |
--restart=always \ | |
--net net-es \ | |
-p 3010:3000 \ | |
--user $UID:$GROUPS \ | |
-e GH_ORIGINS="http://172.27.18.167:8010 http://172.27.18.167 null http://localhost:8010" \ | |
-e GH_HUBNAME=goat -e GH_HUBPATH="/genomehubs/resources/" \ | |
-e GH_NODE=http://es1:9200 \ | |
-e GH_RELEASE=$RELEASE \ | |
-e GH_SOURCE=https://github.com/genomehubs/goat-data/tree/$RELEASE \ | |
-e GH_ACCESS_LOG=/genomehubs/logs/access.log \ | |
-e GH_API_URL=https://172.27.18.167:3010/api/v2 \ | |
-e GH_ERROR_LOG=/genomehubs/logs/error.log \ | |
-v /volumes/docker/logs/$RELEASE:/genomehubs/logs \ | |
-v /volumes/docker/resources:/genomehubs/resources \ | |
--name goat-api \ | |
genomehubs/genomehubs-api:$DOCKERVERSION | |
docker pull genomehubs/goat:$DOCKERVERSION | |
docker rm -f goat-ui | |
docker run -d --restart always \ | |
--net net-es \ | |
-p 8010:8880 \ | |
--user $UID:$GROUPS \ | |
-e GH_CLIENT_PORT=8880 \ | |
-e GH_API_URL=http://172.27.18.167:3010/api/v2 \ | |
-e GH_SUGGESTED_TERM=Canidae \ | |
-e GH_BASENAME=/ \ | |
-e GH_SITENAME=GoaT \ | |
-e GH_ARCHIVE=latest \ | |
--name goat-ui \ | |
genomehubs/goat:$DOCKERVERSION |