Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

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

  1. Go to Identity And Access Management(IAM) console.
  2. On sidebar, click Roles.
  3. Click Create Role.


  4. Choose AWS Service under Trusted Entity Type.


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


  6. Under Permission Policies, choose AmazonECSTaskExecutionRolePolicy and AmazonSSMFullAccess. Then click Next.
  7. Enter the Role Name and Description, and review the permissions.
  8. Click Create Role.

Creating ECS Cluster


Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-cluster-console-v2.html

  1. Go to Elastic Container Service(ECS) console.


  2. Click Create Cluster.


  3. Enter the Cluster Name.
  4. Choose the Infrastructure (Fargate, EC2, External).
  5. Click Create.

Create ECS Task Definition


Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-task-definition.html#json-validate-for-create

  1. On the sidebar, click Task Definition.


  2. Click New Create Task Definition.


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


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


  10. Add the following Environment Variable:
    1. Key: JAVA_OPTS
    2. 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 "


  11. Under Storage, click Add Volume.


  12. Enter the volume name, and choose EFS as Volume Type.
  13. Choose the EFS on File System ID.
  14. Enter / as the root directory.
    Image Added

  15. Under Container Mount Points, lick Add Mount Point
  16. Select Container and Source Volume
  17. Enter Container Path  as /opt/joget/wflowas the root directory.
    Image RemovedImage Added
  18. 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)

...