Skip to content

Latest commit

 

History

History
105 lines (81 loc) · 5.69 KB

gitops-quickstart.md

File metadata and controls

105 lines (81 loc) · 5.69 KB

5 Minute GitOps Pipeline with bedrock

The best way to start learning about GitOps in Bedrock is to walkthrough a simple sample deployment that captures our recommended approach using Fabrikate. You will be using the Bedrock CLI aka bedrock. In this walkthrough, we will:

  • Build a sample microservice and link a Helm chart to a High Level Definition [TODO LINK] 🔮
  • Generate Kubernetes manifests backed by a Git-based source of truth 🚀
  • View end to end observability of the microservice deployment 🔭

Step 1: Install bedrock and dependencies

Pre-req

Installation

bedrock is available on Linux, macOS and Windows platforms.

  • Download the latest bedrock binaries here.

  • Install with Homebrew:

    brew update && brew install bedrock-cli

Step 2: Setup a sample GitOps environment with bedrock

Next bedrock will do the heavy lifting of creating repositories, pipelines, and cloud resources for you. Please read about Bedrock Concepts [TODO LINK] to get more familiar.

  1. Run bedrock setup
  2. Hit enter to confirm the preselected value that is in parenthesis. Otherwise a new value for the prompt
  3. If redirected to an Azure Portal sign in page, login and return to the shell prompt.

Example command and results below:

$ bedrock setup
info:    az cli vesion 2.5.1
? Enter organization name
 contoso
? Enter project name
 fabrikam
? Enter your AzDO personal access token
 ****************************************************
? Would you like to create a sample application repository? Yes
? Do you want to create a service principal? Yes
info:    attempting to login to az command line
? Select one of the subscriptions
 CSE Dev Crews Americas West
info:    attempting to create service principal with az command line
info:    Successfully created service principal with az command line
? Enter Azure Container Register Name. The registry name must be unique within Azure
 contosoacr
 Create variable group
 ✅ Install manifest repo
 ✅ Install hld repo
 ✅ Install and verify manifest pipeline
 ? Enter storage account name
 contosoazurestorage
 ✅ Update variable group
 ✅ Install helm repo
 ✅ Install sample app repo
 ✅ Install and verify lifecycle pipeline
 ✅ Install and verify build pipeline 

Note: If you prefer not to use the interactive (immediate feedback for each statement) mode of bedrock setup you can provide a config file. See docs.

🎉 Congratulations! 🎉 At this point your have created the simplest form of a Bedrock GitOps pipeline. Next let's get a closer at what we have created.


Step 3: Observe the bedrock GitOps flow

We can see a live report of the bedrock GitOps journey we just completed in Step 2 using Bedrock's Spektate dashboard. Follow the instructions below to follow along

  1. Ensure you have Docker running locally. You can download Docker here.
  2. Run bedrock deployment dashboard, you will be redirected to the localhost webpage in your default web browser.
  3. If the page doesn't load on first try please refresh the webpage.

Example below:

$ bedrock deployment dashboard
info:    Pulling dashboard docker image
info:    Launching dashboard on http://localhost:4040

You will see a row of data in the Spektate dashboard as seen below. Feel free to click on links on Spektate to see the builds and pull requests that bedrock GitOps process automated:

alt text

⭐️ If you have an existing Kubernetes cluster, the Spektate dashboard will indicate when your application has been synced with the cluster. Learn about how to get a Kubernetes cluster integrated in Next Steps.


Next Steps

In this walkthrough we created a GitOps workflow of repositories and build pipelines. In addition, we were able to capture telemetry from the build pipelines to display the journey of the sample application to a Kubernetes manifest repository.

  • Learn about more GitOps scenarios addressed by Bedrock and extend this walkthrough for your own tooling and scenarios.
    • Bedrock GitOps Next Steps [TODO LINK]
  • Learn how to enable your existing Kubernetes clusters to take advantage of Bedrock GitOps
    • Configuring a syncing agent on your Kubernetes clusters [TODO LINK]
  • Learn how to easily deploy a new Kubernetes cluster(s) using Terraform and bedrock
    • Single and multi-cluster GitOps enabled AKS [TODO LINK]