2
0

More than 5 years have passed since last update.

Hyperledger Fabric v1.1.0およびv1.2.0環境設定 (ソースDLしない版)

Last updated at Posted at 2018-06-26

Change Log

2018-09-29 v1.3.0-rc1のリリースに伴い説明変更
2018-07-08 v1.2.0のリリースに伴い説明変更

参考文献

最新版のドキュメントはこちら。 http://hyperledger-fabric.readthedocs.io/en/latest/install.html
ただしv1.3.0-rc1向けに記述が変わっているので注意。release-1.1用のドキュメントを見ようとするとエラーになるので注意。

bootstrap.shのダウンロード

curlで取ってこいと (v1.3.0-rc1の) ドキュメントに書いてあるのはこちらのファイル:

v1.2.0用のが欲しい場合は、こちらを取得するべし

v1.1.0用のが欲しい場合は、こちらを取得するべし

たとえばこうやって取得

curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/release-1.2/scripts/bootstrap.sh

注意

いつもそうなのだが、v1.2.0 (v1.1.0) 用のbootstrap.shを取ってくるときにタグv1.2.0 (v1.1.0) のリビジョンのものを使おうとすると古いので注意。つまり、タグの更新よりbootstrap.shなどのスクリプトファイルの更新のほうが後にくる。そういう場合は大抵ブランチ release-1.2 (release-1.1) のHEADを取ってくると上手くいく。

バグ修正

v1.2.0のbootstrap.shはMacOSでは?正しく動かない。

# then parse opts
while getopts "h?dsb" opt; do
  case "$opt" in
    h|\?)
      printHelp
      exit 0
    ;;
    d)  DOCKER=false
    ;;
    s)  SAMPLES=false
    ;;
    b)  BINARIES=false
    ;;
  esac
done

BINARIES=true の直後に移動し、 shift $((OPTIND-1)) を追加すること。

bootstrap.shの実行

オプションなしで実行するといろいろ動き出すため注意。

bash bootstrap.sh

v1.2.0での動作

v1.2.0以降のこれは以下の動作をする:

  1. fabric-samples (https://github.com/hyperledger/fabric-samples) のチェックアウト
  2. Platform specific binariesのダウンロード
  3. Dockerイメージのpullとlatestタグ付け

上記バグを修正した後に -h オプションを付けると以下のヘルプが表示される。

$ ./bootstrap.sh -h
Usage: bootstrap.sh [<version>] [<ca_version>] [<thirdparty_version>][-d -s -b]

-d - bypass docker image download
-s - bypass fabric-samples repo clone
-b - bypass download of platform-specific binaries

e.g. bootstrap.sh 1.2.0 -s
would download docker images and binaries for version 1.2.0

上記の修正の後では bootstrap.sh 1.2.0 -s では動かないので bootstrap.sh -s 1.2.0 などとすること。

v1.2より前の動作

v1.1.0以前では以下の動作をする:

  1. Platform specific binariesのダウンロード
  2. Dockerイメージのpullとlatestタグ付け

なおこのスクリプトはpullしたイメージにlatestタグをつけるため、イメージの色々なバージョン (タグ) で実験したい開発者には嬉しくない。

参考

Fabricのバージョン別、ダウンロードすべきdockerイメージのバージョン一覧

なお、v1.0.4以前はbootstrap.shがない。どこにこのスクリプトがあったか調査中

↓ Fabricバージョン Fabricイメージのタグ 1 Fabric CAイメージのタグ 2 サードパーティ・イメージのタグ 3
v1.3.0-rc1 1.3.0-rc1 1.3.0-rc1 0.4.12
v1.2.0 1.2.0 1.2.0 0.4.10
v1.1.0 1.1.0 1.1.0 0.4.6
v1.0.6 1.0.6 1.0.6 1.0.6
v1.0.5 1.0.5 1.0.5 1.0.5

  1. fabric-peer / fabric-orderer / fabric-ccenv / fabric-javaenv (v1.1.0以前) / fabric-tools 

  2. fabric-ca 

  3. fabric-couchdb / fabric-kafka / fabric-zookeeper 

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