Commit graph

66 commits

Author SHA1 Message Date
Jason Yellick
a76d649ffd [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 14:25:52 +00:00
David Enyeart
31b99c4968 Merge "[FAB-8567] Alt: Always use volumes for ledger (r)" into release 2018-03-01 01:36:30 +00:00
Jason Yellick
5271be875e [FAB-8567] Alt: Always use volumes for ledger (r)
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: Id008d50487e8d304d6e2517300402dfd1cc8c0c3
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-28 15:55:41 -05:00
Christopher Ferris
1f4dc774ce Merge "[FAB-8561] Add note to readthedocs link in README" into release 2018-02-28 19:44:25 +00:00
ratnakar
b2f806d8a2 [FAB-8561] Add note to readthedocs link in README
Change-Id: Idf29789151639f7997a331ff90ab735d93256041
Signed-off-by: ratnakar <asara.ratnakar@gmail.com>
2018-02-27 17:58:53 -05:00
David Enyeart
e91eccfe45 Merge "[FAB-8540] Add ledger persistance to first-network" into release 2018-02-27 22:16:19 +00:00
Jason Yellick
709aa31466 [FAB-8540] Add ledger persistance to first-network
This CR is for the release branch.

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: I311ca1d2157dd87e61ad890c98cde7c118d5ee7d
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
Signed-off-by: Surya <suryalnvs@gmail.com>
2018-02-27 16:11:02 -05:00
Jason Yellick
6942854940 [FAB-8518] Missing IMAGE_TAG on fabric-tools
The compose files were edited to add IMAGE_TAG, but fabric-tools was
skipped.

Change-Id: I3bf4d0570a1711b8845c92560dc4c6278db5a186
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-25 08:43:57 -05:00
Jason Yellick
3c5b4bdab7 [FAB-8489] Make IMAGE_TAG optional
Existing sample documentation assumes that 'docker-compose' may be run
directly in the first-network directory.  Now that IMAGE_TAG is
parameterized, this creates failures if the var is unset.

This CR adds a default (which may be overridden via the environment) so
that this breakage does not occur.

Change-Id: Ibea4a3b3f823dfd3fc0e1eca3ab824b8230a8a41
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
2018-02-23 16:12:22 -05:00
Surya
84ff0e6680 [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 -m up -i 1.0.6

Change-Id: Icaf9791705d50d7ccba380ac7a0867a9f9951be6
Signed-off-by: Surya <suryalnvs@gmail.com>
2018-02-22 09:56:41 -05:00
Gari Singh
f9794a7044 [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: Id3abb044ae9385d239af25e63bacb8d4d3ccbf71
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-12-03 09:35:21 -05:00
Gari Singh
b99e1b8da2 [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: Ib80d720bfdec1ffe100b1b6b5c752e72b583890b
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-11-05 08:10:03 -05:00
Bret Harrison
6a5a1c3183 [FAB-6568] Fabric-Samples - update fabcar
Update the fabcar sample with an easier flow
Remove hardcoded fields in the invoke program

Change-Id: I9a06cdd317c2afec80720ac7d728d38fc62c6f63
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
Signed-off-by: Nick Gaski <ngaski@us.ibm.com>
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-11-01 06:09:05 -04:00
Gari Singh
3685c4444e [FAB-6378] Update samples for v1.0.3
No major changes needed to work with v1.0.3
but this will merge any changes from master
to the release branch

Change-Id: I5fe1f01ea2f53a0596eead1caed401b57f6167ec
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-10-04 06:03:14 -04:00
Gari Singh
6109dc4ee3 [FAB-6361] Update license text in README
The license text at the bottom of the
README is a bit confusing as it might imply
that the entire project is licensed under
Creative Commons
See [FAB-6326] for details

Change-Id: Ic9178ac0d55763b5c911ec7c188312e5a6b98c88
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-09-30 09:33:29 -04:00
Zhangjiong Xuan
c9b0c62975 [FAB-6292] Fix spelling error
[FAB_6292] fix spelling error in high-throughput.

Change-Id: I6f0d3a8ccdbd3b5b0762e3f346292340862354ac
Signed-off-by: Zhangjiong Xuan <xuanzhangjiong@hyperchain.cn>
2017-09-26 15:24:26 +08:00
Jim Zhang
56af764006 Merge "Add high-throughput example to samples" 2017-09-14 17:19:56 +00:00
Alexandre Pauwels
9d70f31334 Add high-throughput example to samples
A new data storage model was implemented in the fabric-samples which allows
for high-throughput of transactions. The storage model is based on storing
deltas of a value, creating a new row for each transaction, and then merging
these deltas when the final value of the variable is required.

This concept is similar to simple integer-based CRDTs, where add or subtract
updates are constantly sent to the ledger and the merge function combines all
of these deltas into one value.

Change-Id: I60b5cdc295d4503d7d496d016bf215c78eff5710
Signed-off-by: Alexandre Pauwels <alexj.pauwels@gmail.com>
2017-09-14 09:06:37 -04: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
Gari Singh
ed285ef42d FAB-5540 Merge master into release
Need to update the release branch to
master

Change-Id: I4e989483b4319f085c7760f91ea21fb90f57582f
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-09-03 09:46:42 -04:00
Gari Singh
ba0a098ca6 FAB-5995 Update samples to work with v1.0.2
basic network:
- update docker-compose.yaml to use v1.0.2
- regenerate artifacts

fabcar:
- update creds

chaincode-docker-devmode:
- renegerate channel tx and genesis block

balance-transfer:
- update docker-compose.yaml
- update readme to use download link
- regenerate channel artifacts

Change-Id: I7d52f1afce51ea9e1b115fa287d281af95d9ad85
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-09-03 08:08:53 -04: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
Binh Nguyen
419a083a2e Merge "FAB-5056 enable couchdb test in byfn e2e script" 2017-08-10 15:09:19 +00:00
Jim Zhang
bb842993d2 Merge "[FAB-5155]Fix README.md in "balance-transfer" example" 2017-08-09 19:17:43 +00:00
Yacov Manevich
9cd3f5425d Merge "[FAB-5303] Further balance-transfer code optimization" 2017-08-09 19:13:07 +00: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
Artem Barger
6e096791ef Merge "[FAB-5603] fixed missing f option on switch" 2017-08-07 10:26:01 +00:00
Artem Barger
2571c960a8
[FAB-56431]: Add dependency for couchdb into peer.
Currently peer and couchdb containers started simulateously, while
clearly peer depends on availability of the state db, therfore this
commit add dependency declaration into docker-compose.yaml file to make
sure to start couchdb before peer container.

Change-Id: Id2302a32fba9234d04ef3f4e6bd24ac92a766995
Signed-off-by: Artem Barger <bartem@il.ibm.com>
2017-08-06 12:56:30 +03:00
Gari Singh
cb3e7f69a3 Merge "[FAB-5130] Invalid syntax in docker compose files" 2017-08-05 11:34:58 +00: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
Christopher Ferris
6b99925773 Merge "[FAB-5394] Introduce Delay as configurable variable" 2017-08-02 18:03:18 +00:00
Jim Zhang
79cb041124 [FAB-5303] Further balance-transfer code optimization
- Made it possible to deploy the app (both the client and fabric
  backend) to a location other than localhost
- Made it possible to work with a backend over grpc instead of always
  assuming grpcs
- Made the list of target peers for instantiate and invoke calls
  to be optional
- Enabled target networks to be controlled by an env variable

Change-Id: Ie394cf7e8f6ed47d970d4be992f2f6a0394fff7f
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
2017-07-26 18:00:05 +00: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
Nao Nishijima
2f4e9b851c [FAB-5130] Invalid syntax in docker compose files
This patch set deletes unused docker-compose environment variables.
Now CouchDB section in docker-compose file uses DB_URL env variables.
But the variables are not used in CouchDB container.

Change-Id: I8e84255e1ea00498b787bdd4042cdb909a96667c
Signed-off-by: Nao Nishijima <nao.nishijima@hal.hitachi.com>
2017-07-24 14:57:48 -07: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
Christopher Ferris
134549af22 FAB-5412 add fabric-preload.sh script
Add a script to allow users to preload the Fabric docker
images without having to run the curl command in the RTD.

Change-Id: I3b6c682c3e2ab1f230f7af8c3ce0b95bbb8fd024
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2017-07-22 16:58:14 -04:00
Gari Singh
a7e83fc235 FAB-5392 Fix path issue for Git Bash users
Git Bash is a prereq for Windows users
required to run the various sample
scripts.  Git Bash by default will
convert paths and this causes the
issue identified by FAB-5392.

Luckily Git Bash provides supports an
environment variable to override this
behavior.

Change-Id: I66e52eb2953c0dcc9f04903a1fd1fd94d19b75ce
Signed-off-by: Gari Singh <gari.r.singh@gmail.com>
2017-07-20 08:24:26 -04:00
Yuki Kondo
6cce07c440 [FAB-5155]Fix README.md in "balance-transfer" example
The README in "balance-transfer" should be fixed in the section:
https://github.com/hyperledger/fabric-samples/tree/master/
balance-transfer#running-the-sample-program

1. Broken link
There is a link to "Sample REST APIs Requests" which is broken.
This is linked to non-existent path on fabric-sdk-node repository.
I believe the intended link is to
https://github.com/hyperledger/fabric-samples/tree/master/
balance-transfer#sample-rest-apis-requests

2. Instruction to start node application.
There is no instruction to start node application.
If we execute the REST APIs according to the current README,
we can't get any responses since node application is not working.
We need to execute the following steps before calling REST APIs.

 - npm install
 - PORT=4000 node app

fix repo names

Change-Id: I9ec0ec18bb36addd6c8371481dc8cfe645053ec6
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
Signed-off-by: Christopher Ferris <chrisfer@us.ibm.com>
2017-07-19 12:00:51 -04:00
Christopher Ferris
1153988540 Merge "[FAB-5311] Fix spelling error" 2017-07-19 14:14:51 +00:00
Christopher Ferris
d9e2d5cc8c Merge "[FAB-5287] NodeSDK - fix sample" 2017-07-17 20:05:34 +00:00
Christopher Ferris
0611471e4b Merge "[FAB-5197]Check all prop-responses in balance-transfer" 2017-07-17 20:03:26 +00:00
GeorgeLindsell
6422fc36ce [FAB-5311] Fix spelling error
Fix spelling error in instantiate-chaincode.js

Fix Issue # 5311.

Change-Id: Ib8654e2d12a6e3d138406d0bb8738e37ebee90d1
Signed-off-by: GeorgeLindsell <lindsellgeorge@gmail.com>
2017-07-14 15:44:41 +01:00
Bret Harrison
e0db341af9 [FAB-5287] NodeSDK - fix sample
Sample should use 'fcn' not 'functionName'
in the sample curl calls and sample app.

Change-Id: I4be92a0394fdf579195e9566d049aac0862d5888
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
2017-07-13 17:04:32 -04: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
Jim Zhang
8f01c7f0e2 [FAB-5260] Update balance-transfer sample to v1.0.0
Change-Id: Ie6738415d8cca650c609fe72bb6195b36751b3d6
Signed-off-by: Jim Zhang <jzhang@us.ibm.com>
2017-07-11 14:06:44 -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
Yuki Kondo
70bff28f8a [FAB-5197]Check all prop-responses in balance-transfer
"balance-transfer" app doesn't check all of the proposal responses.

An app sends a transaction proposal to multiple peers and get
multiple responses. However, the only first response
"proposalResponses[0]" is checked repeatedly in the loop.

This patch fixes the code to check all of the array value of
proposalResponses correctly.

Change-Id: Id61e691eb4d1c3a6c4a7a390584dfd74f1fc6196
Signed-off-by: Yuki Kondo <yuki.kondo@hal.hitachi.com>
2017-07-06 08:08:52 -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