All Projects → tfsaggregator → Aggregator Cli

tfsaggregator / Aggregator Cli

Licence: apache-2.0
A new version of Aggregator aiming at Azure DevOps (ex Visual Studio Team Services)

Projects that are alternatives of or similar to Aggregator Cli

25 Days Of Serverless
Repository responsible for 25 days of Serverless challenges
Stars: ✭ 400 (+640.74%)
Mutual labels:  azure-functions
Azure Functions Core Tools
Command line tools for Azure Functions
Stars: ✭ 745 (+1279.63%)
Mutual labels:  azure-functions
Foxoffice
Sample application demonstrating how to build a distributed cloud .NET Core application based on CQRS and Event Sourcing.
Stars: ✭ 33 (-38.89%)
Mutual labels:  azure-functions
Azure Readiness Checklist
This checklist is your guide to the best practices for deploying secure, scalable, and highly available infrastructure in Azure. Before you go live, go through each item, and make sure you haven't missed anything important!
Stars: ✭ 457 (+746.3%)
Mutual labels:  azure-functions
Letsencrypt Siteextension
Azure Web App Site Extension for easy installation and configuration of Let's Encrypt issued SSL certifcates for custom domain names.
Stars: ✭ 727 (+1246.3%)
Mutual labels:  azure-functions
Azure Functions
Stars: ✭ 827 (+1431.48%)
Mutual labels:  azure-functions
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (+522.22%)
Mutual labels:  tfs
Azure Functions Billing
Azure Functions v2 with .NET Core - billing in serverless architecture.
Stars: ✭ 49 (-9.26%)
Mutual labels:  azure-functions
Imgbot
An Azure Function solution to crawl through all of your image files in GitHub and losslessly compress them. This will make the file size go down, but leave the dimensions and quality untouched. Once it's done, ImgBot will open a pull request for you to review and merge. [email protected]
Stars: ✭ 732 (+1255.56%)
Mutual labels:  azure-functions
Cadscenario personalisation
This is a end to end Personalisation business scenario
Stars: ✭ 10 (-81.48%)
Mutual labels:  azure-functions
Rockpaperscissorslizardspock
Rock, Paper, Scissors, Lizard, Spock - Sample Application
Stars: ✭ 477 (+783.33%)
Mutual labels:  azure-functions
Git Credential Manager Core
Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
Stars: ✭ 670 (+1140.74%)
Mutual labels:  tfs
Vsts Workitem Recentlyviewed
An extension for the VSTS work item form that tracks and displays who viewed a work item and when.
Stars: ✭ 7 (-87.04%)
Mutual labels:  tfs
Guide
Serverless Guide - An open-source definitive guide to serverless architectures.
Stars: ✭ 421 (+679.63%)
Mutual labels:  azure-functions
Azure For Developers Workshop
The Azure cloud is huge and the vast service catalog may appear daunting at first, but it doesn’t have to be!
Stars: ✭ 38 (-29.63%)
Mutual labels:  azure-functions
App Service Announcements
Subscribe to this repo to be notified about major changes in App Service
Stars: ✭ 377 (+598.15%)
Mutual labels:  azure-functions
Ailab
Experience, Learn and Code the latest breakthrough innovations with Microsoft AI
Stars: ✭ 6,896 (+12670.37%)
Mutual labels:  azure-functions
Azure Functions Openapi Extension
This extension provides an Azure Functions app with Open API capability for better discoverability to consuming parties
Stars: ✭ 54 (+0%)
Mutual labels:  azure-functions
Azure Functions Eventgrid Extension
EventGrid extension for Azure Functions
Stars: ✭ 41 (-24.07%)
Mutual labels:  azure-functions
Serverlessazurefriday
Serverless geo-replicated event-based architecture sample for Azure Friday
Stars: ✭ 17 (-68.52%)
Mutual labels:  azure-functions

aggregator-cli

Build status Quality Gate Status

Aggregator is a Rule Interpreter for Work Items events, allowing dynamic calculation of field values and more.

It is the successor to renowned TFS Aggregator. The current Server Plugin version (2.x) will be maintained to support TFS. The Web Service flavour will be discontinued in favour of this new tool for two reasons:

  • deployment and configuration of Web Service was too complex for most users;
  • both the Plugin and the Service rely heavily on TFS Object Model which is deprecated.

Aggregator 3.x supports two scenarios:

  1. Azure DevOps Services with Rules running in Azure Functions.
  2. Docker container running in the cloud or on-premise. [v1.0]

The latter permits replacing the Server Plugin after migrating the Rule code.

Note: This README is a synopsis of the documentation available at https://tfsaggregator.github.io/docs/v3/.

