Commit graph

272 commits

Author SHA1 Message Date
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
Gari Singh
736c565203 Merge "[FAB-7540] Simplifies Reconfigure Your Network tutorial" 2018-02-12 16:49:32 +00:00
Arnaud J Le Hors
1d69e9e2d1 [FAB-7540] Simplifies Reconfigure Your Network tutorial
This change brings a new set of scripts and configuration files to the
first-network sample to make it easier for people to follow the new
tutorial on how to add a third org to the network setup in BYFN.

To function properly the new Extend You First Network script (eyfn.sh)
must be run after byfn.sh is run and with the same parameters. So,
valid uses include:

./byfn.sh up
./eyfn.sh up

or

./byfn.sh up -c testchannel -s couchdb -l node
./eyfn.sh up -c testchannel -s couchdb -l node

A single './eyfn.sh down' command is however necessary to take the
whole network down.

Patch-set #2: fixes ./eyfn.sh down
Patch-set #3: removed unused option from Usage and spurious whitespaces
Patch-set #4: added missing test file

Change-Id: I9c926b52f2243dda1c5f9368112c314a6c5c6929
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2018-02-10 09:36:19 +01:00
Yacov Manevich
4134bc7825 Merge "[FAB-7342] Enable client auth in fabric-ca sample" 2018-02-09 15:54:32 +00:00
Gari Singh
b24a7c7f2d Merge "[FAB-7527] Improves BYFN" 2018-02-08 18:02:02 +00:00
susmita
0daa8bcb04 [FAB-8122] Updated README.md file- balancetransfer
FIX [FAB-8122] Added steps to clear containers and
artifacts before starting the network manually.

Change-Id: I83abd30e0080ff2395d91c76029a3527e4e69de4
Signed-off-by: susmita <susmita.somanchi@gmail.com>
2018-02-08 10:22:45 -05:00
Anil Ambati
652f0744cd [FAB-7342] Enable client auth in fabric-ca sample
Currently client authentication is not enabled on
any peers and orderer in the fabric-ca sample. This
change set will enable client authentication on all
the peers and orderer.

Change-Id: If3c6a5dc6d1dc3a38096608617971945bde359c0
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-02-02 14:30:41 -05:00
luomin
90c2bfdca8 [FAB-6934] fix devmode sample for v1.1
Fix the instructions in chain-docker-devmode for v1.1-perview.

Resubmit this FAB-6934 due to the merge conflict.
https://gerrit.hyperledger.org/r/#/c/15405/

Change-Id: I6d2dece3f48ca8b8c904c0745adb2253a7c6581a
Signed-off-by: luomin <luomin_tokyotech@hotmail.com>
2018-02-01 05:36:00 +00:00
David Enyeart
50cb8d9b1f Merge "[FAB-5913]balance-transfer:Fix query response message" 2018-01-30 19:12:51 +00:00
David Enyeart
de6ee6ea9e Merge "[FAB-7910] Clean up chaincode containers in fabric-ca" 2018-01-30 19:03:53 +00:00
Christopher Ferris
2433afda16 Merge "[FAB-7908] Change hf.admin attr to admin" 2018-01-26 14:45:50 +00:00
Latitia M Haskins
2c0c2c7459 [FAB-7910] Clean up chaincode containers in fabric-ca
The stop.sh script cleans up the network and service
containers from the composition file, but does not
clean up the resulting chaincode containers. This
CR removes the chaincode containers and their images
as well.

Change-Id: I06ba13486efc59b4761728891aab27535ae0366d
Signed-off-by: Latitia M Haskins <latitia.haskins@gmail.com>
2018-01-25 14:20:56 -05:00
Anil Ambati
bbee1b283b [FAB-7908] Change hf.admin attr to admin
Recently, Fabric CA was changed to restrict custom attributes
from starting with "hf." prefix. But fabric-ca sample was
using hf.admin custom attribute. Hence it was failing. This
change set changes custom attribute "hf.admin" to "admin".

Change-Id: I6c9324e62717c26aab3c2d308d9fb098ecd2fb65
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-01-25 10:34:46 -05:00
Jason Yellick
c9836f3131 Merge "[FAB-7834] Add couchdb index to marbles02 sample" 2018-01-25 04:30:35 +00:00
David Enyeart
dd12f88dc0 [FAB-7834] Add couchdb index to marbles02 sample
Add sample couchdb index to marbles02 chaincode
to support the chaincode queries.

Also update the go chaincode instructions with
index instructions, and fix the examples to
indicate that chaincodeid should not be included
in queries or indexes as of 1.1.

Change-Id: I4a3b0dbeb83c6a2cf40c73fcee5aed20427acfca
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2018-01-24 23:02:22 -05:00
Abdul Rauf
25f6091b86 FAB-7836 Fix "No identity type provided" Error
Fix the following error:
[[{"code":0,"message":"No identity type provided. Please provide identity type"}]]

Change-Id: I5a0b04aadbf87d1661f9605f0eb4ec9b2dbab62a
Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com>
2018-01-21 14:15:18 +05:00
Keith Smith
5eb2fb2ff6 [FAB-7653] Fix incorrect chaincode location
Fix the chaincode location by adding "go" subdirectory to path.

Change-Id: Idc72a0f4fcecf519d49a68d141025ada054cf847
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
2018-01-08 15:27:09 -05:00
Gari Singh
5a974a42e0 [FAB-7533] Fix typo in balance-transfer sample
Trivial fix of a typo which causes the app to
crash

