...
Since Fargate storage is ephemeral(volatile), you will need to utilize EFS in order to persist the storage
- Go to EFS console
Image Added - Click Create File System
Image Added
- Choose the VPC you want to provision the EFS. Ensure that it is provisioned in the same VPC as the ECS Cluster
- Click Create
...
- Go to Identity And Access Management(IAM) console
- On sidebar, click Roles
- Click Create Role
Image Added
- Choose AWS Service under Trusted Entity Type
Image Added
- Under Use Case, search and choose Elastic Container Service and choose Elastic Container Service Task and click Next
Image Added
- Under Permission Policies, choose AmazonECSTaskExecutionRolePolicy and AmazonSSMFullAccess. Then click Next
- Enter the Role Name and Description, and review the permissions.
- Click Create Role
...
- Go to Elastic Container Service(ECS) console
Image Added
- Click Create Cluster
Image Added
- Enter the Cluster Name
- Choose the Infrastructure (Fargate, EC2, External)
- Click Create
...
- On the sidebar, click Task Definition
Image Added
- Click New Create Task Definition
Image Added
- Enter the Task Definition name
- On Infrastructure Requirements, choose the launch type and specify the specs required
Image Added
- 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
Image Added
- 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 "
Image Added
- Under Storage, click Add Volume
Image Added
- Enter the volume name, and choose EFS as Volume Type
- Choose the EFS on File System ID
- Enter /opt/joget/wflow as the root directory
Image Added
- Click Create
Create ECS Service(HTTP)
...
- Click on one of the Cluster on ECS Dashboard
Image Added
- Under Services tab, click Create Service
Image Added - 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 - On Deployment Configuration, choose Service as Application Type
Image Added
- Choose the Task Definition create above on Family dropdown
- Enter the Desired Task number, depending on the load expected(Leave at one for testing purpose)
Image Added
- 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
- Under Load Balancing, choose Application Load Balancer
- Create or choose Existing Load Balancer
Image Added
- Enter the Load Balancer name
- Enter 30 in the Health Check Grace Period
Image Added
- Choose container 8080:8080
- Specify the Listener and the Target Group:
- Use port 8080 in when creating new Listener
- Enter /jw on the Health Check path.
Image Added
- Click Create
Modify Load Balancer Properties
Update Target Group Health Check Settings
- Go to Target Group
Image Added
- Click on Health Check and click Edit
- Change the timeout to 30 seconds and interval to 40 seconds
- Update the healthy status code to 200-399
Image Added
- Click Save Changes
Accessing Joget Through Load Balancer
...
- Go to EC2 console > Load Balancers
- On the Load Balancer page, click the copy icon under the DNS Name column.
Image Added
- Paste the link in the browser
...
- Go to ACM Console
- Click Request
- Leave the selection at Request a Public Certificate
Image Added
- Enter the fully qualified domain
Image Added
- Use DNS validation as the Validation Method
Image Added
- Click Request
- Click on the Certificate ID that has just been requested
Image Added
- Under domains, there are information regarding the DNS validation
- If you are using Route 53, you can quickly create the record set by clicking on Create Records on Route 53
- 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
- Once you have created the record sets, the DNS will be validated. It may take a moment to propagate
...