Commit graph

2 commits

Author SHA1 Message Date
Mark S. Lewis
6607df97bc
Remove obsolete version element from compose files
The version element is obsolete and unused since Compose v1 was
deprecated in favour of Compose v2 in 2022, and reached end-of-life in
2023. The version element generates warning messages running Docker
Compose commands when bringing up and down the test-network, which
adds unnecessary noise and can be confusing for users.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
2025-10-30 18:16:18 +00:00
Arun S M
7ee1bf793d
TLS enabled external chaincode example (#438)
* Enable TLS on asset-transfer-basic external chaincode

1. Introduce environment variables to enable or disable TLS
at runtime. Also, introduce environment variables which carries
the server key, cert and the client machine's root CA cert
information.
2. Read the environment variables to decide with appropriate
assumptions on default values to work as is today.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>

* Update the chaincode.env with new options

1. Introduce four new environment variables to the default
chaincode environment file.
2. Add two new environment files for easy/automation running
of the external chaincodes for different organizations.

Note that when TLS enabled, the package contents will change.
So each organization will have their own package ID
generated unlike earlier. Also, there will be two chaincode
containers running instead of one for the given example.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>

* Add docker compose file for running chaincodes

The file will build and run the chaincode on the fly.
Also, it will make use of the available files which is
configured by the user as part of execution. This will
help in bringup/bringdown of the chaincode containers.

In addition, it will help in updating the environment
variables on the go.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>

* Introduce crypto directory and ignore the pem contents

The directory is used by the docker-compose file for
automation. Instructions in the README.md file will
suffice the filling up of required files in this directory.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>

* Instructions on TLS enabled external chaincode server

1. Add instructions to generate a chaincode server TLS
parameters.
2. Add instructions on different parameters that peer node
expects and the chaincode expects.
3. Add instructions on steps to be followed in asset-transfer
-basic to work with iTLS enabled exteral chaincode.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>

* Enable chaincode to work without TLS as well

1. Root certificate is an optional parameter supplied for
chaincode to verify the peer's connection in response.
2. If TLS is enabled, then specify the key and cert
parameters. Do not expect it otherwise.

Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
2021-04-20 11:06:46 +02:00