Minerva Cloud is a novel cloud-native (AWS) platform for high-dimensional microscopy image storage, management, and visualization.
This repository contains the templates necessary to deploy the Minerva Cloud platform in AWS.
It contains CloudFormation templates for creating the AWS infrastructure (S3 buckets, database, Cognito userpool etc.),
and Serverless Framework configurations for creating various serverless applications.
These need to be created manually in AWS console or with the AWS CLI:
The code is formatted using black. This was implemented all-at-once, and for the most useful git blame, we suggest
you run
git config blame.ignoreRevsFile .git-blame-ignore-revs
See Black docs for more information.
If you need to use a different aws profile from the default one, to be able to access aws resources,
this can be setup with:
There is an example configuration file included in the repository: minerva-config.example.yml
You need to update the vpc, subnets and other values in the configuration file.
You can later update the stacks by replacing word “create” with “update”
Instructions below presume you have the configuration file in a folder named minerva-configs,
which is a sibling to the minerva-cloud project root directory.
Before deploying the various serverless applications, you should install the needed node packages by running within each serverless/* directory:
npm install
# Run in /cloudformation
python cloudformation.py create common ../../minerva-configs/test/config.yml
# Run in /cloudformation
python cloudformation.py create cognito ../../minerva-configs/test/config.yml
# Run in /ami-builder
python build.py ../../minerva-configs/test/config.yml
After the image has been created, the Batch AMI ID must be added to config.yml.
# Run in /cloudformation
python cloudformation.py create batch ../../minerva-configs/test/config.yml
# Run in /serverless/auth
serverless deploy --configfile ../../../minerva-configs/test/config.yml
# Run in /serverless/db
serverless deploy --configfile ../../../minerva-configs/test/config.yml
# Run in /serverless/batch
serverless deploy --configfile ../../../minerva-configs/test/config.yml
# Run in /serverless/api
serverless deploy --configfile ../../../minerva-configs/test/config.yml
# Run in /cloudformation
python cloudformation.py create author ../../minerva-configs/test/config.yml
# Run in /serverless/author
serverless deploy --configfile ../../../minerva-configs/test/config.yml
initdb
function to initialise the database