Steps should be performed from the root of the nats-cnc-exploration project.
docker rm broker.example.com controller01.example.com client01.example.com controller02.example.com
docker run -v `pwd`:/nats --name broker.example.com nats -c /nats/server1.conf
docker run --link broker.example.com -v `pwd`:/nats --name controller01.example.com nats -c /nats/server2.conf
docker build nats_client -t nats_client
docker run -it --link broker.example.com --link controller01.example.com -v `pwd`:/nats --name client01.example.com nats_client /cnats/examples/nats-subscriber -s nats://client:[email protected]:4222 -tls -tlscacert /nats/ssl/certs/ca.pem -tlscert /nats/ssl/certs/client01.example.com.pem -tlskey /nats/ssl/private_keys/client01.example.com.pem
docker build nats_top -t nats_top
docker run -it --link broker.example.com --link controller01.example.com --link client01.example.com nats_top /gocode/bin/nats-top -s broker.example.com -ms 8222 -k -lookup
docker run -it --link broker.example.com --link controller01.example.com -v `pwd`:/nats --name controller02.example.com nats_client /cnats/examples/nats-publisher -s nats://controller:[email protected]:4222 -tls -tlscacert /nats/ssl/certs/ca.pem -tlscert /nats/ssl/certs/controller02.example.com.pem -tlskey /nats/ssl/private_keys/controller02.example.com.pem