cocalc-kubernetes icon indicating copy to clipboard operation
cocalc-kubernetes copied to clipboard

How to add a new software in to the projects?

Open arm2arm opened this issue 5 years ago • 6 comments

Are there easy way to add the new software in to the project? Should I rebuild every time the Dockerfile:

https://github.com/sagemathinc/cocalc-kubernetes/tree/master/project/image

and restart the pods?

arm2arm avatar Apr 17 '20 11:04 arm2arm

Should I rebuild every time the Dockerfile:

That's the only thing that is implemented. Even that won't help unless you change where/how images are pulled, which you can do by modifying the cocalc-server pod.

williamstein avatar Apr 17 '20 16:04 williamstein

which you can do by modifying the cocalc-server pod

Could you please provide better instructions on how to do that?

gabriel-milan avatar Jul 28 '20 14:07 gabriel-milan

I've found it here (https://github.com/sagemathinc/cocalc/blob/master/src/smc_pyutil/smc_pyutil/smc_compute.py#L638). Is that correct?

gabriel-milan avatar Jul 28 '20 14:07 gabriel-milan

correct?

Yes, exactly. Edit the version of that file that is actually run (somewhere under /usr in cocalc-kubernetes server) and see a different image get pulled.

Of course it would be better if there was a template file somewhere with the yaml that could be easily customized...

williamstein avatar Jul 28 '20 15:07 williamstein

Of course it would be better if there was a template file somewhere

That's what I was hoping to find. It looks like, by setting the environment variable KUBERNETES_REGISTRY to a custom registry, other than default sagemathinc, it will do the trick. Thanks anyway.

gabriel-milan avatar Jul 28 '20 15:07 gabriel-milan

It wouldn't be hard to change.. just edit smc_compute.py to load a template file instead of that string. Edit your template file. PR's welcome, and also paid consulting, or maybe I'll have time to just implement this (not sure).

williamstein avatar Jul 28 '20 15:07 williamstein