Skip to content

Commit cef0aa3

Browse files
author
Jason Yellick
committed
[FAB-2239] Fix broken orderer image
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>
1 parent ad986bb commit cef0aa3

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

images/orderer/Dockerfile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM hyperledger/fabric-baseos:_BASE_TAG_
22
ENV ORDERER_CFG_PATH /etc/hyperledger/fabric
3+
ENV ORDERER_GENERAL_LOCALMSPDIR $ORDERER_CFG_PATH/msp/sampleconfig
34
RUN mkdir -p /var/hyperledger/production $ORDERER_CFG_PATH
45
COPY payload/orderer /usr/local/bin
56
COPY payload/genesis.yaml $ORDERER_CFG_PATH/
67
COPY payload/orderer.yaml $ORDERER_CFG_PATH/
7-
COPY payload/genesis.yaml $ORDERER_CFG_PATH/
8+
ADD payload/msp-sampleconfig.tar.bz2 $ORDERER_CFG_PATH/
89
EXPOSE 7050
910
CMD orderer

orderer/network_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ func generateConfigEnv(peerNum uint64, grpcPort int, peerCommPort string, certFi
305305
panicOnError(err)
306306
envs := []string{}
307307
envs = append(envs, fmt.Sprintf("ORDERER_CFG_PATH=%s", ordererDir))
308+
envs = append(envs, fmt.Sprintf("ORDERER_GENERAL_LOCALMSPDIR=%s", ordererDir+"/../msp/sampleconfig"))
308309
envs = append(envs, fmt.Sprintf("ORDERER_GENERAL_LISTENPORT=%d", grpcPort))
309310
envs = append(envs, fmt.Sprintf("CONFIGTX_ORDERER_ORDERERTYPE=%s", "sbft"))
310311
envs = append(envs, fmt.Sprintf("ORDERER_GENESIS_DEPRECATEDBATCHTIMEOUT=%d", 1000))

orderer/orderer.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ General:
5252
# when GenesisMethod is set to "file".
5353
GenesisFile: ./genesisblock
5454

55+
# LocalMSPDir is where to find the crypto material needed for signing in the orderer
56+
# It is set relative here as a default for dev environments but should be changed to the
57+
# real location in production
58+
LocalMSPDir: ../msp/
59+
60+
# LocalMSPID is the identity to register the local MSP material with the MSP manager
61+
# ----!!!!IMPORTANT!!!-!!!IMPORTANT!!!-!!!IMPORTANT!!!!----
62+
# Deployers need to change the value of the localMspId string.
63+
# In particular, the name of the local MSP ID of a orderer needs
64+
# to match the name of one of the MSPs in the ordering system channel
65+
LocalMSPID: DEFAULT
66+
5567
# Enable an HTTP service for Go "pprof" profiling as documented at:
5668
# https://golang.org/pkg/net/http/pprof
5769
Profile:

0 commit comments

Comments
 (0)