marlinspike / dsop-environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automated RKE2 + Big Bang DSOP deployment to Azure

This repository is a fork of the 'BigBang Customer Template'. It contains the configuration and artifacts required to deploy BigBang to Kubernetes.

This repository is amended to include scripts and configurations to automate the deployment of RKE2 and BigBang to Azure to the greatest extent possible. This is generally achieved via a GitHub Actions workflow.

Currently, this automated process only supports dev environment deployments.

The original readme from the upstream repo is here bigbang-readme.md

How to use this repository

Step 0: Pre-requisites

First, you will need to clone this repository into your own GitHub organization or account.

You will then need to pre-populate several GitHub repository secrets with credentials to Azure, GitHub, and Iron Bank.

Required GitHub Repository Secrets

The following GH repository secrets are required for this to work:

  • AZURE_CREDENTIALS - A Service Principal with Owner role on your target subscription. This can be accomplished using the following command via bash with an authenticated azcli, and copying the output into this Secret. These credentials are used for the deployment of Azure resources and for accessing your RKE2 cluster. More info here.
az ad sp create-for-rbac --name "<principal name>" --role owner --scopes /subscriptions/<subscription_id> --sdk-auth
  • GH_PAT - GitHub Personal Access Token. See GitHub docs.
  • IRON_BANK_USER - Iron Bank User name. Get from Iron Bank profile.
  • IRON_BANK_PAT - Iron Bank Personal Access Token. Get from Iron Bank profile.

Step 1: Create a new branch for your deployment

Create a branch from main to store configuration for your particular environment. We recommend using the branch naming convention of env/<env-name>.

Step 2: Optionally, update config.json

Edit config.json to meet your deployment needs. By default, the cluster_name value will be automatically substituted with the basename of your branch name (i.e., if your branch is env/rke2/dsop, then the cluster_name will be set to dsop). This field will be used as a prefix for all of the Azure resources deployed by this process.

Commit and push your changes to config.json directly to your environment branch.

Step 3: Sit back and watch it happen

Upon pushing changes to config.json, GitHub Actions will start the deployment process. Click the Actions tab and watch your deployment take place.

The first two stages (deploy-rke2 and deploy-bigbang) generally take 5-10 minutes depending on the size of your cluster. The final stage (verify-reconcilitation) is a test step that monitors for the successful deployment of BigBang to your RKE2 cluster. It generally takes 15 minutes or less.

Acknowledgements

This repository leverages @marlinspike's fantastic dsopbuilder image to deploy RKE2.

This repository is actually a fork of a fork. The intermediary upstream is @cheruvu1's dsop-environment repository which is responsible for the vast majority of the BigBang deployment automation, including the comprehensive deploy.sh script. For now, I am keeping this repsositry downstream for continued development of the automated solutions.

About

License:Apache License 2.0


Languages

Language:Shell 59.1%Language:Bicep 16.8%Language:Python 15.3%Language:Dockerfile 8.8%