Commit graph

204 commits

Author SHA1 Message Date
Gari Singh
88bfe50fce Merge "FAB-9362 add CONTRIBUTING.md and CODE_OF_CONDUCT.md" 2018-04-06 20:50:22 +00:00
Gari Singh
c8d8b91749 Merge "[FAB-8958] Add org3 removal to byfn.sh" 2018-04-06 13:14:38 +00:00
Christopher Ferris
f5c2eb8ee9 FAB-9362 add CONTRIBUTING.md and CODE_OF_CONDUCT.md
Change-Id: I01f2039d9835e6ccccce17c2b719115e8a6f7c1e
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2018-04-04 19:25:55 -04: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
Christopher Ferris
489acdf619 Merge "FAB-8947 Fabric-Samples remove package lock" 2018-03-30 13:09:36 +00:00
Yacov Manevich
f64bd714aa Merge "FAB-9185 add /config to .gitignore" 2018-03-28 23:24:00 +00:00
Christopher Ferris
8fc0865df4 FAB-9185 add /config to .gitignore
Change-Id: Ib744a40abaabd0292ee09e101fafc63aebbecb02
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2018-03-27 08:36:52 -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
Bret Harrison
4f97717287 FAB-8947 Fabric-Samples remove package lock
Remove the package lock file and allow current
versions to be installed.

Change-Id: I74a4710173e4f2307e87b73c6021ecf20237a974
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2018-03-23 17:51:21 +00:00
David Seybold
fcf62adf57 [FAB-8265] Fixed spelling error in registerUser
I have fixed a spelling error in registerUser.js, changing
"intreact" to "interact".

Change-Id: Ib07af36923a5fe652be01e1c83e316d4495d4a46
Signed-off-by: David Seybold <daseybold@gmail.com>
2018-03-20 21:57:57 -04:00
rennman
e4d776032e [ FAB-8730 ] hyphen breaks fabric-samples
The jq script which performs the config update in
scripts/run-fabric.sh fails if the orderer name contains
a hyphen. It requires modifying the way in which jq
interpolates shell variables.

Change-Id: Ie4de9459cb17693465613d6efd78b3d98575bbb2
Signed-off-by: rennman <eabailey@us.ibm.com>
2018-03-12 12:52:08 -04: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
Gari Singh
5d7ac01c81 Merge "[FAB-8496] allow modification of affiliations" 2018-03-07 23:01:33 +00:00
rennman
823fb6b9c5 [ FAB-8679 ] Permit samples to use RootCAs
Fix USE_INTERMEDIATE_CA variable to allow
exclusive use of RootCA for sample tests.

Change-Id: If10f9a768ba17943f03b416f5a68edb9eb65a27a
Signed-off-by: rennman <eabailey@us.ibm.com>
2018-03-06 13:42:48 -05:00
Keith Smith
9f9fc7e5ac [FAB-8633] Correct revoked error check
The returned error message was changed to "access denied" when
a certificate has been revoked.  This simply changes the sample
to look for the correct error message.

Change-Id: Id107d4e1813099e2f21ba9eaffa0bd0b9912a97b
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2018-03-01 23:47:07 -05:00
Chris Elder
f3b55c9c0d [FAB-8621] Remove Marbles index json data wrapper
Fabric 1.1 removes the need for a "data" wrapper for CouchDB data.

The marbles02 sample index json files in fabric-samples still contains
the data wrapper.

Change-Id: Ic984b1408da4959000ae99962bf9a48d66334860
Signed-off-by: Chris Elder <chris.elder@us.ibm.com>
2018-03-01 14:02:56 -05:00
Gari Singh
2d925ae675 Merge "[FAB-8602] Add volumes to first-network e2e yaml" 2018-03-01 16:28:31 +00:00
Gari Singh
0289d113ba Merge "[FAB-8497] Download images required for fabric-ca" 2018-03-01 16:13:37 +00: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
Bret Harrison
ffd7a2576c FAB-6400 Balance-transfer filtered events
Update sample code to use the channel-based events.
The sample will also use the new connection profile
API to get a list of channel-based NodeSDK event hubs
using filtered blocks, automatic unregistration, and
automatic disconnect, all new features of channel-based
events. This will demostrate the most common use case
for events. The sample code will require the NodeSDK
to be at 1.1 alpha.

Change-Id: Id9f2b37f02d7d662b7ca1016586560ee4c595992
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2018-02-27 23:10:19 +00:00
David Enyeart
831e9bfe80 Merge "[FAB-8165] Adding upgrade function to byfn" 2018-02-27 22:16:33 +00:00
David Enyeart
560574b198 Merge "[FAB-8540] Add ledger persistance to first-network" 2018-02-27 22:16:08 +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
Saad Karim
77e74b7cd7 [FAB-8497] Download images required for fabric-ca
Added a script for fabric-ca sample that downloads
all the required docker images.

Vendored dependencies for the fabric-ca sample chaincode.
It can now be run without having a local fabric repository.

Change-Id: I7e0f3d7950201e42fdf82bbef2fc855d33c78676
Signed-off-by: Saad Karim <skarim@us.ibm.com>
2018-02-27 20:35:34 +00: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
luomin
7b7fc09804 [FAB-8496] allow modification of affiliations
As pointed out in [FAB-8496], updating the orgs for the fabric-ca
sample does not have an effect currently.

This RC added the affiliation settings in env.sh script into the
default config file.

