From 90c81efb171a1b3908e7898cd8e01de2452e38f0 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Tue, 7 May 2024 07:43:51 -0700 Subject: [PATCH 1/4] fix userdata indentation --- .../site-installation/site-user-data.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md index 9154e8280b..c7f4672013 100644 --- a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md +++ b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md @@ -34,38 +34,39 @@ to a bootable device, such as a USB stick. ``` For example, you can include the following content in the **user-data** file to connect your Edge host to Wi-Fi. - This requires wpa_supplicant to be included in your base OS image. For more information, refer to + Replace `wifi-network-name` with the name of your Wifi network and the `wifi-password` with the password of your + network. This requires wpa_supplicant to be included in your base OS image. For more information, refer to [Connect Intel NUC Edge Host to Wifi](../../networking/connect-wifi.md). ```yaml #cloud-config install: - bind_mounts: - - /var/lib/wpa + bind_mounts: + - /var/lib/wpa stages: - network.before: - - name: "Connect to wifi" - commands: - - | - # Find the first wireless network interface - wireless_interface="" - for interface in $(ip link | grep -oP '^\d+: \K[^:]+(?=:)') - do - if [ -d "/sys/class/net/$interface/wireless" ]; then - wireless_interface=$interface - break - fi - done - - # Check if a wireless interface was found and connect it to WiFi - if [ -n "$wireless_interface" ]; then - wpa_passphrase Madrid supersup | tee /var/lib/wpa/wpa_supplicant.conf - wpa_supplicant -B -c /var/lib/wpa/wpa_supplicant.conf -i $wireless_interface - dhclient $wireless_interface - else - echo "No wireless network interface found." - fi + network.before: + - name: "Connect to wifi" + commands: + - | + # Find the first wireless network interface + wireless_interface="" + for interface in $(ip link | grep -oP '^\d+: \K[^:]+(?=:)') + do + if [ -d "/sys/class/net/$interface/wireless" ]; then + wireless_interface=$interface + break + fi + done + + # Check if a wireless interface was found and connect it to WiFi + if [ -n "$wireless_interface" ]; then + wpa_passphrase wifi-network-name wifi-password | tee /var/lib/wpa/wpa_supplicant.conf + wpa_supplicant -B -c /var/lib/wpa/wpa_supplicant.conf -i $wireless_interface + dhclient $wireless_interface + else + echo "No wireless network interface found." + fi ``` 2. Create an empty **meta-data** file: From fad1700c3b82b7a55552d2ffa1c034dd47d50bbd Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Tue, 7 May 2024 08:05:18 -0700 Subject: [PATCH 2/4] fix indentation --- .../site-installation/site-user-data.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md index c7f4672013..06c5b23f40 100644 --- a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md +++ b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md @@ -77,22 +77,24 @@ to a bootable device, such as a USB stick. 3. Create an ISO using the following command. - + + ```shell mkisofs -output site-user-data.iso -volid cidata -joliet -rock user-data meta-data ``` - + - + ```shell genisoimage -output site-user-data.iso -volid cidata -joliet -rock user-data meta-data ``` - + + This generates an ISO file called **site-user-data.iso** in the current directory. From d0f8b84bafd6591219289fdd90d938233ff49607 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Tue, 7 May 2024 08:10:28 -0700 Subject: [PATCH 3/4] indentation --- .../edge/site-deployment/site-installation/site-user-data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md index 06c5b23f40..d3ba596c26 100644 --- a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md +++ b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md @@ -34,7 +34,7 @@ to a bootable device, such as a USB stick. ``` For example, you can include the following content in the **user-data** file to connect your Edge host to Wi-Fi. - Replace `wifi-network-name` with the name of your Wifi network and the `wifi-password` with the password of your + Replace `wifi-network-name` with the name of your Wi-Fi network and the `wifi-password` with the password of your network. This requires wpa_supplicant to be included in your base OS image. For more information, refer to [Connect Intel NUC Edge Host to Wifi](../../networking/connect-wifi.md). @@ -97,7 +97,7 @@ to a bootable device, such as a USB stick. -This generates an ISO file called **site-user-data.iso** in the current directory. + This generates an ISO file called **site-user-data.iso** in the current directory. 4. Flash your bootable device such as a USB drive with the ISO file you just created. From 907ccd6fb1cc4aa84ca4d583b2a811387acdd624 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Tue, 7 May 2024 08:52:05 -0700 Subject: [PATCH 4/4] fix identation issues --- .../palette-canvos/build-provider-images.md | 45 +++++++------------ .../site-installation/site-user-data.md | 30 ++++++------- 2 files changed, 31 insertions(+), 44 deletions(-) diff --git a/docs/docs-content/clusters/edge/edgeforge-workflow/palette-canvos/build-provider-images.md b/docs/docs-content/clusters/edge/edgeforge-workflow/palette-canvos/build-provider-images.md index f53f321f52..7654ad717a 100644 --- a/docs/docs-content/clusters/edge/edgeforge-workflow/palette-canvos/build-provider-images.md +++ b/docs/docs-content/clusters/edge/edgeforge-workflow/palette-canvos/build-provider-images.md @@ -80,20 +80,7 @@ artifacts at the same time. - **earthly.sh** - Script to invoke the Earthfile, and generate target artifacts. -6. Review the **.arg** file containing the customizable arguments, such as image tag, image registry, image repository, - and OS distribution. The table below shows all arguments, their default value, and allowed values. - - | **Argument** | **Description** | **Default Value** | **Allowed Values** | - | ------------------ | ------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------- | - | `CUSTOM_TAG` | Tag for the provider images | demo | Lowercase alphanumeric string without spaces. | - | `IMAGE_REGISTRY` | Image registry name | ttl.sh | Your image registry hostname, without `http` or `https`
Example: docker.io/spectrocloud | - | `OS_DISTRIBUTION` | OS Distribution | ubuntu | ubuntu, opensuse-leap | - | `IMAGE_REPO` | Image repository name.
It is the same as the OS distribution. | `$OS_DISTRIBUTION` | Your image repository name. | - | `OS_VERSION` | OS version, only applies to Ubuntu | 22.04 | 20, 22.04 | - | `K8S_DISTRIBUTION` | Kubernetes Distribution | k3s | k3s, rke2, kubeadm | - | `ARCH` | Architecture of the image. | `amd64` | `amd64`, `arm64` | - -7. Issue the command below to assign an image tag value that will be used when creating the provider images. This guide +6. Issue the command below to assign an image tag value that will be used when creating the provider images. This guide uses the value `palette-learn` as an example. However, you can assign any lowercase and alphanumeric string to the `CUSTOM_TAG` argument. @@ -101,24 +88,26 @@ artifacts at the same time. export CUSTOM_TAG=palette-learn ``` -8. Use the command below to save the Docker Hub image registry hostname in the `IMAGE_REGISTRY` argument. Before you - execute the command, replace `[DOCKER-ID]` in the declaration below with your Docker ID. Your image registry hostname +7. Use the command below to save the image registry hostname in the `IMAGE_REGISTRY` argument. Before you execute the + command, replace `[REGISTRY-HOSTNAME]` in the declaration below with your Docker ID. Your image registry hostname must comply with standard DNS rules and may not contain underscores. ```bash - export IMAGE_REGISTRY=docker.io/[DOCKER-ID] + export IMAGE_REGISTRY=[REGISTRY-HOSTNAME] ``` -9. Issue the following command to use the Ubuntu OS distribution and use the 22.04 version. +8. Issue the following command to use the Ubuntu OS distribution and use the 22.04 version. ```bash export OS_DISTRIBUTION=ubuntu export OS_VERSION=22.04 ``` -10. Issue the command below to create the **.arg** file containing the custom tag, Docker Hub image registry hostname, - and openSUSE Leap OS distribution. The **.arg** file uses the default values for the remaining arguments. You can - refer to the existing **.arg.template** file to learn more about the available customizable arguments. +9. Open the **Earthfile** in the CanvOS directory. Under `build-provider-images`, remove the lines containing Kubernetes + versions that you do not need. + +10. Issue the command below to create an **.arg** file. The **.arg** file uses the default values for the remaining + arguments. ```bash cat << EOF > .arg @@ -136,10 +125,9 @@ artifacts at the same time. EOF ``` -11. Open the **Earthfile** in the CanvOS directory. Under `build-provider-images`, remove the lines containing - Kubernetes versions that you do not need. + Refer to [Edge Artifact Build Configurations](./arg.md) for all available arguments. -12. CanvOS utility uses [Earthly](https://earthly.dev/) to build the target artifacts. Issue the following command to +11. CanvOS utility uses [Earthly](https://earthly.dev/) to build the target artifacts. Issue the following command to start the build process. ```bash @@ -152,19 +140,18 @@ artifacts at the same time. Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev. ``` -13. To use the provider images in your cluster profile, push them to your image registry mentioned in the **.arg** file. +12. To use the provider images in your cluster profile, push them to your image registry mentioned in the **.arg** file. Issue the following command to log in to Docker Hub. Provide your Docker ID and password when prompted. ```bash docker login ``` -14. Use the following commands to push the provider images to the Docker Hub image registry you specified. Replace the - `[DOCKER-ID]` and version numbers in the command below with your Docker ID and respective Kubernetes versions that - the utility created. +13. Use the following commands to push the provider images to the Docker Hub image registry you specified. Replace the + `[REGISTRY-HOSTNAME]` and version numbers in the command below. ```bash - docker push docker.io/[DOCKER-ID]/ubuntu:k3s-1.28.2-v4.3.0-palette-learn + docker push [REGISTRY-HOSTNAME]/ubuntu:k3s-1.28.2-v4.3.0-palette-learn ``` ## Validate diff --git a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md index d3ba596c26..a450b70328 100644 --- a/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md +++ b/docs/docs-content/clusters/edge/site-deployment/site-installation/site-user-data.md @@ -77,41 +77,41 @@ to a bootable device, such as a USB stick. 3. Create an ISO using the following command. - + - + ```shell mkisofs -output site-user-data.iso -volid cidata -joliet -rock user-data meta-data ``` - + - + ```shell genisoimage -output site-user-data.iso -volid cidata -joliet -rock user-data meta-data ``` - + - + This generates an ISO file called **site-user-data.iso** in the current directory. -4. Flash your bootable device such as a USB drive with the ISO file you just created. +4. Flash your bootable device such as a USB drive with the ISO file you just created. - :::info + :::info - You can use several software tools to create a bootable USB drive, such as - [balenaEtcher](https://www.balena.io/etcher). For a PXE server, there are open-source projects such as - [Fog](https://fogproject.org/download) or - [Windows Deployment Services](https://learn.microsoft.com/en-us/windows/deployment/wds-boot-support) for Windows. + You can use several software tools to create a bootable USB drive, such as + [balenaEtcher](https://www.balena.io/etcher). For a PXE server, there are open-source projects such as + [Fog](https://fogproject.org/download) or + [Windows Deployment Services](https://learn.microsoft.com/en-us/windows/deployment/wds-boot-support) for Windows. - ::: + ::: -5. Once the Edge host arrives at the physical site. Load the USB drive to the Edge host before powering it on. The Edge - Installer will apply the new user data during the installation process. +5. Once the Edge host arrives at the physical site. Load the USB drive to the Edge host before powering it on. The Edge + Installer will apply the new user data during the installation process. ## Validate