Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

az stack --help not working after installing with Azure CLI on Linux #99

Closed KaiWalter closed 1 year ago

KaiWalter commented 1 year ago

Describe the bug When trying to install Deployment Stacks on Azure CLI on Linux, az stack --help does not work and shows:

'stack' is misspelled or not recognized by the system.

To Reproduce

  1. create a Development Container e.g. in Visual Studio Code or with GitHub Codespaces

.devcontainer/devcontainer.json

{
        "name": "Debian",
        "image": "mcr.microsoft.com/devcontainers/base:bullseye",
        "features": {
                "ghcr.io/devcontainers/features/azure-cli:1": {},
                "ghcr.io/devcontainers/features/sshd:1": {
                        "enabled": true,
                        "port": 2222
                },
                "ghcr.io/devcontainers/features/python:1": {}
        },
        "customizations": {
                "vscode": {
                        "extensions": [
                                "ms-azuretools.vscode-bicep",
                                "ms-azuretools.azure-dev",
                                "ms-vscode-remote.remote-containers",
                                "ms-python.python"
                        ]
                }
        },
        "postCreateCommand": "./.devcontainer/install.sh"
}

.devcontainer/install.sh

pip install -e downloads/azure-mgmt-resource-21.2.0
  1. download [Stacks_CLI_1.9.zip](https://github.com/Azure/deployment-stacks/releases/download/v0.1.7/Stacks_CLI_1.9.zip), extract folder azure-mgmt-resource-21.2.0 and upload to downloads/azure-mgmt-resource-21.2.0
  2. rebuild devcontainer and check that installation were successful
  3. test with az stack --help

Expected behavior Help for deployment stacks is displayed.

Repro Environment Host OS: Debian GNU/Linux 11 (bullseye) Powershell Version: - Azure CLI Version: 2.47.0 azure-mgmt-resource: 22.0.0 Python (Linux) Version: 3.10.10

harshpatel17 commented 1 year ago

Hello Kai, thanks for opening up this issue.

Would you be able to check if the other az commands work, such as: az deployment?

KaiWalter commented 1 year ago

Hello Harsh @harshpatel17 , I just rebuild the Codespace with above files and can confirm, that other az commands like az account ..., az group... and az storage account... are working.

vscode@codespaces-09f151:/workspaces/azure-deployment-stacks-sample$ az storage account delete -g tfstate -n tfstate15698
Are you sure you want to perform this operation? (y/n): y
vscode@codespaces-09f151:/workspaces/azure-deployment-stacks-sample$ az stack --help
'stack' is misspelled or not recognized by the system.

Examples from AI knowledge base:
https://aka.ms/cli_ref
Read more about the command in reference docs
harshpatel17 commented 1 year ago

I see, this is a known issue, but this should be resolved once our SDK goes public. This process might take around 1+ more weeks. Once it does go public, you should just be able to install the CLI without any dependencies. I'll keep you updated

miqm commented 1 year ago

same here, stacks are now in public preview, but it can't be used on linux (or docker)

azcloudfarmer commented 1 year ago

Hi @miqm - Deployment Stacks will be announced to be Public Preview on July 10th, at which point the public CLI and PS builds will be available and these errors will be resolved.

harshpatel17 commented 1 year ago

Closing this issue as Deployment Stacks has been released and announced. These issues should not occur anymore.