Change-Id: I55bb6a0e971d21adb0bd50f450571d6698686c9a
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2018-01-06 07:13:34 -05:00
Anil Ambati
038c496f4c [FAB-7592] Give hf.Registrar attrs to admins
The admin identity needs hf.Registrar.Roles attribute so
it can register other identities. This attribute was
introduced recently in fabric-ca v1.1.0-alpha.

Change-Id: Ie2a0ef705f07a35580c6bc8a85a34b9b9d937623
Signed-off-by: Anil Ambati <aambati@us.ibm.com>
2018-01-03 15:21:10 -05:00
Sudheesh Singanamalla
cf79cd1dc1 [FAB-7584] Removes copy of creds to keystore
The basic-network sample consists of a initialization script which
removes any content inside the hfc-key-store and later copies the
content from creds to the keystore. However this creds directory
doesnot exist or is ever created in the sample execution.

Change-Id: Ia3d07ad78875328f6798290d3f0ab3098b9e85fc
Signed-off-by: Sudheesh Singanamalla <sudheesh95@gmail.com>
2018-01-03 10:46:57 +05:30
Keith Smith
47da1bbeb3 Merge "[FAB-7511] clear crypto material after clearing network" 2018-01-02 20:45:14 +00:00
Keith Smith
cd18887f4b Merge "[FAB-7160] Samples - readme sample commands" 2018-01-02 19:47:15 +00:00
Artem Barger
0503e757ac Merge "[FAB-7487] Fix typo in node/fabcar.js" 2017-12-29 22:26:09 +00:00
nikklein
a0c1687ad8 [FAB-7487] Fix typo in node/fabcar.js
According to this tutorial http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html
the function name is spelled changeCarOwner.

Renamed changeCarowner to changeCarOwner.

Change-Id: Ic32c76137e3686cbf951f846da0ef8c4c5d8986d
Signed-off-by: Nikita Klein <objcoding@gmail.com>
2017-12-29 11:57:22 +01:00
Arnaud J Le Hors
1883ae9589 [FAB-7527] Improves BYFN
This change fixes a set of related issues.

It fixes the use of the cli timeout setting. It is now merely about
the maximum time spent waiting for a response.

The e2e script is no longer run from docker-compose but by calling
docker exec from byfn.sh and docker-compose now merely has the cli
waiting/sleeping for 1000 seconds.

This not only allows starting the network without automatically
running the e2e script, it also allows byfn.sh to properly end when
the e2e script ends rather than hang. It also makes the tutorial
simpler.

The time the cli container waits/sleeps cannot be changed other than
by editing the config file but this shouldn't be a problem.

This change also fixes the log output of the e2e script so that peers
are consistantly being referenced as in peerX.orgY.

In addition, this changes the usage of byfn.sh so that the -m
parameter is no longer needed. One merely needs to type "./byfn.sh up"
rather than "./byfn.sh -m up". The old way is still supported though,
for human backward compatibility. ;-) And by default the answer to the
prompt for continuation is "y" so the user can simply continue with a
hit of the return key.

Change-Id: I3e2409d81018f97ec9306ce6e1ae916d8fe18fec
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
2017-12-21 00:22:13 +01:00
David Enyeart
55d0140381 Merge "[FAB-6550] Sample app written in typescript" 2017-12-20 14:01:02 +00:00
ratnakar
e84821637c [FAB-7511] clear crypto material after clearing network
Crypto materal is cleared after every re-start of a new network

Change-Id: I01c919109401428de1252695930f42e73eb3f795
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-12-19 14:17:18 -05:00
Nick Gaski
54ffa5f4c8 [FAB-7241] Fix chaincode-devmode
This CR replaces the expired certificates with the msp library
in fabric/sampleconfig.

Regenerate the orderer.block and myc.tx artifact using the
configtx.yaml in fabric/sampleconfig.  Profiles used are
SampleSingleMSPSolo & SampleSingleMSPChannel.  Modify the
orderer profile in configtxyaml and change address from
127.0.0.1:7050 -> orderer:7050 before reading in the file
to configtxgen.  This allows the peer to
resolve with the ordering service when the docker compose
is spun up.

Change CORE_PEER_ADDRESS from 7051 to 7052 when starting
the chaincode in dev mode.

Change-Id: I0dbd3f81553c85943a4219123f086e69081c4f5a
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
2017-12-15 12:40:48 -05:00
Gari Singh
77fa92c82c Merge "[FAB-6902] FAB-6904 correct the sample for FAB-6904" 2017-12-08 12:12:44 +00:00
Kapil Sachdeva
c4465100c4 [FAB-6550] Sample app written in typescript
This is a sample application that demonstrates usage of Fabric SDK typings.

Change-Id: I5b9b42c666de51a490043cafe0faac29e4f4a0a4
Signed-off-by: Kapil Sachdeva <ksachdeva17@gmail.com>
2017-12-07 02:08:54 +00:00
Gari Singh
69a127e0c7 [FAB-6254] Fix the default CLI timeout
The CLI timeout for byfn is currently set to
10000 seconds.  This is not a huge issue, but
does mean that the CLI will hang around for
10000 seconds after the e2e is complete.

This simply changes the default timeout to
10 seconds.

Change-Id: I4e163ed248d9e937354e83c0d0143dc6748b6a08
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-12-03 09:36:39 -05:00
Bret Harrison
7428f6496a [FAB-7160] Samples - readme sample commands
The balance transfer sample commands do not work.
Fixed the readme sample commands along with a few
supporting application code.

Change-Id: I74c5ff150f26e4c1868201499eb616daca316ee8
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2017-12-01 13:56:54 -05:00
Yacov Manevich
eeb1b0902d Merge "[FAB-6632] - Artifacts for BYFN reconfigure" 2017-11-17 12:04:21 +00:00