Commit graph

35 commits

Author SHA1 Message Date
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
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
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
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
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
Nick Gaski
7b76a7a5ad [FAB-6632] - Artifacts for BYFN reconfigure
This CR adds two new yaml files that are specific to a new
organization - Org3 - that will join the existing application
channel.  Also adds a separate docker-compose that is specific
to the new org - Org3.
Update byfn.sh to remove the Org3 artifacts

Reliant on CR - 15323

Change-Id: I22a08be6f8472f981c4231491b7cae56906b71dd
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
2017-11-08 15:43:10 -05:00
ratnakar
a7be462ab4 [FAB-6895] chaincode mounting issue
Chaincode mount path has been corrected with this fix so
that artifacts (ex. mychannel.block etc.,) won't be visible on
the host machine and the cli container upon restart.

Change-Id: I9b59c80d1cac3034d9cd7d9e19b2931df8b3988e
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-11-06 11:41:56 -05:00
Gari Singh
7c23985303 [FAB-5221] generateCerts should delete crypto
It's possible to run byfn -m generate multiple
times depending on how you go through the
tutorials, start/stop the network, etc.
The crypto-config folder is deleted when
running byfn -m down and that will stay,
but now each time generateCerts is run the
cyrpto-config folder will be deleted as well.

Change-Id: Ie3851debd76ff0c50c84e14fbca56de2a28bd825
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-11-05 08:40:08 -05:00
ratnakar
44c204d8b6 [FAB-5898] porting samples to node.js chaincode
Fabric 1.1 supports javascript chaincode. This changeset
addresses porting of the golang chaincode to node.js
chiancode and the corresponding README files

Change-Id: Iae24e713f16ab3508fe0cc18ee062ffa412b8ba6
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2017-10-15 21:12:11 -04:00
Jim Zhang
38ad27885f Merge "[FAB-5992] Fix error in first-network dir" 2017-10-02 22:49:33 +00:00
Ethan Coeytaux
194b9b9bca [FAB-5618] Allow directory to contain spaces
Added quotes to $CURRENT_DIR in byfn.sh so that the current directory
can contain spaces and the script will still run properly.

Change-Id: I3853e3398c29c55c46603477fada5db023808431
Issue-id: FAB-5618
Signed-off-by: Ethan Coeytaux <eacoeytaux@gmail.com>
2017-09-12 10:27:05 -04:00
Zhangjiong Xuan
77b4090e86 [FAB-5992] Fix error in first-network dir
[FAB-5992] Fix error at line 42 of the script.sh in scripts dir,
and add tips in byfn.sh.

Change-Id: Id05277074dc240c06e1b47ac4eedf349e9555cfa
Signed-off-by: Zhangjiong Xuan <xuanzhangjiong@hyperchain.cn>
2017-09-11 11:41:11 +00:00
David Enyeart
7dc852b15a Merge "[FAB-5453] Enable CouchDB passwords in Fabric Samples" 2017-09-02 16:15:22 +00:00
rameshthoomu
7cca09f047 FAB-5759 fix byfn e2e test failures
Remove docker-compose script to fix the byfn e2e test failures

Change-Id: Iee560b73f5fe535120ee888a816646d3aba224ed
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
2017-08-14 10:11:38 -04:00
rameshbabu
7f1c2f4225 FAB-5056 enable couchdb test in byfn e2e script
update byfn.sh script to enable couchdb tests. Follow the
below steps from first-network dir

./byfn.sh -m generate -c ibmblockchain
./byfn.sh -m up -c ibmblockchain -s couchdb
./byfn.sh -m down

Change-Id: If84e744b35a96fa1ed314dff0abf845ab363fcbb
Signed-off-by: rameshbabu <rameshbabu.thoomu@gmail.com>
2017-08-08 09:21:35 -04:00
dsanchezseco
be773d2015 [FAB-5603] fixed missing f option on switch
fixed the unrecognized option on byfn.sh script when
providing the docker-compose file to start the network

Fix Issue # FAB-5603

Change-Id: I74234c53d8f82cbf2678f80aa3a898c3ec51c422
Signed-off-by: dsanchezseco <d.seco@protonmail.com>
2017-08-03 20:17:11 +02:00
dsanchezseco
592114010e [FAB-5576] -f flag to choose docker-compose on byfn.sh
Using the -f flag is possible to specify the docker-compose file to use on the
byfn.sh script to have a standar way to test the different configurations for
the samples project. The defautl is 'docker-compose-cli.yaml'

-h output updated as well.

Fix Issue # FAB-5576.

Change-Id: I8766ab930f05d9c4934b149872b9de3a299ff345
Signed-off-by: dsanchezseco <d.seco@protonmail.com>
2017-08-03 13:59:21 +02:00
Chris Elder
92348cb4dd [FAB-5453] Enable CouchDB passwords in Fabric Samples
CouchDB usernames and passwords can be enabled by adding
additional environment variables to docker compose files.

The environment variables are added without values.
This will create peer and couchdb containers without
CouchDB passwords enabled.

