Add temporary machines support
@bnjbvr @jankeromnes Not sure who can get to this first, but I'd like to have some feedback on this PR.
So this PR allows generating temporary containers (it seems to work in my local testing). There's no elaborate UI atm, it just uses the Projects page, no way to get a link to your container or anything atm. I plan to add this later.
I have some questions as well:
- What should happen if a task failed ? Atm, the PR just removes the task, which doesn't seem like a great idea, because then we'd have some containers hanging around.
- How do you access VNC/C9 for containers spawned from a Janitor container ? I tried the usual
host/containerId/port, with the host being the one I set on the admin page, but it didn't work.
Will try to have a look today! Thanks a lot for doing this 😄 👍 💯
Ok, I'll have a look at your code.
What should happen if a task failed ? Atm, the PR just removes the task, which doesn't seem like a great idea, because then we'd have some containers hanging around.
Without having looked at the code yet, this sounds unrelated to temporary containers. Maybe it's better to make a separate pull request that implements tasks? (It's ok to land it while it's unused, and start using it in a follow-up pull request).
How do you access VNC/C9 for containers spawned from a Janitor container ?
I don't understand this question. Why would you spawn containers "from" an existing container?
Also, in general you can access VNC, C9, and any other web service running inside a container by using the usual https://hostname/containerId/port/ URLs. I'll look at your code to see if your question makes more sense.
I don't understand this question. Why would you spawn containers "from" an existing container?
Not sure how to explain this. I spawned some containers using the "local" janitor instance I had, but I can't access it using https://hostname/containerId/port/ even though the log logged succesfully when spawning the containers. The host of the project was set to janitor.technology.
(removing myself from reviewers since Jan seems to be on it; thanks for doing that!)