hyperledger / hyperledger/fabric-samples

test-network-in-a-box

Open
#631 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
3.5k
Avg merge
3d 20h
Merged PRs (30d)
6

Description

@mbwhite showed an amazing demonstration / prototype by embedding a "zero-to-blockchain-in-one-command" example with the [hlfsupport-in-a-box](https://github.com/hyperledgendary/hlfsupport-in-a-box) project. HLF-in-a-box sets up all of the project dependencies, ansible playbooks, and scripting necessary to spin up a network on a remote OCP with a single command.

This Issue / Feature describes an analogous command, but targeting the core Fabric test-network and test-network-k8s projects.

To implement this feature, bundle all of the pre-requisites, scripts, manifests, etc. etc... necessary to spin up a test network, and package everything together in a runnable Docker image. In a kubernetes cluster, the image can just "run" with a kubectl run (or job) in the cluster, inheriting the default service account and kube context. It's not immediately clear how the mechanics will work for the compose-based network, but it certainly would be convenient to run the setup with a single `docker run` command.

The expected usage is:

```
kubectl apply \
-n my-namespace \
-f https://raw.githubusercontent.com/hyperledger/fabric-samples/main/test-network-k8s/kube/install-test-network-job.yaml
```

Some really convenient extension ideas:

- After the user runs the "in-a-box" installer, leave the MSP residue and certificates in a convenient location for local dev.

- Have the installer set up Nginx Ingress resources for the Fabric nodes. (We could use the *.nip.io or *.vcap.me DNS host aliases to set up stable host names binding to the Nginx ingress controller on the host NIC.)

- ???

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.