From f91998f9c98a3992591bfe4a0121b89cf5e46f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Thu, 24 Feb 2022 18:08:18 +0100 Subject: [PATCH 1/3] Update steps to launch Gaia Admin Service --- admin/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/README.md b/admin/README.md index 6617be8a..11b9711c 100644 --- a/admin/README.md +++ b/admin/README.md @@ -15,6 +15,7 @@ remotely administer it with an API key. Using this service, you can: You can build this service from this directory as follows: ``` +$ npm install $ npm run build ``` From 4b9c56499db28f7f5c1f6bc4af2db0e7e8acc8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Thu, 24 Feb 2022 18:54:55 +0100 Subject: [PATCH 2/3] Updated steps --- admin/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/admin/README.md b/admin/README.md index 11b9711c..3d6e2894 100644 --- a/admin/README.md +++ b/admin/README.md @@ -15,7 +15,7 @@ remotely administer it with an API key. Using this service, you can: You can build this service from this directory as follows: ``` -$ npm install +$ sudo npm install $ npm run build ``` @@ -42,15 +42,12 @@ it needs to know the following: * what API key(s) will be used to authenticate administrative requests * what command(s) to run to restart the Gaia hub on a config change -Here is a sample config file for a Gaia hub config located at -`/tmp/gaia-config.json`, and with a single API key "`hello`". The reload -command is set to kill all instances of the `blockstack-gaia-hub` program, and -restart it with `nohup`. You should tailor this to your deployment. +Here is a sample config file for a Gaia hub config located [here](https://github.com/stacks-network/gaia/blob/master/deploy/configs/gaia/admin-config.json) with a single API key "`hello`". The reload +command is set to restart the docker container `docker_hub_1`. You should tailor this to your deployment. ```bash -$ cat /tmp/gaia-admin.json { - "argsTransport": { + "argsTransport": { "level": "debug", "handleExceptions": true, "timestamp": true, @@ -59,13 +56,16 @@ $ cat /tmp/gaia-admin.json "json": true }, "port": 8009, - "apiKeys": ["hello"], + "apiKeys": [ "hello" ], "gaiaSettings": { - "configPath": "/tmp/gaia-config.json" + "configPath": "/tmp/hub/config.json" }, "reloadSettings": { "command": "/bin/sh", - "argv": ["-c", "pkill -9 blockstack-gaia-hub; nohup /usr/bin/blockstack-gaia-hub /tmp/gaia-config.json &"], + "argv": [ + "-c", + "docker restart docker_hub_1 &" + ], "env": {}, "setuid": 1000, "setgid": 1000 From 0e861017cbb2ca5dbe7afb65cd55c86f7684aa5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Criado-P=C3=A9rez?= Date: Thu, 24 Feb 2022 19:00:25 +0100 Subject: [PATCH 3/3] package renamed The package was renamed from blockstack-gaia-admin to gaia-admin --- admin/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/README.md b/admin/README.md index 3d6e2894..7846ccb2 100644 --- a/admin/README.md +++ b/admin/README.md @@ -25,12 +25,12 @@ To run in place: $ node lib/index.js [/path/to/config.json] ``` -To install this service as the `blockstack-gaia-admin` program in your `$PATH`: +To install this service as the `gaia-admin` program in your `$PATH`: ``` $ sudo npm install -g -$ which blockstack-gaia-admin -/usr/bin/blockstack-gaia-admin +$ which gaia-admin +/usr/bin/gaia-admin ``` ## Configuration