From c113ad1107d7837b72d8784d24532b8af7bdcdd1 Mon Sep 17 00:00:00 2001 From: jon brookes Date: Sun, 24 Aug 2025 18:20:33 +0100 Subject: [PATCH] Add guides for Longhorn storage and Traefik ingress; update local Vagrant cluster documentation --- astro.config.mjs | 4 +++ .../guides/local-vagrant-cluster-ingress.md | 19 +++++++++++++ .../guides/local-vagrant-cluster-storage.md | 28 +++++++++++++++++++ .../docs/guides/local-vagrant-cluster.md | 12 ++++---- src/content/docs/guides/quick-start.md | 2 +- 5 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 src/content/docs/guides/local-vagrant-cluster-ingress.md create mode 100644 src/content/docs/guides/local-vagrant-cluster-storage.md diff --git a/astro.config.mjs b/astro.config.mjs index 941ca87..2fdbb00 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -43,6 +43,10 @@ export default defineConfig({ { label: 'Create a Local K3d Instance', slug: 'guides/local-k3d' }, { label: 'Initial Pipeline Run', slug: 'guides/infctl-first-run' }, { label: 'Create a vagrant 3 node cluster', slug: 'guides/local-vagrant-cluster' }, + { label: 'Add Longhorn Storage', slug: 'guides/local-vagrant-cluster-storage' }, + { label: 'Add Ingress', slug: 'guides/local-vagrant-cluster-ingress' }, + + ], }, { diff --git a/src/content/docs/guides/local-vagrant-cluster-ingress.md b/src/content/docs/guides/local-vagrant-cluster-ingress.md new file mode 100644 index 0000000..28eff99 --- /dev/null +++ b/src/content/docs/guides/local-vagrant-cluster-ingress.md @@ -0,0 +1,19 @@ +--- +title: Traefik ingress +description: A guide to adding ingress. +--- + +This section follows on from [Add Longhorn Storage](/guides/local-vagrant-cluster-storage/). Be sure to complete that before commencing with this. + +metallb can be installed with + + +```bash +LOG_FORMAT=basic infctl -f pipelines/vagrant-metallb.json +``` + +ingress can be installed with + +```bash +LOG_FORMAT=basic infctl -f pipelines/vagrant-ingress.json +``` \ No newline at end of file diff --git a/src/content/docs/guides/local-vagrant-cluster-storage.md b/src/content/docs/guides/local-vagrant-cluster-storage.md new file mode 100644 index 0000000..4a894b2 --- /dev/null +++ b/src/content/docs/guides/local-vagrant-cluster-storage.md @@ -0,0 +1,28 @@ +--- +title: Longhorn storage Layer +description: A guide to adding Longhorn storage. +--- + +This follows on from [Create a vagrant 3 node cluster](/guides/local-vagrant-cluster/) so be sure to complete that section before proceeding with this one. + +A pipeline file [vagrant-longhorn.json](https://codeberg.org/headshed/infctl-cli/src/branch/main/vagrant/dev/ubuntu/pipelines/vagrant-longhorn.json) uses + +* [longhorn_prereqs.sh](https://codeberg.org/headshed/infctl-cli/src/branch/main/vagrant/dev/ubuntu/scripts/longhorn_prereqs.sh) +* install_longhorn.sh +* wait_for_longhorn.sh + +to marshall an installation of Longhorn. + +From the previous directory in our example which was `/home/user/projects/infctl-cli` we need to change directory `cd vagrant/dev/ubuntu/` + +so we can `ssh` to the workstation + +```bash +vagrant ssh workstation +``` + +and once logged in to the workstation we can install longhorn with + +```bash +LOG_FORMAT=basic infctl -f pipelines/vagrant-longhorn.json +``` \ No newline at end of file diff --git a/src/content/docs/guides/local-vagrant-cluster.md b/src/content/docs/guides/local-vagrant-cluster.md index 667c726..00ff020 100644 --- a/src/content/docs/guides/local-vagrant-cluster.md +++ b/src/content/docs/guides/local-vagrant-cluster.md @@ -14,21 +14,21 @@ git clone https://codeberg.org/headshed/infctl-cli.git cd infctl-cli ``` -take a look at the script `./scripts/install_vagrant_nodes.sh` to familiarize yourself with what it does +take a look at the script [./scripts/install_vagrant_nodes.sh](https://codeberg.org/headshed/infctl-cli/src/branch/main/scripts/install_vagrant_nodes.sh) to familiarize yourself with what it does basically it will run `vagrant up` on what are to be your local cluster -next take a look at `./scripts/configure_vagrant_k3s.sh` +next take a look at [`./scripts/configure_vagrant_k3s.sh`](https://codeberg.org/headshed/infctl-cli/src/branch/main/scripts/configure_vagrant_k3s.sh) this checks the vagrant hosts and creates an ansible inventory file for use in a later step -finally, check out `./scripts/install_vagrant_workstation.sh` which runs a vagrant up command to create a workstation from which ansible will be run +the Vagrantfile at [`vagrant/dev/ubuntu/Vagrantfile`](https://codeberg.org/headshed/infctl-cli/src/branch/main/vagrant/dev/ubuntu/Vagrantfile) is used by `vagrant` to coordinate host builds -the Vagrantfile at `vagrant/dev/ubuntu/Vagrantfile` are used by `vagrant` for each of these processes to coordinate each build +the [`scripts/install_vagrant_workstation.sh`](https://codeberg.org/headshed/infctl-cli/src/branch/main/scripts/install_vagrant_workstation.sh) script brings the workstation up after the cluster details have been gathered -a final script `./vagrant/dev/ubuntu/ansible/provision_workstation.sh` which is quite a bit longer, is used by `vagrant` to provision our workstation and to finalize the cluster. +a final script [`./vagrant/dev/ubuntu/ansible/provision_workstation.sh`](https://codeberg.org/headshed/infctl-cli/src/commit/bd222ce39e363bcdb536362d5dcb0699b1dbb2ee/vagrant/dev/ubuntu/ansible/provision_workstation.sh) which is quite a bit longer, is used by `vagrant` to provision our workstation and to finalize the cluster. -if you are ready to run the pipeline, this can be run in a single command with `infctl` which we can configure to use a pipeline file at `pipelines/dev/vagrant-k3s.json` +if you are ready to run the pipeline, this can be run in a single command with `infctl` which we can configure to use a pipeline file at [`pipelines/dev/vagrant-k3s.json`](https://codeberg.org/headshed/infctl-cli/src/branch/main/pipelines/dev/vagrant-k3s.json) this marshals each of the above tasks into a single, repeatable operation diff --git a/src/content/docs/guides/quick-start.md b/src/content/docs/guides/quick-start.md index e3aa822..6351e13 100644 --- a/src/content/docs/guides/quick-start.md +++ b/src/content/docs/guides/quick-start.md @@ -3,7 +3,7 @@ title: Quick Start Guide description: A guide to setting up MVK quickly. --- -Install `infctl` command line tool with a single command +Install `infctl` command line tool with ```bash curl -L https://codeberg.org/headshed/infctl-cli/raw/branch/main/install.sh | bash