Host CZI's cellxgene on AWS Fargate.
-
Clone the repository and its submodules:
git clone --recurse-submodules [email protected]:DataBiosphere/cellxgene-fargate.git -
Create the
.activesymlink to the active deployment, for example(cd deployments && ln -snf sc/dev .active) -
Create
deployments/.active/environment.local.pywith any local settings you might need, likeAWS_DEFAULT_PROFILE. The format of that file is exactly the same as that ofenvironment.py. Then runsource environmentOnce you've sourced the environment, you can use the
_selectshell function to activate a different deployment, and_refreshto source the environment again after changes to any of theenvironment*.pyfiles. -
Create and populate a virtualenv with
make virtualenv source .venv/bin/activate make envhook # optional but recommended when using PyCharm make requirements.devThe project is configured and all development dependencies have been installed.
-
To create a Docker image with
cellxgeneinside runmake docker_image -
Test the image with
make docker_run echo $CELLXGENE_VERSIONThe
cellxgeneversion printed by the container should match the value of the environment variable. -
Once per AWS account and region, an Amazon ECR image repository needs to be created:
make docker_repository -
Push the
cellxgeneDocker image to Amazon ECR withmake docker_login make docker_push -
Provision the AWS resources needed to run
cellxgeneas a Fargate container in Amazon ECS behind an EC2 application load balancer:_preauth # if you're assuming an IAM role requiring MFA make terraform