Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Creating a Microsoft Azure integration

download PDF

To add an Microsoft Azure account to hybrid committed spend, you must add it as a integration from the Red Hat Hybrid Cloud Console user interface and configure Microsoft Azure to provide metrics.

To configure your Microsoft Azure account to be an hybrid committed spend integration, you must complete the following tasks:

  1. Create a storage account and resource group.
  2. Configure Storage Account Contributor and Reader roles for access.
  3. Create a function to filter the data you want to send to Red Hat.
  4. Schedule daily cost exports to a storage account accessible to Red Hat.
Note

Because third-party products and documentation can change, instructions for configuring the third-party integrations provided are general and correct at the time of publishing. For the most up-to-date information, see the Microsoft Azure documentation.

Add your Microsoft Azure integration to hybrid committed spend from the Integrations page.

1.1. Adding a Microsoft Azure account and naming your integration

Add your Microsoft Azure account as an integration so hybrid committed spend can process the cost and usage data.

Procedure

  1. From Red Hat Hybrid Cloud Console, click Settings Menu Settings icon > Integrations.
  2. On the Settings page, in the Cloud tab, click Add integration.
  3. Click Add integration.
  4. In the Add a cloud integration wizard, select Microsoft Azure as the cloud provider type and click Next.
  5. Enter a name for your integration and click Next.
  6. In the Select application step, select Hybrid committed spend and click Next.
  7. In the Specify cost export scope step, select I am OK with sending the default data to Cost Management.
  8. Select the scope of your cost data export from the menu. You can export data at the subscription level and other scopes in your subscription.

    1. Copy the generated command for the scope you selected.
    2. In your Microsoft Azure account, click Cloud Shell.
    3. Paste the command you copied from the earlier step.
    4. Copy the value for the subscription_id from the returned data.

      Example response

      {
          "subscription_id": 00000000-0000-0000-000000000000
          }

  9. In the Add a cloud integration wizard, paste the value into the Cost export scope field on the Specify cost export scope step.
  10. Click Next.

1.2. Creating a Microsoft Azure resource group and storage account

Create a storage account and resource group in Microsoft Azure to house your billing exports so that hybrid committed spend can collect the information. In the Add a cloud integration wizard in hybrid committed spend, enter the resource group name and storage account name in the fields in the Resource group and storage account page.

Prerequisites

You must have a Red Hat user account with Cloud Administrator entitlements.

Procedure

  1. In your Microsoft Azure account, search for storage and click Storage accounts.

    1. On the Storage accounts page, click Create.
    2. In the Resource Group field, click Create new. Enter a name, and click OK. In this example, use cost-data-group.
    3. In the Instance details section, enter a name in the Storage account name field. For example, use costdata.
    4. Copy the names of the resource group and storage account so you can add them to the Add a cloud integration wizard in Red Hat Hybrid Cloud Console and click Review.
    5. Review the storage account and click Create.
  2. In the Red Hat Hybrid Cloud Console Add a cloud integration wizard, on the Resource group and storage account page, enter values in the Resource group name and Storage account name.
  3. Click Next.

1.3. Creating a daily export in Microsoft Azure

Create a function in Microsoft Azure to filter your data and export it on a regular schedule. Exports create a recurring task that sends your Microsoft Azure cost data regularly to a storage account, which exists within a resource group. Hybrid committed spend must be able to access the resource group toread the Microsoft Azure cost data. This example uses a Python function to filter the data and post it to the storage account you created earlier.

Procedure

  1. To create the export, go to the Portal menu in Microsoft Azure and click Cost Management + Billing.
  2. On the Cost Management + Billing page, click Cost Management.
  3. In the Settings menu, in the Cost management overview page, click, Exports.
  4. To add an export, click Add.
  5. In the Export details section, name the export.
  6. In the Storage section, add the resource group you created.

1.4. Finding your Microsoft Azure subscription ID

Find your subscription_id in the Microsoft Azure Cloud Shell and add it to the Add a cloud integration wizard in hybrid committed spend.

Procedure

  1. In your Microsoft Azure account, click Cloud Shell.
  2. Enter the following command to obtain your Subscription ID:

    az account show --query "{subscription_id: id }"
  3. Copy the value for the subscription_id from the returned data.

    Example response

    {
        "subscription_id": 00000000-0000-0000-000000000000
        }

  4. Paste that value in the Subscription ID field on the Subscription ID page in the Add a cloud integration wizard.
  5. Click Next.

1.5. Creating Microsoft Azure roles

To grant Red Hat access to Azure, you must configure dedicated credentials in Microsoft Azure.

Procedure

  1. In the Add a cloud integration wizard, on the Roles step, copy the generated az ad sp create-for-rbac command from the wizard to create a service principal with the Cost Management Storage Account Contributor role.
  2. In your Microsoft Azure account, click Cloud Shell.
  3. Paste the command you copied in the earlier step in the cloud shell prompt.
  4. Copy the Tenant (Directory) ID, Client (Application) ID, and Client secret values and paste them into the Roles step of the Add a cloud integration wizard.
  5. Copy the second generated az role assignment create command from the wizard and paste it in the cloud shell prompt to create a Cost Management Reader role.
  6. In the Add a cloud integration wizard, click Next.
  7. Review the information you provided in the wizard and click Add.
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.