Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Simple tutorial on using NATS with Weave Net and Scope, using Docker for Mac

License

Notifications You must be signed in to change notification settings

weaveworks-guides/weave-nats-tutorial

Repository files navigation

Container Chat with NATS

Note: The guides in here haven't been updated in a while. They might or might not work for you. We are keeping them around for informational purposes.

For up-to-date documentation around products and projects started by Weaveworks, please refer to:

Weaveworks products: https://weave.works/docs

Open Source projects started at Weaveworks:


Docker for Mac

Setup:

weave launch
./compose up
./compose ps

Access Weave Scope:

open http://localhost:4040

Weave Scope - NATS cluster and client apps Weave Scope - NATS cluster and node details Weave Scope - all containers by Weave Net DNS names

Access the Container Chat app:

open http://localhost:8080

Send some requests in:

curl -XPUT localhost:8080/echo/BOOM
curl -XPUT localhost:8080/echo/BOOM
curl -XPUT localhost:8080/echo/YEAH

Scale the backend:

./compose scale

Send more requests:

curl -XPUT localhost:8080/echo/MOAR
curl -XPUT localhost:8080/echo/MOAR

Make change to Ruby or JavaScript code, run ./compose up to update!

Kill it, if you had enough:

./compose down
weave stop

For EC2 Container Service

Prerequisites:

  • Must have AWS CLI installed and configured with credentials.
  • Ideally should have ownership of the AWS account.
  • Will also need EC2 key name.
aws cloudformation create-stack \
  --stack-name weave-nats-demo \
  --parameters ParameterKey=KeyName,ParameterValue=<YourKeyNameKey> \
  --capabilities CAPABILITY_IAM \
  --template-body "file:////${PWD}/cloudformation.json"

About

Simple tutorial on using NATS with Weave Net and Scope, using Docker for Mac

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published