AzureDevOpsQuickNotes - henk52/knowledgesharing GitHub Wiki
- AD - Active directory.
- managed identities - providing an identity for the Azure resource in Azure AD and using it to obtain Azure Active Directory (Azure AD) tokens.
- Managed identity types -
- System-assigned: an identity is created in Azure AD that is tied to the lifecycle of that service instance. So when the resource is deleted, Azure automatically deletes the identity for you.
- User-assigned: the identity is managed separately from the resources that use it.
- Service Point -
See: Choose the second method, so that it becomes part of the repos and are auto updated with apt update/upgrade
- Download installer from:
- run the azure-cli-*.msi installer
- Accept license terms and click 'Install'
- click 'Yes' to allow app to make changes to system.
- click 'Finished' when done
- The installation take 5-8 minutes?
- az login
az artifacts universal publish --organization "https://dev.azure.com/ORG/" --feed "FEED_NAME" --name "ARTIFACT_NAME" --path . --version "1.2.3" --description "A DESCRIPTION"
This was due to running python3 on an Ubuntu 18.04 where the default is python2 and the pip installed python2 modules
python3 test_kv_secret.py
Traceback (most recent call last):
File "test_kv_secret.py", line 4, in <module>
from azure.identity import DefaultAzureCredential
ModuleNotFoundError: No module named 'azure'
This was due to running python3 on an Ubuntu 18.04 where the default is python2 and the pip installed python2 modules
python3 test_kv_secret.py
Traceback (most recent call last):
File "test_kv_secret.py", line 4, in <module>
from azure.identity import DefaultAzureCredential
ModuleNotFoundError: No module named 'azure.identity'
Base Python3 Azure package was not installed.
Message: Unable to edit or replace deployment 'vm-template': previous deployment from is still active
If you browse the resource group in the portal, at the upper part of the main list , it will state '1 deploying,...' Click that link and cancel the vm-template ongoing deployment.
Fix:
- sudo visudo
- `%sudo ALL=(ALL:ALL) NOPASSWD: ALL``
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth
for more information
Missing: export AZURE_DEVOPS_EXT_PAT=$(System.AccessToken) in run command.
and az devops login
It seems to be due to AZURE_DEVOPS_EXT_PAT being empty.
Failed to update Universal Packages tooling.
TF400813: Resource not available for anonymous access. Client authentication required.
Traceback (most recent call last):
File "/home/ngcp-svc/japtalog2kibana.py", line 16, in <module>
from azure.keyvault.secrets import SecretClient
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/__init__.py", line 5, in <module>
from ._models import DeletedSecret, KeyVaultSecret, SecretProperties
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/_models.py", line 5, in <module>
from ._shared import parse_vault_id
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/_shared/__init__.py", line 14, in <module>
from .client_base import KeyVaultClientBase
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/_shared/client_base.py", line 12, in <module>
from .._generated import KeyVaultClient as _KeyVaultClient
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/_generated/__init__.py", line 9, in <module>
from ._key_vault_client import KeyVaultClient
File "/usr/local/lib/python2.7/dist-packages/azure/keyvault/secrets/_generated/_key_vault_client.py", line 15, in <module>
from azure.profiles import KnownProfiles, ProfileDefinition
ImportError: No module named profiles