Initializing the variables will create a CouchDB container
with and admin username and password.  The peer will also be
created with the CouchDB username in the ledger config.

Change-Id: I56c93111b0a4bd29c714df5a50af82517641bb3b
Signed-off-by: Chris Elder <chris.elder@us.ibm.com>
2017-07-25 10:57:08 -04:00
Krishna Harsha Voora
7778837ebb [FAB-5394] Introduce Delay as configurable variable
Introduce delay as configurable variable for byfn.sh

Change-Id: I8ab05f44c68b36bd95f175c9b5f5091d11fa7083
Signed-off-by: Krishna Harsha Voora <krishvoor@in.ibm.com>
2017-07-24 09:47:26 +00:00
Jim Zhang
ca8fad3151 [FAB-5260] Update samples to v1.0.0
basic-network:
 - moved "crypto-config" to top-level and removed
   "network" folder
 - added generate.sh to re-gen crypto materials
 - docker-compose.yaml to ref v1.0.0 images
 - add CLI to docker-compose
 - start.sh to only start CA, orderer, peer and couch
 - startFabric.sh to run start.sh, then launch CLI
   for create channel, install, instantiate, invoke
fabcar:
 - moved chaincode to central chaincode folder
 - moved "creds" to top-level and removed "network"
   folder
 - changed to use the basic-network as the target
   and removed docker-compose.yaml and crypto-config
 - updated package.json to require v1.0.0 modules

- added missing license headers
- restructured to use a central chaincode subdirectory

Change-Id: Ic784d1cf55ea51da5155624f3c38275883de1dca
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
2017-07-12 09:07:39 -04:00
Nao Nishijima
6899719cbb [FAB-5195] byfn.sh help text is incorrect
The descriptions for "down" and "restart" are the same as "up".
This patch set changes the descriptions.

Change-Id: I0ee03e5d81faa4ad6a3c43354e8a44648288df90
Signed-off-by: Nao Nishijima <nao.nishijima@hal.hitachi.com>
2017-07-06 11:21:21 -07:00
Gari Singh
f9c29542d7 [FAB-5038] Generate artifacts if they don't exist
If you run ./byfn -m up prior to running
./byfn -m generate, things will fail - which
would normally be OK except in the case where
you are running the Docker daemon as root -
which is the default on Linux systems.  The issue
is that the Docker daemon will automatically
generate host paths for volumes if they don't exist
and they will be owned by whoever is running the
Docker process resulting in the error reported
in FAB-5038.

To fix this, simply check for the existence of
the crypto-config folder and if it does not
exist run the equivalent commands as the
generate option

Change-Id: Ic5b48682a527951ac6eab5b5cf2d0fc6dbdaad56
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-06-30 12:53:56 -04:00
Adnan Choudhury
957a1ff17f [FAB-5062] Correct Gossip bootstrap setup in byfn
Corrects the Gossip bootsrap options for the 2 peers of org2 in the byfn
setup.  Peer1 should point to Peer0, and peer0 should not point to
itself.

Change-Id: I23074b7d5abe6ade4a57493808c3092c66086f62
Signed-off-by: Adnan Choudhury <adnan.choudhury@itpeoplecorp.com>
2017-06-28 16:13:18 -04:00
Jason Yellick
d58af569b7 [FAB-5031] Fix e2e template typo
There is a rogue network section which is indented at the top level of
the docker-compose-e2e-template.yaml file.  This has been reported by
users to cause errors when they attempt to tweak the byfn setup.

As best as I can tell, this network section is intended to be defined at
the top level and appears to have no adverse affect on the byfn.

Change-Id: I40b937d1f352af079754a84860bce025ec61594e
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2017-06-27 09:40:29 -04:00
Srinivasan Muralidharan
ec254d983c Merge "FAB-4916 add marbles02 chaincode" 2017-06-23 11:54:14 +00:00
Christopher Ferris
ca0b5d2882 FAB-4916 add marbles02 chaincode
couchdb mode requires marbles02 chaincode

Change-Id: I0c329e8d42fd72f656e292815d1ba5790f4b709c
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2017-06-23 04:16:14 +00:00
Gari Singh
b4beeffd32 [FAB-4927] Modify TLS config
Last part of FAB-4626- need to
update the script to use the right
root CA for communciating with the
orderer.

Change-Id: I89e1468be6970b48c416f7058dd38c24b0eec506
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-06-22 22:06:00 -04:00
Christopher Ferris
241d08ee3c FAB-4910 fix incorrect network spec
and fix incorrect function name in byfn.sh
add *.tx and *.block files to .gitignore
add FABRIC_CFG_PATH setting

Change-Id: Id3457455354b1f2aea1a9661aa89dc677e05124b
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
Signed-off-by: Rameshbabu <rameshbabu.thoomu@gmail.com>
2017-06-22 09:09:53 +08:00
Christopher Ferris
3297865248 FAB-4073 build your first network sample
address review comments

Change-Id: Ia2382005d4503f9dc7ba845a2d04f36237316cde
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2017-06-21 05:42:36 +00:00