-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OADP-4454: Fixing configuration error in Azure installation docs #78670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
stevsmit
merged 1 commit into
openshift:main
from
anarnold97:OADP-4454-Configuring-Azure
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,29 +6,44 @@ | |||||
|
|
||||||
| :_mod-docs-content-type: PROCEDURE | ||||||
| [id="migration-configuring-azure_{context}"] | ||||||
| = Configuring Microsoft Azure | ||||||
| = Configuring {azure-full} | ||||||
|
|
||||||
| ifdef::installing-3-4,installing-mtc[] | ||||||
| You configure a Microsoft Azure Blob storage container as a replication repository for the {mtc-full} ({mtc-short}). | ||||||
| You configure a {azure-full} Blob storage container as a replication repository for the {mtc-full} ({mtc-short}). | ||||||
| endif::[] | ||||||
| ifdef::installing-oadp-azure[] | ||||||
| You configure Microsoft Azure for the OpenShift API for Data Protection (OADP). | ||||||
| You configure {azure-full} for {oadp-first}. | ||||||
| endif::[] | ||||||
|
|
||||||
| .Prerequisites | ||||||
|
|
||||||
| * You must have the link:https://docs.microsoft.com/en-us/cli/azure/install-azure-cli[Azure CLI] installed. | ||||||
| * You must have the link:https://docs.microsoft.com/en-us/cli/azure/install-azure-cli[{azure-short} CLI] installed. | ||||||
| ifdef::installing-3-4,installing-mtc[] | ||||||
| * The Azure Blob storage container must be accessible to the source and target clusters. | ||||||
| * If you are using the snapshot copy method: | ||||||
| ** The source and target clusters must be in the same region. | ||||||
| ** The source and target clusters must have the same storage class. | ||||||
| ** The storage class must be compatible with snapshots. | ||||||
| endif::[] | ||||||
| ifdef::installing-oadp-azure[] | ||||||
|
|
||||||
| 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. | ||||||
|
|
||||||
| This identity is used for access to resources. | ||||||
|
|
||||||
| * Create a service principal | ||||||
| * Sign in using a service principal and password | ||||||
| * Sign in using a service principal and certificate | ||||||
| * Manage service principal roles | ||||||
| * Create an {azure-short} resource using a service principal | ||||||
| * Reset service principal credentials | ||||||
|
|
||||||
| 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]. | ||||||
| endif::[] | ||||||
| ifndef::installing-oadp-azure[] | ||||||
| .Procedure | ||||||
|
|
||||||
| . Log in to Azure: | ||||||
| . Log in to {azure-short}: | ||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
|
|
@@ -42,7 +57,7 @@ $ az login | |||||
| $ AZURE_RESOURCE_GROUP=Velero_Backups | ||||||
| ---- | ||||||
|
|
||||||
| . Create an Azure resource group: | ||||||
| . Create an {azure-short} resource group: | ||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
|
|
@@ -57,7 +72,7 @@ $ az group create -n $AZURE_RESOURCE_GROUP --location CentralUS <1> | |||||
| $ AZURE_STORAGE_ACCOUNT_ID="velero$(uuidgen | cut -d '-' -f5 | tr '[A-Z]' '[a-z]')" | ||||||
| ---- | ||||||
|
|
||||||
| . Create an Azure storage account: | ||||||
| . Create an {azure-short} storage account: | ||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
|
|
@@ -92,14 +107,35 @@ $ az storage container create \ | |||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
| $ AZURE_SUBSCRIPTION_ID=`az account list --query '[?isDefault].id' -o tsv` \ | ||||||
| AZURE_TENANT_ID=`az account list --query '[?isDefault].tenantId' -o tsv` \ | ||||||
| AZURE_CLIENT_SECRET=`az ad sp create-for-rbac --name "velero" \ | ||||||
| --role "Contributor" --query 'password' -o tsv` \ | ||||||
| AZURE_CLIENT_ID=`az ad sp list --display-name "velero" \ | ||||||
| --query '[0].appId' -o tsv` | ||||||
| $ AZURE_SUBSCRIPTION_ID=`az account list --query '[?isDefault].id' -o tsv` | ||||||
| AZURE_TENANT_ID=`az account list --query '[?isDefault].tenantId' -o tsv` | ||||||
| ---- | ||||||
|
|
||||||
| . Create a service principal with the `Contributor` role, assigning a specific `--role` and `--scopes`: | ||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
| $ AZURE_CLIENT_SECRET=`az ad sp create-for-rbac --name "velero" \ | ||||||
| --role "Contributor" \ | ||||||
| --query 'password' -o tsv \ | ||||||
| --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID/resourceGroups/$AZURE_RESOURCE_GROUP` | ||||||
| ---- | ||||||
| + | ||||||
| The CLI generates a password for you. Ensure you capture the password. | ||||||
|
|
||||||
| . After creating the service principal, obtain the client id. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| + | ||||||
| [source,terminal] | ||||||
| ---- | ||||||
| $ AZURE_CLIENT_ID=`az ad app credential list --id <your_app_id>` | ||||||
anarnold97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ---- | ||||||
| + | ||||||
| [NOTE] | ||||||
| ==== | ||||||
| For this to be successful, you must know your {azure-short} application ID. | ||||||
| ==== | ||||||
| endif::[] | ||||||
anarnold97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| ifndef::installing-oadp-azure[] | ||||||
| . Save the service principal credentials in the `credentials-velero` file: | ||||||
| + | ||||||
| [source,terminal] | ||||||
|
|
@@ -114,8 +150,9 @@ AZURE_CLOUD_NAME=AzurePublicCloud | |||||
| EOF | ||||||
| ---- | ||||||
| + | ||||||
| You use the `credentials-velero` file to add Azure as a replication repository. | ||||||
|
|
||||||
| You use the `credentials-velero` file to add {azure-short} as a replication repository. | ||||||
| endif::[] | ||||||
| //// | ||||||
| ifdef::installing-oadp-azure[] | ||||||
| . Obtain the storage account access key: | ||||||
| + | ||||||
|
|
@@ -165,5 +202,6 @@ EOF | |||||
| ---- | ||||||
| <1> Mandatory. You cannot back up internal images if the `credentials-velero` file contains only the service principal credentials. | ||||||
| + | ||||||
| You use the `credentials-velero` file to create a `Secret` object for Azure before you install the Data Protection Application. | ||||||
| You use the `credentials-velero` file to create a `Secret` object for {azure-short} before you install the Data Protection Application. | ||||||
| endif::[] | ||||||
| //// | ||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.