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

Improves Kubernetes Operator Agent Documentation #78

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions docs/agents/fabric-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,34 @@ The k8s configuration file is needed to gain access to a k8s cluster. Many cloud

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)
[Download sample config.yaml file](https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/agent/samples/peer_config.yaml)

Follow the below process to prepare for setting up your fabric network:
Follow the below process to prepare zip files for setting up your fabric network:

### Kubernetes Agent Zip

```
1. Create a directory named config, any file mentioned must be in this directory
1. Create a directory named kubeconfig, 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
3. Put .kube folder into kubeconfig folder and create a .zip file for the same
```

The zip file created in the above process is to be uploaded during the `Agent` creation.

### Node File with config parameters

```
1. Download the sample config file and change it to put your desired values
2. Create a zip for the folder with the same name
```
Commands for the same :-

```
wget https://github.com/hyperledger/cello/blob/master/src/agent/fabric-operator/agent/samples/peer_config.yaml?raw=true
tar -czvf peer_config.tgz peer_config.json
```

The zip file created in the above process is to be uploaded during the node creation.
The file created in the above process is to be uploaded during the `Node` creation.

## Running the Fabric Operator Manually

Expand Down
36 changes: 36 additions & 0 deletions src/agent/fabric-operator/agent/samples/peer_config.json
Original file line number Diff line number Diff line change
@@ -0,0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N4Q1kyTHFocDcKLzZTVGdFdXZsSkZvVU1JMG80SFJNSUhPTUE0R0ExVWREd0VCL3dRRUF3SUZvREFkQmdOVkhTVUVGakFVQmdncgpCZ0VGQlFjREFRWUlLd1lCQlFVSEF3SXdEQVlEVlIwVEFRSC9CQUl3QURBckJnTlZIU01FSkRBaWdDQXg4Q3lsCnczVmt6MG9WQ0wzdlJoUFFPdCtCMHBXWWNBZFJGbWNoTXpUSGhUQmlCZ05WSFJFRVd6QlpnZzl3WldWeU1TMXYKY21jd0xtOXlaekNDQ25CbFpYSXhMVzl5WnpDSEJLazh4M1dIQktrOHgzMkhCS2s4eDNTSEJLazh4M2lIQktrOAp4M3VIQkFxeGE4aUhCQXF4YSsySEJBcXhhKytIQkFxeGEveUhCQXF4YS80d0NnWUlLb1pJemowRUF3SURTQUF3ClJRSWhBSUxkLzhQQ0NnVGFFbWw2RW5tZUM3OTlVR3dpb0tHcUlqVmZxdlhGekF6N0FpQk50OEoxVjJKZUY3MjQKekhCR3hEc2pIc3BNekt0M3VjRnIxRStRUHcvNjJ3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
"tlsKey": "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JR0hBZ0VBTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEJHMHdhd0lCQVFRZ2FqNlNud0pUZjRkclYyMzcKZFBEc2tDcDI4QnlXcXE4R0IrSXNBODZQWUFDaFJBTkNBQVJ0TlQ0ZFFMTnRuS013WjJnRjF3RHIrRmpodXkyOQpvZXpCblY0RDlzYkhyaUVoRXVpbmFsREZaWGlQNlJjeENZMkxxaHA3LzZTVGdFdXZsSkZvVU1JMAotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg=="
},
"nodeSpec": {
"storageSize": "1Gi",
"storageClass": "default",
"image": "hyperledger/fabric-peer:1.4.3",
"configParams": [
{
"name": "CORE_PEER_ADDRESSAUTODETECT",
"value": "7054"
},
{
"name": "CORE_PEER_TLS_ENABLED",
"value": "true"
}
]
}
}
}