From ccdd2bc2c70aec361ae830c4a0e384f6f06790c5 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Fri, 7 Aug 2015 23:12:48 -0700 Subject: [PATCH] Add in docs for NATS --- nats/README-short.txt | 1 + nats/content.md | 108 ++++++++++++++++++++++++++++++++++++++++++ nats/license.md | 1 + nats/logo.png | Bin 0 -> 7445 bytes 4 files changed, 110 insertions(+) create mode 100644 nats/README-short.txt create mode 100644 nats/content.md create mode 100644 nats/license.md create mode 100644 nats/logo.png diff --git a/nats/README-short.txt b/nats/README-short.txt new file mode 100644 index 000000000000..4fbc1609eec2 --- /dev/null +++ b/nats/README-short.txt @@ -0,0 +1 @@ +NATS is an open-source, high-performance, cloud native messaging system. diff --git a/nats/content.md b/nats/content.md new file mode 100644 index 000000000000..b91111b75a66 --- /dev/null +++ b/nats/content.md @@ -0,0 +1,108 @@ +[NATS](https://nats.io): A high-performance cloud native messaging system. +========================================================================== + +%%LOGO%% + +`nats` is a high performance server for the NATS Messaging System. + +Example usage +============= + +```bash +# Run a NATS server +# Each server exposes multiple ports +# 4222 is for clients. +# 8222 is an HTTP management port for information reporting. +# 6222 is a routing port for clustering. +# use -p or -P as needed. + +$ docker run -d --name nats-main nats +[1] 2015/08/08 02:18:59.240582 [INF] Starting gnatsd version 0.6.4 +[1] 2015/08/08 02:18:59.240694 [INF] Starting http monitor on port 8222 +[1] 2015/08/08 02:18:59.240708 [INF] Listening for route connections on 0.0.0.0:6222 +[1] 2015/08/08 02:18:59.240801 [INF] Listening for client connections on 0.0.0.0:4222 +[1] 2015/08/08 02:18:59.240823 [INF] gnatsd is ready + +... + +# To run a second server and cluster them together.. +$ docker run -d --name=nats-2 --link nats-main nats --routes=nats-route://ruser:T0pS3cr3t@nats-main:6222 + +# If you want to verify the routes are connected, try +$ docker run -d --name=nats-2 --link nats-main nats --routes=nats-route://ruser:T0pS3cr3t@nats-main:6222 -DV +[1] 2015/08/08 06:06:18.662453 [INF] Starting gnatsd version 0.6.4 +[1] 2015/08/08 06:06:18.662524 [INF] Starting http monitor on port 8222 +[1] 2015/08/08 06:06:18.662680 [INF] Listening for route connections on :6222 +[1] 2015/08/08 06:06:18.662807 [INF] Listening for client connections on 0.0.0.0:4222 +[1] 2015/08/08 06:06:18.662831 [INF] gnatsd is ready +[1] 2015/08/08 06:06:18.662862 [DBG] Trying to connect to route on nats-main:6222 +[1] 2015/08/08 06:06:18.663579 [DBG] 172.17.0.52:6222 - rid:1 - Route connection created +[1] 2015/08/08 06:06:18.663647 [DBG] 172.17.0.52:6222 - rid:1 - Route connect msg sent +[1] 2015/08/08 06:06:18.664040 [DBG] 172.17.0.52:6222 - rid:1 - Registering remote route "ee35d227433a738c729f9422a59667bb" +[1] 2015/08/08 06:06:18.664133 [DBG] 172.17.0.52:6222 - rid:1 - Route sent local subscriptions +``` + +The server will load the configuration file below. Any command line flags can override these values. + +Default Configuration File +-------------------------- + +```conf +# Client port of 4222 on all interfaces +port: 4222 + +# HTTP monitoring port +monitor_port: 8222 + +# This is for clustering multiple servers together. +cluster { + + # Route connections to be received on any interface on port 6222 + port: 6222 + + # Routes are protected, so need to use them with --routes flag + # e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222 + authorization { + user: ruser + password: T0pS3cr3t + timeout: 0.75 + } + + # Routes are actively solicited and connected to from this server. + # This Docker image has none by default, but you can pass a + # flag to the gnatsd docker image to create one to an existing server. + routes = [] +} +``` + +Commandline Options +------------------- + +```bash +Server Options: + -a, --addr HOST Bind to HOST address (default: 0.0.0.0) + -p, --port PORT Use PORT for clients (default: 4222) + -P, --pid FILE File to store PID + -m, --http_port PORT Use HTTP PORT for monitoring + -c, --config FILE Configuration File + +Logging Options: + -l, --log FILE File to redirect log output + -T, --logtime Timestamp log entries (default: true) + -s, --syslog Enable syslog as log method. + -r, --remote_syslog Syslog server addr (udp://localhost:514). + -D, --debug Enable debugging output + -V, --trace Trace the raw protocol + -DV Debug and Trace + +Authorization Options: + --user user User required for connections + --pass password Password required for connections + +Cluster Options: + --routes [rurl-1, rurl-2] Routes to solicit and connect + +Common Options: + -h, --help Show this message + -v, --version Show version +``` diff --git a/nats/license.md b/nats/license.md new file mode 100644 index 000000000000..008af6430b07 --- /dev/null +++ b/nats/license.md @@ -0,0 +1 @@ +View [license information](https://github.com/nats-io/gnatsd/blob/master/LICENSE) for the software contained in this image. diff --git a/nats/logo.png b/nats/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..a873c98b0ae47edfa7cbc06566f59abe81e5ce84 GIT binary patch literal 7445 zcma)fWl&sA)aE7F;Dfsi9^73Ax8UwhkN^RK6J&4;?gWS6P6!fQ0|ZD2PH^`S9Cq@4 zTeVeN`(vxRtLvVAy3cuzboY(cc%^`aPKFKu0G5)XtQLG6_}4)w0D#a|*!>9qKyyS?_CAsL z_39s}N>p&FimMhOh(-$<8%&VI$O1tFD@Q>J7YH?bapmNY$VUpI5EBxD;|Mj`Fk{f? zQMVvP31P)iF=O}Z{>4sno!2`PPc6SBcB?P*nx;^DK$z)@yqf&Mn4h3jxWB`O2Zq+S zIHW?*>D>S@sL2N6@koaN+yseHW?u5S(|D<&OXur$Pu33X%XC zeA_5lz(EwKp3;kv0}QwT0y~ufVPKve;8N1JQv~YUfSyS(Mk4^i1h_P#!e0VN{(!{@ z9i0yV%K`}GFZ9LES!=<&EO1X{HHx*<3(JKVgV^0s_4PTZm?xEpSqTIzUsz^KarF6S zk@AG_;rzb*1^@*~gmAW(k3N&wwUd(q39Z=X><3>_o@uSDHlMbqs@$XiVBIrl`iYIR zi7Z$YCD`Suh~Wgu!3?9o>pIr15l5;8DA-@rzjXWO8@a*{?F$RrTU+zW15jhjG5x?N z`#$p?{YU59AhCz*tKZ!l^dUT^Aqq%0zx%%ZQ7xsIN=AcOE$<{MJhWjvKTyun4k%f* z8?X>;YT~&k$Y#e~@|4m>Lz7<)GR!>NY^<@}BTB6C1NDv)2>waz6{gmRe^r>k2A(|| z*8p(Q;oAFy8H5<@5Vk(${d_9UVhlmt6Y>qzN z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