using lima instead of vagrant file - #3571
Conversation
|
This is just an attempt to get feedback from the team on how they think this approach is. |
|
What would the use cases be? |
|
Hey @utam0k, there was an open issue about moving away from using vagrant towards the CNCF managed project lima. I had taken that ticket, but I did not understand lima nor youki that much at that point and it took me a long time to understand them and start working, but this PR I have raised is like the initial step towards it, I see that we use vagrant for
the version which I have right now here only creates a Dev Environment. It uses the scripts that were already present in the CI/CD pipelines as of now. |
|
The issue description is quite short, so it is not clear how much was originally intended to be in scope, but I think standardizing Lima as a development environment would be valuable. I also use Lima for development myself, so I would like to see this PR move forward. However, I think developer-facing documentation for the Lima-based development environment should be included in this PR as well. This would make it easier for other contributors to set up the same environment and use it consistently. |
| @@ -0,0 +1,84 @@ | |||
| # Lima configuration for SELinux development environment with Fedora | |||
| vmType: qemu | |||
There was a problem hiding this comment.
This line should not be added unless this template only works with qemu
| @@ -0,0 +1,84 @@ | |||
| # Lima configuration for SELinux development environment with Fedora | |||
| vmType: qemu | |||
| arch: default | |||
| digest: sha256:846574c8a97cd2d8dc1f231062d73107cc85cbbbda56335e264a46e3a6c8ab2f | ||
| - location: https://mirror.cs.princeton.edu/pub/mirrors/fedora/linux/releases/43/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-43-1.6.aarch64.qcow2 | ||
| arch: aarch64 | ||
| digest: sha256:66031aea9ec61e6d0d5bba12b9454e80ca94e8a79c913d37ded4c60311705b8b |
There was a problem hiding this comment.
You could use:
base: template:fedora-43
or
# no mount
template:_images/fedora-43
|
|
||
| hostResolver: | ||
| hosts: | ||
| host.lima.internal: host.lima.internal |
There was a problem hiding this comment.
This host address does not seem used?
|
|
||
| mounts: | ||
| - location: "~" | ||
| writable: true |
There was a problem hiding this comment.
Do you really need to mount the host home directory?
| writable: true | ||
| - location: "{{.Param.ScriptDirectory}}" # Mount the directory containing the script | ||
| mountPoint: "/tmp/provision_scripts" # Mount to a directory in VM | ||
| writable: false |
There was a problem hiding this comment.
You could potentially use limactl cp -r (or limactl shell --sync) instead of these mounts
| curl -fsSL "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local | ||
|
|
||
| # For Lima v1.1 onward | ||
| curl -fsSL "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-additional-guestagents-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local |
There was a problem hiding this comment.
Additional guestagents do not seem used
There was a problem hiding this comment.
The script does not seem used in CI?
74a4a7a to
10f31ce
Compare
Signed-off-by: Ganesh Tiwari <ganesht049@gmail.com>
Description
This PR adds files
and updates
justfileto make it so that you can create and destroy a fedorathat can be used for development purpose using the limactl toolkit
Type of Change
Testing
Related Issues
Fixes #3139
Additional Context