diff --git a/Documentation/Auto_install_ubuntu_iso.md b/Documentation/Auto_install_ubuntu_iso.md new file mode 100644 index 0000000..0ae59ef --- /dev/null +++ b/Documentation/Auto_install_ubuntu_iso.md @@ -0,0 +1,173 @@ +# Ubuntu Autoinstall ISO Guide + +This guide explains how to create a custom autoinstall ISO for Ubuntu live server with pre-configured installation options. + +## Reference Documentation + +- **Ubuntu AutoInstall Documentation**: [Ubuntu AutoInstall Documentation](https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html) + +## Prerequisites + +Install the following packages: + +- **7z**: For unpacking the source ISO, including partition images. + + ```bash + sudo apt install p7zip + ``` + +- **wget**: To download the latest daily build of the Ubuntu 22.04 server ISO. + + ```bash + sudo apt install wget + ``` + +- **xorriso**: For building the autoinstall custom ISO. + + ```bash + sudo apt install xorriso + ``` + +## Step-by-Step Guide + +### Step 1: Move to the ISO Files directory and download the required version of Ubuntu + +```bash +cd ~/lab/ansible/iso_files +mkdir source-files +wget https://releases.ubuntu.com/jammy/ubuntu-22.04.5-live-server-amd64.iso +``` + +From here on stay in the iso_files directory for all the rest of the commands. + +### Step 2: Extract the ISO contents + +Use 7z to unpack the ISO. It will extract MBR and EFI partition images automatically. + +```bash +7z -y x ubuntu-22.04.5-live-server-amd64.iso -osource-files +``` + +### Step 3: Move the [BOOT] directory for easier access + +```bash +cd source-files +mv '[BOOT]' ../BOOT +cd .. +``` + +### Step 4: Edit the ISO grub.cfg File + +Open **source-files/boot/grub/grub.cfg** and add the following menu entry above the existing ones (it should be the first menuentry option). + +This option will be shown during the Booting process and be automatically selected in 30 seconds, if there is no input from the user. +![Booting Menu](../images/os-install/dell/BootMenu.png) + +```bash +menuentry "Autoinstall Ubuntu Server" { +set gfxpayload=keep +linux /casper/vmlinuz quiet autoinstall ds=nocloud\;s=/cdrom/server/ --- +initrd /casper/initrd +} +``` + +Now, your grub.cfg file should look like ![this](../images/os-install/dell/GrubFile.png) + +### Step 5: Create a directory for auto-install configuration files + +This directory will hold the user-data and meta-data files required to build the auto-install iso + +```bash +mkdir source-files/server +``` + +### Step 6: Add an empty meta-data file (cloud-init requires its presence) + +```bash +touch source-files/server/meta-data +``` + +### Step 7: Create a user-data file + +This file will contain the auto-install user configuration. You can add your own settings here. + +The below are the current settings(user-data) that we are using, you can refer to the Ubuntu Autoinstall documentation for more details. + +```bash +autoinstall: +version: 1 +early-commands: + - ["cat", "/autoinstall.yaml"] +refresh-installer: + update: yes +apt: + preserve_sources_list: false + mirror-selection: + primary: + - country-mirror + - uri: "http://archive.ubuntu.com/ubuntu" + arches: [i386, amd64] + - uri: "http://ports.ubuntu.com/ubuntu-ports" + arches: [s390x, arm64, armhf, powerpc, ppc64el, riscv64] + fallback: abort + geoip: true + sources: + git-ppa: + source: ppa:git-core/ppa +identity: + hostname: opi + password: "hashedpassword" + realname: opi + username: opi +keyboard: + layout: us + toggle: "" + variant: "" +locale: en_US +ssh: + allow-pw: true + authorized-keys: [] + install-server: true +storage: + layout: + name: lvm + match: + size: largest +late-commands: + - 'echo ''APT::Install-Recommends "false";'' >/target/etc/apt/apt.conf.d/02InstallRecommends' +``` + +Under the Identity section, we need to provide a hashed password, which can be done using the following commands + +```bash +openssl passwd -6 +``` + +This will prompt you to enter a password, which will be hashed and displayed. You can then copy it to the autoinstall user-data file above. + +### Step 8: Generate the Custom Ubuntu 22.04 Autoinstall ISO + +To generate the custom Ubuntu 22.04 autoinstall ISO, you can use the following command + +```bash +cd source-files + +xorriso -as mkisofs -r \ +-V 'Ubuntu 22.04 LTS AUTO (EFIBIOS)' \ +-o ../ubuntu-22.04-autoinstall.iso \ +--grub2-mbr ../BOOT/1-Boot-NoEmul.img \ +-partition_offset 16 \ +--mbr-force-bootable \ +-append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b ../BOOT/2-Boot-NoEmul.img \ +-appended_part_as_gpt \ +-iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 \ +-c '/boot.catalog' \ +-b '/boot/grub/i386-pc/eltorito.img' \ + -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \ +-eltorito-alt-boot \ +-e '--interval:appended_partition_2:::' \ +-no-emul-boot \ +. +``` + +This will create a new autoinstall iso with the name: **ubuntu-22.04-autoinstall.iso**, that can be used for installation. diff --git a/Documentation/bom.md b/Documentation/bom.md index baad513..0f5ec00 100644 --- a/Documentation/bom.md +++ b/Documentation/bom.md @@ -60,7 +60,7 @@ another table probably needed to include the actual deployment info: ## Phase 1 testbed diagram -![xPU Rack phase 1](./images/opi-rack-phase1.svg) +![xPU Rack phase 1](../images/opi-rack-phase1.svg) ## Phase 1 bill of materials diff --git a/Documentation/idrac_os_installation_steps_network.md b/Documentation/idrac_os_installation_steps_network.md index 058ddfa..920bb0b 100644 --- a/Documentation/idrac_os_installation_steps_network.md +++ b/Documentation/idrac_os_installation_steps_network.md @@ -23,7 +23,7 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Open a web browser and enter the iDRAC IP address in the address bar. For example: `https://`. 3. Log in using the iDRAC credentials. -![Step 1 - Access iDRAC9](./images/os-install/dell/Login.png) +![Step 1 - Access iDRAC9](../images/os-install/dell/Login.png) ### Step 2: Connect the Remote File Sharing to iDRAC @@ -33,27 +33,27 @@ This outlines the detailed steps to install an Operating System(OS) on a server 4. Once you have successfully filled out the parameters, click on connect and you will be able to see if iDRAC is able to connect or not. 5. Incase iDRAC is not able to access the ISO file, it shows an error to enter the correct details. -![Step 2.1 - Configuration / Virtual Media](./images/os-install/dell/VirtualMediaConsole.png) +![Step 2.1 - Configuration / Virtual Media](../images/os-install/dell/VirtualMediaConsole.png) -![Step 2.2 - Remote File Share](./images/os-install/dell/RemoteShare.png) +![Step 2.2 - Remote File Share](../images/os-install/dell/RemoteShare.png) -![Step 2.3 - Remote File Share Success](./images/os-install/dell/RemoteSuccess.png) +![Step 2.3 - Remote File Share Success](../images/os-install/dell/RemoteSuccess.png) -![Step 2.4 - Remote File Share Error](./images/os-install/dell/RemoteError.png) +![Step 2.4 - Remote File Share Error](../images/os-install/dell/RemoteError.png) ### Step 3: Launch the Virtual Console 1. From the iDRAC dashboard, navigate and launch the **Virtual Console** from the bottom right of the iDRAC dashboard and ensure you have the browser popups turned on. 2. This will open a new window with the server's user interface, and a couple of controls. -![Step 3 - Launch Virtual Console](./images/os-install/dell/Console.png) +![Step 3 - Launch Virtual Console](../images/os-install/dell/Console.png) ### Step 4: Configure Boot Settings 1. In the Virtual Console window, select **Boot** from the top menu bar. 2. Under the **Boot Controls**, set the virtual CD/DVD drive as the primary boot option. This ensures that the server boots from the mounted OS ISO. -![Step 4 - Configure Boot Settings](./images/os-install/dell/BootOrder.png) +![Step 4 - Configure Boot Settings](../images/os-install/dell/BootOrder.png) ### Step 5: Reboot the Server @@ -61,14 +61,14 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Select **Reset System (warm reboot)**. 3. Confirm the reboot by clicking **OK**. -![Step 5 - Reboot the Server](./images/os-install/dell/Reboot.png) +![Step 5 - Reboot the Server](../images/os-install/dell/Reboot.png) ### Step 6: Boot into the OS Installer 1. During the server boot, monitor the Virtual Console window. 2. Once the server starts, it should boot into the mounted OS ISO and display the OS installation menu. -![Step 6 - Boot into OS Installer](./images/os-install/dell/OSBoot.png) +![Step 6 - Boot into OS Installer](../images/os-install/dell/OSBoot.png) ### Step 7: Follow the OS Installation Steps @@ -86,4 +86,4 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Once the OS is installed, remember to **disconnect** the network file share by going into the **Virtual Media console** as mentioned in Step 2 and under **Remote File Share**, click **Disconnect**. 3. Reboot the System. -![Step 7 - OS Installation Steps](./images/os-install/dell/Installation.png) +![Step 7 - OS Installation Steps](../images/os-install/dell/Installation.png) diff --git a/Documentation/idrac_os_installation_steps_virtual_media.md b/Documentation/idrac_os_installation_steps_virtual_media.md index 03123a0..505dd16 100644 --- a/Documentation/idrac_os_installation_steps_virtual_media.md +++ b/Documentation/idrac_os_installation_steps_virtual_media.md @@ -22,14 +22,14 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Open a web browser and enter the iDRAC IP address in the address bar. For example: `https://`. 3. Log in using the iDRAC credentials. -![Step 1 - Access iDRAC9](./images/os-install/dell/Login.png) +![Step 1 - Access iDRAC9](../images/os-install/dell/Login.png) ### Step 2: Launch the Virtual Console 1. From the iDRAC dashboard, navigate and launch the **Virtual Console** from the bottom right of the iDRAC dashboard and ensure you have the browser popups turned on. 2. This will open a new window with the server's user interface, and a couple of controls. -![Step 2 - Launch Virtual Console](./images/os-install/dell/Console.png) +![Step 2 - Launch Virtual Console](../images/os-install/dell/Console.png) ### Step 3: Mount the OS ISO @@ -38,16 +38,16 @@ This outlines the detailed steps to install an Operating System(OS) on a server 3. Click **Map CD/DVD** and select the Operating System ISO file from your local system and map the device. 4. Under the Virtual Media Statistics, you will be able to find the Read/Write status, wait until the entire ISO file is read completely, i.e., ~1 hour (until there is no change in the file size). -![Step 3.1 - Mount OS ISO](./images/os-install/dell/ConnectVirtualMedia.png) +![Step 3.1 - Mount OS ISO](../images/os-install/dell/ConnectVirtualMedia.png) -![Step 3.2 - Wait Until OS ISO File is loaded](./images/os-install/dell/VirtualMediaStatistics.png) +![Step 3.2 - Wait Until OS ISO File is loaded](../images/os-install/dell/VirtualMediaStatistics.png) ### Step 4: Configure Boot Settings 1. In the Virtual Console window, select **Boot** from the top menu bar. 2. Under the **Boot Controls**, set the virtual CD/DVD drive as the primary boot option. This ensures that the server boots from the mounted OS ISO. -![Step 4 - Configure Boot Settings](./images/os-install/dell/BootOrder.png) +![Step 4 - Configure Boot Settings](../images/os-install/dell/BootOrder.png) ### Step 5: Reboot the Server @@ -55,14 +55,14 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Select **Reset System (warm reboot)**. 3. Confirm the reboot by clicking **OK**. -![Step 5 - Reboot the Server](./images/os-install/dell/Reboot.png) +![Step 5 - Reboot the Server](../images/os-install/dell/Reboot.png) ### Step 6: Boot into the OS Installer 1. During the server boot, monitor the Virtual Console window. 2. Once the server starts, it should boot into the mounted OS ISO and display the OS installation menu. -![Step 6 - Boot into OS Installer](./images/os-install/dell/OSBoot.png) +![Step 6 - Boot into OS Installer](../images/os-install/dell/OSBoot.png) ### Step 7: Follow the OS Installation Steps @@ -80,7 +80,7 @@ This outlines the detailed steps to install an Operating System(OS) on a server 2. Once the OS is installed, remember to **disconnect** the virtual media by selecting **Virtual Media** > **Disconnect Virtual Media**. 3. Reboot the System. -![Step 7 - OS Installation Steps](./images/os-install/dell/Installation.png) +![Step 7 - OS Installation Steps](../images/os-install/dell/Installation.png) ## Troubleshooting Tips diff --git a/Documentation/ips.md b/Documentation/ips.md index 31420e5..7015646 100644 --- a/Documentation/ips.md +++ b/Documentation/ips.md @@ -4,7 +4,7 @@ Proposal is to use 172.22.0.0/16 network for all ip addresing in the lab, and ha ## Code duplication -:exclamation: with [ansible inventory](./ansible/inventory) +:exclamation: with [ansible inventory](../ansible/inventory) ## Device types ip allocation diff --git a/Documentation/otel.md b/Documentation/otel.md index a2032ea..19d3fac 100644 --- a/Documentation/otel.md +++ b/Documentation/otel.md @@ -14,7 +14,7 @@ For example, Nvidia is using [Nvidia Doca Telemetry Service](https://docs.nvidia ### Configuration -Create `telegraf.conf` file, see example [here](./telegraf.d/telegraf.conf.bf2) +Create `telegraf.conf` file, see example [here](../telegraf.d/telegraf.conf.bf2) - change `172.22.0.1` in `outputs.opentelemetry` to the correct management server name/ip - change `192.168.240.1` and credentails to the internal DPU/IPU AMC/BMC for redfish collection diff --git a/Documentation/physical-testbed.md b/Documentation/physical-testbed.md index 46dd5cd..e0dc12b 100644 --- a/Documentation/physical-testbed.md +++ b/Documentation/physical-testbed.md @@ -2,4 +2,4 @@ ## Cabling diagram -![lab cabling diagram](./images/opi-lab-cabling.drawio.svg) +![lab cabling diagram](../images/opi-lab-cabling.drawio.svg) diff --git a/Documentation/server-setup.md b/Documentation/server-setup.md index 20a4a72..c212e3d 100644 --- a/Documentation/server-setup.md +++ b/Documentation/server-setup.md @@ -2,7 +2,7 @@ ## Automation -Then run the [playbook](./ansible) to automate all the lab steps: +Then run the [playbook](../ansible) to automate all the lab steps: ```bash ansible-playbook -i inventory site.yml diff --git a/images/os-install/dell/BootMenu.png b/images/os-install/dell/BootMenu.png new file mode 100644 index 0000000..7c6b5e6 Binary files /dev/null and b/images/os-install/dell/BootMenu.png differ diff --git a/images/os-install/dell/GrubFile.png b/images/os-install/dell/GrubFile.png new file mode 100644 index 0000000..272f11d Binary files /dev/null and b/images/os-install/dell/GrubFile.png differ