Aim: to get up and working with Java Chaincode as quick as possible. Also as a sanity check that everything is setup correctly.
That you have:
- git installed
- docker and docker-compose installed
| #!/bin/bash -e | |
| set -euo pipefail | |
| echo "======== PULL DOCKER IMAGES ========" | |
| ############################################################### | |
| # Pull and Tag the fabric and fabric-ca images from Artifactory | |
| ############################################################### | |
| echo "Fetching images from Artifactory" | |
| ARTIFACTORY_URL=hyperledger-fabric.jfrog.io |
| https://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ | |
| rsync -azvh ~/github.com $BACKUP/ | |
| https://www.raspberrypi.org/documentation/remote-access/ssh/README.md | |
| https://www.raspberrypi.org/documentation/configuration/raspi-config.md | |
| Change pwd |
| #!/bin/bash | |
| # You can use this command to get this script | |
| # | |
| # curl -LOs https://gist.github.com/mbwhite/a32abc57a0a45ecc466977ceef67df1f/raw/monitordocker.sh && chmod +x monitordocker.sh | |
| # | |
| # This script uses the logspout and http stream tools to let you watch the docker containers | |
| # in action. | |
| # | |
| # More information at https://github.com/gliderlabs/logspout/tree/master/httpstream |
| ## Cheat Sheet for sequence of commands for v2.0 lifecycle and byfn | |
| docker kill $(docker ps -q) && docker rm $(docker ps -aq) | |
| docker rmi $(docker images dev-* -q) --force | |
| docker volume prune -f && docker network prune -f | |
| ./byfn.sh generate | |
| ./byfn.sh restart | |
| # org1 -> | |
| docker exec -it cli bash |
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", |
Node.js - example script in package.json
"start:dev": "CORE_CHAINCODE_LOGGING_SHIM=debug fabric-chaincode-node start --peer.address=localhost:7052 --chaincode-id-name hellonet:1"
sudo yum install gcc-c++ make
# get the nvm installer for node.js
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# (restart the terminal app to get this added to your shell path)
| #!/bin/bash | |
| # update packge information and | |
| # install the build essentials | |
| sudo apt update | |
| sudo apt install build-essentials git | |
| sudo apt upgrade | |
| # zsh | |
| sudo apt-get install zsh | |
| sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
| /* | |
| SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| /** | |
| * Client application to get the metadata from a deployed Fabric Contract. | |
| * | |
| * Good example of the essentials of connecting a client to Fabric, and how to | |
| * issue a simple transaction. As this is an 'evaluate' transaction (i.e. nothing is | |
| * committed to the ledger) it is also a useful 'ping' transactions. All chaincode's start |