From 5319cb8b46b197f73daef985011f8e523deb3282 Mon Sep 17 00:00:00 2001 From: Yi DENG Date: Thu, 14 Mar 2019 16:37:04 +0800 Subject: [PATCH] fix bug: fabric-ca network bug in MacOS, make it must use linux binary. #171 Signed-off-by: Yi DENG --- fabric/v1.3/fabric-ca/.gitignore | 8 +- fabric/v1.3/fabric-ca/docker-compose.yml | 388 ++++++++++++++++++ .../fabric-ca/fabric-ca-orderer.dockerfile | 6 + .../v1.3/fabric-ca/fabric-ca-peer.dockerfile | 6 + .../v1.3/fabric-ca/fabric-ca-tools.dockerfile | 6 + fabric/v1.3/fabric-ca/makeDocker.sh | 3 +- fabric/v1.3/fabric-ca/start.sh | 2 +- package-lock.json | 68 ++- 8 files changed, 445 insertions(+), 42 deletions(-) create mode 100644 fabric/v1.3/fabric-ca/docker-compose.yml create mode 100644 fabric/v1.3/fabric-ca/fabric-ca-orderer.dockerfile create mode 100644 fabric/v1.3/fabric-ca/fabric-ca-peer.dockerfile create mode 100644 fabric/v1.3/fabric-ca/fabric-ca-tools.dockerfile diff --git a/fabric/v1.3/fabric-ca/.gitignore b/fabric/v1.3/fabric-ca/.gitignore index d21ef6d..5926c9b 100644 --- a/fabric/v1.3/fabric-ca/.gitignore +++ b/fabric/v1.3/fabric-ca/.gitignore @@ -1,5 +1,5 @@ -docker-compose.yml -fabric-ca-orderer.dockerfile -fabric-ca-peer.dockerfile -fabric-ca-tools.dockerfile +#docker-compose.yml +#fabric-ca-orderer.dockerfile +#fabric-ca-peer.dockerfile +#fabric-ca-tools.dockerfile data diff --git a/fabric/v1.3/fabric-ca/docker-compose.yml b/fabric/v1.3/fabric-ca/docker-compose.yml new file mode 100644 index 0000000..cc78c97 --- /dev/null +++ b/fabric/v1.3/fabric-ca/docker-compose.yml @@ -0,0 +1,388 @@ +version: '2' + +networks: + fabric-ca: + +services: + + rca-org0: + container_name: rca-org0 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/rca-org0.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_CSR_CN=rca-org0 + - FABRIC_CA_SERVER_CSR_HOSTS=rca-org0 + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=rca-org0-admin:rca-org0-adminpw + - TARGET_CERTFILE=/data/org0-ca-cert.pem + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + + rca-org1: + container_name: rca-org1 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/rca-org1.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_CSR_CN=rca-org1 + - FABRIC_CA_SERVER_CSR_HOSTS=rca-org1 + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=rca-org1-admin:rca-org1-adminpw + - TARGET_CERTFILE=/data/org1-ca-cert.pem + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + + rca-org2: + container_name: rca-org2 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-root-ca.sh 2>&1 | tee /data/logs/rca-org2.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_CSR_CN=rca-org2 + - FABRIC_CA_SERVER_CSR_HOSTS=rca-org2 + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=rca-org2-admin:rca-org2-adminpw + - TARGET_CERTFILE=/data/org2-ca-cert.pem + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + + ica-org0: + container_name: ica-org0 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-intermediate-ca.sh org0 2>&1 | tee /data/logs/ica-org0.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_CA_NAME=ica-org0 + - FABRIC_CA_SERVER_INTERMEDIATE_TLS_CERTFILES=/data/org0-ca-cert.pem + - FABRIC_CA_SERVER_CSR_HOSTS=ica-org0 + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=ica-org0-admin:ica-org0-adminpw + - PARENT_URL=https://rca-org0-admin:rca-org0-adminpw@rca-org0:7054 + - TARGET_CHAINFILE=/data/org0-ca-chain.pem + - ORG=org0 + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + depends_on: + - rca-org0 + + ica-org1: + container_name: ica-org1 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-intermediate-ca.sh org1 2>&1 | tee /data/logs/ica-org1.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_CA_NAME=ica-org1 + - FABRIC_CA_SERVER_INTERMEDIATE_TLS_CERTFILES=/data/org1-ca-cert.pem + - FABRIC_CA_SERVER_CSR_HOSTS=ica-org1 + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=ica-org1-admin:ica-org1-adminpw + - PARENT_URL=https://rca-org1-admin:rca-org1-adminpw@rca-org1:7054 + - TARGET_CHAINFILE=/data/org1-ca-chain.pem + - ORG=org1 + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + depends_on: + - rca-org1 + + ica-org2: + container_name: ica-org2 + image: hyperledger/fabric-ca + command: /bin/bash -c '/scripts/start-intermediate-ca.sh org2 2>&1 | tee /data/logs/ica-org2.log' + environment: + - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca + - FABRIC_CA_SERVER_CA_NAME=ica-org2 + - FABRIC_CA_SERVER_INTERMEDIATE_TLS_CERTFILES=/data/org2-ca-cert.pem + - FABRIC_CA_SERVER_CSR_HOSTS=ica-org2 + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_DEBUG=true + - BOOTSTRAP_USER_PASS=ica-org2-admin:ica-org2-adminpw + - PARENT_URL=https://rca-org2-admin:rca-org2-adminpw@rca-org2:7054 + - TARGET_CHAINFILE=/data/org2-ca-chain.pem + - ORG=org2 + - FABRIC_ORGS=org0 org1 org2 + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + depends_on: + - rca-org2 + + setup: + container_name: setup + build: + context: . + dockerfile: fabric-ca-tools.dockerfile + command: /bin/bash -c '/scripts/setup-fabric.sh 2>&1 | tee /data/logs/setup.log; sleep 99999' + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + depends_on: + - ica-org0 + - ica-org1 + - ica-org2 + + orderer1-org0: + container_name: orderer1-org0 + build: + context: . + dockerfile: fabric-ca-orderer.dockerfile + environment: + - FABRIC_CA_CLIENT_HOME=/etc/hyperledger/orderer + - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org0-ca-chain.pem + - ENROLLMENT_URL=https://orderer1-org0:orderer1-org0pw@ica-org0:7054 + - ORDERER_HOME=/etc/hyperledger/orderer + - ORDERER_HOST=orderer1-org0 + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/data/genesis.block + - ORDERER_GENERAL_LOCALMSPID=org0MSP + - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/orderer/msp + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/data/org0-ca-chain.pem] + - ORDERER_GENERAL_TLS_CLIENTAUTHREQUIRED=true + - ORDERER_GENERAL_TLS_CLIENTROOTCAS=[/data/org0-ca-chain.pem] + - ORDERER_GENERAL_LOGLEVEL=debug + - ORDERER_DEBUG_BROADCASTTRACEDIR=data/logs + - ORG=org0 + - ORG_ADMIN_CERT=/data/orgs/org0/msp/admincerts/cert.pem + command: /bin/bash -c '/scripts/start-orderer.sh 2>&1 | tee /data/logs/orderer1-org0.log' + volumes: + - ./scripts:/scripts + - ./data:/data + networks: + - fabric-ca + depends_on: + - setup + + peer1-org1: + container_name: peer1-org1 + build: + context: . + dockerfile: fabric-ca-peer.dockerfile + environment: + - FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org1-ca-chain.pem + - ENROLLMENT_URL=https://peer1-org1:peer1-org1pw@ica-org1:7054 + - PEER_NAME=peer1-org1 + - PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - PEER_HOST=peer1-org1 + - PEER_NAME_PASS=peer1-org1:peer1-org1pw + - CORE_PEER_ID=peer1-org1 + - CORE_PEER_ADDRESS=peer1-org1:7051 + - CORE_PEER_LOCALMSPID=org1MSP + - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca + - CORE_LOGGING_LEVEL=DEBUG + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/data/org1-ca-chain.pem + - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true + - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/org1-ca-chain.pem + - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer1-org1-client.crt + - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer1-org1-client.key + - CORE_PEER_GOSSIP_USELEADERELECTION=true + - CORE_PEER_GOSSIP_ORGLEADER=false + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1-org1:7051 + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true + - ORG=org1 + - ORG_ADMIN_CERT=/data/orgs/org1/msp/admincerts/cert.pem + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer + command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer1-org1.log' + volumes: + - ./scripts:/scripts + - ./data:/data + - /var/run:/host/var/run + networks: + - fabric-ca + depends_on: + - setup + + peer2-org1: + container_name: peer2-org1 + build: + context: . + dockerfile: fabric-ca-peer.dockerfile + environment: + - FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org1-ca-chain.pem + - ENROLLMENT_URL=https://peer2-org1:peer2-org1pw@ica-org1:7054 + - PEER_NAME=peer2-org1 + - PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - PEER_HOST=peer2-org1 + - PEER_NAME_PASS=peer2-org1:peer2-org1pw + - CORE_PEER_ID=peer2-org1 + - CORE_PEER_ADDRESS=peer2-org1:7051 + - CORE_PEER_LOCALMSPID=org1MSP + - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca + - CORE_LOGGING_LEVEL=DEBUG + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/data/org1-ca-chain.pem + - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true + - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/org1-ca-chain.pem + - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer2-org1-client.crt + - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer2-org1-client.key + - CORE_PEER_GOSSIP_USELEADERELECTION=true + - CORE_PEER_GOSSIP_ORGLEADER=false + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2-org1:7051 + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true + - ORG=org1 + - ORG_ADMIN_CERT=/data/orgs/org1/msp/admincerts/cert.pem + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1-org1:7051 + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer + command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer2-org1.log' + volumes: + - ./scripts:/scripts + - ./data:/data + - /var/run:/host/var/run + networks: + - fabric-ca + depends_on: + - setup + + peer1-org2: + container_name: peer1-org2 + build: + context: . + dockerfile: fabric-ca-peer.dockerfile + environment: + - FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org2-ca-chain.pem + - ENROLLMENT_URL=https://peer1-org2:peer1-org2pw@ica-org2:7054 + - PEER_NAME=peer1-org2 + - PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - PEER_HOST=peer1-org2 + - PEER_NAME_PASS=peer1-org2:peer1-org2pw + - CORE_PEER_ID=peer1-org2 + - CORE_PEER_ADDRESS=peer1-org2:7051 + - CORE_PEER_LOCALMSPID=org2MSP + - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca + - CORE_LOGGING_LEVEL=DEBUG + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/data/org2-ca-chain.pem + - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true + - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/org2-ca-chain.pem + - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer1-org2-client.crt + - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer1-org2-client.key + - CORE_PEER_GOSSIP_USELEADERELECTION=true + - CORE_PEER_GOSSIP_ORGLEADER=false + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1-org2:7051 + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true + - ORG=org2 + - ORG_ADMIN_CERT=/data/orgs/org2/msp/admincerts/cert.pem + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer + command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer1-org2.log' + volumes: + - ./scripts:/scripts + - ./data:/data + - /var/run:/host/var/run + networks: + - fabric-ca + depends_on: + - setup + + peer2-org2: + container_name: peer2-org2 + build: + context: . + dockerfile: fabric-ca-peer.dockerfile + environment: + - FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - FABRIC_CA_CLIENT_TLS_CERTFILES=/data/org2-ca-chain.pem + - ENROLLMENT_URL=https://peer2-org2:peer2-org2pw@ica-org2:7054 + - PEER_NAME=peer2-org2 + - PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer + - PEER_HOST=peer2-org2 + - PEER_NAME_PASS=peer2-org2:peer2-org2pw + - CORE_PEER_ID=peer2-org2 + - CORE_PEER_ADDRESS=peer2-org2:7051 + - CORE_PEER_LOCALMSPID=org2MSP + - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_fabric-ca + - CORE_LOGGING_LEVEL=DEBUG + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/data/org2-ca-chain.pem + - CORE_PEER_TLS_CLIENTAUTHREQUIRED=true + - CORE_PEER_TLS_CLIENTROOTCAS_FILES=/data/org2-ca-chain.pem + - CORE_PEER_TLS_CLIENTCERT_FILE=/data/tls/peer2-org2-client.crt + - CORE_PEER_TLS_CLIENTKEY_FILE=/data/tls/peer2-org2-client.key + - CORE_PEER_GOSSIP_USELEADERELECTION=true + - CORE_PEER_GOSSIP_ORGLEADER=false + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer2-org2:7051 + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true + - ORG=org2 + - ORG_ADMIN_CERT=/data/orgs/org2/msp/admincerts/cert.pem + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1-org2:7051 + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer + command: /bin/bash -c '/scripts/start-peer.sh 2>&1 | tee /data/logs/peer2-org2.log' + volumes: + - ./scripts:/scripts + - ./data:/data + - /var/run:/host/var/run + networks: + - fabric-ca + depends_on: + - setup + + run: + container_name: run + image: hyperledger/fabric-ca-tools + environment: + - GOPATH=/opt/gopath + command: /bin/bash -c 'sleep 3;/scripts/run-fabric.sh 2>&1 | tee /data/logs/run.log; sleep 99999' + volumes: + - ./scripts:/scripts + - ./data:/data + - /Users/dengyi/Documents/Developments/nodepath/hyperledger-fabric-desktop-demo/fabric/v1.3:/opt/gopath/src/github.com/hyperledger/fabric-samples + - /Users/dengyi/Documents/Developments/gopath/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric + networks: + - fabric-ca + depends_on: + - orderer1-org0 + - peer1-org1 + - peer2-org1 + - peer1-org2 + - peer2-org2 diff --git a/fabric/v1.3/fabric-ca/fabric-ca-orderer.dockerfile b/fabric/v1.3/fabric-ca/fabric-ca-orderer.dockerfile new file mode 100644 index 0000000..fa71d3c --- /dev/null +++ b/fabric/v1.3/fabric-ca/fabric-ca-orderer.dockerfile @@ -0,0 +1,6 @@ +FROM hyperledger/fabric-orderer:1.3.0 +RUN apt-get update && apt-get install -y netcat jq && apt-get install -y curl && rm -rf /var/cache/apt +RUN curl -o /tmp/fabric-ca-client.tar.gz https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/linux-amd64-1.3.0/hyperledger-fabric-ca-linux-amd64-1.3.0.tar.gz && tar -xzvf /tmp/fabric-ca-client.tar.gz -C /tmp && cp /tmp/bin/fabric-ca-client /usr/local/bin +RUN chmod +x /usr/local/bin/fabric-ca-client +ARG FABRIC_CA_DYNAMIC_LINK=false +RUN if [ "\$FABRIC_CA_DYNAMIC_LINK" = "true" ]; then apt-get install -y libltdl-dev; fi diff --git a/fabric/v1.3/fabric-ca/fabric-ca-peer.dockerfile b/fabric/v1.3/fabric-ca/fabric-ca-peer.dockerfile new file mode 100644 index 0000000..d2784c1 --- /dev/null +++ b/fabric/v1.3/fabric-ca/fabric-ca-peer.dockerfile @@ -0,0 +1,6 @@ +FROM hyperledger/fabric-peer:1.3.0 +RUN apt-get update && apt-get install -y netcat jq && apt-get install -y curl && rm -rf /var/cache/apt +RUN curl -o /tmp/fabric-ca-client.tar.gz https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/linux-amd64-1.3.0/hyperledger-fabric-ca-linux-amd64-1.3.0.tar.gz && tar -xzvf /tmp/fabric-ca-client.tar.gz -C /tmp && cp /tmp/bin/fabric-ca-client /usr/local/bin +RUN chmod +x /usr/local/bin/fabric-ca-client +ARG FABRIC_CA_DYNAMIC_LINK=false +RUN if [ "\$FABRIC_CA_DYNAMIC_LINK" = "true" ]; then apt-get install -y libltdl-dev; fi diff --git a/fabric/v1.3/fabric-ca/fabric-ca-tools.dockerfile b/fabric/v1.3/fabric-ca/fabric-ca-tools.dockerfile new file mode 100644 index 0000000..852c649 --- /dev/null +++ b/fabric/v1.3/fabric-ca/fabric-ca-tools.dockerfile @@ -0,0 +1,6 @@ +FROM hyperledger/fabric-tools:1.3.0 +RUN apt-get update && apt-get install -y netcat jq && apt-get install -y curl && rm -rf /var/cache/apt +RUN curl -o /tmp/fabric-ca-client.tar.gz https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/linux-amd64-1.3.0/hyperledger-fabric-ca-linux-amd64-1.3.0.tar.gz && tar -xzvf /tmp/fabric-ca-client.tar.gz -C /tmp && cp /tmp/bin/fabric-ca-client /usr/local/bin +RUN chmod +x /usr/local/bin/fabric-ca-client +ARG FABRIC_CA_DYNAMIC_LINK=false +RUN if [ "\$FABRIC_CA_DYNAMIC_LINK" = "true" ]; then apt-get install -y libltdl-dev; fi diff --git a/fabric/v1.3/fabric-ca/makeDocker.sh b/fabric/v1.3/fabric-ca/makeDocker.sh index 168503f..2e63c19 100755 --- a/fabric/v1.3/fabric-ca/makeDocker.sh +++ b/fabric/v1.3/fabric-ca/makeDocker.sh @@ -16,7 +16,8 @@ export FABRIC_TAG=${FABRIC_TAG:-1.3.0} export FABRIC_CA_TAG=${FABRIC_CA_TAG:-${FABRIC_TAG}} export NS=${NS:-hyperledger} -export MARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') +#export MARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') +export MARCH=linux-amd64 CA_BINARY_FILE=hyperledger-fabric-ca-${MARCH}-${FABRIC_CA_TAG}.tar.gz URL=https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric-ca/hyperledger-fabric-ca/${MARCH}-${FABRIC_CA_TAG}/${CA_BINARY_FILE} diff --git a/fabric/v1.3/fabric-ca/start.sh b/fabric/v1.3/fabric-ca/start.sh index 13e994c..3b323b9 100755 --- a/fabric/v1.3/fabric-ca/start.sh +++ b/fabric/v1.3/fabric-ca/start.sh @@ -46,7 +46,7 @@ fi mkdir -p ${DDIR}/logs # Create the docker-compose file -${SDIR}/makeDocker.sh +# ${SDIR}/makeDocker.sh # Create the docker containers log "Creating docker containers ..." diff --git a/package-lock.json b/package-lock.json index 9eae88e..4ebf618 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hyperledger-fabric-desktop", - "version": "0.1.0", + "version": "0.2.0-rc1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -274,6 +274,12 @@ "vue-template-es2015-compiler": "^1.4.2" } }, + "@types/jest": { + "version": "23.3.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.14.tgz", + "integrity": "sha512-Q5hTcfdudEL2yOmluA1zaSyPbzWPmJ3XfSWeP3RyoYvS9hnje1ZyagrZOuQ6+1nQC1Gw+7gap3pLNL3xL6UBug==", + "dev": true + }, "@types/node": { "version": "7.0.70", "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.70.tgz", @@ -2713,9 +2719,9 @@ }, "dependencies": { "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "requires": { "ms": "^2.1.1" } @@ -5595,6 +5601,12 @@ } } }, + "eslint-plugin-jest": { + "version": "22.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.3.0.tgz", + "integrity": "sha512-P1mYVRNlOEoO5T9yTqOfucjOYf1ktmJ26NjwjH8sxpCFQa6IhBGr5TpKl3hcAAT29hOsRJVuMWmTsHoUVo9FoA==", + "dev": true + }, "eslint-plugin-jsx-a11y": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz", @@ -6019,7 +6031,7 @@ }, "grpc": { "version": "1.10.1", - "resolved": "http://registry.npmjs.org/grpc/-/grpc-1.10.1.tgz", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.10.1.tgz", "integrity": "sha512-xmhA11h2XhqpSVzDAmoQAYdNQ+swILXpKOiRpAEQ2kX55ioxVADc6v7SkS4zQBxm4klhQHgGqpGKvoL6LGx4VQ==", "requires": { "lodash": "^4.15.0", @@ -7131,14 +7143,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7153,20 +7163,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -7283,8 +7290,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -7296,7 +7302,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7311,7 +7316,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7319,14 +7323,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -7345,7 +7347,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -7426,8 +7427,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -7439,7 +7439,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -7561,7 +7560,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8794,8 +8792,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/imul/-/imul-1.0.1.tgz", "integrity": "sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk=", - "dev": true, - "optional": true + "dev": true }, "imurmurhash": { "version": "0.1.4", @@ -9194,8 +9191,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true, - "optional": true + "dev": true }, "is-regex": { "version": "1.0.4", @@ -12787,9 +12783,9 @@ } }, "pkcs11js": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.16.tgz", - "integrity": "sha512-WQ3jZWK8dLrdgrG0Bl87ehP36zIgCPg3lpZFr8n2+sAVMXosnAm2FXDJJRuvgJlnSY9izjHfJECgTzvTImRn6w==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.17.tgz", + "integrity": "sha512-JQN70Vafra1L9eDrpDevw5J7cDRV16Osamm0GJQgRTQA6DL3SokfaD2U7mt0pZ/XN6qlkMPrQ463JlK9J6y8gg==", "requires": { "nan": "^2.10.0" } @@ -15449,9 +15445,9 @@ } }, "spdy-transport": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", - "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.1.tgz", + "integrity": "sha512-q7D8c148escoB3Z7ySCASadkegMmUZW8Wb/Q1u0/XBgDKMO880rLQDj8Twiew/tYi7ghemKUi/whSYOwE17f5Q==", "requires": { "debug": "^2.6.8", "detect-node": "^2.0.3",