Skip to content

Commit

Permalink
work on ec2/docker/lambda for initiating step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
zzeppozz committed Sep 25, 2024
1 parent 009f441 commit 6db95ce
Show file tree
Hide file tree
Showing 16 changed files with 691 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .env.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ WORKING_DIRECTORY=/scratch-path
AWS_DATA_DIRECTORY=/volumes/aws_data

FQDN=bison.localhost
PYTHONPATH=/home/bison/flask_app
PYTHONPATH=/home/bison/bison:/home/bison/flask_app
46 changes: 23 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,26 @@ COPY --chown=bison:bison ./flask_app ./flask_app
#ENV FLASK_ENV=production
CMD venv/bin/python -m gunicorn -w 4 --bind 0.0.0.0:5000 ${FLASK_APP}

# ........................................................
# Frontend base image (for development)
FROM node:16.10.0-buster as base-front-end

LABEL maintainer="Specify Collections Consortium <github.com/specify>"

USER node
WORKDIR /home/node

COPY --chown=node:node bison/frontend/js_src/package*.json ./
RUN npm install

RUN mkdir dist \
&& chown node:node dist

COPY --chown=node:node bison/frontend/js_src .


# ........................................................
# Frontend image (for production) from base-front-end
FROM base-front-end as front-end

RUN npm run build
## ........................................................
## Frontend base image (for development)
#FROM node:16.10.0-buster as base-front-end
#
#LABEL maintainer="Specify Collections Consortium <github.com/specify>"
#
#USER node
#WORKDIR /home/node
#
#COPY --chown=node:node bison/frontend/js_src/package*.json ./
#RUN npm install
#
#RUN mkdir dist \
# && chown node:node dist
#
#COPY --chown=node:node bison/frontend/js_src .
#
#
## ........................................................
## Frontend image (for production) from base-front-end
#FROM base-front-end as front-end
#
#RUN npm run build
22 changes: 22 additions & 0 deletions _sphinx_config/pages/workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ will be created in the same directory, and have the basename appended with
This ensures that the RIIS data and the current GBIF data that have the same date
appended and taxonomic resolutions are current.

Resolve RIIS data
=======================

Add GBIF accepted taxa to RIIS data records of RIIS introduced/invasive status for
species by region (AK, HI, L48). This provides a field to match on, as all GBIF records
include the accepted taxon.

This step is initiated by an EventBridge Schedule, and:

* Creates and launches an EC2 instance
* The "userdata" in the EC2 instance runs a script which:

* pulls a Docker image containing BISON code from the Specify Docker Hub
* starts the Docker instance
* initiates the "annotate_riis" command.
* when the annotation is complete, it uploads the annotated RIIS file to S3

* TODO: The update of the annotated RIIS file on S3 is an event which triggers:

* stop the EC2 instance.
* initiate the next step.

Load ancillary data
===================

Expand Down
Loading

0 comments on commit 6db95ce

Please sign in to comment.