Skip to content

Bugfix: install sonobuoy executable in playbook#924

Merged
janiskemper merged 6 commits intomainfrom
fix/missing-sonobuoy-executable
May 20, 2025
Merged

Bugfix: install sonobuoy executable in playbook#924
janiskemper merged 6 commits intomainfrom
fix/missing-sonobuoy-executable

Conversation

@mbuechse
Copy link
Contributor

Questions:

  • Can we assume that .local/bin is on PATH? Otherwise, it would have to be added.
  • Do you have a better idea?

Note that this method is what is officially suggested. I have found Ansible roles for installing Sonobuoy that use some obscure Debian repository, but most such roles were actually no longer available.

@mbuechse mbuechse requested review from berendt, gtema and janiskemper May 20, 2025 08:11
@mbuechse mbuechse force-pushed the fix/missing-sonobuoy-executable branch from cb4e053 to d00e8d2 Compare May 20, 2025 08:14

- name: Install Sonobuoy
ansible.builtin.shell:
curl -L https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.57.3/sonobuoy_0.57.3_linux_amd64.tar.gz | tar xz sonobuoy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to move the URL + the Version into vars. It could also make sense to make the used arch configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like

Suggested change
curl -L https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.57.3/sonobuoy_0.57.3_linux_amd64.tar.gz | tar xz sonobuoy
curl -L {{ sonobuoy_tar_gz_url | quote }} | tar xz sonobuoy

??

do_provision: false
do_cleanup: true
sonobuoy_tar_gz_url: >
https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.57.3/sonobuoy_0.57.3_linux_amd64.tar.gz
Copy link
Contributor

@berendt berendt May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do it this way:

Definition of sonobuoy_version : https://github.com/regiocloud/e2e-tests/blob/main/playbooks/gardener/pre.yml#L15 (this makes it easy to update the version with the help of e.g. Renovate).

wget and removal: https://github.com/regiocloud/e2e-tests/blob/main/playbooks/gardener/pre.yml#L58-L60

But I think it makes sense to have a sonobuoy_url like https://github.com/vmware-tanzu/sonobuoy/releases/download/v{{ sonobuoy_version }}/sonobuoy_{{ sonobuoy_version }}_linux_amd64.tar.gz here. This way it's easier to use a local mirror.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how Renovate works. Apart from that, specifying the full url gives you the highest degree of control, and you wouldn't even notice if they change the pattern somehow.

@mbuechse mbuechse force-pushed the fix/missing-sonobuoy-executable branch 2 times, most recently from cdfb03d to e3632ab Compare May 20, 2025 13:42
mbuechse added 6 commits May 20, 2025 21:29
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
something similar was suggested by @berendt

Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
Signed-off-by: Matthias Büchse <matthias.buechse@alasca.cloud>
@mbuechse mbuechse force-pushed the fix/missing-sonobuoy-executable branch from 9df7536 to 06602ac Compare May 20, 2025 19:29
Copy link
Member

@janiskemper janiskemper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving after communicating with @mbuechse that possible improvements will be part of future PRs, to see results quickly.

@janiskemper janiskemper merged commit 7341453 into main May 20, 2025
9 checks passed
@janiskemper janiskemper deleted the fix/missing-sonobuoy-executable branch May 20, 2025 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants