https://github.com/holzeis/lifecycle
https://github.com/holzeis/lifecycle
chaincode chaincode-installation chaincode-lifecycle
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/holzeis/lifecycle
- Owner: holzeis
- License: apache-2.0
- Created: 2020-03-15T15:31:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T08:20:08.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T12:00:09.387Z (over 1 year ago)
- Topics: chaincode, chaincode-installation, chaincode-lifecycle
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chaincode lifecycle
Wraps the peer [chaincode lifecycle](https://hyperledger-fabric.readthedocs.io/en/release-2.0/commands/peerlifecycle.html) cli api into an http server.
* Supports chaincode installations as an external service.
* Coordinates chaincode installations within the business network.
* Provides an api to query the currently installed / committed ccid.
## API
The following lists the accessible endpoints exposed by the lifecycle service.
### POST /{channel}/deploy/{chaincode}
Deploys a chaincode to the network using the discovery service to find nodes participating in the channel. A connection and metadata json is created based on the given parameters. *Please note, that the chaincode as external service is expected to be accessible on {chaincode}:7052.*
### GET /install/{chaincode}
Installs a chaincode as external service to the given peer
### GET /{channel}/approve/{chaincode}/{sequence}/{ccid}
Approves a chaincode installation for the given channel, chaincode, sequence number and ccid (package id).
### GET /{channel}/installed/{chaincode}
Returns the installed and committed chaincode on the given channel. Returns 404 if the chaincode has not been installed on that channel.
### GET /{channel}/joined
Returns 200 if the peer has joined the given channel and 404 if not.
## Used environment variables
The following environment variables need to be set in order for the lifecycle service to work properly.
|Environment Variable|Description|
|--------------------|-----------|
|FABRIC_LOGGING_SPEC|sets the log level e.g. INFO|
|CORE_PEER_LOCALMSPID|the msp of the organization|
|ORDERER_ADDRESS|the address of the orderer|
|ORDERER_CA|the ca of the orderer for tls communication|
|CORE_PEER_ADDRESS|the address of the peer|
|CORE_PEER_TLS_ENABLED|whether or not tls should be used (needs to be true)|
|CORE_PEER_MSPCONFIGPATH|the path to the users msp config|
|CORE_PEER_TLS_CERT_FILE|the path to the peers cert file|
|CORE_PEER_TLS_ROOTCERT_FILE|the path to the peers root cert file|