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

Support arm64 Linux builds #7368

Closed
sirredbeard opened this issue Sep 19, 2018 · 32 comments · Fixed by #24180
Closed

Support arm64 Linux builds #7368

sirredbeard opened this issue Sep 19, 2018 · 32 comments · Fixed by #24180
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Feature Candidate feature-request Packaging/Debian
Milestone

Comments

@sirredbeard
Copy link

Is your feature request related to a problem? Please describe.

azure-cli is available for amd64 through Microsoft's official repos for Debian, Ubuntu, and OpenSUSE.

See Debian and Ubuntu repo at https://packages.microsoft.com/repos/azure-cli/dists/.

However, azure-cli is not available for arm64 on any of those systems.

Describe the solution you'd like

Add arm64 builds to Microsoft's official repos for Linux and WSL.

Describe alternatives you've considered

I have considered re-building each release for arm64 anew each time.

@yugangw-msft
Copy link
Contributor

@troydai could you clarify?

@troydai
Copy link
Contributor

troydai commented Sep 19, 2018

I'll look into that.

@troydai troydai added this to the Backlog milestone Sep 19, 2018
@troydai troydai self-assigned this Sep 19, 2018
@sirredbeard
Copy link
Author

Thank you Troy.

@tjprescott tjprescott removed this from the Backlog milestone Oct 29, 2018
@tjprescott tjprescott added this to Triage in CodeGen Features via automation Nov 14, 2018
@tjprescott tjprescott moved this from Triage to Won't Fix in CodeGen Features Nov 14, 2018
@tjprescott tjprescott moved this from Won't Fix to Low Priority in CodeGen Features Nov 14, 2018
@tjprescott tjprescott changed the title Add arm64 builds of azure-cli to Microsoft Linux repos Support arm64 Linux builds Nov 14, 2018
@azure-sdk azure-sdk added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 24, 2020
@yungezz yungezz assigned fengzhou-msft and unassigned zikalino Oct 19, 2020
@SkelligTheBard
Copy link

Hi Random User here, any update on this request?

@jwg4
Copy link

jwg4 commented Jan 2, 2021

It threw me that the instructions at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt install a version which includes an AMD64 python binary - if there isn't an ARM version then it just should refuse to install rather than install a broken version?

@ghost
Copy link

ghost commented Jan 30, 2021

Hello Team,

Is this near a resolution by any chance?? I've recently bought Pi400 in bulk(10 units) and looking to install az cli, but failed. I understand it is to do the with arm architecture. sharing the response from my unit when I investigate the architecture.

~  dpkg --print-architecture
armhf

@jiasli
Copy link
Member

jiasli commented Sep 17, 2021

I have tested installing Azure CLI on debian:bullseye on arm64 on an amd64 machine, and it is working as expected.

