semaphoreui / semaphore

Modern UI and powerful API for Ansible, Terraform, OpenTofu, PowerShell and other DevOps tools.
https://semaphoreui.com
MIT License
10.69k stars 1.07k forks source link

Problem: Stop shipping Terraform/Opentofu binaries #2417

Open tboerger opened 1 month ago

tboerger commented 1 month ago

Issue

To reduce the docker image size and to avoid any lawsuit trouble I would suggest to remove the binaries and add an pre-task which downloads the binaries from defined urls only if they are really needed and store them on a defined path.

Impact

Other

Installation method

Docker

Database

No response

Browser

No response

Semaphore Version

Any

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

fiftin commented 1 month ago

Let's create additional docker image based on ansible-only image.

so, we will have:

fiftin commented 1 month ago

Otherwise we need reliable way to download Terraform on-demand. It should be displayed on the web interface to user understand that Terraform successfully downloaded. And allow to re-download it if required.

So, we need button "Download Terraform".

tboerger commented 1 month ago

It makes totally sense to add a button to download it properly. I really wouldn't bundle terraform in any image because this could result in a lawsuit by hashicorp.

Sergio-IME commented 1 month ago

This could be as simple as a SEMAPHORE_(TERRAFORM|TOFU)_VERSION env var, which, if exists, is acted upon in server-wrapper on boot. And for minimum effort you could bundle a dummy script instead of the actual binary that informs about the env var, something like /usr/local/bin/terraform

#!/usr/bin/env bash

echo -e "\e[0;31mTerraform is not installed. Pease define \e[0;32mSEMAPHORE_TERRAFORM_VERSION\e[0;31m and recreate the container to install.\e[m"
exit 1

image

fiftin commented 1 month ago

I'm sure it's half measures. We need apps management dashboard to allow manage: