-
Notifications
You must be signed in to change notification settings - Fork 1
Support for AMs created out of pools of pre-provisioned VMs using containers #115
Comments
Some notes on the Docker aspects, without fully understanding the Handlers or ImageProxy :)
We will probably want to We'll probably need to have support for user-specified
Several other
|
Sounds like additional things to worry about:
|
BTW, not a fan of pre-populating dockers with user SSH keys - bad security practice (even if those are public) |
@hinchliff : my preference to pass anything (including credentials) into the container would be either via a wrapper through the ENTRYPOINT (e.g., import credentials from ephemeral nodes in Zookeeper) or use the -e option. We used the latter in the RADII/HydroShare integration. For a more production environment I favor the former. I presume that the container would be checkout from the VM through post-boot script in the provisioning phase. Regarding managing ports we should probably talk to Mike S who has done this. He is an expert in containers. I'll setup a meeting with him. |
The containers can (internally) run SSH (or any service) on any port, and Docker will give the host the ability to map those container ports to different host port numbers:
Managing that might get complicated, so talking with someone who has already done it would be useful. |
That's why I'm wondering if we'd rather create restricted shells for users that use host's SSHd to log them into bash running inside their container. |
@hinchliff : this approach is to my knowledge widely adopted and is what we used for our RADII/HydroShare prototype. I have emailed Mike but he has not responded yet. Regarding your comment "managing that might get complicated". What is "that"? |
'That' is managing any port mappings. Orca will need to track that user requested ports p1, p2... pn for their container, and we gave them corresponding ports q1, q2... qn on the host. Might get more complicated when you start to allow more than one container on each host. |
We could use the feature that maps a container port to a range of ports in the host, e.g., "docker run -d -p 7000-8000:4000 myApp" |
Interesting. I guess you can also just let Docker completely pick the ports:
Makes it a little bit more of a trick to find the port mapping to report back to the user, but less management. |
attaches a shell to docker. We may need a dynamic wrapper script to do this, so this can be added to /etc/passwd for a new user entry, but the end result is the same - user upon login using host's SSH (no need to package SSH into docker, only bash) ends up inside the docker environment. So the handler on join needs to add user (update /etc/passwd file and create home directory) and push user key into /home/user/.ssh/ on host VM. On leave, it is simply deleting the user (userdel) together with the home directory. No need to manage ports at all. The caveat is disallowing root login for users (since it is root@host VM), but this is now a standard GENI practice - most tools expect to use username@host, not root@host. Multiple user logins should be allowable - a matter of creating multiple /etc/passwd entries mapped to the same container (and remembering to delete them). |
@ibaldin : I used docker exec to run commands. For instance, I have used docker exec to run icommands in a container configured as an iRODS client node. I still think some port configuration is needed for a long-running application-container, e.g., iRODS resource node and HTCondor. We will meet with Mike and further discuss our use case. |
@ibaldin - Agreed that handing off to Do note that if you package SSH into a docker container where the host also uses SSH, you'll need to remap the SSH port from the host's point of view to the container. i.e. using port 2022 instead of 22. You could also allow SSH to be run by a non-root user within the container so if the user does log in via SSH they would not be root on the container. Example:
|
@mjstealey : I will take some of our time on Friday to ask you more about this. I don't understand how this approach alone addresses the deployment of a long running service such as a HTCondor Worker which maintains a long-lived connection with a HTCondor Master (an overlay) and may open new connections to other nodes. It seems to me that port management has to be handled by something either outside Docker or inside. I think it is possible that there are different application models, e.g., ssh vs distributed service that have different requirements and need different configurations. Or perhaps above addresses all of them and I don't see it yet. |
@hinchliff - using So, for a process that uses lots of ports like iRODS, you could do something like this to get the
|
@clarisca - It doesn't. By default docker runs as root, and any operations performed within the container would be as root unless explicitly specified otherwise. So the options are.
|
Had a meeting with Alan. He will think about the various design aspects, I'll do the flowchart with tasks. We may ask Mert help try the approach manually to make sure things work as expected. |
I started a wiki page on the design aspects |
@vjorlikowski suggests looking at https://github.com/jpetazzo/pipework PipeWork to constrain containers to specific network interfaces. |
This is proposed by @clarisca as part of SciDAS - support for creating ORCA AMs that operate on a pool of pre-provisioned VMs of potentially varying sizes. There are several issues that must be considered
I propose doing this in two phases - Phase I involves only modifying ImageProxy and creating a new handler for issuing VMs. Phase II would add support for RDF specification of these AMs along with extensions to processing RDF and doing proper delegation of resources. The latter would also require controller extensions, as well as AM and broker controls.
The assumption in both cases that such AM operates only using commodity internet. Not clear how dynamic connectivity may work here. I suppose there could be a pool of VLANs available, but then not clear how to connect VMs to them dynamically. They can be plumbed statically upon creation, at the expense of security and performance isolation. In the former case no Net AM is needed, in the latter a traditional Net AM should work just fine.
Phase I:
On leave:
Phase II:
@paul-ruth @anriban
@vjorlikowski is it possible to leverage xCAT and xCAT machinery for issuing nodes and IP addresses for this?
Comments welcome.
The text was updated successfully, but these errors were encountered: