aws-samples / hyperledger-on-kubernetes

Builds a Hyperledger Fabric network on Kubernetes
MIT No Attribution
119 stars 64 forks source link

Turn tests into Jobs #4

Open msolefonte opened 5 years ago

msolefonte commented 5 years ago

At least in the 1.4 Fabric version, tests and other only-one-use pods are deployed thought a deployment and not a job. I think it is better to have them as a job to limit resource usage once everything is deployed.

This is more a discussion than an actual issue, but can lead to some changes.

MCLDG-zz commented 5 years ago

Yes, makes sense. Would you like to submit a PR?

msolefonte commented 5 years ago

I would like to, but I do not have an AWS account for testing usage and I do not want to spend any money in helping. However, I want to help.

If It is useful, I can try to modify deployment files but they have to be tested by another one. I actually have a lot of things in mind to be changed/improved which I am going to turn into issues/pr as long as I have time for it.

msolefonte commented 5 years ago

There is already a PR. I have been trying to modify also the /k8s-templates/fabric-deployment-register* YAML files to turn them into jobs, but the script also has to be modified. The problem here is that when the peer/org/orderer has already been registered, the script returns an error, which is interpreted as a fatal error by Kubernetes (setting the job status as Error).

To solve this, I recommend to not return an error but a warning in the script, and end the execution with a 0 status. However, this is very different from this issue, so should be debated in another one.