From fb0194267e0372691d2811c63e441b9656aea61f Mon Sep 17 00:00:00 2001 From: John Krug Date: Fri, 6 Sep 2024 17:47:53 +0200 Subject: [PATCH] Fix some code block lacking subs=+attributes so {current-version} was not expanded. Signed-off-by: John Krug --- modules/en/pages/deploy/install/index.adoc | 3 +++ modules/en/pages/deploy/install/install-with-helm.adoc | 1 + modules/en/pages/deploy/uninstall/index.adoc | 3 +++ modules/en/pages/deploy/upgrade/longhorn-manager.adoc | 3 +++ .../backup-and-restore/set-backup-target.adoc | 1 + modules/en/pages/v2-data-engine/quick-start.adoc | 5 +++++ modules/en/pages/volumes-and-nodes/create-volumes.adoc | 2 ++ 7 files changed, 18 insertions(+) diff --git a/modules/en/pages/deploy/install/index.adoc b/modules/en/pages/deploy/install/index.adoc index ba047b1..7cb6f23 100644 --- a/modules/en/pages/deploy/install/index.adoc +++ b/modules/en/pages/deploy/install/index.adoc @@ -173,6 +173,7 @@ IMPORTANT: On SUSE and openSUSE, the `iscsi_tcp` module is included only in the We also provide an `iscsi` installer to make it easier for users to install `open-iscsi` automatically: +[subs="+attributes",shell] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/prerequisite/longhorn-iscsi-installation.yaml ---- @@ -244,12 +245,14 @@ zypper install nfs-client We also provide an `nfs` installer to make it easier for users to install `nfs-client` automatically: +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/prerequisite/longhorn-nfs-installation.yaml ---- After the deployment, run the following command to check pods' status of the installer: +[subs="+attributes", console] ---- kubectl get pod | grep longhorn-nfs-installation NAME READY STATUS RESTARTS AGE diff --git a/modules/en/pages/deploy/install/install-with-helm.adoc b/modules/en/pages/deploy/install/install-with-helm.adoc index dfdf4fd..cee0806 100644 --- a/modules/en/pages/deploy/install/install-with-helm.adoc +++ b/modules/en/pages/deploy/install/install-with-helm.adoc @@ -9,6 +9,7 @@ In this section, you will learn how to install Longhorn with Helm. * Kubernetes cluster: Ensure that each node fulfills the xref:#_installation_requirements[installation requirements]. * Your workstation: Install https://helm.sh/docs/[Helm] v3.0 or later. +[subs="+attributes", console] ____ https://github.com/longhorn/longhorn/blob/v{current-version}/scripts/environment_check.sh[This script] can be used to check the Longhorn environment for potential issues. ____ diff --git a/modules/en/pages/deploy/uninstall/index.adoc b/modules/en/pages/deploy/uninstall/index.adoc index d8564ad..02b5cdb 100644 --- a/modules/en/pages/deploy/uninstall/index.adoc +++ b/modules/en/pages/deploy/uninstall/index.adoc @@ -36,6 +36,7 @@ helm uninstall longhorn -n longhorn-system . Create the uninstallation job to clean up CRDs from the system and wait for success: + +[subs="+attributes", console] ---- kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/uninstall/uninstall.yaml kubectl get job/longhorn-uninstall -n longhorn-system -w @@ -43,6 +44,7 @@ helm uninstall longhorn -n longhorn-system + Example output: + +[subs="+attributes", console] ---- $ kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/uninstall/uninstall.yaml serviceaccount/longhorn-uninstall-service-account created @@ -58,6 +60,7 @@ Example output: . Remove remaining components: + +[subs="+attributes", console] ---- kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/longhorn.yaml kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/uninstall/uninstall.yaml diff --git a/modules/en/pages/deploy/upgrade/longhorn-manager.adoc b/modules/en/pages/deploy/upgrade/longhorn-manager.adoc index 658b538..9bea151 100644 --- a/modules/en/pages/deploy/upgrade/longhorn-manager.adoc +++ b/modules/en/pages/deploy/upgrade/longhorn-manager.adoc @@ -49,6 +49,7 @@ image::screenshots/install/cluster-explorer.png[Image] To upgrade with kubectl, run this command: +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/longhorn.yaml ---- @@ -57,6 +58,7 @@ kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-v To upgrade with Helm, run this command: +[subs="+attributes", console] ---- helm upgrade longhorn longhorn/longhorn --namespace longhorn-system --version {current-version} ---- @@ -144,6 +146,7 @@ To recover, you need to upgrade to the previously installed revision at `Rancher * To clean up the deprecated StorageClass, run this command: + +[subs="+attributes", console] ---- kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/examples/storageclass.yaml ---- diff --git a/modules/en/pages/snapshots-and-backups/backup-and-restore/set-backup-target.adoc b/modules/en/pages/snapshots-and-backups/backup-and-restore/set-backup-target.adoc index ad786d2..6176e85 100644 --- a/modules/en/pages/snapshots-and-backups/backup-and-restore/set-backup-target.adoc +++ b/modules/en/pages/snapshots-and-backups/backup-and-restore/set-backup-target.adoc @@ -242,6 +242,7 @@ Longhorn provides sample backupstore server setups for testing purposes. You ca . Set up a MinIO S3 server for the backupstore in the `longhorn-system` namespace. + +[subs="+attributes", console] ---- kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/backupstores/minio-backupstore.yaml ---- diff --git a/modules/en/pages/v2-data-engine/quick-start.adoc b/modules/en/pages/v2-data-engine/quick-start.adoc index 74ef4c8..52327e8 100644 --- a/modules/en/pages/v2-data-engine/quick-start.adoc +++ b/modules/en/pages/v2-data-engine/quick-start.adoc @@ -49,6 +49,7 @@ apt install -y linux-modules-extra-`uname -r` We provide a manifest that helps you configure the kernel modules and huge pages automatically, making it easier to set up. +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/prerequisite/longhorn-spdk-setup.yaml ---- @@ -87,6 +88,7 @@ echo "vm.nr_hugepages=512" >> /etc/sysctl.conf We provide a manifest that helps you finish the deployment on each Longhorn node. +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/deploy/prerequisite/longhorn-nvme-cli-installation.yaml ---- @@ -115,6 +117,7 @@ After finishing the above steps, restart kubelet on each node. Make sure everything is correctly configured and installed by +[subs="+attributes", console] ---- bash -c "$(curl -sfL https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/scripts/environment_check.sh)" -s -s ---- @@ -238,6 +241,7 @@ After the installation and configuration, we can dynamically provision a Persist Use following command to create a StorageClass called `longhorn-spdk`. Set `parameters.backendStoreDriver` to `v2` to utilize V2 Data Engine. +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/examples/v2/storageclass.yaml ---- @@ -246,6 +250,7 @@ kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-v Create a Pod that uses Longhorn volumes using V2 Data Engine by running this command: +[subs="+attributes", console] ---- kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/examples/v2/pod_with_pvc.yaml ---- diff --git a/modules/en/pages/volumes-and-nodes/create-volumes.adoc b/modules/en/pages/volumes-and-nodes/create-volumes.adoc index e3ee198..2188b50 100644 --- a/modules/en/pages/volumes-and-nodes/create-volumes.adoc +++ b/modules/en/pages/volumes-and-nodes/create-volumes.adoc @@ -18,6 +18,7 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC . Use following command to create a StorageClass called `longhorn`: + +[subs="+attributes", console] ---- kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/examples/storageclass.yaml ---- @@ -55,6 +56,7 @@ In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to s . Create a Pod that uses Longhorn volumes by running this command: + +[subs="+attributes", console] ---- kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/v{current-version}/examples/pod_with_pvc.yaml ----