minifabric
minifabric copied to clipboard
Move tool container from local to k8s when using k8s
Currently the tool container (cli) is deployed on the local machine when deploy Fabric onto k8s. which in later deployment may hard to keep track where the tool container is. If that container gets deployed onto k8s running with peer or orderer nodes, the system will be easier to work with.
@itaru2622, you wanna to take a look at this one?
@litong01 hmm. actually, I thought almost the same matter, but unfortunately it is hard for me to work this issue in my current situation.
@litong01 I investigated this issue, related to #240 and found some...
in current minifabric architecture, two conatainers (minifab and fabric-tools) sync files via docker volume mount. to solve this matter, followings are needed:
A) boot fabric-tools container on k8s
B) send(sync) vars/run/* script from minifab before executing it on fabric-tools container
I'm not sure if it needs to send back execution output file from fabric-tools to minifab container.
C) the name of fabric-tools container may not have fixed name, and needs resolving.
A is not difficult, but B is quite hard since there is no auto sync mechanism between local and k8s containers. I was looking for things to achieve B and found 'kubectl cp' functionality may help to achieve B. fortunately, latest kubernetes.core got k8s_cp feature few days ago (in main branch. it is not released yet).
This feature is probably needed to setup multiple fabrics (on kubernetes) from one operation machine.
ansible kubernetes.core 2.2.0 released which has k8s_cp and k8s_exec. it is ready to work for this issue.