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

Warning about Alpine-based image vs latest Azure Linux based image #159

Closed
matthewbarreiro opened this issue Aug 13, 2024 · 12 comments
Closed
Assignees
Labels
question Requiring some clarification

Comments

@matthewbarreiro
Copy link

When using this Action, the following is printed to console output:

WARNING: Azure CLI 2.63.0 is the last version available on Alpine and will not receive updates. Consider migrating to the Azure Linux based image for Azure CLI. For more information: https://go.microsoft.com/fwlink/?linkid=2282203

The link contains the following:

Warning:
Azure CLI 2.63.0 (released in August 2024) is the last version supported on the Alpine docker image. Microsoft will not be providing additional updates or bug fixes for this image. Consider migrating to the Azure Linux based image for the Azure CLI, which is fully supported.

Will this Action be updated to use the new container image automatically as part of azure/CLI@v2? If yes, is there a timeline for this change? If no, what is the planned path forward?

Thank you in advance!

@matthewbarreiro matthewbarreiro added the need-to-triage Requires investigation label Aug 13, 2024
@MoChilia MoChilia added question Requiring some clarification and removed need-to-triage Requires investigation labels Aug 14, 2024
@MoChilia
Copy link
Member

Hi @matthewbarreiro, we're currently discussing the Linux distribution for 2.64.0. We'll make an announcement once a decision is made.

@MoChilia MoChilia pinned this issue Aug 14, 2024
@MoChilia
Copy link
Member

MoChilia commented Sep 3, 2024

Hi @matthewbarreiro, starting from version 2.64.0, we have decided to switch the base Linux distribution to Azure Linux to drive the transition to Azure Linux based image. The az commands will remain unaffected. To ensure a smooth migration to this update, kindly remove any Alpine-specific commands from the inlineScript in azure/cli action. Thank you for your cooperation!

@MoChilia
Copy link
Member

MoChilia commented Sep 3, 2024

If you are not yet prepared to migrate to Azure Linux due to some specific issues, please let me now. You can temporarily pin the Azure CLI version to 2.63.0 until the issue is resolved.

- name: Azure CLI script
      uses: azure/cli@v2
      with:
        azcliversion: 2.63.0
        inlineScript: |
             <Your az commands here>

@xsoheilalizadeh
Copy link

This broke our CI/CD pipeline since we where using the latest version (by default), in inlineScript we had jq and it's no longer included in the image.

@o-l-a-v
Copy link

o-l-a-v commented Sep 4, 2024

This broke our CI/CD too. We now hardcode this action to v2.63.0 while we wait for newer versions to mature.

Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.

We have no special scripting done in that action, only doing az deployment commands (validate, what-if, create).

@kdambekalns
Copy link

See #165

@MoChilia
Copy link
Member

MoChilia commented Sep 6, 2024

Hi everyone, please try the temporary workarounds mentioned in this blog. We're now working to resolve the package missing issue in Azure CLI version 2.65.0.

@stefcameron
Copy link

stefcameron commented Sep 20, 2024

❗️ See the resolution I found in #159 (comment)

We're pinning to 2.63.0 as well because the 2.64.0 image is missing other utilities like addgroup and adduser.

I tried manually installing Azure CLI into an Alpine image, which succeeds, however when we come to use az login in our Kube environment, the command fails to find our Managed Identity and says we should make sure the MSI is properly configured -- an error which we didn't have with the 2.63.0 image.

FROM alpine:3.20.3

RUN apk add --no-cache bash curl py3-pip \
  && apk add --no-cache --virtual=az-build gcc musl-dev python3-dev libffi-dev openssl-dev cargo make \
  && pip install --upgrade --break-system-packages pip \
  && pip install --break-system-packages azure-cli \
  && apk del az-build

The resulting error from az login is:

ERROR: Failed to connect to MSI. Please make sure MSI is configured correctly.
Get Token request returned http error: 403, reason: Forbidden

Nothing other than the image has changed. Our scripts remain the same.

@stefcameron
Copy link

@MoChilia

Hi everyone, please try the temporary workarounds mentioned in this blog. We're now working to resolve the package missing issue in Azure CLI version 2.65.0.

The blog article linked here isn't helpful at all, IMO. It appears focused on a GitHub Action? Meanwhile, I'm trying to get a Docker image with the Azure CLI in it, a long with some basic Linux binaries.

The article would be more useful if it included steps on how to properly build an Alpine-based image that includes Azure CLI that is properly configured (see my previous comment about that), especially since I'm seeing that error in the context of a running image, not a GitHub Action.

@MoChilia
Copy link
Member

Hi @stefcameron, this is the GitHub action repo for Azure cli. Could you please open an issue in https://github.com/Azure/azure-cli/issues to bring your scenario to the team's attention?

@stefcameron
Copy link

@MoChilia Thanks for letting me know I was commenting in the wrong repo.

In the Azure CLI repo per se, I found Azure/azure-cli#19591 which is basically the same steps as I was trying (and I believe the issue is also the CLI team's proposal for decoupling the CLI image from Alpine), and after some digging, I discovered that the MSI error I was experienced was a red herring as the real issue was I wasn't setting the active cloud prior to executing the az login command. Fixing that leads to success.

@MoChilia
Copy link
Member

MoChilia commented Dec 2, 2024

Hi everyone, the missing valid ICU package error has been resolved in Azure CLI version 2.66.0 (Azure/azure-cli#29897). And jq is now included(Azure/azure-cli#29867). You can now update your scripts to azcliversion: latest to include these fixes.

@MoChilia MoChilia closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Requiring some clarification
Projects
None yet
Development

No branches or pull requests

6 participants