-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
The provisioning scripts in this repository are short and simple shell scripts, which were made specifically for the VM, but are also useful as examples to copy from, wherever we don't have enough documentation.
At the same time, I often repeat similar steps manually to create a Live USB image with Cubic, where there is a clear overlap. The Live USB typically includes a subset of the same components. Currently, the VM is based on Ubuntu 20.04 (until #94 is merged), while the Live USB is based on Ubuntu 24.04.
Now, I also have to prepare Apptainer containers with similar components, for a different use case.
It would be very useful to have a reusable system that can run on any of these contexts. This means that we need a provisioner, which would also take care of aspects such as idempotence and would easily enable us to enable/disable/tweak components at runtime. Using the list of provisioners mentioned in the Vagrant documentation, I understand that Ansible is the solution we need for this rather simple use case: we can write playbooks in YAML (which we already use elsewhere), it is procedural (which is easy to map to what we already have), and provides the features we need.
While we already have Nix packages, I don't think this alone is a flexible and easy to tune solution for the provisioning itself. We could, however, use these packages to install all the preCICE components. This would also motivate us to support the Nix packages.
Potential implementation steps could be:
- Set up an Ansible playbook to execute independently, reproducing:
- Add a CI job, provisioning a normal Ubuntu 24.04 runner (no VM yet)
- Document provisioning the Live USB using the new system
- Document provisioning the Apptainer container using the new system
- Add the most used preCICE components:
- https://github.com/precice/vm/blob/develop/provisioning/install-precice.sh
- https://github.com/precice/vm/blob/develop/provisioning/install-config-visualizer.sh
- https://github.com/precice/vm/blob/develop/provisioning/install-openfoam.sh
- https://github.com/precice/vm/blob/develop/provisioning/install-calculix.sh
- Add the post-install steps
- Add the rest of the preCICE components
- Use the playbooks to provision Vagrant, replacing the current scripts
- Replace the explicit installation steps in Ansible with installing the NixOS packages for the preCICE components we already have packages for.
Before continuing, have a first exploration step on whether this makes sense, or whether we should rather use the Nix solution for everything in the first place. @uekerman any opinion on that?