Disclaimer
While Joget does not officially support running on ECS, this guide act as a proof of concept to deploy Joget on ECS. Please visit AWS official documentation website for support and information.
Prerequisites
- An AWS Account
- Installed AWS CLI
...
Create Elastic File Storage(EFS)
Reference: https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html
Since Fargate storage is ephemeral(volatile), you will need to utilize EFS in order to persist the storage
...
Create ECS Task Execution Role
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html#create-task-execution-role
- Go to Identity And Access Management(IAM) console.
- On sidebar, click Roles.
- Click Create Role.

- Choose AWS Service under Trusted Entity Type.

- Under Use Case, search and choose Elastic Container Service and choose Elastic Container Service Task and click Next.

- Under Permission Policies, choose AmazonECSTaskExecutionRolePolicy and AmazonSSMFullAccess. Then click Next.
- Enter the Role Name and Description, and review the permissions.
- Click Create Role.
Creating ECS Cluster
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-cluster-console-v2.html
- Go to Elastic Container Service(ECS) console.

- Click Create Cluster.

- Enter the Cluster Name.
- Choose the Infrastructure (Fargate, EC2, External).
- Click Create.
Create ECS Task Definition
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html#json-validate-for-create
- On the sidebar, click Task Definition.

- Click New Create Task Definition.

- Enter the Task Definition name.
- On Infrastructure Requirements, choose the launch type and specify the specs required.

- Under Task Role, choose the role created in Create ECS Task Execution Role.
- Under Task Execution Role, choose the role created in Create ECS Task Execution Role.
- Under container, enter the container name.
- Use jogetworkflow/joget-dx8-tomcat9 for the image.
- Enter 8080 and 9080 for Container Port.

- Add the following Environment Variable:
- Key: JAVA_OPTS
- Value: ${JAVA_OPTS_MEMORY} -Dwflow.home=${WFLOW_HOME} -Dwflow.systemkey=domain -javaagent:${LIB_HOME}/wflow-cluster.jar -javaagent:${LIB_HOME}/aspectjweaver-${ASPECTJ_VERSION}.jar -javaagent:${LIB_HOME}/glowroot/glowroot.jar "

- Under Storage, click Add Volume.

- Enter the volume name, and choose EFS as Volume Type.
- Choose the EFS on File System ID.
- Enter / as the root directory.
Image Added
- Under Container Mount Points, lick Add Mount Point
- Select Container and Source Volume
- Enter Container Path as /opt/joget/wflowas the root directory.
Image Removed
Image Added
- Click Click Create.
Create ECS Service(HTTP)
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-console-v2.html
If you wish to setup Joget with HTTPS right away, click here
...
Updating Permission on Joget wflow folder
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html
Updating ECS Service to Allow execute-command
...
Deploy Joget on ECS Fargate with HTTPS Support
Reference: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
Request SSL Certificate from Amazon Certificate Manager(ACM)
...