Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update steps to launch Gaia Admin Service #364

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
$ sudo npm install
$ npm run build
```

Expand All @@ -24,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
Expand All @@ -41,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,
Expand All @@ -58,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
Expand Down