3 minutes
Chaotically Deployments
Introduction
This blog is part of an ecosystem I configured to make my life easier when switching back and forth between all the different projects I have on the go at any point in time. As of writing, these fall under the umbrella of “chaotically.me”, and I have a couple goals for deployments targeting the domain - mostly because I am scatterbrained at the best of times.
The motivation
I want a central home on the internet that I can use to quickly prototype and launch experiments from. Things like making a playground with WebGL, PoC integrations with Spotify, self-managing Foundry instances for friends to use for Dungeons and Dragons, and somewhere to drop writing ideas and learning articles that I found useful.
This blog is intended to keep me accountable for - if not finishing - at least synthesizing progress I make on my side projects. It seems reasonable then to create this initial post summarizing the process so far (even though it’s not exactly the most original).
The criteria
- One push = one deployment: no remembering to go click an extra button for things to be updated.
- Low cost: I don’t want to give the big cloud providers any more money than I need to. In the future I may even move to self hosting, but without being a member of the home-owning class it’s a bit hard to justify fancy home networking.
- Low cognitive load: I throw myself in and out of projects intensely, and if I don’t come back for a couple months at a time I need to be able to pick up and write a blog post or fiddle with a css widget without too much overhead
The stack
With the criteria laid out, I decided on my tech stack:
- Hugo for the blog
- React for the first experiment site (generously intended to be a portfolio, but we’ll see)
- AWS Lambda for any non-static functionality I might need for now
- Terraform for IaC concerns
- Github Organization for source control
- GoCD for deployment orchestration
Steps to replicate
- Initialise a repo to hold the bootstrapping infra
- Configure terraform state bucket and lock tables in your provider of choice for remote state for the subsequent steps. I did this in AWS using the code found in my chaotically-pipelines-infra repo.
- Set up GoCD integrations with your cloud provider (in my case AWS for now) to allow the pipeline to reach into the account and make required changes
- Set yourself up with a new monorepo in your preferred fashion, I am familiar with yarn so I stuck to the typescript yarn tooling.
- Create a hugo project in one section of your monorepo
- Create a frontend package, and a backend package if desired, and happy developing
My final project push kicks off the following pipeline tooling:
Next steps
Adding commenting functionality is up there, and I’d like to try to emulate the work done here: https://oct8l.gitlab.io/posts/2018/129/setting-up-commento-with-hugo/ to avoid using Disqus.
490 Words
2023-11-10 00:00