Skip to content

Instantly share code, notes, and snippets.

@hi5san
hi5san / 00-HLF-logging-with-fluentd-README.md
Last active August 7, 2018 11:23
Hyperledger Fabric byfn docker-compose with fluent logging

What is this?

A sample docker compose file for BYFN from fabric-samples with fluentd log driver output enabled.

Also see Hyperledger Fabric fluent logging connected to EK stack for the same connected to EK stack (allowing Kibana view of Hyperledger Fabric logs).

NOTE The docker-compose file attached here is based on BYFN (fabric-samples) matching hyperledger fabric v1.1. However, it should be trivial to apply for others (such as v1.2).

The key config points are:

  1. Adding deps and log driver config
  2. fluentd docker container
@hi5san
hi5san / 00-HLF-logging-with-fluentd-and-EK-REAME.md
Last active August 7, 2018 16:31
Hyperledger Fabric byfn docker-compose with fluent logging connected to EK stack (no Logstash in middle)

What is this?

A sample docker compose file for BYFN from fabric-samples with fluentd log driver output enabled, and is connected to ElasticSearch and Kibana.

NOTE The docker-compose file attached here is based on BYFN (fabric-samples) matching hyperledger fabric v1.1. However, it should be trivial to apply for others (such as v1.2).

Thanks to this blog in Qiita (Japan) - https://qiita.com/cgetc/items/345e3c686910b30ba49f.

How to use?

See Hyperledger Fabric byfn with fluent logging but use the docker-compose file and fluentd.conf attached here instead.

@hi5san
hi5san / docker-compose.yml
Last active November 2, 2018 20:08
Docker compose for Hyperledger Fabric fabler sample w/gossip endpoint enabled for Service discovery (diff to original sample is L60~62 added GOSSIP ends). See https://stackoverflow.com/questions/51377474/hyperledger-fabric-gossip-bootstrap-gossip-externalendpoints for explanation of those env vars. Original source:https://github.com/hyperledger/…
#
# Copyright IBM Corp All Rights Reserved
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
networks:
basic:
@hi5san
hi5san / invoke.js
Last active October 30, 2018 05:43
Hyperledger fabric fabcar sample example of working invoke.js (Only diff to official sample is L64 and L65 filled with params) original:https://github.com/hyperledger/fabric-samples/blob/v1.2.1/fabcar/invoke.js
'use strict';
/*
* Copyright IBM Corp All Rights Reserved
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* Chaincode Invoke
*/
@hi5san
hi5san / config.json
Last active October 30, 2018 05:46
Hyperledger Explorer config example for Hyperledger Fabric basic-network sample (assumes ~/fabric/fabric-samples) (original: https://github.com/hyperledger/blockchain-explorer/blob/release-3.8/app/platform/fabric/config.json)
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": false,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
@hi5san
hi5san / config.json
Last active October 30, 2018 05:45
Hyperledger Explorer config example for Hyperledger Fabric BYFN(first-network) sample (assumes ~/fabric/fabric-samples) (original: https://github.com/hyperledger/blockchain-explorer/blob/release-3.8/app/platform/fabric/config.json)
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
@hi5san
hi5san / 01_setup-ubuntu.sh
Last active November 8, 2021 20:38
Hyperledger Fabric + Hyperledger Explorer - Full setup memo scripts (HLF v1.2 + Explorer release-3.8)
#!/bin/sh
# Tested on Ubuntu 16.04LTS/18.04LTS
echo 'export PS1="\[\e[34;1m\]\w\[\e[m\]$ "' >> ~/.profile
. ~/.profile
sudo timedatectl set-timezone Asia/Tokyo
sudo apt -y update
sudo apt -y upgrade
sudo apt -y install \
@hi5san
hi5san / PY0101EN-1-1-Types.ipynb
Created September 3, 2019 23:30
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hi5san
hi5san / DB0201EN-Week4-2-2-PeerAssign-v5-py.ipynb
Created September 3, 2019 23:30
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hi5san
hi5san / PY0101EN-1-2-Strings.ipynb
Created September 4, 2019 00:25
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.