Reusable provisioning
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8
- Forks
- 7
- Avg merge
- 10m
- Merged PRs (30d)
- 3
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 https://github.com/precice/vm/pull/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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing provisioning/install-basics.sh, provisioning/install-devel.sh, the other listed provisioning scripts, and the post-install section of Vagrantfile. First investigate whether Ansible or the existing Nix packages should own provisioning; done should include a decided approach, reusable provisioning coverage for the listed contexts, and the corresponding CI and documentation updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, shell
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100