fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Automatically install software - Gitops part.

Open sharon-fdm opened this issue 1 year ago • 1 comments

Allow configuration of automatic install to be set with Gitops.

sharon-fdm avatar Jul 31 '24 18:07 sharon-fdm

@lucasmrod when adding Gitops, are we typically also editing this document ?

sharon-fdm avatar Aug 29 '24 14:08 sharon-fdm

@xpkoala Added QA notes.

lucasmrod avatar Sep 10 '24 14:09 lucasmrod

qa - @iansltx

sharon-fdm avatar Sep 18 '24 18:09 sharon-fdm

So, I've used bouncing from Firefox uninstalled to 129.0 to 129.0.1 to 129.0.2 to test this, and the .deb for FF129.0 uses the version string 129.0~build2. That string actually seems to match the software installation query listed above.

You can see this by running:

SELECT version, version_compare(version, '129.0.2') FROM deb_packages WHERE name = 'firefox'

After installing from https://ftp.mozilla.org/pub/firefox/releases/129.0/linux-x86_64/en-US/firefox-129.0.deb

But that's not actually an issue with this ticket, just with the query.

Functionality seems to work fine once I got my env set up properly:

  1. Go from no Firefox installed on Debian Bookworm to FF129.0
  2. Go from FF129.0 to 129.0.1 with a tweaked query asking for >= 130. This resulted in an install, and a failed -> failed so the install wasn't repeated, which is expected.
  3. Go from FF129.0.1 to 129.0.2 via the normal query. Policy passed didn't install the package again, as expected.

Some potential sharp edges to clean up later:

  1. Installed status on a package doesn't immediately rerun the query whose failure triggered the install, and I would expect that to happen so a successful install would immediately put the host in compliance if the install actually solved the problem.
  2. The install_software: key on a policy can be blank with no feedback, which allows a silent failure when install_software and package_path are at the same level of indentation by mistake. We should fail loudly there.

But those are sharp edges that are potentially nontrivial to fix, so IMO this can go out in its current state.

iansltx avatar Sep 19 '24 02:09 iansltx

Software installs flow, Guided by GitOps' hand, Ease for teams bestowed.

fleet-release avatar Sep 24 '24 00:09 fleet-release