Public | Automated Build

Last pushed: 6 months ago
Short Description
Container for ancestry backend app
Full Description

ancestry-docker

Contains all code for the setup of the ancestry computation

Setup

  1. create Lamdba function in AWS with file aws/aws-lamdba.js triggered by AWS API Gateway
  2. create Lamdba function in AWS with files zipped aws/message-remove-lambda.js and node_modules
    Upload zip and set right handler file in the configuration of the lamdba function
  3. configure the AWS API Gateway for these two lambda function to be accessible with an API key
  4. set in the Dev API for this application the value for webhook as the API Gateway from step 1 and add as webhookHeaders {"x-api-key": "[KEY]"} and replace the key with the one made in step 4
  5. create AWS sqs queue for the ancestry computation queueing
  6. create an image with the docker container installed
    Make sure if the files need to be fetched/uploaded to GS, to include GS credentials in the home of the default user.
  7. configure all environement variables for the lamdba function defined in the aws/aws-lamdba.js file.

How it works

  1. The lamdba function of step one will add the ancestry-computation request in the SQS queue and if the number of running instances is lower then the max allowed it will also start an new instance.
  2. The created instance
    • will poll the SQS for an ancestry-computatio job
    • will setup cloudwatch logs
    • will start the docker container job
    • will shutdown automatically once job is done
  3. The docker container
    • will run an nextflow pipeline
    • at the end of the pipeline the Dev Api is notified of the status of the job and if successfull the report of the analysis is added
    • the AWS lambda function of step 2 in setup is called to remove the message from the queue and check for new jobs
Docker Pull Command
Owner
insilicodb
Source Repository