GEMLINK node AMI app.
All commands should be executed as root or with sudo
.
- Install
ami
if not installed alreadywget -q https://raw.githubusercontent.com/alis-is/ami/master/install.sh -O /tmp/install.sh && sh /tmp/install.sh
- Create directory for your application (it should not be part of user home folder structure, you can use for example
/mns/glink1
) - Create
app.json
orapp.hjson
with app configuration you like, e.g.:
{
"id": "glink22",
"type": "glink.node",
"configuration": {
"DAEMON_CONFIGURATION": {
"bind": "aaa.bbb.ccc.ddd",
"rpcbind": "127.0.0.22",
"port": 16113,
"txindex": 1,
"masternode": 1,
"rpcallowip": "127.0.0.0/8",
"masternodeprivkey": "5JM..........QYhRN"
}
},
"user": "glink1"
}
Above example is a config file for 22nd masternode. Depending on the node You have to change these lines:
"id": "glink22",
"bind": "aaa.bbb.ccc.ddd",
"rpcbind": "127.0.0.22",
"masternodeprivkey": "5JM..........QYhRN"
As You can see '22' appears in 'id' and 'rpcbind' IP. Of course each masternode uses different external IP and Private key ('masternodeprivkey').
- Run
ami --path=<your app path> setup
- e.g.
ami --path=/mns/glink1
. Runami --path=<your app path> --help
to investigate available commands
- e.g.
- Start your node with
ami --path=<your app path> start
- Check info about the node
ami --path=<your app path> info
ami --path=<your app path> stop
- change app.json or app.hjson as you like
ami --path=<your app path> setup --configure
ami --path=<your app path> start
ami --path=<your app path> stop
ami --path=<your app path> remove --all
ami --path=<your app path> stop
ami --path=<your app path> remove
- removes app data onlyami --path=<your app path> start
ami --path=<your app path> stop
ami --path=<your app path> removedb
ami --path=<your app path> start
- Let's say we have one masternode in directory /mns/glink1. We want to create another one in /mns/glink2, so first we have to stop first masternode using command:
ami --path=/mns/glink1 stop
- We create a directory for masternode 2 using command:
mkdir /mns/glink2
- Next we copy all the files from /mns/glink1 to /mns/glink2 recursively:
cp -R /mns/glink1/* /mns/glink2
- Then remember to edit app.json file in /mns/glink2
- Rebuild configuration for new MN:
ami --path=/mns/glink2 setup
- Start new MN:
ami --path=/mns/glink2 start
- Don't forget to start source MN which we stopped in first step:
ami --path=/mns/glink1 start
- Check if both masternodes are running well:
ami --path=/mns/glink1 info
ami --path=/mns/glink2 info
Run ami with -ll=trace
to enable trace level printout, e.g.:
ami --path=/mns/glink1 -ll=trace setup