Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting of environment variables #134

Open
Klaas- opened this issue Mar 24, 2022 · 4 comments
Open

Setting of environment variables #134

Klaas- opened this issue Mar 24, 2022 · 4 comments
Assignees

Comments

@Klaas-
Copy link

Klaas- commented Mar 24, 2022

Hi,
please document how to set environment variables during the update run, the most prominent example of a package that needs env vars set in our environment is microsofts own odbc rpms:
ACCEPT_EULA=Y is needed in the environment variables for an update to succeed.

Old update management also loads /etc/environment but that does not seem to be documented anywhere.

Greetings
Klaas

@kjohn-msft
Copy link
Collaborator

Hi Klaas,

Thanks for the feedback on this.

We do not currently plan to set variables like ACCEPT_EULA on our own because the EULA is a legal agreement between the end customer and the package author.

For any generic set of environment variables to set, customers are encouraged to set them on Azure VMs using mechanisms like Run command:
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/run-command

For specific ones like ACCEPT_EULA, we will review that as a product request in our backlog, and get back to you.

Thanks,
Koshy

@kjohn-msft kjohn-msft self-assigned this Mar 28, 2022
@Klaas-
Copy link
Author

Klaas- commented Mar 28, 2022

if there is no way to set environment variables you can not update Microsoft packages like msodbcsql17 with update management (https://packages.microsoft.com/rhel/8/prod/msodbcsql17-17.9.1.1-1.x86_64.rpm). That is also why update management v1 sets ACCEPT_EULA=Y inside it's runbook. I would much prefer a generic way via configfile or something similar :)

@shaneholder
Copy link

This seems to have been addressed with #215 but I am not finding any documentation on how to use the functionality. I see a reference to documentation on how to use it.

@shaneholder
Copy link

Based on the code it seems that a JSON file needs to exist
/var/lib/azure/linuxpatchextension/patch.eula.settings with contents of:

{
            "AcceptEULAForAllPatches": "True",
            "AcceptedBy": "TestSetup",
            "LastModified": "2023-08-29"
}

It would be great if someone on the team could confirm and document this.

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

No branches or pull requests

3 participants