Skip to content
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

[BKR-1021] Archlinux support #5

Merged
merged 1 commit into from
Jan 29, 2018
Merged

Conversation

jantman
Copy link
Contributor

@jantman jantman commented Dec 27, 2017

This adds support for archlinux, which is present in beaker-puppet, originally introduced by pre-refactor beaker PR 1289 by @petems and I, but isn't supported for Docker.

This also introduces support for a docker_cap_add Array section of the config, which allows setting additional kernel capabilities for the SUT container (see Docker kernel capabilities, docker run --cap-add. This was needed for a module I'm testing; see below for more.

This should add the minimum needed to get Arch working as a docker-based SUT with the "standard" SUT setup (openssh/sshd). An example of this working can be seen in my puppet-archlinux-workstation module; host yaml and tests passing on TravisCI.

I'm not sure if this should be documented, or if so where, but the archlinux distro itself is only supported by beaker-puppet with PUPPET_INSTALL_TYPE=foss, probably because the PR above predates agent installs.

Note about added capabilities: The module that inspired this PR is my puppet-archlinux-workstation module module that I use to manage a base graphical install of ArchLinux on my desktop and laptops. It's not terribly popular but isn't unknown either (and would probably get more visibility if it were on the Forge, which I'm going to do soon, but it's a vintage module ;) ). It requires a full-blown systemd to do acceptance testing (the old Vagrant/VirtualBox tests stood up xorg and sddm, too, but that's too problematic in Docker), which requires the SYS_ADMIN capability.

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@jantman jantman changed the title Archlinux support [BKR-1021] Archlinux support Dec 27, 2017
@jantman
Copy link
Contributor Author

jantman commented Dec 27, 2017

Egads! No Travis on this repo!

Also, I just realized that this may fulfill BKR-1021 for Arch support, which @petems opened about a year ago.

There is one asterisk on my implementation here, which may be cause for concern...

  1. To get ssh working in the container, I had to explicitly install openssh
  2. and then systemctl enable sshd, which assumes the container is running a full-fledged init and systemd (which is the Arch default)
  3. Which requires both a container with a "normal" (i.e. non-container-optimized) Arch install, and for that container to be running with --cap-add SYS_ADMIN and -v /sys/fs/cgroup:/sys/fs/cgroup:ro

Not sure if that should be documented or not, and if that's OK or not.

I assume that since many/most Puppet modules manage daemons, it's normal to be running in a Docker environment with the system standard init and process manager, but this is my first foray into beaker-docker for a module of my own.

@kevpl
Copy link
Contributor

kevpl commented Jan 9, 2018

@jantman thanks for this submission! I'm surprised there are so many commits for this few changes, but I see they're pretty granular.

Would you please prefix your git commit messages w/the ticket reference (BKR-1021) like you've done with the title of this PR? Then everything here should match our contributing standards, and we can look to push this through our CI for merging.

@jantman
Copy link
Contributor Author

jantman commented Jan 9, 2018

@kevpl I rebased this down to one commit, appropriately prefixed.

Sorry for not referencing the issue in the original commits... I actually found the ticket after I opened the PR.

@petems
Copy link
Member

petems commented Jan 10, 2018

@jantman Thanks for picking this up! I had honestly forgotten about this 😄

I'm sure @bastelfreak will be happy to see this, as our resident Arch + Linux person 👍

@bastelfreak
Copy link
Member

\o/
Thanks for the work here! I already added a nodeset for arch on Vox Pupuli, this PR would allow us to finally use it.

Copy link
Contributor

@kevpl kevpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kevpl
Copy link
Contributor

kevpl commented Jan 10, 2018

@puppetlabs-jenkins test this please

@jantman
Copy link
Contributor Author

jantman commented Jan 10, 2018

@bastelfreak @petems Sure! I'm finally getting around to cleaning up and modernizing some of my vintage-2013 Arch-centric modules, and just couldn't bear to use VirtualBox acceptance tests anymore (or leave acceptance tests out of the Travis run).

Glad to know there are still some other Arch folks around!

@mchllweeks mchllweeks merged commit 1ab88da into voxpupuli:master Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants