-
Notifications
You must be signed in to change notification settings - Fork 49
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
Evaluate Docker as Developer and/or User option #734
Comments
This would only be applicable to users trying to do development on POCS on windows and OSX machines. The docker runtime is linux (and/or windows, it's complicated). So if it's just someone trying to setup the NUC for a build, you can host the images on Docker Hub and they can install the docker runtime on the NUC without needing docker logins. Github for Mac is a HyperKit linux VM that runs in OSX. Windows you can either run containers natively in windows or using the linux VM. Speaking from the experience of using docker for development on python projects, I have seen great reproducibility for the dev environment between different development machines. We even had a project where 2 users were running OSX, 1 Fedora, 1 Ubuntu, 1 Windows all building and running the same python container without any cross platform issues. This was due to the fact that the docker runtime on all was linux so it was identical. The other nice feature that i'm using on a distributed hardware project similar to panoptes is the ability to run a watcher container on each device, that will automatically pull new docker container versions and restart containers. This would allow "OTA" like updates of panoptes as bugfixes, features are added. This would also allow the NUC setup to be very straightforward as you basically only need a base linux image with docker on it and the rest of the "setup" is in the container. The other great feature is that you can mount a volume in the container that is the sourcecode of POCS, so you can update the source code on your machine and it will update in the container without needing to rebuild the container. The runtime version of the container is identical, you just dont mount the source directory in, you copy it directly. I'm fairly new to the project, but quite interested in helping out. I can take a pass at creating a dev environment in docker and make a PR for the team to look at? |
Hi @programatt, thanks for the question. We do have a bloated Dockerfile that I have used a couple of places within GCE. I use this as a base for the PIAA Dockerfile and it all works well although I haven't built a fresh image in a while. Some of the instructions are in the README here. I have just made the images public on so supposedly it would be available at gcr.io/panoptes-survey/pocs:latest. We would definitely love to have the simple feature of having images for developers and/or for the control computer itself and there is some work that needs to be done to make that a bit simpler. @jamessynge had wanted to update some of the install scripts but I'm not sure if there are any active plans or not. @programatt we're open to any suggestions! See if the above Dockerfile can get you going but it will certainly need some work done for the final steps in terms of having something easy for developers to use. Let me know if I can help with any questions. |
I can't see any evidence that a login is required in order to use docker in order to run containers. The linked issue clearly implies that it is required, yet the install instructions for Docker CE for Ubuntu don't include a step requiring a login. So, when is a login required? |
@jamessynge I think he's talking about installing docker for mac or docker for windows. The download links if you just go to docker.com require you to have an account and login in order to find them. Several users commented in the linked issue with the direct download url for the installers but I'm not sure if those are permalinks or if they will go away eventually. |
I think the nice thing about using the docker images for dev and deployment to the NUCs is you can have a consistent linux environment that works the same for everybody, and the image setup on the NUC is simple. Install a linux os, install docker, run dockerfile, done. For dev work, use docker-compose and map the local git repo into the container and you can do dev work without rebuilding the container unless dependencies change. Same container in both cases. |
@programatt sorry, holiday vacation hit. :) Agree completely. I've actually been doing a lot of work on this front over this weekend and should have something available by end of the week. I took your suggestion for docker-compose and mapping the local environments and it is working well. Need to get a few more kinks out of the system still but I think it is a very viable solution. Cheers! |
Just a note that I have this Docker image working well over in #778. It is probably suitable for development at this point. I used it to take observations on PAN001 the other night and everything went ok. One thing we don't have yet is a good or guaranteed way for the unit to park itself in the situation where the docker container goes down. Ideally that wouldn't happen but it could. So, some particulars to still work through in terms of actual operation using the images, but a good step forward. |
@wtgee Nice! Glad I could help. I'm using docker-compose to run python code in an embedded linux environment for a client. We just create a systemd unit file that calls the docker-compose up/down calls when the service is started and stopped. That way the containers are started on boot of the os. And then we use |
Will be closed by #951 |
Docker has recently moved to requiring users to register and log in to the docker store just to use the containers. This means if we go the Docker route that all PANOPTES users would first be required to register first, which doesn't exactly thrill me.
Note that Docker is under an Apache 2.0 license which technically means we could just download it once and host it ourselves and provide it to our users that way. Still, not entirely my favorite option.
Creating this issue just to be aware and discuss.
@jamessynge not sure what the current status of the Docker work is but would appreciate thoughts.
docker/docs#6910
The text was updated successfully, but these errors were encountered: