bevel-operator-fabric
bevel-operator-fabric copied to clipboard
Can we use the operator without the plugin
Is it possible to use the hlf operator without the plugin, say using CRD and helm charts? We have a requirement where the deployment needs to happen through helm charts, not through CLI.
Much appreciate your help in this regard.
Thanks
Hi @harishmurthy
Take a look at this project using Go with the Kuberntes client you can create resources programmatically.
https://github.com/kfsoftware/hlf-operator-ui/tree/main/api
Can you give us an example on that? For example how the peer creation is taking place using the api
@dviejokfs As I can see here the functionalities for the deployment are not implemented. If I don't want to use bash with the hlf plugin to deploy (and maintain -i.e add an orderer node after the initial deployment-) the network what is the best way to make the job done. Should I make a custom Go-lang application where I will call the functions that hlf plugin uses? For example for creating a peer to call this function with the appropriate arguments?
@nkaramolegos Yes, the functions you need to call are the same but instead of doing it within the Kubectl plugin, you can do it within your API.
The mutations are not implemented, but the queries are. It's almost the same are the queries but changing the operation, instead of List, you need to invoke the function Create or Update:
https://github.com/kfsoftware/hlf-operator-ui/blob/main/api/gql/resolvers/query.go#L23
So I will go to this function and I will add this code after creating the appropriate options and parameters. Correct?
Can you please provide some details on that.
Yes @nkaramolegos , exactly, that's the way to go, can you share some code publicly for me to review it? If that's possible that would accelerate the process so much.
Thank you
I will try to implement that. I am new to Go and things looks a bit complicated. What I have to compile in order to call the function CreatePeer from my code
Excuse my ignorance in how things runs in Go but I have ran inside the api folder go build -o api main.go . After this, how can I call this function to see the panic message. Is there a test script with the appropriate imports and calls with the corresponding arguments?
Hello @dviejokfs If you give some guidelines or an example on how to start, compile and use the api I may help you implement it. It is something that I really need for my project