save
This commit is contained in:
parent
17f9c653e2
commit
4e32147aba
@ -115,8 +115,14 @@ kubectl apply -f sql-service1.yaml
|
|||||||
|
|
||||||
helm uninstall $(helm ls --filter eshop -q) --dry-run
|
helm uninstall $(helm ls --filter eshop -q) --dry-run
|
||||||
|
|
||||||
|
# https://github.com/dotnet-architecture/eShopOnContainers/issues/1513
|
||||||
#azure devops pipeline
|
#azure devops pipeline
|
||||||
# https://github.com/dotnet-architecture/eShopOnContainers/tree/main/build/azure-devops
|
# https://github.com/dotnet-architecture/eShopOnContainers/tree/main/build/azure-devops
|
||||||
|
#https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml
|
||||||
|
# Project settings > Service connections.
|
||||||
|
# Select + New service connection, select the type of service connection that you need, and then select Next.
|
||||||
|
# create a new docker Registry service heigooRegistry with other docker registry option
|
||||||
|
# using service principal id and password username/password: 7a304605-08fa-47e2-adea-49d529dcabc4/kv59J2RHiknv-v_uLzQIj37_zHjvX4QgZc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -149,7 +155,32 @@ helm uninstall $(helm ls --filter eshop -q) --dry-run
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
####service principle
|
||||||
|
#!/bin/bash
|
||||||
|
# This script requires Azure CLI version 2.25.0 or later. Check version with `az --version`.
|
||||||
|
|
||||||
|
# Modify for your environment.
|
||||||
|
# ACR_NAME: The name of your Azure Container Registry
|
||||||
|
# SERVICE_PRINCIPAL_NAME: Must be unique within your AD tenant
|
||||||
|
ACR_NAME=heigoo
|
||||||
|
SERVICE_PRINCIPAL_NAME=acr-service-principal
|
||||||
|
|
||||||
|
# Obtain the full registry ID for subsequent command args
|
||||||
|
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query "id" --output tsv)
|
||||||
|
|
||||||
|
# Create the service principal with rights scoped to the registry.
|
||||||
|
# Default permissions are for docker pull access. Modify the '--role'
|
||||||
|
# argument value as desired:
|
||||||
|
# acrpull: pull only
|
||||||
|
# acrpush: push and pull
|
||||||
|
# owner: push, pull, and assign roles
|
||||||
|
PASSWORD=$(az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role acrpush --query "password" --output tsv)
|
||||||
|
USER_NAME=$(az ad sp list --display-name $SERVICE_PRINCIPAL_NAME --query "[].appId" --output tsv)
|
||||||
|
|
||||||
|
# Output the service principal's credentials; use these in your services and
|
||||||
|
# applications to authenticate to the container registry.
|
||||||
|
echo "Service principal ID: $USER_NAME"
|
||||||
|
echo "Service principal password: $PASSWORD"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user