Change-Id: I3eaa601fc572f6880b15dec48a4be8a69d01eb4e
Signed-off-by: Min Luo <luomin_tokyotech@hotmail.com>
2018-02-27 09:58:16 +09:00
Keith Smith
3dc989e5c3 Merge "[FAB-8122] Updated README.md file- balancetransfer" 2018-02-27 00:30:25 +00:00
Jason Yellick
981efba232 [FAB-8503] Prevent CLI container from exiting
The pattern of the byfn scripts and of our tutorial is to start the CLI
container, then docker exec commands against it.  For some reason, we
only start the CLI container with a command of 'sleep 1000' which causes
it exit after this time.

This causes headaches of having to restart the CLI container and is only
saving the overhead of one idle bash process.  From a usability
it seems far better to leave an idle bash process so that we can be
assured the container is still running.

Change-Id: I8d5c860b89226a28f15d42f5a19e42b923bfa8c1
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-25 20:20:42 -05:00
Jason Yellick
c93268f3f1 [FAB-8518] Not all compose files have IMAGE_TAG
A number of the image lines in the compose files were skipped when the
IMAGE_TAG option was added.  This CR fixes them.

Change-Id: I60ca932de47315f2c99368ac41ed6710aca96614
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-25 08:48:25 -05:00
Surya
4f2cd8d4ac [FAB-8445] Adding IMAGE_TAG option to byfn
Adding IMAGE_TAG option to byfn script to launch specific
version of fabric network

Usage: ./byfn.sh up -i 1.1.0-alpha

Change-Id: I67a1d01257abd7021ea344c354c6e1c97eebf4f7
Signed-off-by: Surya <suryalnvs@gmail.com>
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-23 16:10:15 -05:00
David Enyeart
e4a0666893 Merge "[FAB-8327] Change eyfn.sh to use configtxlator cli" 2018-02-23 17:10:24 +00:00
Saad Karim
ca8016385e [FAB-8387] Add gencrl to revoke command
Add --gencrl flag to revoke command to illustrate
the ability to generate a CRL while performing
a revocation.

Change-Id: I7521cfee54f8704675236d7afb2876b87eb339bf
Signed-off-by: Saad Karim <skarim@us.ibm.com>
2018-02-22 11:22:05 -05:00
Gari Singh
a0edc2ece2 Merge "[FAB-8407] Fix TLS bad cert error" 2018-02-22 13:36:01 +00:00
Anil Ambati
e379ac5581 [FAB-8407] Fix TLS bad cert error
Fabric CA sample fails with TLS error when
running against latest 1.1 code because orderer
was expecting client certificate but was not receiving
on during TLS handshake. This change set fixes the
problem by specifying --clientauth, --keyfile and
--certfile command line arguments to the peer commands
that need to communicate with orderer, like 'peer channel
create'.

Change-Id: I34ad39c919c0121916116c3711c7429009db7fc8
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-02-21 17:25:41 -05:00
yacovm
02ca1dcf23 [FAB-7494] Fix bootstrap peer config
This change set makes bootstrap peers aligned to recommended
settings.

Change-Id: Ibd29577000d1a91d091c595ac3f32c00cead1d13
Signed-off-by: yacovm <yacovm@il.ibm.com>
2018-02-20 23:09:15 +02:00
ratnakar
41e144f327 [FAB-8386] eyfn fails to execute invoke on org3
org3 peer role is not enabled in org3-artifacts/org3-crypto.yaml
which causes failure in executing the transaction on org3.
adding the following configuration fixes the issue
"EnableNodeOUs: true"

Change-Id: Id345583a7f5a1f8fb970c8e6113a094de82b6358
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2018-02-19 22:28:44 -05:00
Jason Yellick
4ab098f5b4 [FAB-8327] Change eyfn.sh to use configtxlator cli
V1.1 introduces a new CLI for configtxlator which eliminates the need to
run it as a REST service.  Since this makes the example simpler, this CR
changes those REST calls to be direct CLI invocations.

Change-Id: I005068d1ca27946b9b6d4d1a2a1056268e366d61
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-16 17:12:37 -05:00
Angelo De Caro
24f35c1493 [FAB-7750] first network with support to FAB-5664
This change-set does the following:
- it modifies the first-network example to show how to use FAB-5664.
Namely, the identity classification is enabled by
setting EnableNodeOUs to true in crypto-config.yaml.
Then, the endorsement policy is changed to requires
peers and not members. Finally, cryptotx.yaml is modified
to enable v1.1 capabilities.

Change-Id: If8e943b5833b4402d612895449ac110ab2fee4b5
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
2018-02-15 13:19:22 +01:00
Keith Smith
5dffcfb314 Merge "[FAB-8238]wrong orderer/peer type in fabric-ca sam" 2018-02-14 18:36:56 +00:00
Srinivasan Muralidharan
40faca4367 Merge "[FAB-6934] fix devmode sample for v1.1" 2018-02-14 16:09:18 +00:00
luomin
305d6f47f8 [FAB-8238]wrong orderer/peer type in fabric-ca sam
The fabric-samples/fabric-ca/scripts/setup-fabric.sh script needs 
two small changes so that orderers and peers are registered with 
the correct type. They are currently defaulting to type 'client'.

Change-Id: Ibd813cd68ae1669bc39423826ca1d39ac57d16c1
Signed-off-by: luomin <luomin_tokyotech@hotmail.com>
2018-02-14 03:01:31 +00:00