Controlling services
Now that we have our personal cloud running with a microservice as a service, we need to learn how to control it. First, we will look at how we can scale these instances, then at how we can access the logs, and finally, how we can control these instances independently.
Scaling instances
Let's first look at which services we have to run with the following command:
docker service ls
This should show us our service instances:
ID NAME MODE REPLICAS IMAGE PORTS syqgugo598xn hello-service replicated 1/1 localhost:5000/hello:latest *:8080->8080/tcp os5j0iw1p4q1 registry replicated 1/1 registry:latest *:5000->5000/tcp
Here, we see that we have 1
replica for hello-service
. Let's increase it with the following command:
docker service scale hello-service=3
After a few seconds, we can list our instances again:
docker service ls
This should now show:
ID NAME MODE REPLICAS...