Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a sample-network with the Ansible Blockchain Collection #36

Open
jkneubuh opened this issue Jul 20, 2022 · 1 comment
Open

Create a sample-network with the Ansible Blockchain Collection #36

jkneubuh opened this issue Jul 20, 2022 · 1 comment

Comments

@jkneubuh
Copy link
Contributor

The operator sample-network uses an odd mix of bash scripting and kustomization overlays to realize a Fabric network compatible with the fabric-samples chaincode and gateway applications. CRDs are applied to the k8s API controller, where they are reconciled in the operator to realize a blockchain network. The bash scripts provide a little bit of imperative control flow, using envsubst to perform some light string substitution into the CRDs before applying to k8s. Once the nodes are set up, the fabric CLI binaries are strung together to administer the subsequent network topology.

This is one way that fabric-operator can be used, but it is not the only (or preferred) way to spin up networks. Illustrate this feature by creating a new sample-network, equivalent to the fabric-samples / test-network-k8s / sample-network (bash), but this time using the Ansible Blockchain Collection as a fully declarative representation for the Fabric Network.

This includes the core Resource types managed by the operator (CAs, Peers, Orderers, Consoles), but also extends up into the higher-order constructs of Channel, Chaincode, Organization (MSP), etc. Fabric-operator makes the network node setup simple, but still leaves open some administrative complexity for actually constructing the blockchain and channel constructs. The ansible playbooks, despite some rough edges, provide for some nice automation at this layer and complement the operator well. Demonstrate this linkage with a sample network in the operator project.

A good starting point for this feature is emerging over at hyperledgendary/full-stack-asset-transfer-guide

Hey - I just want to write some chaincode on Fabric...

Not a bad start:

just kind 

just operator 

just sample-network
@jkneubuh
Copy link
Contributor Author

cc: @denyeart @mbwhite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant