Versions Compared

Key

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

...

Since Fargate storage is ephemeral(volatile), you will need to utilize EFS in order to persist the storage

  1. Go to EFS console
    Image Added
  2. Click Create File System
    Image Added
  3. Choose the VPC you want to provision the EFS. Ensure that it is provisioned in the same VPC as the ECS Cluster
  4. Click Create

...

  1. Go to Identity And Access Management(IAM) console
  2. On sidebar, click Roles
  3. Click Create Role
    Image Added
  4. Choose AWS Service under Trusted Entity Type
    Image Added
  5. Under Use Case, search and choose Elastic Container Service and choose Elastic Container Service Task and click Next
    Image Added
  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

...

  1. Go to Elastic Container Service(ECS) console
    Image Added
  2. Click Create Cluster
    Image Added
  3. Enter the Cluster Name
  4. Choose the Infrastructure (Fargate, EC2, External)
  5. Click Create

...

  1. On the sidebar, click Task Definition
    Image Added
  2. Click New Create Task Definition
    Image Added
  3. Enter the Task Definition name
  4. On Infrastructure Requirements, choose the launch type and specify the specs required
    Image Added
  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
    Image Added
  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 "
      Image Added
  11. Under Storage, click Add Volume
    Image Added
  12. Enter the volume name, and choose EFS as Volume Type
  13. Choose the EFS on File System ID
  14. Enter /opt/joget/wflow as the root directory
    Image Added
  15. Click Create

Create ECS Service(HTTP)

...

  1. Click on one of the Cluster on ECS Dashboard
    Image Added
  2. Under Services tab, click Create Service
    Image Added
  3. Under Compute Options, choose one - If you are planning to use multiple Infrastructure, choose Capacity Provider Strategy. If you are using only one type of Infrastructure, choose Launch Type
    Image Added
  4. On Deployment Configuration, choose Service as Application Type
    Image Added
  5. Choose the Task Definition create above on Family dropdown
  6. Enter the Desired Task number, depending on the load expected(Leave at one for testing purpose)
    Image Added
  7. Under networking, you may choose your own VPC if available. You can leave as default for testing(Ensure that the VPC chosen is the same as where the EFS being provisioned)
    Image Added
  8. Under Load Balancing, choose Application Load Balancer
  9. Create or choose Existing Load Balancer
    Image Added
  10. Enter the Load Balancer name
  11. Enter 30 in the Health Check Grace Period 
    Image Added
  12. Choose container 8080:8080
  13. Specify the Listener and the Target Group:
    1. Use port 8080 in when creating new Listener
    2. Enter /jw on the Health Check path. 
      Image Added
  14. Click Create

Modify Load Balancer Properties

Update Target Group Health Check Settings

  1. Go to Target Group
    Image Added
  2. Click on Health Check and click Edit
  3. Change the timeout to 30 seconds and interval to 40 seconds
  4. Update the healthy status code to 200-399
    Image Added
  5. Click Save Changes

Accessing Joget Through Load Balancer

...

  1. Go to EC2 console > Load Balancers
  2. On the Load Balancer page, click the copy icon under the DNS Name column.
    Image Added
  3. Paste the link in the browser

...

  1. Go to ACM Console
  2. Click Request
  3. Leave the selection at Request a Public Certificate
    Image Added
  4. Enter the fully qualified domain
    Image Added
  5. Use DNS validation as the Validation Method
    Image Added
  6. Click Request
  7. Click on the Certificate ID that has just been requested
    Image Added
  8. Under domains, there are information regarding the DNS validation
    1. If you are using Route 53, you can quickly create the record set by clicking on Create Records on Route 53
    2. If you are using different DNS provider, you will need to copy the CNAME Name and CNAME Value, and create a new record set with them
      Image Added
  9. Once you have created the record sets, the DNS will be validated. It may take a moment to propagate

...