Test the prototype on your own

Enough talking. The good part is that you can actually bring the prototype up on your machine or AWS and just play with it a bit.

1| Set up a Docker cluster. We’ve built support for Docker 1.12 Swarm mode for now, so first you’d need a Swarm cluster. We have prepared a simple step-by-step guide to get such a cluster on Virtualbox or on AWS. Of course, if you are part of the Docker for AWS/Azure private beta program, it’s even easier for you.

2| Bring up services. You can deploy whatever you prefer (we encourage you to play with this actually, the Docker 1.12 orchestration is super easy to use). If you want to deploy Docker’s voting example, just follow these steps:

# Start a database instance

docker service create --name db -p 5432:5432 postgres

# Create a Redis instance

docker service create --name redis -p 6379:6379 redis:alpine

# Start the voting frontend

docker service create --name vote --replicas 2 -p 5000:80 ghoranyi/docker-example-vote

# Start the vote processing worker

docker service create --name worker --network ingress ghoranyi/docker-example-worker

# the `--network ingress` above is needed to attach to the default overlay network instead of bridge even if it doesn't expose any ports

# Start the results frontend

docker service create --name result -p 5001:80 ghoranyi/docker-example-result

Test your app in the browser. Open port 5000 and 5001 on any of your Swarm nodes (Docker’s new routing mesh feature takes care of redirecting your request to a node which actually has the container running).

3| Deploy the backend. This is only for the prototype. On the long run, this would be hosted on our side, you shouldn’t have to worry about this.

docker service create --name vizdemo-backend -p 8080:8080 -p 8878:8878 -p 9200:9200 ghoranyi/docker-intuition-backend

4| The final step. This is the only step you’d need to do on your infrastructure: install the agent with this single command.

docker service create --name docker-agent --mount source=/var/run/docker.sock,target=/var/run/docker.sock --mode global --network ingress ghoranyi/docker-agent

Now you should open your browser and generate some traffic on your app. Then head to the UI to get the overview. Feel free to bring up new services, as soon as there is traffic on a service, it should show up on the UI. Alternatively, you can check out the UI just by clicking here.