Deploy a HammerDB Docker Image to AWS ECS

HammerDB to AWS ECS

Tue, 11 Aug 2020

Push the HammerDB Image to Docker Hub

Create a docker hub account and repository if you don’t have.

Run following command to tag the hammerdb image and push to docker hub a public repository.

P.S. Please replace my repository with your repository

docker tag hammerdb andrewlo1011/hammerdb
docker push andrewlo1011/hammerdb

10 push image to docker hub

Create ECS Cluster

NOTE: We will create AWS resources that incur costs. It is chargeable, please be aware.

Create an ECS cluster as below:

20 Create ECS cluster

Pick the Fargate ECS type, which don’t need to maintain our own EC2. It is kind of serverless ECS.

21 Create ECS cluster

Enable Container Insights for CPU usage monitoring. 22 Create ECS cluster

24 Create ECS cluster 25 Create ECS cluster

Create Task and Container definition

Select Fargate launch type: 26 Create task definition 40 task definition

Task Size: 2 vCPU and 4G Memory 41 task definition b

Add the hammerdb Container from docker hub to the definition: 30 add container b

Add the environment variables for Oracle easy connection string, database username and password: 31 add container b

32 add container

Add the awslog configuration, so that we could view the log in CloudWatch. 33 add container

Continue to create task definition: 42 task definition 43 task definition

Run the hammerdb Task definition

50 run task 51 run task

In the environment variables override, set the Oracle RDS connection string, system username and password.

P.S. The step to create the testing RDS Oracle database is not included here. Also the HammerDB user creation and warehouse build in the database also not included here.

52 run task 53 run task 54 run task 55 run task 56 run task 57 run task

Round 1 Task Execution Result

The round 1 test was executed with 1, 2, 3 virtual users respectively. However, after review the database statistic for 3 virtual users, I found that the database loading was a bit low. After review, I found that load.tcl has an typo for the 3rd part of the test, it was set to 1 virtual user.

60 run task stats 61 run task stats 62 run task stats 63 run task stats 64 run task stats 65 run task stats 66 run task stats 67 run task stats 68 run task stats

Round 2 Task Execution Result

I fixed the load.tcl script and increased the virtual users in the script. I rebuilt the image and push to docker hub again. The round 2 test was executed with 3, 4, 5 virtual users It seems that the current RDS sizing the performance was saturated at 3 virtual users.

70 run task stats 71 run task stats 72 run task stats 73 run task stats 74 run task stats 75 run task stats 76 run task stats 77 run task stats 78 run task stats

Loading...
Drew Lo

Drew.vip - Share my learning path about - Database, Security and Cloud

  • Copyright @ Drew.vip 2020. All rights reserved.
  • Photos by unsplash.com.