Giter Site home page Giter Site logo

peek's Introduction

Peek

Customers are continuing to expand their footprint in Azure and there is a significant need to understand resource usage, optimize it as far as possible and plan for future growth. Microsoft Peek is a one stop PaaS based solution which allows us to abstract the intricacies of collecting the usage data for different use cases (Cloud Solution Provider, Direct, and Enterprise Agreement Azure subscriptions) and provides detailed visuals for near real time data analytics.

peekimage

Prerequisites

The following are required prerequisites for this sample project

Prerequisite Purpose
Azure Subscription A subscription is required to host the Azure WebJob and provide the Azure Storage account.

Obtaining Direct Subscription Information

Usage information for direct Azure subscriptions is obtained using the Azure RateCard and Azure Usage APIs. To access both of these APIs an application must be registered within the Azure AD tenant that has access to the subscriptions. Perform the following in order to create and configure the required application

  1. Login into https://portal.azure.com using credentials that have Global Admin privileges

  2. Open the Azure Active Directory management experience

  3. Click on App registrations and then click Add to create a new application

    Azure AD App registrations

  4. Specify the appropriate information within the Create blade and then click Create

    Azure AD app creation

  5. Click Required permissions on the Settings blade and then click Add

    Azure AD required permissions

  6. Select the Windows Azure Service Management API and select the Access Azure Service Management as organization users (preview) permissions and then click Done

    Azure AD required permissions done

  7. Click on Keys on the Settings blade and then click Add

    Azure AD app keys

Obtaining the Cloud Solution Provider (CSP) Information

Microsoft provides the Partner Center API to enable a partner to interact with various aspects of the Cloud Solution Provider program. To access the Partner Center API an application must be registered and configured with the partner's Azure AD tenant. Perform the following tasks to create and configure the application.

  1. Login into https://partnercenter.microsoft.com using credentials that have both AdminAgent and Global Admin privileges

  2. Click Dashboard -> Account Settings -> App Management

  3. Click on Register existing app if you want to use an existing Azure AD application, or click Add new web app to create a new one

    Partner Center - App Management

  4. Document the App ID and Account ID values. Also, if necessary create a key and document that value.

    Partner Center - App Management

It is important to understand that the creation and configuration of this Azure AD application can be done from the Azure Management portal. However, since this application utilizes app only authentication to access the Partner Center API the application must be registred in Partner Center using this process. Otherwise, you will receive a HTTP 401 error with every attempt to access the Partner Center API.

Configuring the Application for Pre-consent

Perform the following steps to configure the application that will be used to access the Partner Center API for pre-consent

  1. Install Azure AD PowerShell Module (instruction available here).
  2. Update the AppId and DisplayName variables in the PowerShell script below
  3. Execute the modified PowerShell script. When prompted for authentication specify credentials that belong to the tenant where the application was created and that have global admin privileges
Connect-AzureAD

$AppId = 'INSERT-APPLICATION-ID-HERE'
$DisplayName = 'INSERT-APPLICATION-DISPLAY-NAME-HERE'

$g = Get-AzureADGroup | ? {$_.DisplayName -eq 'AdminAgents'}
$s = Get-AzureADServicePrincipal | ? {$_.AppId -eq $AppId}

if ($s -eq $null) { $s = New-AzureADServicePrincipal -AppId $AppId -DisplayName $DisplayName }
Add-AzureADGroupMember -ObjectId $g.ObjectId -RefObjectId $s.ObjectId

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

peek's People

Contributors

utkarshvit avatar harleenkohli avatar amit-srivastav avatar

Watchers

KSC avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.