Running HACOBE-CLOUD Container on EC2 type

In this document we will tell how to run a HACOBE-CLOUD container on EC2 type on ECS.

Step 0. Prepare an AWS account to use and subscribe to HACOBE-CLOUD Products on the AWS Marketplace

Step 1. Create a security group

  1. Open the Amazon EC2 console.

  2. In the navigation pane, choose Security Groups.

  3. Choose Create security group.

  4. Enter a descriptive name and brief description for the security group and choose the public VPC.

  5. Add http port 80 and the stream's input port to the inbound rule.
    Specify an accessible IP address as the permitted source, and restrict unnecessary access.

  6. Choose Create security group.

Step 2. Create AWS ECS Cluster

  1. Open the Amazon ECS console.

  2. From the navigation bar, select the Region to use.

  3. In the navigation pane, choose Clusters.

  4. On the Clusters page, choose Create Cluster.

  5. Select EC2 Linux+Networking Type then choose Next Step.

  6. For Cluster name, enter a name for your cluster.

  7. Under instance configration, choose the Amazon EC2 instance type for your container instances. Recommended instance type is m5.large.

  8. Networking Settings

  9. Choose Create.

Step 3. Create an IAM role for ECS tasks

  1. Open the IAM console.

  2. In the navigation pane, choose Roles, Create role.

  3. For Select type of trusted entity section, choose AWS service.
    For Choose the service that will use this role, choose Elastic Container Service.
    For Select your use case, choose Elastic Container Service Task and choose Next.

  4. For Attach permissions policy, select the AmazonECSTaskExecutionRolePolicy and AWSMarketplaceMeteringRegisterUsage policies.

  5. Add permissions to use the CloudWatch linkage function. This is not necessary if you do not use the CloudWatch linkage function.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:CreateLogGroup", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:XX-XXXXXX-X:XXXXXXXXXXXX:log-group:HACOBE_CLOUD_METRIC:*", "arn:aws:logs:XX-XXXXXX-X:XXXXXXXXXXXX:log-group:HACOBE_CLOUD_EVENT:*" ] } ] }
  6. Choose Next.

  7. For Role name, enter a name for your role, and then choose Create role.

Step 4. Create task definition

  1. Open the Amazon ECS console.

  2. In the navigation pane, choose Task definitions.

  3. On the Task definitions page, choose Create new task definition.

  4. Select EC2 Type then choose Next Step.

  5. Configure task and container definitions.

  6. Click Add Container.

  7. Choose Create.

Step 5. Run task definition

  1. Open the Amazon ECS console.

  2. In the navigation pane, choose Clusters.

  3. Select the ECS cluster created in STEP2.

  4. Navigate Tasks tab, choose Run new task.

  5. Select EC2 as Launch type, Select the Task Definition created in STEP4.

  6. Choose Run Task.

Step 6. Access the HACOBE-CLOUD web page and set the input stream

  1. Access the HACOBE-CLOUD web page http://EC2-Instance-PublicIPaddress

  2. Right-click on the source panel on the screen to display the function buttons and select "Source settings".

  3. Select a protocol, enter the source IP address and source port, enter a description if necessary and choose Enter.

  4. Select the input you just added and choose Select.

  5. Send an input stream.

For the setting of CloudWatch linkage function and the procedure for creating the CloudWatch dashboard template, please refer to the manual from the link below.
CloudWatch Linkage Setting

For other HACOBE-CLOUD functions and usage instructions, please refer to the manual from the link below.
English
Japanese