0
0

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 3 years have passed since last update.

前提条件

  • Docker、node.js、npmはインストール済み
  • 使用PC:M1 Mac
  • API・DBコンテナは起動済み
  • 作業ディレクトリは~/User/development/

各コンテナの動作確認

Hyperledger Iroha

iroha-cli

iroha-cliとは、Hyperledger Iroha プロセスにアクセスするものでほぼすべての処理(transaction)を指示でき、 状態の表示(query)もできます。つまり、Hyperledger Iroha はプログラムなしでも利用できます。

iroha-cli起動

iroha-cliコマンドで対話型のAPI操作が可能となります。以下は起動コマンドのフォーマットです。以下はアカウントをデフォルトで入っているadmin@testに指定します。

iroha-cli --account_name (アカウント名)@ドメイン名

例題:ロールの表示

ロール

ロールとは複数の権限を 1 つのグループにまとめたものです。

動作確認

①irohaコンテナにアクセス

docker exec -it iroha /bin/bash 

②iroha-cli起動

iroha-cli -account_name admin@test

③「New query(qry)」を選択
④「Get all current roles in the system (get_roles)」を選択
④「Send to iroha peer(send)」を選択
⑥ Peer のアドレスを選択

  • デフォルト値の 0.0.0.0 の場合、 そのまま Enter キーを押す

⑦ port を選択

  • デフォルト値の 50051 の場合、 そのまま Enter キーを押す

⑧ 結果が表示される
⑨ iroha-cli コマンド終了

  • Ctrl + C キーを押す

最終状況

スクリーンショット 2022-04-08 8.10.01.png

PostgresSQL

Hyperledger Iroha プロセスの正常動作をiroha-cliコマンドで確認できれば、some-postgresコンテナのPostgreSQLデータベースの動作も正常といえます(その理由は各自で考えてください) 。

まとめ

対話型簡単で良いですね。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?