Directly installing PyNaCl can take very long, because PyNaCl 1.4.0 on PyPI has no wheel for arm64/aarch64 (pyca/pynacl#306), so it has to build libsodium from source code. I used SODIUM_INSTALL=system provided by pyca/pynacl#553 (comment) to make the installation faster.

docker run -it --rm --platform linux/arm64 debian:bullseye
apt-get update
apt-get install --yes python3 python3-pip

# Optional steps
apt-get install --yes libsodium-dev
SODIUM_INSTALL=system pip install pynacl

pip install azure-cli

@jiasli
Copy link
Member

jiasli commented Sep 20, 2021

Tested installing Azure CLI on alpine Linux (#19591) in arm64 container running on amd64 machine, and it is also working as expected.

kgremban added a commit to kgremban/azure-docs-cli that referenced this issue Sep 29, 2021
*Moved ARM64 line into its own Note box for easier scanability
*Added a recommendation for installing CLI on ARM64 based on conversations in Azure/azure-cli#7368 and MicrosoftDocs/azure-docs#80763
@jjgriff93
Copy link
Member

Are there any plans for an ARM version of the cli now? We are unable to use pip due to dependency conflicts

@jiasli
Copy link
Member

jiasli commented Jan 12, 2022

Are there any plans for an ARM version of the cli now? We are unable to use pip due to dependency conflicts

We recommend installing in a virtual environment. See #20476.

@badsyntax
Copy link

@jiasli confirming

I have tested installing Azure CLI on debian:bullseye on arm64 on an amd64 machine, and it is working as expected.

Directly installing PyNaCl can take very long, because PyNaCl 1.4.0 on PyPI has no wheel for arm64/aarch64 (pyca/pynacl#306), so it has to build libsodium from source code. I used SODIUM_INSTALL=system provided by pyca/pynacl#553 (comment) to make the installation faster.

docker run -it --rm --platform linux/arm64 debian:bullseye
apt-get update
apt-get install --yes python3 python3-pip

# Optional steps
apt-get install --yes libsodium-dev
SODIUM_INSTALL=system pip install pynacl

pip install azure-cli

I've confirmed these instructions work on Ubuntu arm64 in a qemu virtual machine on a Mac Mini M1

@andrewegel
Copy link

Hi there-

Also a random user stumbling on this issue- I have some feedback for the package maintainers who build the azure-cli debian packages, which is that its not genuine to mark a debian package as "all" or "any" if said package ships a binary that is architecture dependent [1].

Interestingly enough the team is correctly marking the RPMs as being x86_64 architecture [2] but is not noted in your docs that [3] only EL7 and x86_64 are supported.

[1] https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-architecture
[2] https://packages.microsoft.com/yumrepos/azure-cli/
[3] https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf

@tbugfinder
Copy link
Contributor

Update of PyNaCl to 1.5.0 would be beneficial as it provides wheels, now.

@markti
Copy link

markti commented Jun 1, 2022

Any update? As an M1 Mac user, this would be really helpful when running ubuntu based VMs. The workaround works great though but it would be nice if we could use native package managers instead of pip.

@fishd72
Copy link

fishd72 commented Jun 7, 2022

Can the broken apt packages be removed whilst this is being fixed? I'm using Ansible to configure a number of linux workstations (including a Pi4 for testing) and this is breaking my workflow.

If there is no suitable ARM64 package, then your package repo should not install anything on that architecture.

@rdtechie
Copy link

Any update on this? I'd like to see a arm64 package also for Linux as this comes in handy to use in ubuntu based docker images running on top of macos m1/m2 systems.

@github527561222
Copy link

Azure should GA ARM64 VM in preview.
https://azure.microsoft.com/en-us/updates/public-preview-arm64based-azure-vms-can-deliver-up-to-50-better-priceperformance

Amazon already online arm64 awscliv2.
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

It is confused that Microsoft Azure should abandon azure-cli arm64 with pip replacement or arm64 version development already on roadmap?

Expect azure-cli arm64 should publish as soon as possible.

@bebound
Copy link
Contributor

bebound commented Mar 4, 2023

This issue is closed as completed. You’ll see ARM64 version in 2.46.

@kurt-mueller-osumc
Copy link

kurt-mueller-osumc commented Mar 8, 2023

@bebound How would I install the latest version in an aarch64container? The current Microsoft instructions for installing the Azure CLI states that deb packages are x86_64 architecture only.

@github527561222
Copy link

github527561222 commented Mar 8, 2023

You could refer bellow python venv installation for your arm64 azure-cli.

# pip with venv to install azure-cli (https://dev.to/paul8989/install-azure-cli-on-arm64-raspberry-pi-39mb)👍
$ docker run --name ubt_kinetic -itd ubuntu:kinetic bash # create a new container
$ docker exec -it ubt_kinetic bash # exec in docker
$ sudo apt update # update docker apt source
$ sudo apt install python3 python3-venv -y # install python3 and python3-venv in docker
$ python3 -m venv azure-cli-env # Create a virtual environment
$ azure-cli-env/bin/python -m pip install pip --upgrade # Update pip
$ azure-cli-env/bin/python -m pip install azure-cli # Install azure-cli
$ azure-cli-env/bin/az --version # Run any Azure CLI commands
$ rm -rf azure-cli-env # Delete the virtual environment
$ sudo ln -s azure-cli-env/bin/az /usr/local/bin/az # symbolic link az

# back to vm, and permanently set alias az at user .bashrc
$ cat <<EOF >> ~/.bashrc
# alias
alias az='docker exec -it ubt_kinetic az'
EOF
$ alias az='docker exec -it ubt_kinetic az' # valid tempary alias
$ az version
{
  "azure-cli": "2.45.0",
  "azure-cli-core": "2.45.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {}
}

@bebound
Copy link
Contributor

bebound commented Mar 8, 2023

@bebound How would I install the latest version in an aarch64container? The current Microsoft instructions for installing the Azure CLI states that deb packages are x86_64 architecture only.

The doc is not updated yet. You can follow the same installation guide to install arm64 version for Ubuntu >=20.04 and Debian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Feature Candidate feature-request Packaging/Debian
Projects
None yet
Development

Successfully merging a pull request may close this issue.