Commit graph

85 commits

Author SHA1 Message Date
Simon Stone
8271a472f8 [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-25 14:49:08 +01:00
Simon Stone
3a1d29ce93 [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>
(cherry picked from commit 0c4141f2a1)
2019-04-25 13:06:24 +00:00
Matthew White
5d0bfb9989 Merge "[FAB-14330] Add connection profiles for BYFN and EYFN" into release-1.4 2019-04-25 13:04:13 +00:00
rameshthoomu
6c0203a9b0 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: Ib2fd948eae9f2e37535144489279773836400358
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
2019-03-29 11:05:06 -04:00
Yoav Tock
72edb7e3bb 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-24 14:19:20 +02:00
Yoav Tock
83fe6c32df 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-03-24 13:46:47 +02:00
Simon Stone
349d88d184 [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-02-25 11:38:06 +00:00
Simon Stone
e5dc89e61d [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>
(cherry picked from commit f942010fa6)
2019-02-22 19:43:15 +00: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
rameshthoomu
4445e8d47e FAB-12272 Increase MAX_RETRY to 10
This change is to fix the couchdb timeout errors in byfn
test. This could be an CI environment issue but to fix CI
failures, increasing the MAX_RETRY count to 10

Change-Id: Id16b1846374eb2cb91b4d67fedb38562df90c7d3
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
2018-10-02 22:56:22 -04:00
David Enyeart
edee6387f1 [FAB-12184] Prepare fabric-samples for 1.3.0-rc1
Change-Id: I791a7dc50557547036209dbabb5a6c42ee2e0c38
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-09-26 13:16:02 -04:00
Jonathan Blood
3237229184 [FAB-12073] Fix Org3 peers CouchDB config.
Change-Id: I279a32b3a07a326fc0291f259f66b4f3a036a58a
Signed-off-by: Jonathan Blood <jonathan.blood@uk.ibm.com>
2018-09-23 19:15:31 +00:00
Surya
9ee57c6c22 [FAB-11778] Upgrade to v1.3.x from v1.2.x in byfn
Changes include upgrade from v1.2.x to v1.3.x.

First, upgrades the network from v1.2.x to v1.3.x and
upgrade_to_v13.sh will run config updates on /Channel level and
/Channel/Application level for v1_3 capabilities.

Add 15 sec's delay to couchdb tests

Change-Id: Ic2a1633842b7dd8a39ee674c5159d67b46122ff4
Signed-off-by: Surya <suryalnvs@gmail.com>
Signed-off-by: RameshBabu <rameshbabu.thoomu@gmail.com>
2018-09-17 14:34:27 +00:00
gennady
4030ebdb3d [FAB-11397] Adding java cc
Added java project sources under chaincode
Added support for "-l java" to byfn.sh

Change-Id: I7038aed9b21ad9bf51bcb58c6b71ceb1f161813f
Signed-off-by: gennady <gennady@il.ibm.com>
2018-09-08 17:35:27 +03:00
Naga Pemmara
ad40e29ebb [FAB-10732] BYFN upgrade to v1.2
This patch set includes changes for demonstrating
byfn network sample upgrade from v1.1 to v1.2

Change-Id: Ib0e5243e7ec280861c13feab0a23dc3566674f4c
Signed-off-by: Naga Pemmara <naga.pemmaraju@ibm.com>
2018-06-21 16:11:41 -04:00
Naga Pemmara
20ad472356 FAB-10801 format and styling for shell artifacts
formatting for existing shell scripts

Change-Id: I7e067730558bc55edc74b73e59195af7c825d8b2
Signed-off-by: Naga Pemmara <naga.pemmaraju@ibm.com>
2018-06-21 15:25:27 -04:00
yacovm
3c32c524e5 [FAB-10346] Ensure peers are in sync in eyfn
This change set adds querying to peers in all orgs at the end of eyfn
to ensure peers of all orgs are in sync.

Which proves they all validated the transaction and there is no state fork
among peers of different orgs.

Change-Id: I33ed632798a6e01d182e879c66c282fc4af6dbce
Signed-off-by: yacovm <yacovm@il.ibm.com>
2018-05-23 22:35:09 +00:00
Gari Singh
1bfdee8ca3 Merge "FAB-8612 Cleanup eyfn/byfn with --remove-orphans" 2018-05-22 16:47:19 +00:00
Jason Yellick
1cd059e534 FAB-8612 Cleanup eyfn/byfn with --remove-orphans
There are currently multiple docker-compose downs going on in the
first-network samples.  These are in an attempt to catch different
configurations of the same compose network.  The flag --remove-orphans
was created to allow tearing down components in a composition even when
there is a mismatch in the compose definition, so this cleans the down
scripts up a bit.

Change-Id: Ied6a06e2ebc21053993e2a6b39b6fbd7fffdfe02
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-05-21 16:46:17 -04:00
David Enyeart
3031a8c556 [FAB-10235] Update BYFN to use V1_2 capability
Update BYFN to use V1_2 application capability.
Required for private data collections.

Change-Id: I56c74b9fb6cd77864b5c8d13abb066a3d729500b
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-05-20 21:27:46 -04:00
Matthew Sykes
5cf19449f1 [FAB-10185] Reorder for logical consistency
Change-Id: I0274250c8c0c5d1801b6db0fb7bfce3359bb1c2f
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
2018-05-17 11:06:09 -04:00
Matthew Sykes
e2f4f20bd6 [FAB-10176] Fix invalid configtx.yaml documents
Change-Id: Ibf52f9380ed3b724c594b53550321a12475e9860
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
2018-05-17 08:41:05 -04:00
Will Lahti
b5dad8cd25 [FAB-9317] Update first-network with multi endorse
This CR updates the first-network (BYFN and EYFN) to use an
'AND (...)' endorsement policy. It also cleans up some of the
output and fixes the line length of some comments.

Change-Id: I741f41226955ccfcd3eb5369d8ba6eb77e49e89e
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
2018-05-03 09:52:22 -04:00
Robert P. J. Day
010fcb544f [FAB-9326] Clean up byfn.sh, drop "-m" option
Some general cleanup of byfn.sh script:

 - Given that "-m" is deprecated, remove its normal processing,
   but retain (for now) its early recognition so that CI passes.
 - Drop reference to "--help", only "-h" is supported.
 - Add reference to "upgrade" mode to usage message and comment.

Change-Id: If1d6624c8788ec660abca5d13e7c87aafb13ce59
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2018-04-23 08:10:07 -04:00
Artem Barger
54b071bfdc Merge "FAB-9294 eliminate excess noise in BYFN" 2018-04-21 20:18:47 +00:00
nirro
2d6386c421 [FAB-8245] change first network according to the fix
fixed [FAB-8245], and fabric samples have to be changed accordingly.
currently, added support for both output formats.

Change-Id: I0cac063af44556d6a37f17b25abf20134032540f
Signed-off-by: nirro <nirro@il.ibm.com>
2018-04-17 15:47:45 +03:00
Christopher Ferris
77a65685c5 FAB-9294 eliminate excess noise in BYFN
eliminate the noise of echoing the environment
variables for each command and add -v option to
enable the noise for debug purposes for byfn.sh
and eyfn.sh in first-network sample

also eliminate noise in fabcar

Change-Id: I46c377360efbab598fd37c0a31b29a119b99173e
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2018-04-08 19:14:20 -04:00
foolcage
41f5ab839b [FAB-9406] Typo in byfn.sh
I found "depete" in first-network/byfn.sh.
Maybe it should be "delete".

Change-Id: Iecdb6f8822b8b99765bc9d93e9b5ab623cb63607
Signed-off-by: foolcage <5533061@qq.com>
2018-04-08 18:03:01 +08:00
Gari Singh
c8d8b91749 Merge "[FAB-8958] Add org3 removal to byfn.sh" 2018-04-06 13:14:38 +00:00
Robert P. J. Day
9d518fb795 [FAB-9330] Refactor top-level .gitignore into subdirs
Rather than cram most .gitignore content into the top-level .gitignore
file, partition it into lower-level .gitignore files, as is already done
with a couple subdirectories, just to be consistent.

I'm sure these files could be even tidier but this seems sufficient for
a first pass.

Change-Id: I0cc8cb2a9d7fa82c4f6de1aef9f82107c8cc7a6a
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2018-04-04 06:26:20 -04:00
Salman Baset
a080da3e23 [FAB-8958] Add org3 removal to byfn.sh
When running the sample "Adding an Org to a Channel", then upon clean up,
./eyfn.sh -m down script must be run before ./byfn.sh -m down; otherwise,
org3 containers and volumes and containers do not get cleaned properly.
This patch adds the org3 container and volume cleanup to ./byfn.sh so
that a user does not have to worry about the correct execution ordering
of ./eyfn.sh and ./byfn.sh scripts.

Change-Id: Ieac1adc4081d59943286cfe9139a74395986460b
Signed-off-by: Salman Baset <sabaset@us.ibm.com>
2018-03-31 16:24:06 -04:00
alex
680ff01a5d [FAB-8600]Clear hyperledger-related containers only
Change-Id: If45759c6db4b6e63aaadd1c86d31f1332a5aee53
Signed-off-by: alex <alexliusch@gmail.com>
2018-03-27 11:10:03 +08:00
Saad Karim
2bbb0a85b3 [FAB-8630] byfn failing intermittently in CI
byfn test failing intermittently in CI due to peer not
being available when the join channel command is
executed. Need to wait for peer to finsih establishing
connection with couchdb before joining channel.

The exit code was not being correctly captured from the
peer join command and thus the retry logic was not being
executed.

Change-Id: I2c27d17cd769c6b8de1bdcfed263d9b0f758b432
Signed-off-by: Saad Karim <skarim@us.ibm.com>
2018-03-08 11:36:08 -05:00
Jason Yellick
f110a6e0a2 [FAB-8602] Add volumes to first-network e2e yaml
The first-network CLI yaml was recently enhanced to use volume mounts
for the ledger directories.  There is the additional e2e yaml which
depends on the container definitions and is now failing.  This CR simply
edits its template to include these new volume definitions.

Change-Id: Ia5b7b93b2be4f9de1f0ebfaa804f8ef713fb935d
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-03-01 08:47:17 -05:00
Jason Yellick
f3ba862017 Merge "FAB-8564 add debug commands to byfn" 2018-03-01 04:22:55 +00:00
David Enyeart
d58a13682b Merge "[FAB-8567] Alt: Always use volumes for ledger (m)" 2018-03-01 01:36:04 +00:00
Jason Yellick
7362928e99 [FAB-8567] Alt: Always use volumes for ledger (m)
Docker compose makes volume management easy and transparent to the user.
By defaulting the ledgers to be docker compose volumes, we transparently
get ledger persistence for the ugprade case, and may trivially tear the
volumes down in the docker-compose down command with the addition of the
--volumes flag.  This would allow the upgrade scenario to work without
the use of the '-p' flag, and is likely to be generally much cleaner.

Change-Id: I80b36a63370065a7aad0f9c284ec578533123d2b
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-28 19:02:05 -05:00
ratnakar
afb3d626b0 [FAB-8561] Add note to readthedocs link in README
Change-Id: Idf29789151639f7997a331ff90ab735d93256041
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
(cherry picked from commit b2f806d8a2)
2018-02-28 19:46:51 +00:00
Christopher Ferris
10526d5a1d FAB-8564 add debug commands to byfn
replace DEBUG level logging w/INFO, but add in
shell debug statements for all fabric commands
for improved UX

Change-Id: I97a19db0373ecaf7a504cb95d4815a11cd64dfed
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2018-02-28 10:05:33 -05:00
David Enyeart
e73a4813ba [FAB-8568] BYFN: Fix IMAGE_TAG for couchdb
As of 1.1 alpha timeframe, 3rd party images do not follow the
same docker IMAGE_TAG versioning as the other Fabric docker images.

Need to remove IMAGE_TAG from couchdb images, and default to
latest couchdb image, which is how it worked prior to
the -i introduction.

This change needs to be made in master branch but not release branch,
since the IMAGE_TAGs are aligned in 1.0.x release.

Change-Id: Iaca24ea7ed1fc6319738dcf59f665da9259d2b9a
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-02-28 03:41:02 -05:00
Yacov Manevich
9986510d8d Merge "[FAB-8539] Add version checking to first-network" 2018-02-28 08:00:29 +00:00
Surya
cba57da0dc [FAB-8165] Adding upgrade function to byfn
Adding upgrade functionality to byfn.sh to upgrade the fabric network
from v1.0.x to v1.1 and scripts for cli to enable
/Channel, /Channel/Orderer, /Channel/Application capabilities

Usage:
git fetch origin
git checkout origin/release
./byfn.sh -m up -i 1.0.6
git checkout origin/master
./byfn.sh upgrade

Change-Id: I6f53a6db39501e2653dc4c325d3d42d78f463e87
Signed-off-by: Surya <suryalnvs@gmail.com>
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-27 21:13:42 +00:00
Jason Yellick
c6166d6d18 [FAB-8540] Add ledger persistance to first-network
This CR adds a new docker-compose-persist.yaml file which creates a
volume mount in the current directory at ./ledgers/<container> and binds
it to the ledger directory for the container.

It also adds a '-p' flag to the byfn.sh script to allow users to include
this new compose file when bringing up the network.

Change-Id: I1ee5faa33c7f0ce18fe7711f5f752d7bf18f117c
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
Signed-off-by: Surya <suryalnvs@gmail.com>
2018-02-27 16:02:48 -05:00
Jason Yellick
2bed1ef499 [FAB-8539] Add version checking to first-network
The first-network tutorial turns on the v1.1 fabric capabilities, and
depends on very recent versions of cryptogen and configtxlator.  Users
appear to be running the latest version of first-network with older
binaries, and are experiencing cryptic failures.

This CR adds basic version checking, both for the local binary versions
as well as the binary versions contained within the docker images.  If
these versions are mismatched, it prints a warning.  If either of the
versions is in a black-list, the byfn.sh will error out.

Change-Id: I1a43ec396c8d1f5a438472cb422d5a7e52e2ef63
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-27 12:44:26 -05:00