-
Notifications
You must be signed in to change notification settings - Fork 528
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
Provide support for Debian; to uninstall docker and deps #76
Conversation
…tion id'd by travis CI
Hi @hesco. Thanks for taking a run at adding Debian support. It's definitely something I'd love the module to have. However, especially as I'm not currently using Debian myself, it's really important to me that the test suite passes for this before it's merged into master. I'm happy to add the integration tests using beaker, but if you could try and get the rest of the test suite passing that would be appreciated. |
Conflicts: manifests/install.pp manifests/service.pp
Closing in favour of #151 |
I have successfully tested the uninstall functionality (by setting $docker::params::ensure to 'purged'). These changes will purge, or supposedly absent docker (and its dependent packages). Restoring the ::ensure value to 'present' restores the installation successfully. I made no attempt to remove the /etc/apt/sources.list.d/docker.list file nor to purge the apt key, although it seems those two actions would be appropriate if ::ensure is set to 'purged'. That is work for a later day. This functionality was sufficient for running the tests necessary for my work on the feature I am interested in.
I failed to find an init.d script upon reinstall. I am unsure whether that means that no such script exists in the package, or if my conditional wrapper has a bug in it. I will investigate that further after lunch, perhaps. Still need to sort out how to start the docker service on a debian server.
I manually added in:
https://github.com/dotcloud/docker/blob/master/contrib/init/sysvinit-debian/docker
modifying it to ensure that it runs under bash, rather than dash. Should probably contribute that patch upstream.
moby/moby#7031
When that file is incorporated into the docker package, it should be unnecessary to include it here as an explicit File['/etc/init.d/docker'] resource. After some testing I am confident that these changes should successfully ensure => running, enable => true, starting the daemon and populating /etc/rc?.d/*docker.
At this point this PR should resolve #75 and provide useful support for debian servers.
I just added support for the installation and removal of recommended packages, which right now includes only bridge-utils on debian/ubuntu machines. This has been manually tested and found to work, for $docker::params::ensure_recommended being 'present' or 'purged'.
If the Tavis CI server is satisfied, I am now recommending that these changes be exercised with the maintainer's regression suite and merged into the source project.
TODO: