Skip to content

Commit

Permalink
[CE-189] Add mongoose support
Browse files Browse the repository at this point in the history
Add configtx binary in user dashboard

Change-Id: I758305c3b324213defb26176303116310bc65c44
Signed-off-by: Haitao Yue <hightall@me.com>
  • Loading branch information
hightall committed Dec 13, 2017
1 parent 1031cb0 commit b40a1ef
Show file tree
Hide file tree
Showing 17 changed files with 1,288 additions and 16 deletions.
23 changes: 16 additions & 7 deletions user-dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
#
# SPDX-License-Identifier: Apache-2.0
#
FROM hyperledger/cello-baseimage
MAINTAINER li xu cheng "lixucheng@aliyun.com"
FROM node:9.2
MAINTAINER haitao yue "hightall@me.com"
RUN npm install -g requirejs
COPY package.json /
RUN cd / && yarn install -g --verbose
RUN yarn add nodemon -g
ENV PATH ${PATH}:/node_modules/.bin
RUN mkdir -p /usr/app/src
COPY . /usr/app/src
#COPY . /usr/app/src
WORKDIR /usr/app/src
RUN mv /usr/app/src/js /reactjs && \
cd /reactjs && npm install && npm run build && rm -rf node_modules && \
cd /reactjs/home && npm install && npm run build && rm -rf node_modules && \
cd /usr/app/src && npm install && npm run build && npm cache clean --force
ENV FABRIC_VERSION 1.0.5
RUN cd /tmp && wget -c https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-${FABRIC_VERSION}/hyperledger-fabric-linux-amd64-${FABRIC_VERSION}.tar.gz \
&& tar -zxvf hyperledger-fabric-linux-amd64-${FABRIC_VERSION}.tar.gz && mv bin/configtxgen /usr/local/bin/configtxgen
COPY fabric/fabric /etc/hyperledger/fabric
ENV FABRIC_CFG_PATH /etc/hyperledger/fabric
#RUN mv /usr/app/src/js /reactjs && \
# cd /reactjs && npm install && npm run build && rm -rf node_modules && \
# cd /reactjs/home && npm install && npm run build && rm -rf node_modules && \
# cd /usr/app/src && npm install && npm run build && npm cache clean --force
EXPOSE 8080
CMD ["npm", "start"]
149 changes: 149 additions & 0 deletions user-dashboard/fabric/fabric/configtx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

---
################################################################################
#
# Profile
#
# - Different configuration profiles may be encoded here to be specified
# as parameters to the configtxgen tool
#
################################################################################
Profiles:

TwoOrgsOrdererGenesis:
Orderer:
<<: *OrdererDefaults
Organizations:
- *OrdererOrg
Consortiums:
SampleConsortium:
Organizations:
- *Org1
- *Org2
TwoOrgsChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1
- *Org2

################################################################################
#
# Section: Organizations
#
# - This section defines the different organizational identities which will
# be referenced later in the configuration.
#
################################################################################
Organizations:

# SampleOrg defines an MSP using the sampleconfig. It should never be used
# in production but may be used as a template for other definitions
- &OrdererOrg
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: OrdererOrg

# ID to load the MSP definition as
ID: OrdererMSP

# MSPDir is the filesystem path which contains the MSP configuration
MSPDir: crypto-config/ordererOrganizations/example.com/msp

- &Org1
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Org1MSP

# ID to load the MSP definition as
ID: Org1MSP

MSPDir: crypto-config/peerOrganizations/org1.example.com/msp

AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: peer0.org1.example.com
Port: 7051

- &Org2
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Org2MSP

# ID to load the MSP definition as
ID: Org2MSP

MSPDir: crypto-config/peerOrganizations/org2.example.com/msp

AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: peer0.org2.example.com
Port: 7051

################################################################################
#
# SECTION: Orderer
#
# - This section defines the values to encode into a config transaction or
# genesis block for orderer related parameters
#
################################################################################
Orderer: &OrdererDefaults

# Orderer Type: The orderer implementation to start
# Available types are "solo" and "kafka"
OrdererType: solo

Addresses:
- orderer.example.com:7050

# Batch Timeout: The amount of time to wait before creating a batch
BatchTimeout: 2s

# Batch Size: Controls the number of messages batched into a block
BatchSize:

# Max Message Count: The maximum number of messages to permit in a batch
MaxMessageCount: 10

# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch.
AbsoluteMaxBytes: 99 MB

# Preferred Max Bytes: The preferred maximum number of bytes allowed for
# the serialized messages in a batch. A message larger than the preferred
# max bytes will result in a batch larger than preferred max bytes.
PreferredMaxBytes: 512 KB

Kafka:
# Brokers: A list of Kafka brokers to which the orderer connects
# NOTE: Use IP:port notation
Brokers:
- 127.0.0.1:9092

# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network
Organizations:

################################################################################
#
# SECTION: Application
#
# - This section defines the values to encode into a config transaction or
# genesis block for application related parameters
#
################################################################################
Application: &ApplicationDefaults

# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
Loading

0 comments on commit b40a1ef

Please sign in to comment.