For the book updates and community contributions



Download 3,57 Mb.
Pdf ko'rish
bet34/49
Sana21.08.2022
Hajmi3,57 Mb.
#847402
1   ...   30   31   32   33   34   35   36   37   ...   49
Bog'liq
DevOps-for-ASP.NET-Core-Developers

Azure authentication 
To perform actions such as deploying code to an Azure resource, you need the correct permissions. 
For deployment to Azure Web Apps, you can use a publishing profile. If you want to deploy to a 
staging slot, then you’ll need the publishing profile for the
slot too. Instead, you can use a service 
principal (SPN) and assign permission to this service principal. You can then authenticate using 
credentials for the SPN before using any commands that the SPN has permissions to perform. 
Once you have an SPN, you’
ll create a 
repository secret
 to securely store the credentials. You can then 
refer to the secret whenever you need to authenticate. The secret is encrypted and once it has been 
saved, can never be viewed or edited (only deleted or re-created). 
Create an SPN 
1.
In your terminal or Cloud Shell, run the following command to create a service principal with 
contributor permissions to the web app you created earlier: 
az ad sp create-for-rbac --name "{sp-name}" --sdk-auth --role contributor \ --scopes 
/subscriptions/{subscription-id}/resourceGroups/{resource-
group}/providers/Microsoft.Web/sites/{webappname} 
2.
The command should output JSON that has credentials embedded: 

"clientId": "", 
"clientSecret": "", 
"subscriptionId": "", 
"tenantId": "", 
... 

3.
Make sure to record the clientId, clientSecret, subscription, and tenantId. You can also leave the 
terminal open for copy/paste later. 
Create a repository secret 
1.
Now you’re going to create an encrypted secret to store the credentials. You’ll create this secret 
at the repository level. 


50 
CHAPTER 3 | Continuous integration and deployment with Azure DevOps 
2.
Navigate to GitHub and select your repository 

Download 3,57 Mb.

Do'stlaringiz bilan baham:
1   ...   30   31   32   33   34   35   36   37   ...   49




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish