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

Installing gettext RPM #359

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

naioja
Copy link
Contributor

@naioja naioja commented Oct 24, 2023

In order to work with yaml files for kubernetes deployments we need a tool to do variable substitutions.
Usually we would use yq but Azure Linux is not packaging this binary the next best thing is envsubst which is provided by the gettext rpm.

@priyaananthasankar priyaananthasankar self-requested a review October 24, 2023 21:05
In order to work with yaml files for kubernetes deployments we need
a tool to do variable substitutions.
Usually we would use `yq` but Azure Linux is not packaging this binary
the next best thing is envsubst which is provided by the gettext rpm.
@naioja naioja force-pushed the aj_install_gettext branch from 295a7fc to bc2ddf6 Compare October 25, 2023 16:13
@darrentu
Copy link
Contributor

Hi @naioja, would you mind answering these questions please?

  1. Are there workarounds for installing this in Cloud Shell without adding it into the image? If so, what are the workaround(s)?
  2. What is the additional size that it would add to the image?
  3. How often does the package or its dependencies need an update?
  4. Which customers would be using the command? Are there specific teams or companies that would potentially benefit from this?

@naioja
Copy link
Contributor Author

naioja commented Oct 26, 2023

Hi @darrentu, please see my answers below:

  1. Are there workarounds for installing this in Cloud Shell without adding it into the image? If so, what are the workaround(s)?
    There are a few possible workarounds:

For example if a customer would like to use yq , they would need to

  • create a bin directory in clouddrive : mkdir ~/clouddrive/bin
  • download the yq binary and place it in that directory : wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O ~/clouddrive/bin/yq && chmod +x ~/clouddrive/bin/yq
  • modify for each session their bash PATH variable : export PATH="$PATH:~/clouddrive/bin"
  • update manually the yq binary on their own
  1. What is the additional size that it would add to the image?

As an rpm package the gettext is just 3.3 Mb in size

 du -hs gettext-0.21-3.cm2.x86_64.rpm
3.3M    gettext-0.21-3.cm2.x86_64.rpm

and unpacked 14 M

rpm2cpio gettext-0.21-3.cm2.x86_64.rpm | cpio -i --make-directories
25479 blocks

du -hs usr
14M     usr
  1. How often does the package or its dependencies need an update?

The same way as the other system packages, no special requirements.

  1. Which customers would be using the command? Are there specific teams or companies that would potentially benefit from this?

Yes, actually we would consume this internally for Executable Docs, for example in this doc:
https://github.com/Azure/InnovationEngine/blob/main/scenarios/ocd/CreateAKSDeployment/README.md?plain=1#L330
or
https://github.com/naioja/InnovationEngine/blob/aj_wp_aks/scenarios/ocd/CreateWordPressDeployment/README.md?plain=1#L373

envsubst is industry used as it's "buitl-in" the OS as it usually comes shipped with modern distros.

@hima-gadupudi hima-gadupudi merged commit 60800b7 into Azure:master Oct 26, 2023
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.

4 participants