Commit graph

120 commits

Author SHA1 Message Date
Matthew B White
d84863340c [FAB-16844] Correct BYFN CC name
Correct chaincode name regexp in byfn.sh so it is not restricted
to one named chaincode.

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
2019-12-13 13:53:35 +00:00
Baohua Yang
36694d08e5 [FAB-17121] Use new bootstrap config in orderer
It includes two config changes in fabric recently:

* GenesisMethod --> BootstrapMethod
* GenesisFile --> BootstrapFile

Signed-off-by: Baohua Yang <yangbaohua@gmail.com>
Signed-off-by: Baohua Yang <baohua.yang@oracle.com>
2019-11-26 11:41:19 -08:00
Arnaud J Le Hors
48804014d3 [FAB-16284] Remove E2E file and -f option from BYFN
Remove leftover call to removed ReplacePrivateKey function which
makes calling ./byfn.sh up fail if cryptogen hasn't been run first.

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-10-25 22:41:38 +02:00
David Enyeart
e48e804828 [FAB-16776] Move BYFN up to V2_0 capabilities
Using V2_0_0 capabilities will turn on identification of admins
via node OU, and will fix the failing sample since cryptogen
is now setup to generate admins via node OU.

Change-Id: I30ff651a112bd88c93f6563f5e4414f8d2c6693e
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2019-10-06 16:30:19 -04:00
bjzhang03
408e0e873c [FAB-16619] Fix the policy warning
This fixes #FAB-16619

Change-Id: I251d10bc9dc9baf4f7e7d20cc11a34703baffc52
Signed-off-by: bjzhang03 <bjzhang03@foxmail.com>
(cherry picked from commit 7e8edb3189)
2019-09-24 13:09:48 +00:00
Simon Stone
db48612180 [FAB-6415] Increase chaincode execute timeout
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I553f4cba445c5c93bb4c04214e37eed88f664d77
2019-09-24 09:40:56 +01:00
Simon Stone
18712ca8f6 [FAB-16133] Remove Solo consensus from BYFN
A Solo ordering node offers no benefits over
a single node Raft ordering node. Raft is the
best practice for Fabric v2.0, and should be
the only option in the BYFN sample going
forwards.

This CR removes Solo and the consensus related
options from BYFN, and always uses Raft.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I686cb68d8bc8fc9a231a0fa680263175451f2820
2019-08-27 10:00:07 +01:00
Arnaud J Le Hors
72ecf45088 Merge "[FAB-16310] Vendor Go dependencies in all samples" 2019-08-15 16:51:49 +00:00
Simon Stone
ce154e044b [FAB-16310] Vendor Go dependencies in all samples
All samples that deploy Go chaincode must now vendor
their dependencies before deployment, due to changes
in FAB-5177 which stop the shim being available at
deployment time. This CR adds the command:

"GO111MODULE=on go mod vendor"

... to all scripts/readmes as appropriate.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: If0a2cc3a20dc943917d8325a8905427a79eb2400
2019-08-15 11:44:00 +01:00
Simon Stone
6ea7c71c6c [FAB-16285] Update blacklisted versions in BYFN
Update the blacklisted versions in BYFN so that
BYFN from Fabric v2.0 samples refuses to work
with binaries and Docker images from Fabric v1.x.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I7fceb7f2b7635830ada35e2e47988d84b9ee14c3
2019-08-12 17:43:35 +01:00
Simon Stone
86cd831f93 [FAB-16284] Remove E2E file and -f option from BYFN
The docker-compose-e2e-template.yaml file and generated
docker-compose-e2e.yaml file should not be used any more,
and should be removed. The associated Docker Compose
file argument (-f docker-compose-e2e.yaml) should also
be removed.

Users wishing to deploy BYFN with a CA should use the new
-a option, and we should probably just make that the default
anyway.

There are associated documentation changes required for
this which I will do in another CR.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ie7fc0b809b44cbb2a7d55865ce8f3e887e0e7c58
2019-08-12 17:33:27 +01:00
Simon Stone
3907507981 [FAB-16277] Update BYFN w/ Raft ports in Docker network
Update the Raft ordering nodes to use the same ports
inside the Docker network as they are mapped to outside
of the Docker network (7050, 8050, 9050, 10050, 11050).

