hyperledger / indy-node-monitor

Apache License 2.0
13 stars 28 forks source link

Add a tmp directory #75

Closed GuillaumeBourque-QC closed 2 months ago

GuillaumeBourque-QC commented 2 months ago

In order to run this in k8s or OpenShift, it's best to create a directory to write the files, other than the current directory where the python code is located.

This is my proposal, all comments are welcome!

SylvainMartel commented 2 months ago

@WadeBarnes or @swcurran , could you review this small PR? Guillaume is also working on issue #62

WadeBarnes commented 2 months ago

While I like the idea of having a separate folder for the data I'm not really a fan of using a generic name like tmp. In this case the folder is specific to genesis files so I would recommend some thing like genesis or if we want to stick with something more generic data.

GuillaumeBourque-QC commented 2 months ago

Thanks for the fast response,

Well I'm almost 100 % with you.. But let me bring more info, these genesis file are always download and are be defaut temporary if I understand correctly ?

In OpenShift I did a temporary mount point (emptyDir: {} ) specific for this genesis directory that will be lost when the container is restart. The log directory is persistant, so this one will endup on on real volume but for the genesis file I thought that tmp would make sense ?

data is usually more permanent, and I'm not sure we need to keep those file form a k8s#openshift perspective.

So please let me know waht would best make sens for the genesis files

Best, Guillaume

GuillaumeBourque-QC commented 2 months ago

Hi @WadeBarnes if data makes more sense I'll push this in a few minutes.

WadeBarnes commented 2 months ago

Your raise some good points, yes, they can be considered temporary, but you could also decide to persist them longer term. Perhaps a better name for the directory would be cache.

GuillaumeBourque-QC commented 2 months ago

I rename tmp by cache and pushed it @WadeBarnes anything else ? If all is fine please let me know if we can push a new docker images with those changes so that I can test in our openshift env.