diff --git a/docs/agents/fabric-operator.md b/docs/agents/fabric-operator.md new file mode 100644 index 000000000..fd2ce219d --- /dev/null +++ b/docs/agents/fabric-operator.md @@ -0,0 +1,43 @@ +Cello Fabric Operator how-to +=========================================== + +Cello Fabric Operator is a Kubernetes Operator which uses the Kubernetes Operator Framework to create Fabric Network and stand up nodes in a K8s Cluster + +The following is the list of the general steps to make the Kubernetes Operator + +1. [Create configuration zip](#create-configuration-zip) + +## Create configuration zip + +To stand up a fabric network, you will need a set of files, here is the list + + 1. K8s configuration file, to get access to a k8s cluster + 2. Config file having the specifications of the K8s resource, as well as the certs needed for that node + +The k8s configuration file is needed to gain access to a k8s cluster. Many cloud providers provide the k8s configuration file for you to download once you have a k8s cluster. If not download directly, these providers most likely provides you a way to create such file. + +The config file allows you to put in details like node name, allocate k8s resources such as cpu and memory, and the certificates needed for that. + +[Download sample config.yaml file](https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/agent/config.yaml) + +Follow the below process to prepare for setting up your fabric network: + +``` + 1. Create a directory named config, any file mentioned must be in this directory + 2. Name your k8s configuration file config and put it in .kube folder + 3. Download the sample config file and change it to put your desired values + 4. Create a zip for the folder with the same name +``` + +The zip file created in the above process is to be uploaded during the node creation. + +## Running the Fabric Operator Manually + +To manually run the operator, guide is present here :- [Fabric Operator README](https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/README.md) + + +Creative Commons License
+This work is licensed under a + +Creative Commons Attribution 4.0 International License. diff --git a/src/agent/fabric-operator/README.md b/src/agent/fabric-operator/README.md index 345bd0ca4..68b60b222 100644 --- a/src/agent/fabric-operator/README.md +++ b/src/agent/fabric-operator/README.md @@ -115,4 +115,8 @@ kubectl delete orderer orderer1st [peer_spec]:https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/crds/fabric_v1alpha1_peer_cr.yaml?raw=true [orderer_spec]:https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/deploy/crds/fabric_v1alpha1_orderer_cr.yaml?raw=true -Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. \ No newline at end of file +## Fabric Operator from the API / Dashboard + +To run the operator using the cello API or dashboard follow the instructions here :- [Fabric Operator Agent README](https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/README.md) + +Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/src/agent/fabric-operator/agent/config.yaml b/src/agent/fabric-operator/agent/config.yaml new file mode 100644 index 000000000..8a5b13fcf --- /dev/null +++ b/src/agent/fabric-operator/agent/config.yaml @@ -0,0 +1,35 @@ +# Config YAML File +# To be filled when using the agent + +spec: + # Only Needed in case of CA + #admin: "sampleadmin" + #adminPassword: "samplepassword" + + # To set up a node, a set of certs must be provided. + # You may choose a set from your company's CA issued certs or + # use Fabric CA to generate a set of certs. All fields of msp + # and tls are required. + # Certificates and private keys have to be base64 encoded + # The values in this file are examples. + msp: + adminCerts: ["LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNCVENDQWF5Z0F3SUJBZ0lRU2E4RmZ0RkpHOXFtd0diNmMrVWtyREFLQmdncWhrak9QUVFEQWpCYk1Rc3cKQ1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFVRUJ4TU5VMkZ1SUVaeQpZVzVqYVhOamJ6RU5NQXNHQTFVRUNoTUViM0puTURFUU1BNEdBMVVFQXhNSFkyRXViM0puTURBZUZ3MHhPVEV3Ck1ESXhOak0xTURCYUZ3MHlPVEE1TWpreE5qTTFNREJhTUdBeEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUkKRXdwRFlXeHBabTl5Ym1saE1SWXdGQVlEVlFRSEV3MVRZVzRnUm5KaGJtTnBjMk52TVE4d0RRWURWUVFMRXdaagpiR2xsYm5ReEV6QVJCZ05WQkFNTUNrRmtiV2x1UUc5eVp6QXdXVEFUQmdjcWhrak9QUUlCQmdncWhrak9QUU1CCkJ3TkNBQVJB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tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ2FqNlNud0pUZjRkclYyMzcKZFBEc2tDcDI4QnlXcXE4R0IrSXNBODZQWUFDaFJBTkNBQVJ0TlQ0ZFFMTnRuS013WjJnRjF3RHIrRmpodXkyOQpvZXpCblY0RDlzYkhyaUVoRXVpbmFsREZaWGlQNlJjeENZMkxxaHA3LzZTVGdFdXZsSkZvVU1JMAotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg==" + nodeSpec: + # To specify resource limits for node, + # use kubernetes resource requirements spec + # resources: + # requests: + # memory: "32Mi" + # cpu: "200m" + # limits: + # memory: "1024mi" + # cpu: "250" + storageSize: "1Gi" + storageClass: "default"