opdev / dev-machine-setup

Ansible roles for setting up a development machine
Apache License 2.0
1 stars 1 forks source link

Fedora Atomic/rpm-ostree systems #2

Open trgeiger opened 3 months ago

trgeiger commented 3 months ago

This is outdated at this point, but this is an image I had set up previously: https://github.com/trgeiger/operator-enablement-base

Building a bootable container gives you incredible flexibility in what you can customize in the system. In the Containerfile in that repo, I'm pulling down the latest versions of oc, opm, kubectl, operator-sdk, odo, helm, and crc, installing vscode, libvirt, and qemu.

Then you just set up a github action to build the image daily and users don't have to worry about keeping any of those packages up to date.

itroyano commented 3 months ago

In terms of usage on a dev system, can I just do the following from Ansible? (become: true)

- name: Fetch latest dev image
  ansible.builtin.shell: |
     rpm-ostree rebase ostree-unverified-registry:ghcr.io/trgeiger/operator-enablement-base:latest
trgeiger commented 3 months ago

Oh yeah, I could build and maintain the image and then your playbook on first boot could rebase. Most anything else that you would want to configure would happen on the image build.

itroyano commented 2 months ago

@trgeiger @bcrochet which of the 2 options do you prefer for this tool?

  1. automate creating and shipping a distrobox container that's identical for all dev envs (and can be pulled either with this tool or manually). or
  2. automate a flow of creating a container with Ansible e.g. distrobox create fedora; distrobox enter fedora; sudo dnf install package1 package2 package3 as a role.
trgeiger commented 2 months ago

I think option 1 is kind of the most ideal use case for almost anyone, atomic distro or not. Users can just pull down this dev environment with all operator development stuff installed, nothing else needed. Set up would just be one distrobox create command. Can just have a github action that pushes an image to ghcr.io or quay.io. Then you could put a little wrapper command in this repo, too, if you wanted.