Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
/ Microsoft Public archive

GitOps & Terraform Ops Demo Repository for Microsoft Subscription

Notifications You must be signed in to change notification settings

MarkWarnekeMe/Microsoft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Terraform Kubernetes Hack Markdown

Terraform GitOps demo repository. In this repository I am going to demonstrate how to use a GitOps approach to Terraform and Kubernetes.

You can review the CI/CD implementation in the workflows directory. The scripts to setup the Terraform backend are located in hack. Terraform templates for Resource Groups and reusable modules are located in terraform. Kubernetes GitOps configuration files are located in clusters, Flux is used to provision Kubernetes manifests.

Documentation

File Description
workflows CI/CD documentation
hack Scripts documentation
terraform Terraform documentation
clusters Kubernetes documentation
docs General & tools documentation

Getting started

Review the variables.sh script and run the setup.sh

az login

chmod +x ./hack/login.sh
chmod +x ./hack/variables.sh
chmod +x ./hack/secrets.sh
chmod +x ./hack/setup.sh

# Source the variables
source ./hack/variables.sh

# Create the initial environment
./hack/setup.sh

Make sure the pipeline is configured correctly, create AZURE_CREDENTIALS inside of the GitHub action using the service principal created. After kubernetes is setup run flux.sh, create a Personal access tokens via Settings/Developer settings/Personal access tokens

# Create a personal access token for GitHub 
GITHUB_TOKEN=$GITHUB_TOKEN

# Setup gitops
./hack/flux.sh