Testing a new Cluster Instance - tooltwist/documentation GitHub Wiki

You can quickly test a cluster and instance by running up a task containing the ToolTwist website.

Define a task for ttsite

If it's not already defined, create a new task definition for ttsite, using this JSON definition:

{
  "networkMode": "bridge",
  "containerDefinitions": [
    {
      "volumesFrom": [],
      "memory": 512,
      "extraHosts": null,
      "dnsServers": null,
      "disableNetworking": null,
      "dnsSearchDomains": null,
      "portMappings": [
        {
          "hostPort": 80,
          "containerPort": 8080,
          "protocol": "tcp"
        }
      ],
      "hostname": null,
      "essential": true,
      "entryPoint": null,
      "mountPoints": [],
      "name": "ttsite",
      "ulimits": null,
      "dockerSecurityOptions": null,
      "environment": [],
      "links": null,
      "workingDirectory": null,
      "readonlyRootFilesystem": null,
      "image": "tooltwist/ttsite:21oct15",
      "command": null,
      "user": null,
      "dockerLabels": null,
      "logConfiguration": null,
      "cpu": 0,
      "privileged": null,
      "memoryReservation": null
    }
  ],
  "volumes": [],
  "family": "ttsite"
}

Allow access to the Container

To access this site you will need to add you IP address to the whitelist for the cluster's security group.

  1. On the ECS Dashboard, go to your cluster and select any instance, and click on the EC2 Instance link.
    2016-09-24_22-06-33

  2. Click on the security group for the instance.
    2016-09-24_22-09-22

  3. On the Security Group page press edit, and add port 80 for My IP. This will allow your machine, and only your machine, to access port 80 on the server.

2016-09-24_18-52-52

View the Website

You should now be able to see the ToolTwist website. The easiest way to get there is to click on the link on the details page for the running task, in the ECS Dashboard.

2016-09-24_22-31-31

IMPORTANT!!!

Remember to remove your IP address from the security group once you have finished testing.