Autonomous Driving Data Framework follows the Industry standard GitOps model. The project is entirely driven by Descriptive prinicples in the form of asking inputs from a module developer via manifest file(s).
You will need to clone the ADDF repository and checkout a release branch using the below command:
git clone --origin upstream --branch release/0.1.0 https://github.com/awslabs/autonomouse-driving-data-frameworkThe release version can be replaced with the version of interest
You should move into the ADDF repository:
cd autonomouse-driving-data-frameworkpython3 -m venv .venv && source .venv/bin/activatepip install -r ./requirements.txtADDF submits build information to AWS CodeBuild via AWS CodeSeeder. The initial submittal is done via AWS CLI, leveraging the configured active AWS profile. If you would like to deploy ADDF to a region other than the region configured for the profile, you can explicitly set the region via:
export AWS_DEFAULT_REGION=<region-name> (ex. us-east-1, eu-central-1)Please see HERE for details
We use AWS CDK V2 as the standard CDK version because CDK V1 is set to maintenance mode beginning June 1, 2022. You would need to bootstrap the CDK environment (one time per region) with V2 - see HERE.
cdk bootstrap aws://<account>/<region>Create a copy of your target manifests directory using the below command, where you will locate sample manifests in the name of example-dev and example-prod. You should create a directory with your desired deployment names like uat, demo. Below example uses demo as the deployment name
If running on a Mac instance:
cp -R manifests/example-dev manifests/demo
sed -i .bak "s/example-dev/demo/g" manifests/demo/deployment.yamlIf running in a Linux instance (such as Cloud9), this the command for a sed replace:
cp -R manifests/example-dev manifests/demo
sed -i "s/example-dev/demo/g" manifests/demo/deployment.yamlAs part of this example demo deployment, there are modules that leverage credentials for access. We store these credentials in AWS SecretsManager. We have provided a bash script to populate AWS SecretsManager with default values for those modules that need them located in scripts/setup-secrets-example.sh.
Run the bash script from commandline with the following:
Below script uses
jq. Please install it via these instructions
source scripts/setup-secrets-example.shFor the below walkthrough, let us use the manifests/demo/ directory for deployment, where the deploymemt name is set to demo.
File deployment.yaml is the top level manifest, which should include the modules you wanted to deploy, grouped under logical containers called group. Please see manifests for understanding more details about a deployment manifest, the keys it supports(if mandatory/optional).
Note: All paths inside the manifest files should be relative to the root of the project. For ex: if you want to include a module manifest
demo-modules.yamlin your deplopyment.yaml, you should include the manifest in the path asmanifests/demo/demo-modules.yamland declare the path asmanifests/demo/demo-modules.yamlin the deployment.yaml file.
To avoid throttling from DockerHub when building images, you should create a parameter/re-use an existing parameter in AWS Secrets Manager to store your DockerHub username and password. NOTE: This is optional, but you may experience throttling at DockerHub. To create an account, see DockerHub.
To create/update the default secret (aws-addf-docker-credentials) run:
./scripts/setup-secrets-dockerhub.shNote: For additional info on setting up the secret manually see manifests guide for details. The
demomodules leverages DockerHub, so you should populate the SecretsManager as indicated in manifests.
For the walkthrough, we have few manifests declared within demo directory which installs the following modules in sequence. If you do not wish to know what modules the demo deployment is doing, you can skip reading this section:
Groupname is set tooptionalsto install the following, sourcing from the manifestmanifests/demo/optional-modules.yaml:- Creates a
networkingmodule (creates vpc, 2 Public/Private subnets, IGW, NAT, Gateway endpoints etc) - Creates a
datalake-bucketsmodule (creates shared buckets for datalake, logging and artifacts etc)
- Creates a
Groupname is set tocoreto install the following, sourcing from the manifestmanifests/demo/core-modules.yaml:- Creates
eksmodule (creates AWS EKS Compute environment with standard plugins installed) - Creates
mwaamodule(creates AWS Managed Airflow cluster for orchestration of dags) - Creates
metadata-storgaemodule(creates shared AWS DynamoDB and AWS Glue databases) - Creates
opensearchmodule (creates AWS Managed Opensearch for ingesting app/infra logs)
- Creates
Groupname is set toexamplesto install the following, sourcing from the manifestmanifests/demo/example-modules.yaml:- Creates
example-dagsmodule (Demos an example on how to deploy dags from target modules using the shared mwaa module)
- Creates
Groupname is set torosbagto install the following, sourcing from the manifestmanifests/demo/rosbag-modules.yaml:- Creates
rosbag-scene-detectionmodule - Creates
rosbag-webvizmodule
- Creates
Groupname is set tosimulationsto install the following, sourcing from the manifestmanifests/demo/simulation-modules.yaml:- Creates
k8s-managed-simulationsmodule which deploys different types of Kubernetes driven simulations - Creates
batch-managedmodule which deploys AWS Batch Compute environment and helps launching Batch Jobs
- Creates
Groupname is set tointegrationto install the following, sourcing from the manifestmanifests/demo/integration-modules.yaml:- Creates
eks-osmodule which integrates EKS Cluster with OpenSearch - Creates
opensearch-proxymodule which creates a Proxy to OpenSearch Cluster - Creates
rosbag-ddb-to-osmodule which integrates DynamoDB table from Rosbag module with OpenSearch - Creates
emrlogs-to-osmodule which integrates EMR Cluster's logs to OpenSearch
- Creates
Groupname is set toideto install the following, sourcing from the manifestmanifests/demo/integration-modules.yaml:- Creates
jupyter-hubmodule - Creates
vscodemodule
- Creates
Below is the command to deploy the modules using the SeedFarmer CLI using the main manifest deployment.yaml:
seedfarmer apply manifests/demo/deployment.yamlBelow is the command to destroy all the modules related to a deployment:
seedfarmer destroy <<DEPLOYMENT_NAME>>Note: Replace the
DEPLOYMENT_NAMEwith the desired deployment name of your environment. For ex:demoYou can pass an optional--debugflag to the above command for getting debug level output