change to point to adx-automation rather than az-devex (#22)
This commit is contained in:
Родитель
33553b4933
Коммит
27b06a5468
|
@ -14,19 +14,30 @@ from a01.communication import session
|
|||
@a01.cli.cmd('check', desc='Examine the current settings and environment.')
|
||||
def check_environment():
|
||||
result = True
|
||||
result &= verify_item('Azure CLI', 'az --version')
|
||||
result &= verify_item('Azure CLI login', 'az account show')
|
||||
result &= verify_item('Azure CLI subscription', 'az account set -s 6b085460-5f21-477e-ba44-1035046e9101',
|
||||
'The current az login failed to sign in 6b085460-5f21-477e-ba44-1035046e9101 subscription')
|
||||
result &= verify_item('Azure Container Registry login', f'az acr login -n {DROID_CONTAINER_REGISTRY}',
|
||||
result &= verify_item('Azure CLI',
|
||||
'az --version')
|
||||
result &= verify_item('Azure CLI login',
|
||||
'az account show')
|
||||
result &= verify_item('Azure CLI subscription',
|
||||
'az account set -s 6b085460-5f21-477e-ba44-1035046e9101',
|
||||
'The current az login failed to sign in '
|
||||
'6b085460-5f21-477e-ba44-1035046e9101 subscription')
|
||||
result &= verify_item('Azure Container Registry login',
|
||||
f'az acr login -n {DROID_CONTAINER_REGISTRY}',
|
||||
'The current az account must allow you to login container '
|
||||
f'registry {DROID_CONTAINER_REGISTRY}.')
|
||||
result &= verify_item('Azure Container Service login', 'az aks get-credentials -n az-devex -g az-devex-kube',
|
||||
'The current az account must allow you to login container service az-devex.')
|
||||
result &= verify_item('Kubernete CLI', 'kubectl version', 'Install kubectl using "az aks install-cli" command.')
|
||||
result &= verify_item('Kubernete namespace a01-prod', 'kubectl get namespace a01-prod',
|
||||
'The cluster must have a namespace named a01-prod associated. You may not have log in your '
|
||||
'kubectrl with correct AKS service. Run "az aks get-credentials -n <aks_service>" to login.')
|
||||
result &= verify_item('Azure Container Service login',
|
||||
'az aks get-credentials -n adx-automation -g adx-automation-a01',
|
||||
'The current az account must allow you to login container service '
|
||||
'adx-automation.')
|
||||
result &= verify_item('Kubernete CLI',
|
||||
'kubectl version',
|
||||
'Install kubectl using "az aks install-cli" command.')
|
||||
result &= verify_item('Kubernete namespace a01-prod',
|
||||
'kubectl get namespace a01-prod',
|
||||
'The cluster must have a namespace named a01-prod associated. You may '
|
||||
'not have log in your kubectrl with correct AKS service. Run "az aks '
|
||||
'get-credentials -n <aks_service>" to login.')
|
||||
|
||||
sys.exit(0 if result else 1)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче