Skip to main content

Get Planetary Data from the Planetary Data System (PDS)

Project description

LabCas Workflow

Run workflows for Labcas

Install

locally

Preferably use a virtual environment with python 3.9

pip install -e '.[dev]'

With Dask on docker

Create certificates:

cd docker/certs
./generate-certs.sh

Build the docker image:

docker build -f docker/Dockerfile . -t labcas/workflow

Start the scheduler:

docker network create dask
docker run --network dask -p 8787:8787 -p 8786:8786 labcas/workflow scheduler

Start one worker

docker run  --network dask -p 8786:8786 labcas/workflow worker 

Start the client, same as in following section

With dask on ECS

Deploy the image created in the previous section on ECR

Have a s3 bucket labcas-infra for the terraform state.

Other pre-requisites are:

  • a VPC
  • subnets
  • a security group allowing incoming request whre the client runs, at JPL, on EC2 or Airflow, to port 8786 and port 8787
  • a task role allowing to write on CloudWatch
  • a task execution role which pull image from ECR and standard ECS task Excecution role policy "AmazonECSTaskExecutionRolePolicy"

Deploy the ECS cluster with the following terraform command:

cd terraform
terraform init
terraform apply \
    -var consortium="edrn" \
    -var venue="dev" \
    -var aws_fg_image=<uri of the docker image deployed on ECR>
    -var aws_fg_subnets=<private subnets of the AWS account> \
    -var aws_fg_vpc=<vpc of the AWS account> \
    -var aws_fg_security_groups  <security group> \
    -var ecs_task_role <arn of a task role>
    -var ecs_task_execution_role <arn of task execution role>

Run

Set you local AWS credentials to access the data

./aws-login.darwin.amd64

Start the dask cluster

Run the processing

python ./src/labcas/workflow/manager/main.py

Publish the package on pypi

pip install build
pip install twine
python -m build
twine upload dist/*

Apache Airflow

Test locally using https://github.com/aws/aws-mwaa-local-runner

Follow the README instructions.

cd mwaa

Launch the server

./mwaa-local-env start

See the console on http://localhost:8080, admin/test

Test the requirement.txt files

./mwaa-local-env test-requirements

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labcas_workflow-0.1.2.tar.gz (4.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labcas_workflow-0.1.2-py3-none-any.whl (4.9 MB view details)

Uploaded Python 3

File details

Details for the file labcas_workflow-0.1.2.tar.gz.

File metadata

  • Download URL: labcas_workflow-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.7

File hashes

Hashes for labcas_workflow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0f1817a31c1fe3a5e7f5f04252eaea35f8358e9b1b5894cde7c5cc53dbbc0756
MD5 b8eb12e0a304bcf2c51fb1fff190477c
BLAKE2b-256 ed1beaf4f36d29d8479582fd84d8eafbbc02277150f77dffe7e0a60e902edd19

See more details on using hashes here.

File details

Details for the file labcas_workflow-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for labcas_workflow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2db170dd96e5f3860feb6ac4ba06a032c1ace84efc889a23a95301047ffdc3b3
MD5 1f147414c4c8b413eb64f0bf81b67e2f
BLAKE2b-256 e0235d17c7f00d32a236f0b70c6b1bdb04dd2b2f8e38e0a69f14b475bf3517a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page