Scaling the tasks on the cluster
To scale the cluster to two tasks, as an example, run the following command:
ecs-cli compose --project-name hello-world service scale 2
As the output here indicates, the desiredCount
and runningCount
get set to 2
:
![](https://static.packt-cdn.com/products/9781789345018/graphics/2d33c3bd-9cd8-4da8-8d58-8111c401635c.png)
Subsequently, list the running tasks:
ecs-cli compose --project-name hello-world service ps
Two tasks get listed, as shown here:
![](https://static.packt-cdn.com/products/9781789345018/graphics/6c6ef1d2-6465-4259-bd67-e1cace555785.png)
The Running tasks
in the hello-world
cluster are also listed as 2
, as shown in the following screenshot. Click on the hello-world
cluster link:
![](https://static.packt-cdn.com/products/9781789345018/graphics/bef5277a-8335-4b5f-a3e1-e84d373fc498.png)
Select the Tasks
tab and two tasks get listed, as shown in the following screenshot:
![](https://static.packt-cdn.com/products/9781789345018/graphics/1b9beff5-d86c-468a-90a6-6b15f35ff1f9.png)