Open NenoLoje opened 4 years ago
hi @fengzhou-msft could you pls help on this?
I'm having same problem due to trying to go through corporate proxy and I just keep hitting more and more stuff that wants whitelisted. I'd really love to be able to just download the extensions and required packages offline and distribute them internally as I won't get this past security in current state. Azure Devops cli extension seems to be only way for universal package uploads for instance ?
@gabrielmccoll Specifically for the case you mentioned regarding uploading/downloading universal packages, the workaround I used is to:
Hope it helps!
@gabrielmccoll Specifically for the case you mentioned regarding uploading/downloading universal packages, the workaround I used is to:
install an 🚀 Azure Pipelines agent on that machine (the corporate firewall in my case had the neccessary execptions it already configured)
and use the Universal Package task (which supports up- and downloading). No need to install Azure CLI or the Azure DevOps extension at all.
Hope it helps!
That is a nice wee work around thank you
Also I'm trying to install Azure DevOps extension into a separate development machine, but corporate proxy prevents the pip to fetch the required modules from pypi.org. I've installed those modules manually, but DevOps extension does not check the currently installed modules and tries to fetch those from pypi.org every time. Any possibilities to make DevOps installation to just use already installed modules?
@JariSal the extension is not installed in standard python package location, you can check with az --version
. By default it's ~/.azure/cliextensions
. Please install its dependency packages under ~/.azure/cliextensions/azure-devops/
azure-devops
currently specifies 3 dependencies, only distro
is not in azure-cli
(the version requirement for python-dateutil
is different, not sure if it will cause problems). @NenoLoje you need to install azure-devops
with --no-deps
and then install the distro
package with --target ~/.azure/cliextensions/azure-devops
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.
Author: | NenoLoje |
---|---|
Assignees: | fengzhou-msft |
Labels: | `DevOps`, `Packaging`, `Service Attention`, `question` |
Milestone: | - |
Route to service team to see if they can remove the msrest
and python-dateutil
dependencies which are already installed with the azure-cli
package. distro
is a very simple package, you may also considering vendoring its source code.
Hope it helps
command from https://docs.microsoft.com/en-us/cli/azure/extension?view=azure-cli-latest
az extension add --source ~/anextension-0.0.1-py2.py3-none-any.whl --pip-proxy https://user:pass@proxy.server:8080
as for me this works first dowload what you need from https://azcliextensionsync.blob.core.windows.net/index1/index.json
to install devops extension
python.exe -m pip install --target "~\.azure\cliextensions\azure-devops" azure_devops-0.12.0-py2.py3-none-any.whl --proxy "http://proxy_to_pip_repo/" -vv --disable-pip-version-check --no-cache-dir --trusted-host pypi.org --trusted-host files.pythonhosted.org
to install devops login dependency
python.exe -m pip install --target "~\.azure\cliextensions\azure-devops" keyring~=17.1.1 --proxy "http://proxy_to_pip_repo/" -vv --disable-pip-version-check --no-cache-dir --trusted-host pypi.org --trusted-host files.pythonhosted.org
Hi @fengzhou-msft, are there any updates for this? We need to install Azure CLI extensions on disconnected environments. Would be good if there is a work-around or script to set up an environment so that customers can run Azure CLI extension commands in an offline environment without differences in user-experience.
Using the suggestion from @dimalyshev, I am able to manually install the Azure DevOps extension on an offline Linux VM:
# Install the azure-devops extension
/opt/az/bin/python3 -m pip instal --disable-pip-version-checkl --target ~/.azure/cliextensions/azure-devops --no-deps distro-1.3.0-py2.py3-none-any.whl
/opt/az/bin/python3 -m pip instal --disable-pip-version-checkl --target ~/.azure/cliextensions/azure-devops --no-deps azure_devops-1.0.1-py2.py3-none-any.whl
(Note: This is a cross-post from https://github.com/Azure/azure-devops-cli-extension/issues/1055)
How to set up an Azure CLI extension in an offline environment?
I see that the Azure CLI supports installing from a local source like this:
az extension add –source …
… but this doesn't seem to be enough. (I'm trying to install the Azure DevOps extension and it fails when it runs "pip", which tries to connect to public sources…).
Any tips on how an offline / or x-copy-like deployment looks like?