Hyperledger Indy 설치
🚪

Hyperledger Indy 설치

Description
오픈소스 Hyperledger Indy 설치
category
ETC
Tag
BlockChain
Hyperledger INDY
Date
Feb 26, 2024 07:15 AM
 

실습 환경

WINDOW 10, 11
가상 머신 : Oracle VirtualBox 6.1.34 r150636 (Qt5.6.2)
메모리 : 4GB 디스크 : 40GB
 
 
1-1 c 빌드 프로그램 설치
sudo apt-get install make -y
make 설치
 
sudo apt-get install g++ -y
C/C++ 컴파일러 설치
 
1-2 Rust 빌드 프로그램 설치
sudo curl https://sh.rustup.rs -sSf | sh
rust 설치
 
rustc --version
rust 버전 확인
 
1-3 Indy SDK 빌드 및 설치
sudo apt-get update && \ sudo apt-get install -y \ build-essential \ pkg-config \ cmake \ libssl-dev \ libsqlite3-dev \ libzmq3-dev \ libncursesw5-dev
필요한 라이브러리와 도구 설치
 
cd /tmp && \ curl https://download.libsodium.org/libsodium/releases/old/unsupported/libsodium-1.0.14.tar.gz | tar -xz && \ cd /tmp/libsodium-1.0.14 && \ ./configure --disable-shared && \ make && \ sudo make install && \ rm -rf /tmp/libsodium-1.0.14
libsodium 설치
 
cd $HOME git clone https://github.com/hyperledger/indy-sdk.git cd ./indy-sdk/libindy cargo buildcd $HOME git clone https://github.com/hyperledger/indy-sdk.git cd ./indy-sdk/libindy cargo build
libindy 소스 다운로드
 
1-4 docker 설치
sudo apt update sudo apt install -y apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" sudo apt update
 
sudo apt install -y docker
docker 설치
 
sudo systemctl status docker
docker 설치 확인
 
sudo usermod -aG docker $USER newgrp docker
Docker 그룹에 유저 추가
 
1-5 테스트
cd $HOME/indy-sdk sudo docker build -f ci/indy-pool.dockerfile -t indy_pool .
Indy 풀 빌드
 
sudo docker run -itd -p 9701-9708:9701-9708 indy_pool
Indy 풀 실행
 
docker network create --subnet 10.0.0.0/8 indy_pool_network docker build --build-arg pool_ip=10.0.0.2 -f ci/indy-pool.dockerfile -t indy_pool .
Indy 풀 네트워크 생성
 
docker run -d --ip="10.0.0.2" --net=indy_pool_network indy_pool
Indy 풀 네트워크 실행
 
cd $HOME/indy-sdk/libindy RUST_TEST_THREADS=1 cargo test RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test
테스트 시작 Indy 풀의 IP를 아래와 같이 환경변수 TEST_POOL_IP에 지정하여 실행할 수 있습니다.
 
cd $HOME/indy-sdk/cli/ RUSTFLAGS=" -L ../libindy/target/debug" cargo build
인디 CLI 빌드
 
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/indy-sdk/libindy/target/debug" >> ~/.bashrc sudo ldconfig source ~/.bashrc
인디 CLI 빌드
 
cd $HOME/indy-sdk/cli/target/debug ./indy-cli
인디 CLI 실행
 
 
 

DOCKER 연결이 안되는 경우

sudo usermod -aG docker $USER newgrp docker
Docker 그룹에 유저 추가
 

참고 사이트

 
genesis file 관련
 
# indy-sdk 가 $home/indy-sdk에 설치되었다고 가정 docker build -f ~/indy-sdk/ci/indy-pool.dockerfile -t indy_pool . docker run -itd -p 9701-9708:9701-9708 indy_pool docker network create --subnet 10.0.0.0/8 indy_pool_network docker build --build-arg pool_ip=10.0.0.2 -f ci/indy-pool.dockerfile -t indy_pool . docker run -d --ip="10.0.0.2" --net=indy_pool_network indy_pool
docker pool connect error
 
 
docker build -f /home/indy-sdk/ci/indy-pool.dockerfile -t indy_pool . docker run -itd -p 9701-9708:9701-9708 indy_pool docker network create --subnet 10.0.0.0/8 indy_pool_network docker build --build-arg pool_ip=10.0.0.2 -f /home/indy-sdk/ci/indy-pool.dockerfile -t indy_pool . docker run -d --ip="10.0.0.2" --net=indy_pool_network indy_pool
VM VirtualBox docker pool connect error
 
pool create "name" gen_txn_file=../../docker_pool_transactions_genesis
인디 풀 생성