17
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

2分でできるcatapult環境構築 on Amazon EC2

Last updated at Posted at 2018-05-25

catapult環境を作成するにはCatapult Service Bootstrapを使うと簡単。

以下、Amazon EC2でインスタンス作成後にやったこと。

git/docker/docker-composeインストール

sudo yum update -y
sudo yum install -y git docker 
sudo curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo gpasswd -a $USER docker
sudo service docker start

Catapult Service Bootstrap

git clone https://github.com/tech-bureau/catapult-service-bootstrap
cd catapult-service-bootstrap/
./cmds/start-all

おっ動いた。

api-node-0_1              | 2018-05-25 00:54:27.013300 0x00007f1016ffd700:<info> (disruptor::ConsumerDispatcher.cpp@44) completing processing of element 1 (1 blocks (heights 2 - 2) [F91EBB0B] from Remote_Pull), last consumer is 0 elements behind
peer-node-0_1             | 2018-05-25 00:54:27.614133 0x00007fa6a0aa6700: <debug> (src::NetworkHeightService.cpp@45) network chain height increased from 1 to 2
peer-node-1_1             | 2018-05-25 00:54:27.614892 0x00007f75c99e2700: <debug> (src::NetworkHeightService.cpp@45) network chain height increased from 1 to 2
api-node-0_1              | 2018-05-25 00:54:27.774238 0x00007f103d056700: <debug> (src::NetworkHeightService.cpp@45) network chain height increased from 1 to 2

接続してみる。

$ docker ps
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS              PORTS                    NAMES
23c2fc211408        techbureau/catapult-rest-server:1.0.7   "ash -c '/bin-mount/…"   20 minutes ago      Up 20 minutes       0.0.0.0:3000->3000/tcp   catapultservicebootstrap_rest-gateway_1
3455f1909e9c        catapultservicebootstrap_api-node-0     "bash -c '/bin-mount…"   20 minutes ago      Up 20 minutes                                catapultservicebootstrap_api-node-0_1
eba47d76554a        catapultservicebootstrap_peer-node-0    "bash -c '/bin-mount…"   20 minutes ago      Up 20 minutes                                catapultservicebootstrap_peer-node-0_1
75c9768d7d32        catapultservicebootstrap_peer-node-1    "bash -c '/bin-mount…"   20 minutes ago      Up 20 minutes                                catapultservicebootstrap_peer-node-1_1
507b9af6f2b0        mongo                                   "docker-entrypoint.s…"   20 minutes ago      Up 20 minutes       27017/tcp                catapultservicebootstrap_db_1

$ docker exec -it eba47d76554a /bin/bash
#

追記

以下に各設定ファイル等があるので適宜参照。

アドレス/秘密鍵/公開鍵一覧

 catapult-service-bootstrap/build/generated-addresses/raw-addresses.txt

設定ファイルのアドレス/鍵情報は上記を参照。

各サーバの設定ファイル

 catapult-service-bootstrap/build/catapult-config
  - peer-node-0
  - peer-node-1
  - api-node-0
  - rest-gateway-0

nemesisファイルの設定ファイル

 catapult-service-bootstrap/build/nemesis/block-properties-file.properties

mijin-test用のxemを持っている人の鍵もわかったので、次はnem2-cliでいろいろ操作してみよう。

追記

以下追記しました。
catapult環境でのxemの送金(nem2-cli)

17
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?