BLORP, or maybe Universal Consul Dev Environment
To shorten the feedback loop of the Consul development cycle, starting with a focus/integration on K8S.
- Simulate all deployments of Consul
- K8S Testings First
- Faster 🏃
- uses existing docker containers and replaces only the binary
- pushes containers around locally - no remote registries required.
- concurrent builds
- less typing
- Implicitly tests "upgrade" scenarios. Re-deploying Consul on top of Consul.
- Some conveniences, like default port forwarding.
- Obviously only works for k8s
- Moving between versions could be hard (could be solved with different branches or clusters)
- Still requires additional configurations for failover, etc.
- Make sure you have a kubernetes cluster and cli accoutrements installed and configured properly.
Tools I recommend when in doubt:
- Rancher Desktop with the Moby container runtime selected. This will also install
- k3d for creating a cluster with multiple nodes, which is useful for deployments in Consul that have anti-affinity.
I use this one for testing. I use this for testing:
k3d cluster create testing --agents=3 --no-lb
- Install Skaffold >=v2.0
- Easy mode:
brew install skaffold
- Easy mode:
- Clone this repo.
- Initialize the submodules:
git submodule init
git submodule update
- Run the following command.
- `skaffold dev``
- ☕️
- Change a file affecting one of the Consul components and watch the helm chart redeploy.
- Visit the FakeService App at http://localhost:8081 -->
- When you're done, CTRL+C to exit skaffold and have it clean up your cluster.
- Have applications redeploy when consul-dataplane is redeployed
- Experiment with a go.work file at the root of the repo to share the API module.
- Build the UI
- Build CRDs and check for to redeploy
- Codespace Integration?