Skip to content

Commit

Permalink
Merge pull request #364 from criadoperez/patch-1
Browse files Browse the repository at this point in the history
Update steps to launch Gaia Admin Service
  • Loading branch information
jcnelson authored Feb 24, 2022
2 parents 86ba950 + 0e86101 commit 70b8763
Showing 1 changed file with 13 additions and 12 deletions.
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

0 comments on commit 70b8763

Please # to comment.