Hello! This is the repository for my cloud infrastructure and some personal applications.
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/secretsSecrets 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/traefikThis 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/pipelineThe 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 applyI 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