项目作者: cloudbeatsch

项目描述 :
Provide insight into GitHub users, organizations and repositories using the GitHub GraphQL API v4 and PowerBI
高级语言: JavaScript
项目地址: git://github.com/cloudbeatsch/project-lenis.git
创建时间: 2017-09-10T09:47:30Z
项目社区:https://github.com/cloudbeatsch/project-lenis

开源协议:MIT License

下载


To Do
In Progress

About project-lenis

Provide insight into GitHub users, organizations and repositories using the GitHub
GraphQL API v4 and PowerBI.





Architecture

Architecture overview

  • Each capability (e.g. the creation of a collaboration graph) is implemented as an independent nano service. The output of each nano service is written into a document collection of the shared Azure Cosmos DB. Each service implements its own Power BI template to visualize its data.
  • The final Power BI report includes the Power BI templates provided by the different nano services.
  • If a nano service requires sequential processing (e.g. extract the key contributors for each repository), the task should be split into multiple functions which are triggered by a queue message.
  • AppSettings (e.g. which repositories should be processed/excluded) are set through the CLI tool.

Deploy to Azure

In order to use project-lenis the first thing you’ll need to do is to deploy the Azure resources to your Azure subscription. Click the Deploy to Azure button (below) to kick off a deployment.



You will be required to provide the following parameters:

  • appName: A unique identifier for your app deployment
  • githubToken: A Personal Access Token for GitHub. You can generate one here
  • databaseAccountName: A unique identifier for your CosmosDB account name
  • organizations: A comma seperated list of organisations to query against

Deploy Services Locally

  • Install the functions core tools on your local machine if they do not already exist
    1. npm i -g azure-functions-core-tools
  • Navigate to the azure functions directory
    1. cd $REPO_ROOT/azure-functions
  • Install Nodejs dependenices
    1. npm install
  • Create a local settings file if you do not currently have one
    1. cp appsettings.json local.settings.json
  • Check appropriate values are set in your local.settings.json file

  • Run the azure functions runtime host

    1. func host start --debug vscode
  • Open the folder project-lenis in Visual Studio Code, switch to the Debug view and select Attach to Azure Functions

  • Open a new terminal and navigate to the $REPO_ROOT/azure-functions directory

  • Execute the individual functions

    1. func run your-function-name

Custom Nano Service Development Guidance

  • Create a new folder within the azure-functions directory. Name it the same way as your nano service is called (e.g. github-repositories). Place all your function files into this folder.
  • Name your document collection by using the nano-service name followed by the description of the collection itself (e.g. githubRepositories)
  • Save your Power BI template in the power-bi folder. Name the same way as your nano service called (e.g. github-collaboration-graph.pbit)

Configuring the PowerBI datasources

Edit the data query and set for each query the datasource to your CosmosDB endpoint. Provide the account key when requested.

Development Tools

Useful Documentation