-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python implementation #19
Comments
Thanks @stevenstetzler! Just a quick response that I'll be looking at this over the next day or two -- a few deadlines kept me busy. |
I've been trying to develop this more, but I'm running into a few issues that make me think the class-based approach I am taking might not be worthwhile. The way I'm thinking about the automator is as a script that takes a set of actions in a certain order. The steps we follow now are:
It makes sense to me to implement each of these actions as individual python classes that expose a Taking this route lets us abstract the code in what seems like a nice way: you can have The first issue that I'm running into is figuring out a way to make this easily extensible. How do you store and encode the "deployment plan" in a way that a user can extend / override at will? How do you add a new Helm chart for example? I imagine it would look like e.g. The second issue I'm running into is balancing transparency with flexibility. At the end of the day, the automator is a wrapper on top of a few bash commands, calls to I think that taking a templating approach, in the spirit of the original code, might be a better route forward. I imagine this would look like I realize this is a lot of detail and a bit in the weeds, but I'm kind of spinning my wheels deciding between "make the code as flexible as possible", which would be the approach I'm currently attempting, and "make the deployment transparent" which would be falling back on just templating some YAML and bash scripts with Jinja. I suppose a good question to ask is: what's the purpose of the python implementation / what does it bring over the bash version? In my mind, it's to help it be easier to make changes, for exampling adding a new provider -- in my current code this is just changing the class you are using from |
@mjuric I am playing around with a python version of the automator in the branch
python-dev
. You can find a short readme here: https://github.com/astronomy-commons/genesis-jupyterhub-automator/tree/python-dev/pythonThis is essentially an entire re-write of the code and kind of abandons templating of configuration files. It makes everything class based and attempts to make it flexible to add new kubernetes resources to the cluster. It also separates the Kubernetes providers from who is managing the domain name. I imagine this can be used with any DNS that has some command line or web-based API to create an A record. Not much actually works yet, deployment-wise but I think the structure is there.
I am wondering if you think we should keep going in this direction or pull back and look at what we can gain from just re-writing parts of what we have in python.
I am also worried I may be too ambitious with the changes I'm making, and perhaps writing a lot of code that is recreating what other tools might do better.
The text was updated successfully, but these errors were encountered: