Skip to content

Commit

Permalink
[FAB-2239] Fix broken orderer image
Browse files Browse the repository at this point in the history
https://jira.hyperledger.org/browse/FAB-2239

Moving the configuration around caused the orderer docker image to no
longer resolve the MSP configuration directory.  This CR explicitly sets
the MSPDir and ID, and adds them to the config file so that the env
variables are effective.

Change-Id: I1d5c059125ef028c7f4269ae5c573d51e317a401
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Feb 15, 2017
1 parent ad986bb commit cef0aa3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion images/orderer/Dockerfile.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM hyperledger/fabric-baseos:_BASE_TAG_
ENV ORDERER_CFG_PATH /etc/hyperledger/fabric
ENV ORDERER_GENERAL_LOCALMSPDIR $ORDERER_CFG_PATH/msp/sampleconfig
RUN mkdir -p /var/hyperledger/production $ORDERER_CFG_PATH
COPY payload/orderer /usr/local/bin
COPY payload/genesis.yaml $ORDERER_CFG_PATH/
COPY payload/orderer.yaml $ORDERER_CFG_PATH/
COPY payload/genesis.yaml $ORDERER_CFG_PATH/
ADD payload/msp-sampleconfig.tar.bz2 $ORDERER_CFG_PATH/
EXPOSE 7050
CMD orderer
1 change: 1 addition & 0 deletions orderer/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ func generateConfigEnv(peerNum uint64, grpcPort int, peerCommPort string, certFi
panicOnError(err)
envs := []string{}
envs = append(envs, fmt.Sprintf("ORDERER_CFG_PATH=%s", ordererDir))
envs = append(envs, fmt.Sprintf("ORDERER_GENERAL_LOCALMSPDIR=%s", ordererDir+"/../msp/sampleconfig"))
envs = append(envs, fmt.Sprintf("ORDERER_GENERAL_LISTENPORT=%d", grpcPort))
envs = append(envs, fmt.Sprintf("CONFIGTX_ORDERER_ORDERERTYPE=%s", "sbft"))
envs = append(envs, fmt.Sprintf("ORDERER_GENESIS_DEPRECATEDBATCHTIMEOUT=%d", 1000))
Expand Down
12 changes: 12 additions & 0 deletions orderer/orderer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ General:
# when GenesisMethod is set to "file".
GenesisFile: ./genesisblock

# LocalMSPDir is where to find the crypto material needed for signing in the orderer
# It is set relative here as a default for dev environments but should be changed to the
# real location in production
LocalMSPDir: ../msp/

# LocalMSPID is the identity to register the local MSP material with the MSP manager
# ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!----
# Deployers need to change the value of the localMspId string.
# In particular, the name of the local MSP ID of a orderer needs
# to match the name of one of the MSPs in the ordering system channel
LocalMSPID: DEFAULT

# Enable an HTTP service for Go "pprof" profiling as documented at:
# https://golang.org/pkg/net/http/pprof
Profile:
Expand Down

0 comments on commit cef0aa3

Please sign in to comment.