tool-chain-io / gitops-workspace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This repository is a demostration on how to use GitHub CodeSpaces customized with DevContainers for modern application development. It leverages AKS plus its Web Application Routing feature and Skaffold.

  • Web Application Routing is a developer tool that makes it easier for developers to create dev environments accessible for TLS.
  • Skaffold is a continous deployment tool used by developers to automate pushing changes to a Kubernetes cluster.
  • DevContainers build consistent developer environments

Open in GitHub Codespaces

Quicksteps

Complete Environment

NOTE: task up will create all required Azure resources (locked down to the Codespace's current IP Address) then deploy code via skaffold run

    az login --scope https://graph.microsoft.com/.default
    task up

Deploy Skaffold - Dev Mode

NOTE: Dev Mode will continuously build, test, and deploy changes to your kubernetes cluster when your code changes

    task skaffold -- dev

Deploy Skaffold - Run Mode

NOTE: Run Mode will build, test, and deploy your code to your kubernetes cluster once

    task skaffold -- run

Clean up

    task down

Notes

  • This will create an AKS cluster and deploy code to it using Skaffold.
  • If you are using Codespaces, then after a restart, do:
        task update-firewalls
    • This will add the Codespaces IP addres to the ACLs for Azure Container Registry, Key Vault and AKS

Validate

  • Skaffold will automtically run Golang Unit test cases and a Custom curl Test on each build/deploy
  • Web Applciation Routing will create an external load balancer and configure an Nginx ingress configured with a self signed certificate
  • Skaffold is also set for port-forwading so the service can be accessible over localhost as well

About

License:MIT License


Languages

Language:HCL 69.3%Language:Shell 16.1%Language:Go 8.5%Language:TypeScript 4.2%Language:Dockerfile 1.9%