From 67aa893f42cc36131024afbb5221b4fba3bb4311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Thor=C3=A9n?= Date: Thu, 7 Jan 2021 18:10:38 +0800 Subject: [PATCH] Add basic docs for cluster fleet (#340) * Add basic docs for cluster fleet * Add more cluster notes for viewing logs * Add note on submodules --- CHANGELOG.md | 1 + docs/contributors/README.md | 2 ++ docs/contributors/cluster-logs.md | 11 +++++++++++ docs/contributors/git-submodules.md | 10 ++++++++++ docs/faq.md | 25 +++++++++++++++---------- docs/tutorial/dingpu.md | 2 ++ examples/v2/chat2.nim | 3 +++ 7 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 docs/contributors/cluster-logs.md create mode 100644 docs/contributors/git-submodules.md diff --git a/CHANGELOG.md b/CHANGELOG.md index d64471edc..a4450e62d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next version - Refactor: Split out `waku_types` types into right place; create utils folder. +- Docs: Add information on how to query Status test fleet for node addresses; how to view logs and how to update submodules. ## 2021-01-05 v0.2 diff --git a/docs/contributors/README.md b/docs/contributors/README.md index 71aaf6e64..9f76cd72d 100644 --- a/docs/contributors/README.md +++ b/docs/contributors/README.md @@ -7,3 +7,5 @@ Example resources: - How to do releases - Viewing and modifying metrics dashboard +- Continuous integration process +- How to view Status cluster logs diff --git a/docs/contributors/cluster-logs.md b/docs/contributors/cluster-logs.md new file mode 100644 index 000000000..cdae5409f --- /dev/null +++ b/docs/contributors/cluster-logs.md @@ -0,0 +1,11 @@ +# Cluster node logs + +These can be found in [Kibana](https://kibana.status.im/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-09T20:21:49.910Z',to:now))&_a=(columns:!(message,severity_name),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d6db7610-60fd-11e9-98fa-2f101d13f938,key:program.keyword,negate:!f,params:(query:docker%2Fnim-waku-node),type:phrase),query:(match_phrase:(program.keyword:docker%2Fnim-waku-node))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d6db7610-60fd-11e9-98fa-2f101d13f938,key:fleet.keyword,negate:!f,params:(query:wakuv2.test),type:phrase),query:(match_phrase:(fleet.keyword:wakuv2.test)))),index:d6db7610-60fd-11e9-98fa-2f101d13f938,interval:auto,query:(language:kuery,query:Listening),sort:!())). + +Login with Github. For access issues, contact devops. + +Modify search field and time window as appropriate. + +Notice that there are two clusters, test and production. There is also a Waku v1 cluster. + + diff --git a/docs/contributors/git-submodules.md b/docs/contributors/git-submodules.md new file mode 100644 index 000000000..52336e25a --- /dev/null +++ b/docs/contributors/git-submodules.md @@ -0,0 +1,10 @@ +# Submodules + +We use Git submodules in the `vendor` directory to track internal Nim +dependencies. We want to update submodules all at once to avoid issues. + +``` +git submodule foreach --recursive git submodule update --init +git submodule update --remote +``` + diff --git a/docs/faq.md b/docs/faq.md index 4f3a9b27f..c4888f044 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,19 +1,24 @@ # FAQ -## Where do I find cluster node logs? (internal) - -At [Kibana](https://kibana.status.im/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-09T20:21:49.910Z',to:now))&_a=(columns:!(message,severity_name),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d6db7610-60fd-11e9-98fa-2f101d13f938,key:program.keyword,negate:!f,params:(query:docker%2Fnim-waku-node),type:phrase),query:(match_phrase:(program.keyword:docker%2Fnim-waku-node))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:d6db7610-60fd-11e9-98fa-2f101d13f938,key:fleet.keyword,negate:!f,params:(query:wakuv2.test),type:phrase),query:(match_phrase:(fleet.keyword:wakuv2.test)))),index:d6db7610-60fd-11e9-98fa-2f101d13f938,interval:auto,query:(language:kuery,query:Listening),sort:!())) - -Login with Github. For access issues, contact devops. - -Modify search field and time window as appropriate. - ## How do I see what address a node is listening for? Grep for "Listening on". It should be printed at INFO level at the beginning. E.g. from Kibana: `Oct 7, 2020 @ 23:17:00.383INF 2020-10-07 23:17:00.375+00:00 Listening on topics="wakunode" tid=1 file=wakunode2.nim:140 full=/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmJb2e28qLXxT5kZxVUUoJt72EMzNGXB47Rxx5hw3q4YjS` -## How do I update all submodules at once? +## How do I find out node addresses at the test cluster? -`git submodule foreach --recursive git submodule update --init` +The easiest way is to use `jq` and query the fleets registry that Status operates: + +``` +curl -s https://fleets.status.im | jq '.fleets["wakuv2.test"]' + +# Output +{ + "waku": { + "node-01.ac-cn-hongkong-c.wakuv2.test": "/ip4/0.0.0.0/tcp/30303/p2p/16Uiu2HAmSyrYVycqBCWcHyNVQS6zYQcdQbwyov1CDijboVRsQS37", + "node-01.do-ams3.wakuv2.test": "/ip4/0.0.0.0/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ", + "node-01.gc-us-central1-a.wakuv2.test": "/ip4/0.0.0.0/tcp/30303/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ" + } +} +``` diff --git a/docs/tutorial/dingpu.md b/docs/tutorial/dingpu.md index ecfbdb162..3ee486031 100644 --- a/docs/tutorial/dingpu.md +++ b/docs/tutorial/dingpu.md @@ -1,5 +1,7 @@ # Dingpu testnet +*NOTE: Some of these addresses might change. To get the latest, please see `curl -s https://fleets.status.im | jq '.fleets["wakuv2.test"]'`* + ## Basic chat usage > If historical messaging is desired, the chat app requires that the remote peer specified in `storenode` option supports the WakuStore protocol. For the current cluster node deployed as part of Dingpu this is already the case. diff --git a/examples/v2/chat2.nim b/examples/v2/chat2.nim index 459abdf3f..e0be4071e 100644 --- a/examples/v2/chat2.nim +++ b/examples/v2/chat2.nim @@ -1,3 +1,6 @@ +## chat2 is an example of usage of Waku v2. For suggested usage options, please +## see dingpu tutorial in docs folder. + when not(compileOption("threads")): {.fatal: "Please, compile this program with the --threads:on option!".}