This is an initiative to visualize Project Bedrock. Spektate ties in information from the repositories API, the pipelines API and information stored in an Azure Table to display the dashboard with the following components:
Here's a detailed diagram describing the Spektate workflow. Each pipeline is responsible for sending a unique set of data to the storage, which is used to connect all the pieces together:
Currently, Spektate consists of a command line interface and a simple dashboard prototype. The instructions to use both are below.
Note: Spektate dashboard will delete deployments when their corresponding builds/releases have expired in Azure DevOps.
Official docker images for this dashboard are located at mcr.microsoft.com/k8s/bedrock/spektate
.
Follow the steps in this guide to onboard a project to use Spektate.
The helm chart to use this dashboard is located here. There's a Load Balancer provided in the helm chart but it's turned off in values.yaml
with the setting externalIP
. Set this to true if you would like to expose the dashboard via a public endpoint.
Substitute values for your configuration and install this dashboard via the command below:
cd ./chart
helm install . --name spektate --set storageAccessKey=<storageAccessKey> --set storageTableName=<storageTableName> --set storagePartitionKey=<storagePartitionKey> --set storageAccountName=<storageAccountName> --set pipelineProject=<pipelineProjectName> --set pipelineOrg=<pipelineOrg> --set pipelineAccessToken=<PipelinePAT> --set manifest=<manifestRepoName> --set manifestAccessToken=<manifestAccessToken> --set githubManifestUsername=<gitHubUserName> --set sourceRepoAccessToken=<sourceRepoAccessToken>
storageAccessKey
: Access key for the storage accountstorageTableName
: Table name for the storage accountstoragePartitionKey
: Partition key for your configuration, you may want to use project name or some identifier that helps separate unrelated configurations for the purpose of introspection.storageAccountName
: Storage account namepipelineProject
: Project name for the pipelines in Azure DevOpspipelineOrg
: Org name for the pipelines in Azure DevOpspipelineAccessToken
: Access token for pipelines in Azure DevOpsmanifestRepoName
: Manifest repository namemanifestAccessToken
: Access token for the manifest repositorysourceRepoAccessToken
: Access token for the source repositorygithubManifestUsername
: Account name or organization name under which the manifest repository resides.If you're not using an external IP, use port-forwarding to access the dashboard:
kubectl get pods
kubectl port-forward pod/<pod-name> 2200:5000
or change 2200
to a port of your choice2200
to a port of your choiceClone this repository.
There is frontend and backend folders and each of them are separate yarn projects. cd frontend
in one window and cd backend
in another.
Add the following env variables to your shell where you have changed directory to backend
:
export REACT_APP_STORAGE_ACCESS_KEY=
export REACT_APP_STORAGE_TABLE_NAME=
export REACT_APP_STORAGE_PARTITION_KEY=
export REACT_APP_STORAGE_ACCOUNT_NAME=
export REACT_APP_PIPELINE_PROJECT=
export REACT_APP_PIPELINE_ORG=
export REACT_APP_PIPELINE_ACCESS_TOKEN=
export REACT_APP_MANIFEST=
export REACT_APP_MANIFEST_ACCESS_TOKEN=
export REACT_APP_SOURCE_REPO_ACCESS_TOKEN=
REACT_APP_STORAGE_ACCESS_KEY
: Access key for the storage accountREACT_APP_STORAGE_TABLE_NAME
: Table name for the storage accountREACT_APP_STORAGE_PARTITION_KEY
: Partition key for your configuration, you may want to use project name or some identifier that helps separate unrelated configurations for the purpose of introspection.REACT_APP_STORAGE_ACCOUNT_NAME
: Storage account nameREACT_APP_PIPELINE_PROJECT
: Project name for the pipelines in Azure DevOpsREACT_APP_PIPELINE_ORG
: Org name for the pipelines in Azure DevOpsREACT_APP_PIPELINE_ACCESS_TOKEN
: Access token for pipelines in Azure DevOpsREACT_APP_MANIFEST
: Manifest repository nameREACT_APP_MANIFEST_ACCESS_TOKEN
: Access token for the manifest repositoryREACT_APP_SOURCE_REPO_ACCESS_TOKEN
: Access token for the source repositoryREACT_APP_GITHUB_MANIFEST_USERNAME
: Account name or organization name under which the manifest repository resides.Run yarn
in both to install dependencies
Run yarn start
in both to start the applications. You should be able to see the dashboard launch in one, and a Node.js server start in another! It should navigate you to the browser where dashboard is running.
In order to publish images to this repository, you will need access to devcrewsacr.azurecr.io
az acr login --name devcrewsacr
az acr credential show --name devcrewsacr
.docker login devcrewsacr.azurecr.io
and you will be prompted to enter the credentialsdocker push devcrewsacr.azurecr.io/public/k8s/bedrock/spektate:<tag>
You can provide an Azure Active Directory layer of authetication on top of Spektate. Follow instructions here.
To use the CLI for Spektate, head over to https://github.com/microsoft/bedrock-cli.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.