Skip to content

augustfengd/augustfeng.app

Repository files navigation

About

Hello! This is the repository for my cloud infrastructure and some personal applications.

Setup

Secrets

Infrastructure related secrets are statically encrypted in the repository using SOPS and are easily decrypted, and imported for CUE consumption as required.

cue cmd decrypt github.com/augustfengd/augustfeng.app/secrets
cue cmd convert github.com/augustfengd/augustfeng.app/secrets

Secrets that are specific to services can be just as prepared for usage:

cue cmd decrypt github.com/augustfengd/augustfeng.app/cloud/kubernetes/traefik
cue cmd convert github.com/augustfengd/augustfeng.app/cloud/kubernetes/traefik

Building the pipelines

This project is nearly heavily automated using pipelines. The pipeline configuration are coded with CUE and compiled using a variety of different methods.

  • cloud pipeline:
cue cmd build github.com/augustfengd/augustfeng.app/cloud/pipeline
  • blog pipeline:
cue cmd pipeline github.com/augustfengd/augustfeng.app/apps/blog
  • domain pipeline:
make -C apps/domain ../../.github/workflows/apps.domain.yaml
  • toolchain pipeline:
cue cmd build github.com/augustfengd/augustfeng.app/apps/toolchain/pipeline

Terraform

The terraform cloud project configuration is configured prior to the plan and applies:

  • configure the terraform workspace variables:
# if working from root directory.
cue cmd configure github.com/augustfengd/augustfeng.app/cloud/terraform:augustfeng_app
  • build, plan and apply:
# for a better ux, we can run the commands directly from the package to typing the package's fqdn.
cd cloud/terraform

cue cmd build
cue cmd init
cue cmd plan
cue cmd apply

Kubernetes

I have written some abstractions in CUE to easily author kubernetes configuration. Additionally, there is also scripting layer to consumes the configuration:

# kubectl backend
cue cmd template github.com/augustfengd/augustfeng.app/cloud/kubernetes/traefik
cue cmd diff github.com/augustfengd/augustfeng.app/cloud/kubernetes/traefik
cue cmd apply github.com/augustfengd/augustfeng.app/cloud/kubernetes/traefik

# kubectl/helm backend
cue cmd template github.com/augustfengd/augustfeng.app/cloud/kubernetes/cert-manager # this project doesn't use cert-manager anymore though.
cue cmd diff github.com/augustfengd/augustfeng.app/cloud/kubernetes/cert-manager
cue cmd apply github.com/augustfengd/augustfeng.app/cloud/kubernetes/cert-manager

About

Code for my personal cloud infrastructure.

Resources

Stars

Watchers

Forks

Packages