Mit den vorhanden Infos ist es gelungen, ein generic 4.1 docker image auf 4.2 upzugraden, ohne es vorher zu konfigurieren -> universal install-tar-ball für docker und LXC ohne Rollenzuweisung
#Vorgehensweise:
Vorbereitung:
- start eines ucs-generic-4.1 dockercontainers (auf dem host)
wie hier beschrieben: docker image
- aktualisierung des containers: (betreten des Containers)
univention-upgrade --noninteractive```
3. reinstallation des setup-wizards
``apt-get install --no-install-recommends univention-system-setup-boot
apt-get clean``
4. zurücksetzen der Konfiguration, aufruf des SetupWizards beim nächsten boot und verlassen des Containers
``univention-system-setup-boot start
exit``
5. container anhalten & exportieren als tar-ball. (auf dem Host)
``docker stop dockertest_container
docker export -o ucs-generic-4.2-0.tar dockertest_container``
## LX-Container einrichten:
* LXC erstellen
``mkdir -p /var/lib/lxc/ucs42/
btrfs sub cr /var/lib/lxc/ucs42/rootfs``
(mit BTRFS als FS des Hostes, ansonsten ```mkdir /var/lib/lxc/ucs42/rootfs``` und die entsprechende Zeile aus der config nehmen)
* Config erstellen
cat << EOF>> /var/lib/lxc/ucs42/config
configuration - br0 - internal
lxc.network.type = veth
lxc.network.hwaddr = 00:16:3e:27:42:b0
lxc.network.link = br0
lxc.network.flags = up
configuration - br1 - external
#lxc.network.type = veth
#lxc.network.hwaddr = 00:16:3e:27:42:b1
#lxc.network.link = br1
#lxc.network.flags = up
lxc.rootfs = /var/lib/lxc/mab42/rootfs
Only with BTRFS as Host-FS
lxc.rootfs.backend = btrfs
Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.include = /usr/share/lxc/config/debian.jessie.conf
Container specific configuration
lxc.tty = 4
lxc.utsname = ucs42
lxc.arch = amd64
lxc.start.auto = 0
EOF
* tarball ins rootfs entpacken
``tar xf ucs-generic-4.2-0.tar -C /var/lib/lxc/ucs42/rootfs``
* minimale konfiguration der UCR
HOST=ucs42
DOMAIN=privat.domain
ucr set interfaces/eth0/address=192.168.33.22
ucr set interfaces/eth0/netmask=255.255.255.0
ucr set interfaces/eth0/broadcast=192.168.33.255
ucr set interfaces/eth0/network=192.168.33.0
ucr set interfaces/eth0/type=static
ucr set interfaces/primary=eth0
ucr set gateway=192.168.33.1
ucr set nameserver1=192.168.33.22
ucr set dns/forwarder1=192.168.33.1
ucr set hostname=$HOST
ucr set domainname=$DOMAIN
ucr set appcenter/docker=false
ucr set system/setup/boot/force/fqdn=$HOST.$DOMAIN
rm -rf /etc/univention/ssl/dockertest_container*
a2dissite default-ssl
service apache2 restart
* Per WebWizard konfigurieren