Before we proceed with the final step, we need to build a few HTC-Grid Artifacts. HTC artifacts include: python packages (for the HTC-Connector-Library), docker images (deploying example applications), configuration files for HTC and k8s.
To build and install these:
cd ~/environment/aws-htc-grid
make happy-path TAG=$TAG ACCOUNT_ID=$HTCGRID_ACCOUNT_ID REGION=$HTCGRID_REGION BUCKET_NAME=$S3_LAMBDA_HTCGRID_BUCKET_NAME
A few notes on this command:
TAG
is omitted then mainline will be the chosen has a default value.ACCOUNT_ID
is omitted then the value will be resolved by the following command:
aws sts get-caller-identity --query 'Account' --output text
REGION
is omitted then eu-west-1 will be used.BUCKET_NAME
refers to the name of the bucket created at the beginning for storing the HTC-Grid workload lambda function. This variable is mandatory.Once the command above gets executed, A folder named generated
will be created at ~/environment/aws-htc-grid/generated
. This folder should contain the following two important files:
The ~/environment/aws-htc-grid/generated/grid_config.json
file contains the configuration file that we will use to deploy HTC-Grid, let’s explore a few sections:
|
|
Using EKS as the Compute Plane allows us to use EC2 Spot Instances. Amazon EC2 Spot Instances offer spare compute capacity available in the AWS cloud at steep discounts compared to On-Demand instances. Spot Instances enable you to optimize your costs on the AWS cloud and scale your application’s throughput up to 10X for the same budget.
Given that we will use Kubernetes Cluster Autoscaler we create two node groups each with instances of the same size. You can read more about EKS and Spot best practices here
|
|
As this is a test deployment we will just use the default values. Users may need to scale this values up depending on your workload. When they do they will also need to consider the max_htc_agents
and min_htc_agents
as well as the dynamodb_default_read_capacity
and `dynamodb_default_write_capacity
Finally the last section of the file. We have highlighted a section that defines how much memory and CPU the deployment will get. In this case we have attributed ~1 VCPU amd ~2GB of Ram for each of the workers.
Note also how the location of the lambda points to the lambda.zip
that we just created by executing the make
command above.
|
|