Creating an ECS service for a Hello world application

Creating an ECS Service for a Hello world application using the tutum/hello-world Docker image is discussed in detail in Chapter 2, Networking. In this section, we shall create a hello-world cluster consisting of a hello-world-service service with three tasks for a tutum/hello-world Docker image. To create the cluster, service, and task definition, use the same procedure as in Chapter 2, Networking  which is as follows:

  1. Create a Container Definition, hello-world, for the tutum/hello-world Docker image
  1. Create a task definition, hello-world-task-definition
  2. Create a service, hello-world-service
  3. Create a cluster, hello-world

The procedure is the same as in Chapter 2Networking, except for a few differences. Define the service with three tasks instead of the default one task:

  • Click on Edit in the Define your service section, as shown in the following screenshot:
  • In the Set up service: hello-world-service dialog, set the Number of desired tasks to 3, as shown here. Click on Save:
  • With the Number of desired tasks set to 3, click on Next in Define your service, as shown here:
  • In Configure your cluster, specify the Cluster name as hello-world, as shown here. The other settings, which include VPC ID and Subnets, are not modifiable. Click on Next:
  • Review the Container definition, Task definition, Service, and Cluster in Review, as shown here. An Edit button is provided to modify each of these. Click on Create to create the ECS objects, as shown here:
  • The Launch Status should indicate that all ECS resources have been created, as indicated by the complete status shown here. Click on View service:
  • A service gets created, as shown here. The Service name, Cluster, Status, Task definition, Launch type, Platform version, Service role, Desired count, Pending count, and Running count are listed in the service summary. The Details tab lists the Load Balancing and Network Access:
  • Select the Tasks tab to list the tasks. The Last status column lists the task status, which could initially be PENDING. Click on the Refresh button periodically to refresh the task status. When all tasks have started running, the Last status becomes RUNNING, as shown here:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.38.176