Skip to content

Commit

Permalink
Posts: Add new posts
Browse files Browse the repository at this point in the history
  • Loading branch information
SchoolGuy committed Jul 7, 2023
1 parent ee13e36 commit ea2c41f
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 0 deletions.
129 changes: 129 additions & 0 deletions _posts/2023/2023-02-15-cobbler-inside-libvirt-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
layout: post
title: Cobbler inside libvirt (1)
author: Enno
summary: Cobbler inside libvirt with a private libvirt network
---

The last blog post that was neither a roadmap update or a release announcement was in december of 2020. Thus it is time
to give you guys a new guide!

This time we will together explore how to use Cobbler to enable a libvirt internal network to boot over the network.
The guide will assume you have a running host OS and libvirt installed and running already. As a guest OS I will use
openSUSE Tumbleweed but any other guest OS should work equally good.

In case you have libvirt not installed please consult your OS vendors resources to do so. A few examples:

- [openSUSE](https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/part-virt-libvirt.html)
- [Fedora](https://developer.fedoraproject.org/tools/virtualization/installing-libvirt-and-virt-install-on-fedora-linux.html)
- [Ubuntu](https://ubuntu.com/server/docs/virtualization-libvirt)

Note:

> There will be a second part of this guide where we will utilize a network bridge to also boot real hardware with our
> VM based Cobbler setup.
Information:

> Depending on your setup you may need to prefix the `virsh` and other commands with `sudo`.
1. Create libvirt network for Cobbler (don't use the network `default`).
```xml
<network>xml
<name>cobbler</name>
<uuid>6b7f4f36-7895-4b74-8be6-dfa4b2b84500</uuid>
<forward mode='nat'/>
<bridge name='virbr2' stp='on' delay='0'/>
<mac address='52:54:00:fb:72:57'/>
<domain name='cobbler.local'/>
<dns enable='no'/>
<ip family='ipv4' address='10.17.3.1' prefix='24'>
</ip>
</network>
```
2. Download the openSUSE Tumbleweed ISO and move it to your desired libvirt storage pool (below I show the default
location):
```
wget https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-NET-x86_64-Current.iso
mv openSUSE-Tumbleweed-NET-x86_64-Current.iso /var/lib/libvirt/images
```
3. Setup the guest. An example for a guide can be found [in the openSUSE Documentation](https://doc.opensuse.org/documentation/leap/virtualization/html/book-virtualization/cha-kvm-inst.html#sec-libvirt-inst-vmm).
4. Login into the guest either via SSH or if you are using `virt-manager` using the GUI.
5. `zypper in cobbler` (atm 3.3.3)
6. Shutdown the VM from the host
```
virsh shutdown "<vm name>"
```
or if you are logged into the guest use
```
systemctl poweroff
```
7. Add a second network to the guest. Use the network defined in step 1.
8. Start the VM again use the UI of `virt-manager` or use
```
virsh start "<vm name>"
```
9. Log into the VM after it started using SSH (easier to copy & paste between host and guest).
```
ssh [email protected]
```
10. Setup the secondary network interface that is inside the network that Cobbler is managing:
```
ip a add 10.17.3.2/24 dev eth1
ip link set dev eth1 up
ip route add 10.17.3.0/24 via 10.17.3.1
```
You will need to adjust the name of the interface `eth1` to the interface that doesn't belong to the default NAT
network.
11. Edit Cobbler settings to match IP on guest (and thus subnet):
```yml
server: 10.17.3.2
next_server_v4: 10.17.3.2
manage_dhcp: true
manage_dhcp_v4: true
```
12. Restart Cobbler
```
systemctl restart cobblerd
```
13. Download the openSUSE Leap image (or any other full DVD ISO) inside the Cobbler VM:
```
wget https://download.opensuse.org/distribution/leap/15.4/iso/openSUSE-Leap-15.4-DVD-x86_64-Media.iso
```
14. Mount the ISO to a reasonable directory:
```
mkdir -p /mnt/cobbler-isos/leap-15-4
mount -o loop /root/openSUSE-Leap-15.4-DVD-x86_64-Media.iso /mnt/cobbler-isos/leap-15-4
```
15. Use `cobbler import` to automate setting up a distro and profile:
```
cobbler import --name="openSUSE-Leap-15-4" --path="/mnt/cobbler-isos/leap-15-4/"
```
16. Setup an emtpy VM - no installation media required. Make note of the MAC address of the VM.
17. Add the system to Cobbler:
```
cobbler system add --name="testsystem" --profile="openSUSE-Leap-15-4-x86_64" --mac="<your mac here>" --ip="10.17.3.20"
```
18. Generate the bootloaders and sync them into the TFTP Tree
```
cobbler mkloaders && cobbler sync
```
19. Profit

To clean up after your experiments there are only a couple of commands needed:

```
virsh destroy <vm name> && virsh destroy <second vm name> && virsh net-destroy cobbler
```
Further topics:
- Write autoinstall snippets for your setups
- Setup Windows Guests
- Don't forget to set netboot_enabled to `False`
---
P.S.: In case your find typos and/or grammar mistakes just
[open an Issue](https://github.com/cobbler/cobbler.github.io/issues/new) or
[open a PR](https://github.com/cobbler/cobbler.github.io/compare).
61 changes: 61 additions & 0 deletions _posts/2023/2023-02-15-roadmap-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
layout: post
title: Cobbler Roadmap Update
author: Enno
summary: Status of the current roadmap
---

> TLDR: The current roadmap can be found [here](https://github.com/cobbler/cobbler/wiki/Roadmap)
A new year requires a new Roadmap update. This time there are no changes in the roadmap itself, just in the date of
delivery.

## Server

### 3.4.0

Due to the extensive performance problems the project teams wants to reindroduce the internal Cache of Cobbler, to speed
things up from an end-user perspective. This cache however is not trivial to implement and thus the release 3.4.0 is
still in development. We are getting there but at the time of writing there are still
[16 open issues](https://github.com/orgs/cobbler/projects/2/views/4) for the milestone.

Please be aware that after all issues are done we will not tag the release but we will instead implement the WebUI and
Golang CLI (with its client). After that we will test the integration of all components and only if the quality is
satisfactory, we will tag 3.4.0.

### 3.3.4

Although in the [GH project](https://github.com/orgs/cobbler/projects/2/views/8) no progress is visible, the
[SUSE Manager](https://www.suse.com/de-de/solutions/manager/) development team is currently working to stabalize the
release and afterwards provide 3.3.4 for the community. However atm this stablization phase is not finished and thus it
will take a while. No exact dates have been confirmed for this release yet.

### 3.2.3

After the currently two open PRs are merged we can release the version and hopefully close the chapter of 3.2.x for
good.

Progress can be monitored [here](https://github.com/orgs/cobbler/projects/2/views/3).

## cobblerclient

Here we have hit a temporary roadblock sadly due to
[a problem with implementing inheritance](https://github.com/cobbler/cobblerclient/issues/4#issuecomment-1402503157).
The problem will get solved after there are is no more work done on the Cobbler server part.

## Golang CLI

This is purely dependant on the cobblerclient and thus no progress has been made in the last months sadly.

## Web Interface

The Web UI is still lacking a dedicated maintainer and thus no work could be done on the repository. Thus it needs to
wait until the server side work for 3.4.0 is completed. After that the project team will work finishing up the
implementation of the XML-RPC Typescript API Client for the Angular webinterface. After that the user noticable changes
will start to slowly appear.

---

P.S.: In case your find typos and/or grammar mistakes just
[open an Issue](https://github.com/cobbler/cobbler.github.io/issues/new) or
[open a PR](https://github.com/cobbler/cobbler.github.io/compare).
27 changes: 27 additions & 0 deletions _posts/2023/2023-02-16-cobbler-inside-libvirt-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: post
title: Cobbler inside libvirt (2)
author: Enno
summary: Cobbler inside libvirt with a network bridge
---

- Assume part 1 is read
- Assume DHCP is handled externally
- Setup libvirt bridge
- Install guest OS
- Install Cobbler
- Do settings to match IP range
- Restart Cobbler
- Add SSH keys
- Login from host via SSH
- wget leap DVD ISO
- cobbler import
- cobbler system add
- cobbler sync
- Setup emtpy VM with bridge network

---

P.S.: In case your find typos and/or grammar mistakes just
[open an Issue](https://github.com/cobbler/cobbler.github.io/issues/new) or
[open a PR](https://github.com/cobbler/cobbler.github.io/compare).

0 comments on commit ea2c41f

Please sign in to comment.