example42 / puppet-tp

Tiny Puppet - The Universal Installer
http://tiny-puppet.com
Apache License 2.0
68 stars 21 forks source link

Add support for Devuan (jessie & ascii) #42

Closed QueerCodingGirl closed 1 year ago

QueerCodingGirl commented 7 years ago

Devuan is a Debian fork without SystemD. It has a fast growing user base and it would be nice if we could use TP for this distro too.

alvagante commented 7 years ago

Have you already tried it on Devuan? IT should behave well for most of the packages, as I don't expect package names and files paths to change compared to Debian ones. Maybe some tinydata entry has to be updated, but probably also them are not really needed.

QueerCodingGirl commented 7 years ago

Yeah, for example: i tried to install docker and got this:

Notice: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Tp::Repo[docker]/Exec[tp_aptkey_add_2C52609D]/returns: executed successfully Notice: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Tp::Repo[docker]/File[docker.list]/ensure: defined content as '{md5}887ca6f8addc3140a812a61bacde6131' Info: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Tp::Repo[docker]/File[docker.list]: Scheduling refresh of Exec[tp_apt_update] Error: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Tp::Repo[docker]/Exec[tp_apt_update]: Failed to call refresh: /usr/bin/apt-get -qq update returned 100 instead of one of [0] Error: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Tp::Repo[docker]/Exec[tp_apt_update]: /usr/bin/apt-get -qq update returned 100 instead of one of [0] Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install docker-engine' returned 100: Reading package lists... E: Malformed line 2 in source list /etc/apt/sources.list.d/docker.list (dist parse) E: The list of sources could not be read. E: The package lists or status file could not be parsed or opened. Error: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Package[docker-engine]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install docker-engine' returned 100: Reading package lists... E: Malformed line 2 in source list /etc/apt/sources.list.d/docker.list (dist parse) E: The list of sources could not be read. E: The package lists or status file could not be parsed or opened. Notice: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Service[docker]: Dependency Package[docker-engine] has failures: true Warning: /Stage[main]/Docker::Install::Tp/Tp::Install[docker]/Service[docker]: Skipping because of failed dependencies Info: Tp::Install[docker]: Unscheduling all events on Tp::Install[docker]

The content of /etc/apt/sources.list.d/docker.list:

# File Managed by Tiny Puppet deb https://apt.dockerproject.org/repo main

I symlinked /etc/debian_release to /etc/devuan_release so that facter is able to recognize the os. (facter devuan support comes in a future facter release) Thats the facter output for the OS key:

os => {"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"jessie", "full"=>"jessie"}, "lsb"=>{"distcodename"=>"jessie", "distid"=>"Devuan", "distdescription"=>"Devuan GNU/Linux 1.0 (jessie)", "distrelease"=>"1.0", "majdistrelease"=>"1", "minordistrelease"=>"0"}}

And even when the docker.list is fixed it would crash on the service because of a missing systemctl command. For Devuan it should be the service command (like it was in Debian7, which puppet-tp supports).

alvagante commented 6 years ago

@DarkGigaByte Sorry for late feedback on this, I somehow missed the reply or forgot to follow up. The content of the apt source file can be fixed in tinydata, given the right facts. What's exactly the correct content expected for docker?

As for the command to manage the service, tp uses Puppet's service type, which should recognize the underlying OS and use the correct provider for that. So I suspect this is mostly a Puppet issue: when Facter and Puppet will fully support Devuan, tp should work out of the box (given correct data in tinydata). I've tried to test this on Vagrant on https://github.com/example42/psick , using the akabit/devuan-jessie-beta2 box, but I have errors with the vbguest plugin, which is necessary to compile the Vbox additions needed to mount shared folders. If I find time I'll test this manually, but can't guarantee anything. Do you have eventually alternative boxes to suggest?

alvagante commented 1 year ago

Devuan is supported. And tinydata starts to have dedicated data