This enables applications to work using service
discovery, whether those applications are running inside
or outside the Docker network.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I40b24653d76b6e60c73b754cd7e1544c333e0021
2019-08-12 16:12:09 +01:00
Arnaud J Le Hors
977ba9ff28 Merge "[FAB-16132] Remove Kafka consensus from BYFN" 2019-08-08 17:42:59 +00:00
Simon Stone
b62d5bd77b [FAB-16132] Remove Kafka consensus from BYFN
Remove Kafka as a consensus mechanism option
in BYFN, including all related configuration.

Users wishing to configure Kafka (not best
practice) in Fabric v2.0 can consult the
Fabric v1.4 and earlier samples.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I3bbffc876a6b64831cb6b2bdfac28a88cc013bdf
2019-08-08 13:07:27 +01:00
Simon Stone
639848a31d [FAB-16197] Add connection profiles to .gitignore
Connection profiles are now generated during BYFN
execution, and should not be tracked via Git. Also,
the remaining connection profiles for Org3 need to
be removed as they are no longer used/valid.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ifb76e2a183643a26e95781b455f8c42fc2935928
2019-08-02 14:30:05 +01:00
Simon Stone
3996db59dc [FAB-12219] abstore node -> javascript
Rename the abstore node directory as the sample code
within is JavaScript, and we are planning to add a
TypeScript version as well.

This change also requires updates to BYFN to reflect
the renamed directory.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I1cd554c6598ac7cc71e2b0c65ab541cfaa477354
2019-08-02 11:22:56 +01:00
andrew-coleman
171a7d2275 FGJ-4 Fabcar sample
Implementation of Fabcar client for Java Gateway SDK
Changes to first-network to generate the CCP files with
embedded PEM certificates rather than paths to files on disk

Change-Id: Iff15425e96ce28c6f96079cee474c35868fab554
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>

FGJ-4 split java fabcar into separate classes

Incorporate review comments from previous CR
Split enroll/register/transactions into separate classes

Change-Id: I384cec59c7f53a37864bfc28be11e785a61421f3
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>

FGJ-4 add license header to fabcar java sample

Change-Id: Ic658fe3bdece9875ca3ceaf28d94c5fb48879083
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
2019-07-30 14:07:14 +01:00
Will Lahti
583ff8f6d4 Use renamed CheckCommitReadiness function
FAB-16111 #done

Change-Id: Iacdbd59515b71cb692935b0afbd1c678e0f55851
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2019-07-30 09:51:06 +00:00
Matthew Sykes
61c33d3fba [FAB-15973] use --output json on simulatecommit
Change-Id: Ic31b390898f1981a0138935990ff11a3902007ee
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
2019-07-16 12:24:11 -04:00
Will Lahti
0254d67b37 QueryApprovalStatus -> SimulateCommitChaincodeDef
Update samples now that QueryApprovalStatus has been renamed
to SimulateCommitChaincodeDefinition.

FAB-15831 #done

Change-Id: I4e12ca2c8424bf8d6537e77e1a9de7fd3723636d
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2019-07-02 13:37:20 -04:00
Simon Stone
9225122fb3 Merge "[FAB-15601] BYFN: Fix MAX_RETRY for couchdb" 2019-06-05 11:04:32 +00:00
Arnaud J Le Hors
2e7fec9da8 [FAB-15601] BYFN: Fix MAX_RETRY for couchdb
CR31665 increased MAX_RETRY to 15 which allowed the fabcar go test
to succeed but the fabcar javascript test still fails. This sets
it to 20 in hope this will be enough.

Change-Id: I51a0e24893634d773b12341f5b87d49d2bbf7cb6
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-06-03 16:30:54 +02:00
Yuki Kondo
1e9e4c4dce [FAB-9329] Remove the unused variable in BYFN/EYFN
This CR removes the unused variable 'OS_ARCH' from byfn.sh,
eyfn.sh and interest swap in fabric-samples.

FAB-9329 #done

Change-Id: I0d1b87679d66bec1d9e4aaee9e770305f9c8f4b9
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-06-03 10:42:47 +00:00
Yuki Kondo
964c09fe00 [FAB-15601] BYFN: Fix MAX_RETRY for couchdb
BYFN and Fabcar with couchdb are failing intermittently
because CLI sends a request for joining a Channel before
a Peer connects to the couchdb.
This CR changes the value of MAX_RETRY from 10 to 15
as a workaround.

FAB-15601 #done

Change-Id: I8d91fa224c585cc52c9dfabebb808b8909253900
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2019-05-31 23:50:36 +00:00
Gari Singh
3fe014a8c2 Use official CouchDB image
Replace fabric-couchdb image with
official CouchDB library image.

FAB-15353 #done

Change-Id: I248fb452419f590553ad578141dbfb3ab1fb5dd5
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2019-05-05 09:01:01 -04:00
Simon Stone
fbe403616f [FAB-14486] Extend BYFN to opt skip chaincode deploy
Add a new "-n" option to byfn.sh that optionally skips
the deployment of the abstore chaincode. When BYFN is
used as a network for other samples, we don't really
want the default chaincode deployed.

Change-Id: I6b4043a5c0bcedbeec431cc4a860a3b12da8d8f6
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:21:42 +01:00
Simon Stone
0c4141f2a1 [FAB-14485] Extend BYFN to opt inc cert authorities
Add a new "-a" option to byfn.sh that optionally deploys
certificate authorities (in Docker containers) for
organisation 1 and 2.

Change-Id: Ib58c46941aa6e8e58bac01aa3349e97d1f93b930
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:20:38 +01:00
Simon Stone
529b83bc95 [FAB-14330] Add connection profiles for BYFN and EYFN
Add connection profiles as part of the BYFN and EYFN
samples. The connection profiles can be used by client
applications using the Fabric SDKs to connect to those
networks.

Each organisation needs its own connection profile
that contains the set of peers that organisation
should  use to connect to the network. Orderers and
channels are not needed, as they can be determined
by using service discovery.

Connection profiles can be specified in either JSON
or YAML, so provide both.

Change-Id: Ie8e3d2aef6475b324e5be8ebdada4c594c2235ae
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-04-24 22:20:13 +01:00
rameshthoomu
1bd1c2f355 FABCI-284 Update CI Pipeline script
This patch updates CI pipeline scripts which utilizes global shared
library reusable functions. It also creates ci.properties file with
all the parameters required to test the fabric-samples patch.

Change-Id: I9ed97c8dd0c07a3677042dbda034043e8a19a0f1
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
2019-04-05 20:37:23 +00:00
Alessandro Sorniotti
eb3fe0810f [FAB-14779] QueryApprovalStatus step in byfn
Between the approve and commit steps we add a QueryApprovalStatus to verify
whether peers are ready to commit the chaincode definition.

Change-Id: I18805a4180fa61da07d2bca321c6355660f772fc
Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
2019-03-28 14:00:37 +00:00
Alessandro Sorniotti
d24577fb5d Merge "[FAB-14711] update byfn with new lifecycle" 2019-03-26 17:14:09 +00:00
Alessandro Sorniotti
27774297ec [FAB-14711] update byfn with new lifecycle
Change-Id: I24dd3e85f6dedab52b05ce3103ee06435f01f9a3
Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
2019-03-26 16:25:14 +01:00
David Enyeart
9a6a625f8c Merge "FAB-14531 BYFN Raft with 5 nodes" 2019-03-22 00:53:33 +00:00
Jason Yellick
ee5b438913 Merge "FAB-14633 Remove apt-get from eyfn.sh" 2019-03-14 17:45:09 +00:00
Jason Yellick
b5d50265e4 FAB-14633 Remove apt-get from eyfn.sh
The tools and fabric images are all alpine based now and do not have
apt-get.  Instead, they are prepopulated with jq.  This CR simply
removes the attempt to install jq (which always fails) and acts as a
red-herring when trying to debug.

Change-Id: I8fe83dc4a9ba6995ebfb2786cee45fe0e591b85a
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-03-13 14:02:09 -04:00
Yoav Tock
efaadd329d FAB-14531 BYFN Raft with 5 nodes
Extend the 3-node etcd/raft cluster in BYFN to 5 nodes, in
order to better support the documentation effort. This will
allow users to experiment creating channels with less then
5 nodes, but avoid the pitfalls of a 2-node cluster.

Change-Id: I5ba1d6039b4bb4864b2b97271de81fbfe91b4fb5
Signed-off-by: Yoav Tock <tock@il.ibm.com>
2019-03-07 15:00:04 +02:00
Yoav Tock
420ba2311c FAB-12762 Add etcd/raft consensus option to BYFN
Augment the fabric-samples first-network sample to include an option
to choose etcd/raft as consensus-type.

Extend the -o flag so that it allows users to choose between the
solo, kafka, or etcdraft consensus-type for the ordering service.

Use three orderer nodes.

