[Chapel Merge] Demonstrator for testing within a singularity cont

Branch: refs/heads/main
Revision: 4d20913
Author: mppf
Link: Unavailable
Log Message:

Merge pull request #19692 from mppf/singularity-demo

Demonstrator for testing within a singularity container

We have lots of scripting for testing on many different platforms with
vagrant and VMs in util/devel/test/vagrant. One thing we have been
considering is using Docker or Singularity instead or in addition to that
mechanism. Using a container instead of a VM is easier to manage since we
don't have to allocate disk space, memory, or CPUs to the VM and rather
these can be used on-demand.

To that end I developed a demonstrator that ports the ubuntu-xenial64
config over to a singularity container (it leaves the vagrant version
untouched). This consists of a singularity.def file as well as some
commands to run and notes in README.md. It reuses a bunch of scripting to
install dependencies that we have for vagrant testing.

Some things I learned along the way:

  • Docker and Singularity both seem to want to run as root but at least
    with Singularity it seems to work OK to run as a regular user (with
    fakeroot). For our testing purposes I think we probably cannot assume
    that we can run as root.
  • Docker and Singularity can only really run linux binaries on a linux
    host - so something like testing with FreeBSD will still need to be
    done in a VM
  • I found singularity relatively pleasant to work with (although this is
    entirely subjective). I think its design aligns well with what we
    would want out if it in a testing scenario. In particular, it seems
    nice that each chapel checkout can be visible outside of the
    container (for things like managing disk space) - where that is not
    really possible with all the VMs we have for vagrant. But, I did not
    do the equivalent experiment with Docker (and we certainly could).

None of the scripting in this PR is run in any testing configuration. For
now, it exists only for reference.

Reviewed by @ronawho - thanks!

Modified Files:
A util/devel/test/singularity/README-distro-timelines.txt

A util/devel/test/singularity/README.md
A util/devel/test/singularity/current/ubuntu-xenial64/singularity.def
A util/devel/test/singularity/provision-scripts
A util/devel/test/vagrant/provision-scripts/run.sh

Compare: https://github.com/chapel-lang/chapel/compare/a4594db8c991...4d20913c5d6c