Skip to content

Commit 565cf15

Browse files
committed
Ubutnu guide final edits
1 parent b314bd6 commit 565cf15

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

_posts/2024-12-11-Cobbler-v3.3.7-Ubuntu-Deployment-Guide.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ Starting where the [Beginner's guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/
2626

2727
- Despite my efforts (and unlike the [Beginner's Guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/)) **Ubuntu 20.04 PXE clients will require an internet connection** at the time of installation, since the `fallback: offline-install` option is not available in that version's `cloud-init` implementation and was only introduced as of [Ubuntu 22.04 release](https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668)..
2828

29+
- Also unlike my [other](blog/2024/Cobbler-v3.3.7-Debian-Deployment-Guide/) [guides](https://sus-admin.github.io/blog/2024/Cobbler-v3.3.7-OpenSUSE-Deployment-Guide/), this PXE deployment will use the installation media (ISO file) instead of a repo mirror when installing the target OS *(except for Ubuntu 20.04, however it still requires to use the ISO file in PXE process, so it's very similar and consistent)*, so even though the distribution will be imported as usual, it's important to make the ISO file available over HTTP as well.
30+
2931
## Cobbler Server Prep
3032

31-
Cobbler v3.3.7 does not come with a sample template for the `cloud-init` autoinstall files, so create that before getting started, as well as some Cobbler sync-triggers to correct the bootloader configurations for compatability with `cloud-init`.
33+
Cobbler v3.3.7 does not come with a sample template for the `cloud-init` autoinstall files, so create those before getting started, as well as some Cobbler sync-triggers to correct the bootloader configurations for compatability with `cloud-init`.
3234

3335
### Dependencies
3436

@@ -57,7 +59,7 @@ Create the new Cobbler template and snippets necessary to generate the `cloud-in
5759

5860
> The above section should resemble the standard [netplan](https://netplan.readthedocs.io/en/latest/netplan-yaml/) YAML configuration file for Ubuntu once generated.
5961
>
60-
> **Assumptions:** For automated Cobbler System deployments (not Profiles...), each system interface defined should have the corresponding MAC address defined, a standard requirement in Cobbler. Less intuitively, this solution only adds DNS servers to static interfaces with an IP address defined, since DNS servers are set per-system in Cobbler, but per-interface in Ubuntu cloud-init/netplan; the above snippet will revert any interface to DHCP if it is set to static but has no IP defined.
62+
> **Assumptions:** For automated Cobbler System deployments (not Profiles...), each system interface defined should have the corresponding MAC address defined (a standard requirement in Cobbler). Less intuitively, this solution only adds DNS servers to static interfaces with an IP address defined, since DNS servers are set per-system in Cobbler, but per-interface in Ubuntu cloud-init/netplan; the above snippet will revert any interface to DHCP if it is set to static but has no IP defined.
6163
6264
Create 2 Cobbler sync-triggers to correct the GRUB and PXELINUX boot configurations to support Ubuntu `cloud-init` installations, which will run each time the `cobbler sync` action is performed:
6365

@@ -93,13 +95,17 @@ cd ~/Downloads && wget https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-ser
9395
```
9496
## Ubuntu 20.04 PXE Deployment
9597

96-
Mount the Ubuntu 20.04 live server installer and import to Cobbler, then copy the installation media to the public HTTP share
98+
Mount the Ubuntu 20.04 live server installer and import to Cobbler
9799

98100
```shell
99101
[ -d /mnt/Ubuntu] || mkdir /mnt/Ubuntu
100102
mount -t iso9660 -o loop,ro ~/Downloads/ubuntu-20.04.6-live-server-amd64.iso /mnt/Ubuntu
101103
cobbler import --name Ubuntu20 --path /mnt/Ubuntu
104+
```
105+
106+
Copy the installation media to the public HTTP share *(The location of this file will be used in the kernel-options for relavent Cobbler Distros/Profiles/Systems)*
102107

108+
```shell
103109
mkdir -p /var/www/cobbler/pub/cloud-init/Ubuntu20
104110
cp ~/Downloads/ubuntu-20.04.6-live-server-amd64.iso /var/www/cobbler/pub/cloud-init/Ubuntu20/.
105111
```
@@ -142,7 +148,7 @@ NAME="Ubuntu20-auto" && cobbler system add --name $NAME --profile Ubuntu20-caspe
142148
> cobbler system add --name Ubuntu20 --profile Ubuntu20-casper-x86_64 --kernel-options 'root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://10.0.0.10/cblr/pub/cloud-init/Ubuntu20/ubuntu-20.04.6-live-server-amd64.iso autoinstall cloud-config-url=/dev/null' --mac-address "aa:bb:cc:dd:ee:ff"
143149
> ```
144150
145-
Finally, sync up Cobbler, then the **PXE Client** VM can be powered on and should automatically boot to PXE and install Ubuntu 20.04 to the VM HDD using the "Ubuntu20_cloud-init_user-data" *cloud-init* template created above.
151+
Finally, sync up Cobbler, then the **PXE Client** VM can be powered on and should automatically boot to PXE and install Ubuntu 20.04 to the VM HDD using the "Ubuntu20_cloud-init_user-data" `cloud-init` template created above.
146152
147153
- The resulting system will have the `root` super-user account disabled, and will only be accessible with the `ubuntu` user specified in the *cloud-init* config file.
148154
@@ -257,6 +263,8 @@ cobbler sync
257263

258264
1. More info on `cloud-init`
259265

266+
-
267+
260268
- [https://cloudinit.readthedocs.io/en/22.1_a/topics/modules.html](https://cloudinit.readthedocs.io/en/22.1_a/topics/modules.html)
261269

262270
- [https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html](https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html)

0 commit comments

Comments
 (0)