Skip to content

Commit 6f594a4

Browse files
authored
Merge pull request #78670 from anarnold97/OADP-4454-Configuring-Azure
OADP-4454: Fixing configuration error in Azure installation docs
2 parents 0c55b9b + f02c169 commit 6f594a4

File tree

1 file changed

+54
-16
lines changed

1 file changed

+54
-16
lines changed

modules/migration-configuring-azure.adoc

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,44 @@
66

77
:_mod-docs-content-type: PROCEDURE
88
[id="migration-configuring-azure_{context}"]
9-
= Configuring Microsoft Azure
9+
= Configuring {azure-full}
1010

1111
ifdef::installing-3-4,installing-mtc[]
12-
You configure a Microsoft Azure Blob storage container as a replication repository for the {mtc-full} ({mtc-short}).
12+
You configure a {azure-full} Blob storage container as a replication repository for the {mtc-full} ({mtc-short}).
1313
endif::[]
1414
ifdef::installing-oadp-azure[]
15-
You configure Microsoft Azure for the OpenShift API for Data Protection (OADP).
15+
You configure {azure-full} for {oadp-first}.
1616
endif::[]
1717

1818
.Prerequisites
1919

20-
* You must have the link:https://docs.microsoft.com/en-us/cli/azure/install-azure-cli[Azure CLI] installed.
20+
* You must have the link:https://docs.microsoft.com/en-us/cli/azure/install-azure-cli[{azure-short} CLI] installed.
2121
ifdef::installing-3-4,installing-mtc[]
2222
* The Azure Blob storage container must be accessible to the source and target clusters.
2323
* If you are using the snapshot copy method:
2424
** The source and target clusters must be in the same region.
2525
** The source and target clusters must have the same storage class.
2626
** The storage class must be compatible with snapshots.
2727
endif::[]
28+
ifdef::installing-oadp-azure[]
29+
30+
Tools that use {azure-short} services should always have restricted permissions to make sure that {azure-short} resources are safe. Therefore, instead of having applications sign in as a fully privileged user, {azure-short} offers service principals. An {azure-short} service principal is a name that can be used with applications, hosted services, or automated tools.
31+
32+
This identity is used for access to resources.
2833

34+
* Create a service principal
35+
* Sign in using a service principal and password
36+
* Sign in using a service principal and certificate
37+
* Manage service principal roles
38+
* Create an {azure-short} resource using a service principal
39+
* Reset service principal credentials
40+
41+
For more details, see link:https://learn.microsoft.com/en-us/cli/azure/azure-cli-sp-tutorial-1?tabs=bash[Create an {azure-short} service principal with Azure CLI].
42+
endif::[]
43+
ifndef::installing-oadp-azure[]
2944
.Procedure
3045

31-
. Log in to Azure:
46+
. Log in to {azure-short}:
3247
+
3348
[source,terminal]
3449
----
@@ -42,7 +57,7 @@ $ az login
4257
$ AZURE_RESOURCE_GROUP=Velero_Backups
4358
----
4459

45-
. Create an Azure resource group:
60+
. Create an {azure-short} resource group:
4661
+
4762
[source,terminal]
4863
----
@@ -57,7 +72,7 @@ $ az group create -n $AZURE_RESOURCE_GROUP --location CentralUS <1>
5772
$ AZURE_STORAGE_ACCOUNT_ID="velero$(uuidgen | cut -d '-' -f5 | tr '[A-Z]' '[a-z]')"
5873
----
5974

60-
. Create an Azure storage account:
75+
. Create an {azure-short} storage account:
6176
+
6277
[source,terminal]
6378
----
@@ -92,14 +107,35 @@ $ az storage container create \
92107
+
93108
[source,terminal]
94109
----
95-
$ AZURE_SUBSCRIPTION_ID=`az account list --query '[?isDefault].id' -o tsv` \
96-
AZURE_TENANT_ID=`az account list --query '[?isDefault].tenantId' -o tsv` \
97-
AZURE_CLIENT_SECRET=`az ad sp create-for-rbac --name "velero" \
98-
--role "Contributor" --query 'password' -o tsv` \
99-
AZURE_CLIENT_ID=`az ad sp list --display-name "velero" \
100-
--query '[0].appId' -o tsv`
110+
$ AZURE_SUBSCRIPTION_ID=`az account list --query '[?isDefault].id' -o tsv`
111+
AZURE_TENANT_ID=`az account list --query '[?isDefault].tenantId' -o tsv`
101112
----
102113

114+
. Create a service principal with the `Contributor` role, assigning a specific `--role` and `--scopes`:
115+
+
116+
[source,terminal]
117+
----
118+
$ AZURE_CLIENT_SECRET=`az ad sp create-for-rbac --name "velero" \
119+
--role "Contributor" \
120+
--query 'password' -o tsv \
121+
--scopes /subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$AZURE_RESOURCE_GROUP`
122+
----
123+
+
124+
The CLI generates a password for you. Ensure you capture the password.
125+
126+
. After creating the service principal, obtain the client id.
127+
+
128+
[source,terminal]
129+
----
130+
$ AZURE_CLIENT_ID=`az ad app credential list --id <your_app_id>`
131+
----
132+
+
133+
[NOTE]
134+
====
135+
For this to be successful, you must know your {azure-short} application ID.
136+
====
137+
endif::[]
138+
ifndef::installing-oadp-azure[]
103139
. Save the service principal credentials in the `credentials-velero` file:
104140
+
105141
[source,terminal]
@@ -114,8 +150,9 @@ AZURE_CLOUD_NAME=AzurePublicCloud
114150
EOF
115151
----
116152
+
117-
You use the `credentials-velero` file to add Azure as a replication repository.
118-
153+
You use the `credentials-velero` file to add {azure-short} as a replication repository.
154+
endif::[]
155+
////
119156
ifdef::installing-oadp-azure[]
120157
. Obtain the storage account access key:
121158
+
@@ -165,5 +202,6 @@ EOF
165202
----
166203
<1> Mandatory. You cannot back up internal images if the `credentials-velero` file contains only the service principal credentials.
167204
+
168-
You use the `credentials-velero` file to create a `Secret` object for Azure before you install the Data Protection Application.
205+
You use the `credentials-velero` file to create a `Secret` object for {azure-short} before you install the Data Protection Application.
169206
endif::[]
207+
////

0 commit comments

Comments
 (0)