You might also find useful Richard Fennell's post Getting started with Aggregator CLI for Azure DevOps Work Item Roll-up.

Major features

  • use of new Azure DevOps REST API
  • simple deployment via CLI tool or Docker container
  • Rule language similar to TFS Aggregator v2

Planned features (post v1.0)

  • Support for Deployment Slots for blue/green-style deployments
  • OAuth support to avoid maintain access tokens
  • Additional Azure DevOps events and objects (e.g. Git)

Requirements

To write a Rule is required some basic knowledge of C# language and Azure Boards. In addition you need:

  • an Azure DevOps Services Project
  • a Personal Access Token with sufficient permissions on the Project

CLI & Azure

The CLI scenario has two additional requirements:

  • an Azure Subscription
  • a Service Principal with, at least, Contributor permission on a Resource Group of the Subscription

Docker

The Docker scenario requires:

  • an SSL Certificate
  • an host for Docker containers (Windows or Linux)

How the CLI works with Azure Functions

As the name implies, this is a command line tool: you download the latest aggregator-cli*.zip appropriate for your platform from GitHub releases and unzip it on your client machine. Read more below in the Usage section.

Through the CLI you create one or more Azure Functions in your Subscription. The Functions use a library named Aggregator Runtime to run your Rules. A Rule is code that reacts to one or more Azure DevOps event; currently, the only language for writing rules is C#.

The CLI automatically checks GitHub Releases to ensure that you use the more recent version of Aggregator Runtime available. To avoid automatic upgrades, specify the Runtime version or point to a specific Runtime package file, using an http: or file: URL.

After you setup the Rules in Azure, you must add at least one Mapping. A mapping is an Azure DevOps Service Hook that send a message to the Azure Function when a specific event occurs. Currently we support only Work Item events. When triggered, the Azure DevOps Service Hook invokes a single Aggregator Rule i.e. the Azure Function hosting the Rule code. Azure DevOps saves the Azure Function Key in the Service Hook configuration.

You can deploy the same Rule in different Instances, map the same Azure DevOps event to many Rules or map multiple events to the same Rule: you choose the best way to organize your code.

CLI Authentication

You must instruct Aggregator which credential to use. To do this, run the login.azure and login.ado commands.

To create the credentials, you need an Azure Service Principal and a Azure DevOps Personal Access Token. Full details in the Setup section.

Aggregator stores the logon credentials locally and expires them after 2 hours.

The PAT is also stored in the Azure Function settings: whoever has access to the Resource Group can read it!

The Service Principal must have Contributor permission to the Azure Subscription or, in alternative, pre-create the Resource Group in Azure and give the service account Contributor permission to the Resource Group. Permission on existing Resource Group If you go this route, remember add the --resourceGroup to all commands requiring an instance.

For Docker only Azure DevOps logon is required.

CLI Usage

Download and unzip the latest CLI.zip file from Releases. It requires .Net Core 3.1 installed on the machine. To run Aggregator run aggregator-cli.exe (Windows), aggregator-cli (Linux) or dotnet aggregator-cli.dll followed by a verb and its options.

CLI Verbs

There are about 20 commands described in detail at Commands.

They can be grouped in a few categories:

  • Authentication to logon into Azure and Azure DevOps.
  • Instance creation, configuration and update.
  • Rule deployment, configuration and update.
  • Mapping from Azure DevOps to Rules.
  • Informational commands, to read configuration.
  • Testing commands to validate configuration.

Most commands manage Azure Function, but a few can be used in the Docker scenario.

We collected some usage scenarios at Command Examples.

How the Docker image works

Pull the latest image from Docker Hub. It works on Linux and Windows. Start a container with the image, setting configuration through environment variables. The Rules are simply files on a Docker volume that the container uses. The container must expose a port reachable from your Azure DevOps instance, either Server or Service. Add one or web hook to Azure DevOps using the container URL. Use one Aggregator API Key to authenticate the call. You may use the CLI to add these mappings.

More details at Docker configuration

Rule language

Currently we offer only C# as the language to write Rules. The Rules can access a few objects:

  • The Current Work Item.
  • Work Item Store to retrieve additional Work Items.
  • The Event which triggered the Rule.
  • Project information.
  • A Logger object to track Rule steps.

See Rule Language for a list of objects and properties to use. For examples see Rule Examples.

Maintenance

Aggregator stores the PAT in the Azure Function configuration. Before the PAT expire you should refresh it from Azure DevOps or save a new PAT using the configure.instance command.

Read Production Configuration and Administration for recommendations on running Aggregator in production.

Troubleshooting

Use the Application Insight instance that was created aside the Azure Function.

Contributing

Details on building your own version and testing are in the Contribute section.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].