Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxgfr/automobile-blockchain
Blockchain for automobile use-case
https://github.com/maxgfr/automobile-blockchain
automobile blockchain blockchain-demos hyperledger hyperledger-composer testing
Last synced: 7 days ago
JSON representation
Blockchain for automobile use-case
- Host: GitHub
- URL: https://github.com/maxgfr/automobile-blockchain
- Owner: maxgfr
- Created: 2019-02-14T11:01:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T20:20:26.000Z (9 months ago)
- Last Synced: 2024-04-14T11:31:46.079Z (7 months ago)
- Topics: automobile, blockchain, blockchain-demos, hyperledger, hyperledger-composer, testing
- Language: JavaScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# automobile-blockchain
Blockchain for automobile use-case
## Launch the network in local
```shell
composer-rest-server -c admin@auto -n always -u true -w true
```## Test the network
```shell
mkdir dist && composer archive create --sourceType dir --sourceName . -a ./dist/auto.bna && cd distcomposer network install --card PeerAdmin@hlfv1 --archiveFile auto.bna
composer network start --networkName auto --networkVersion 0.0.1 --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
composer card import --file [email protected]
composer network ping --card admin@auto
composer-rest-server --card admin@auto
```## Deploy to IBM Blockchain
### 1. Create a certification authority card
`ENROLLSECRET` is a field of this file : `connection-profile.json`
`connection-profile.json` has been downloaded from IBM Blockchain in the section presentation (connection profile)
```shell
cd dist && composer card create -f ca.card -p connection-profile.json -u admin -s ENROLLSECRETcomposer card import -f ca.card -c ca
composer identity request --card ca --path ./credentials -u admin -s ENROLLSECRET
```### 2. Add certificates to IBM blockchain
https://console.bluemix.net/docs/services/blockchain/develop_starter.html#etape-3-ajouter-les-certificats-l-instance-de-plan-starter
### 3. Create admin card
```shell
composer card create -f adminCard.card -p connection-profile.json -u admin -c ./credentials/admin-pub.pem -k ./credentials/admin-priv.pem --role PeerAdmin --role ChannelAdmincomposer card import -f adminCard.card -c adminCard
```### 4. Install the network
```shell
composer network install -c adminCard -a auto.bnacomposer network start -c adminCard -n auto -V 0.0.1 -A admin -C ./credentials/admin-pub.pem -f delete_me.card
rm delete_me.card
composer card create -n auto -p connection-profile.json -u admin -c ./credentials/admin-pub.pem -k ./credentials/admin-priv.pem
composer card import -f ./[email protected]
composer network ping -c admin@auto
```