Symbol bootstrap v0.2.0 から v0.2.2 へのバージョンアップ
https://github.com/nemtech/symbol-bootstrap
Symbol bootstrap のワーキングディレクトリへ移動。(READMEの通りだと my-networks)
$ cd my-networks
~/my-networks$ symbol-bootstrap --help
Symbol tool that allows you creating, configuring and running Symbol's networks
VERSION
symbol-bootstrap/0.2.0 linux-x64 node-v15.0.1
USAGE
$ symbol-bootstrap [COMMAND]
COMMANDS
clean It removes the target folder deleting the generated configuration and data
compose It generates the `docker-compose.yml` file from the configured network.
config Command used to set up the configuration files and the nemesis block for the current network
healthCheck It checks if the services created with docker compose are up and running.
help display help for symbol-bootstrap
link It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node
registration to an existing network.
report it generates reStructuredText (.rst) reports describing the configuration of each node.
resetData It removes the data keeping the generated configuration, certificates, keys and block 1.
run It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands
need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.
start Single command that aggregates config, compose and run in one line!
stop It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose
down` bash call.
ヘルプで確認すると stop コマンドがあるので停止させる
$ symbol-bootstrap stop
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-11-03T07:46:31.387Z info Spawn command: docker-compose -f target/docker/docker-compose.yml down
Stopping rest-gateway ... done
Stopping api-node ...
Stopping api-node ... done
Stopping db ...
Stopping api-broker ... done
Stopping db ... done
Removing rest-gateway ...
Removing rest-gateway ... done
Removing api-broker ...
Removing db ...
Removing api-broker ... done
Removing db ... done
Removing network docker_default
ターゲットフォルダを削除
$ sudo rm -rf ./target
npmインストール
$ sudo npm install -g symbol-bootstrap
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated js-joda@1.11.0: This package is deprecated, please check/use @js-joda/core instead
added 212 packages, and audited 212 packages in 15s
13 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
バージョン確認
$ symbol-bootstrap -v
symbol-bootstrap/0.2.1 linux-x64 node-v15.0.1
(おや?バージョン0.2.1 まぁいいや)
設定ファイル生成
$ symbol-bootstrap config -p testnet -a dual
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-11-03T08:11:50.933Z info Generating config from preset bootstrap
2020-11-03T08:11:50.995Z info Pulling image symbolplatform/symbol-server:tools-gcc-0.10.0.3
2020-11-03T08:11:51.036Z info Spawn command: docker pull symbolplatform/symbol-server:tools-gcc-0.10.0.3
2020-11-03T08:11:54.288Z info tools-gcc-0.10.0.3: Pulling from symbolplatform/symbol-server
Digest: sha256:0c8564a8a4065530fb824f340e84397221290f9df2ac1566c02b495bf4a7e0b6
Status: Image is up to date for symbolplatform/symbol-server:tools-gcc-0.10.0.3
2020-11-03T08:11:54.290Z info docker.io/symbolplatform/symbol-server:tools-gcc-0.10.0.3
2020-11-03T08:11:54.296Z info Image pulled: docker.io/symbolplatform/symbol-server:tools-gcc-0.10.0.3
2020-11-03T08:11:54.620Z info User for docker resolved: 1000:1000
2020-11-03T08:11:54.621Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-11-03T08:11:54.643Z info User for docker resolved: 1000:1000
2020-11-03T08:11:54.644Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-11-03T08:11:54.656Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
2020-11-03T08:11:58.455Z info Certificate for node peer-node-1 created
2020-11-03T08:11:58.503Z info Certificate for node api-node-0 created
2020-11-03T08:11:58.529Z info Certificate for node peer-node-0 created
2020-11-03T08:11:58.988Z info Non-voting node api-node-0.
2020-11-03T08:11:58.990Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.votingkey --secret=35FD6E30B21C098F8BCAD01D0E70F0EFC092E58ECE7B8FFCCF9E98BAA2627E5E --dilution=128 --startEpoch=1 --endEpoch=26280 --output=/votingKeys/private_key_tree1.dat
2020-11-03T08:11:59.006Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.votingkey --secret=5C67DB9C73A75E206B79109CEB4F3F50273A4F91F5E9333C53CB018AA61F7C27 --dilution=128 --startEpoch=1 --endEpoch=26280 --output=/votingKeys/private_key_tree1.dat
2020-11-03T08:12:01.022Z info Voting key executed for node peer-node-0!
2020-11-03T08:12:01.055Z info Voting key executed for node peer-node-1!
2020-11-03T08:12:01.245Z info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 /usr/catapult/bin/catapult.tools.nemgen --resources=/userconfig --nemesisProperties=./userconfig/block-properties-file.properties
2020-11-03T08:12:02.487Z info Nemgen executed!!!!
2020-11-03T08:12:02.538Z info Configuration generated.
docker-compose ファイル生成?
$ symbol-bootstrap compose
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-11-03T08:13:08.021Z info User for docker resolved: 1000:1000
2020-11-03T08:13:08.027Z info creating docker-compose.yml from last used profile.
2020-11-03T08:13:08.060Z info docker-compose.yml file created /home/ubuntu/my-networks/target/docker/docker-compose.yml
稼働
$ symbol-bootstrap run
_ _ _ _ _
___ _ _ _ __ ___ | |__ ___ | | | |__ ___ ___ | |_ ___ | |_ _ __ __ _ _ __
/ __| | | | | | '_ ` _ \ | '_ \ / _ \ | | _____ | '_ \ / _ \ / _ \ | __| / __| | __| | '__| / _` | | '_ \
\__ \ | |_| | | | | | | | | |_) | | (_) | | | |_____| | |_) | | (_) | | (_) | | |_ \__ \ | |_ | | | (_| | | |_) |
|___/ \__, | |_| |_| |_| |_.__/ \___/ |_| |_.__/ \___/ \___/ \__| |___/ \__| |_| \__,_| | .__/
|___/ |_|
2020-11-03T08:14:47.370Z info Pulling image mongo:4.2.6-bionic
2020-11-03T08:14:47.397Z info Spawn command: docker pull mongo:4.2.6-bionic
2020-11-03T08:14:47.398Z info Pulling image symbolplatform/symbol-server:gcc-0.10.0.3
2020-11-03T08:14:47.420Z info Spawn command: docker pull symbolplatform/symbol-server:gcc-0.10.0.3
2020-11-03T08:14:47.422Z info Pulling image symbolplatform/symbol-rest:2.1.0
2020-11-03T08:14:47.445Z info Spawn command: docker pull symbolplatform/symbol-rest:2.1.0
2020-11-03T08:14:49.072Z info gcc-0.10.0.3: Pulling from symbolplatform/symbol-server
Digest: sha256:6ad8417c1567cc07f834b389d953e0b5c4c7fb75a841671488b4ae93408e21ab
Status: Image is up to date for symbolplatform/symbol-server:gcc-0.10.0.3
2020-11-03T08:14:49.073Z info docker.io/symbolplatform/symbol-server:gcc-0.10.0.3
2020-11-03T08:14:49.074Z info 4.2.6-bionic: Pulling from library/mongo
2020-11-03T08:14:49.078Z info Image pulled: docker.io/symbolplatform/symbol-server:gcc-0.10.0.3
2020-11-03T08:14:49.322Z info 2.1.0: Pulling from symbolplatform/symbol-rest
2020-11-03T08:14:49.323Z info Digest: sha256:5aa54ce2a911befc7441e233a01414bbeca57777b1b6634f3b4a83fb63c84cda
Status: Image is up to date for symbolplatform/symbol-rest:2.1.0
docker.io/symbolplatform/symbol-rest:2.1.0
2020-11-03T08:14:49.328Z info Image pulled: docker.io/symbolplatform/symbol-rest:2.1.0
2020-11-03T08:14:49.667Z info Digest: sha256:a89b09e8bc3153c5c87c52e36a7b6f992ee874c5329cc631e5d9542bf1cbfe31
Status: Image is up to date for mongo:4.2.6-bionic
2020-11-03T08:14:49.667Z info docker.io/library/mongo:4.2.6-bionic
2020-11-03T08:14:49.674Z info Image pulled: docker.io/library/mongo:4.2.6-bionic
2020-11-03T08:14:49.691Z info Spawn command: docker-compose -f target/docker/docker-compose.yml up --remove-orphans
peer-node-0 is up-to-date
api-node-broker-0 is up-to-date
peer-node-1 is up-to-date
db-0 is up-to-date
api-node-0 is up-to-date
rest-gateway-0 is up-to-date
Attaching to peer-node-0, api-node-broker-0, peer-node-1, db-0, api-node-0, rest-gateway-0
api-node-0 | RUNNING runServerRecover.sh api-node-0
api-node-0 | !!!! DO NOT HAVE ANY LOCK FILE... There is no need to recover
api-node-0 | RUNNING startServer.sh api-node-0
api-node-0 | !!!! Going to start server now....
api-node-0 | Copyright (c) Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp.
api-node-0 | catapult version: 0.10.0.3 (public)
api-node-0 | loading resources from "./userconfig/resources"
api-node-0 | loading configuration from "./userconfig/resources/config-inflation.properties"
〜〜〜
稼働確認
$ curl http://localhost:3000/node/info
$ curl http://localhost:3000/chain/info
Comments