Change-Id: Ibc4c3564220466aef0a87baee4a2d594e5554a62
Signed-off-by: Yoav Tock <tock@il.ibm.com>
2019-02-28 16:09:17 +02:00
Jason Yellick
2b68c80716 FAB-14317 Add default policies to org3
Configtxgen was failing to print the org definition for org3 because it
was missing the required policies for the org definition.  This caused a
failure in the CI test for adding an org.

Because it will be needed in the future, this CR also adds the new
lifecycle endorsement and general endorsement policies to the
configtx.yamls as well.

Change-Id: Ie53165231cf8afe6377b51a28625797b15ca78ec
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-02-24 20:56:35 -05:00
David Enyeart
7b673ffd2f Merge "[FAB-14268] Make BYFN/EYFN ports match external ports" 2019-02-22 16:17:59 +00:00
Simon Stone
f942010fa6 [FAB-14268] Make BYFN/EYFN ports match external ports
Update both BYFN and EYFN so that the peer request and
chaincode ports match the externally mapped ports. This
enables applications both inside and outside the Docker
network to use service discovery to interact with these
networks (see the JIRA for more details).

Change-Id: I73c36dfdb269ec4225376fb04b1e7a087363e4cc
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
2019-02-21 14:57:39 +00:00
Jason Yellick
4e2ce23e43 FAB-14271 Add channel policies to channel config
Previously, configtxgen would auto-populate policies if they were
omitted.  This presented some problems for specifying partial policy
schemes, like only overriding one policy.  Support for omitting policies
was deprecated in v1.3 and has been removed for v2.0.0.

Change-Id: Ie01bf8f05911358a0af144f2fe2df2667c2bf12e
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2019-02-20 14:08:40 -05:00
Arnaud J Le Hors
6007c0974c [FAB-13862] Rename example02 ABstore
Updated chaincode, BYFN, and all other references to example02 to use
the new name ABstore.

Change-Id: I04c177f9de68eb913f4384fd643aa69631143d58
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-30 09:02:23 +01:00
Arnaud J Le Hors
c7438e1f7c [FAB-13668] BYFN's container volume mapping is bad
Updated compose files and scripts to use the correct mapping.

Change-Id: Iccbe384393c2736c5ba197d70ef6a124588ad588
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2019-01-14 16:17:30 +01:00
Artem Barger
89fff6df43 Merge "FAB-13011 add kafka consensus type to byfn sample" 2018-12-13 09:14:35 +00:00
Srinivasan Muralidharan
8e45db62ac Merge "[FAB-12724] Upgrade from 1.3.x to 1.4.0" 2018-12-07 23:18:30 +00:00
Surya Lanka
e1a39e685a [FAB-12724] Upgrade from 1.3.x to 1.4.0
Adding support to upgrade from 1.3.x to 1.4.0 using upgrade_to_v14.sh
and changes to byfn.sh

For this, no v1_4 capabilities need to be enabled other than v1_3
capabilities on channel and application group level

Only upgrading the images from v1.3.x to v.1.4.0 for peer, orderer,
cli, ccenv

Change-Id: I991f96c2deb3c91870ec4654aa8b561f49594248
Signed-off-by: Surya Lanka <suryalnvs@gmail.com>
2018-12-07 14:17:30 +00:00
Will Lahti
c21bbbaa38 Update samples to use new logging env variables
FAB-12669 #done

Change-Id: Ibb50cc77cb64c3cc138af9afde7273636f34b816
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2018-12-05 15:32:41 -05:00
Yoav Tock
7ad9f196a4 FAB-13011 add kafka consensus type to byfn sample
Augment the fabric-samples first-network sample to include a flag that allows a choice of  consensus-type:
solo (default) or kafka.

- Add note on production deployment of kafka
- Remove port mapping for kafka and zookeeper containars

Change-Id: I3204ba44e5974961eb69649b6f5744f52097ce80
Signed-off-by: Yoav Tock <tock@il.ibm.com>
2018-12-05 11:06:35 +02:00
David Enyeart
61059f5f12 Merge "[FAB-12275] Fix the warn in creating genesis block" 2018-10-04 04:34:03 +00:00
Hui Kang
3a12c6022b [FAB-12275] Fix the warn in creating genesis block
- add system channel name

Change-Id: Ie36e36b2053524cf3bbcf9be17305ccb7d3f966c
Signed-off-by: Hui Kang <kangh@us.ibm.com>
2018-10-02 23:53:21 -04:00