[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 6 commits: Adjust LTSP related DHCP options and statements for both subnet00 and subnet01

Wolfgang Schweer gitlab at salsa.debian.org
Wed Jun 17 14:59:01 BST 2020



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
6a308570 by Wolfgang Schweer at 2020-06-17T15:50:09+02:00
Adjust LTSP related DHCP options and statements for both subnet00 and subnet01
to be compliant with iPXE.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
12671100 by Wolfgang Schweer at 2020-06-17T15:50:57+02:00
cf3/cf.dhcpserver: link dhcpd.conf to the Debian Edu specific one.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
1037712f by Wolfgang Schweer at 2020-06-17T15:51:34+02:00
debian/debian-edu-config.enable-nat: use /srv/ltsp as new LTSP base dir.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
6cd35f86 by Wolfgang Schweer at 2020-06-17T15:52:26+02:00
Adjust share/debian-edu-config/tools/edu-ltsp-install

  Configure local excludes and services to be masked.
  Use static entry for the primary network interface and configure it.
  Configure NFS exports conditionally.
  Also set NAT for clients behind eth1 via LTSP.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
4f26f8a9 by Wolfgang Schweer at 2020-06-17T15:55:41+02:00
Exclude separate and additional LTSP servers from SquashFS image generation.

The host specific krb5.keytab file needs to be included in the image but isn't
yet available. (Procedure needs to be documented in the manual.)

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -
d305ce2f by Wolfgang Schweer at 2020-06-17T15:57:44+02:00
Add changelog entries for last commits.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


6 changed files:

- cf3/cf.dhcpserver
- debian/changelog
- debian/debian-edu-config.enable-nat
- ldap-bootstrap/gosa-server.ldif
- share/debian-edu-config/tools/edu-ltsp-install
- share/debian-edu-config/tools/run-at-firstboot


Changes:

=====================================
cf3/cf.dhcpserver
=====================================
@@ -3,7 +3,7 @@ bundle agent dhcpserver
 
 files:
 
-  debian.server.installation::
+  debian.(server|ltspserver).installation::
 
     "/etc/dhcp/dhcpd.conf"
       link_from => ln_s("/etc/dhcp/dhcpd-debian-edu.conf"),


=====================================
debian/changelog
=====================================
@@ -1,3 +1,22 @@
+debian-edu-config (2.11.27) UNRELEASED; urgency=medium
+
+  * Modify LTSP setup related configuration to support both separate and
+    additional LTSP servers.
+    - ldap-bootstrap/gosa-server.ldif: Adjust LTSP related DHCP options and
+      statements for both subnet00 and subnet01 to be compliant with iPXE.
+    - cf3/cf.dhcpserver: link dhcpd.conf to the Debian Edu specific one.
+    - debian/debian-edu-config.enable-nat: use /srv/ltsp as new LTSP base dir.
+    - share/debian-edu-config/tools/edu-ltsp-install:
+      + Configure local excludes and services to be masked.
+      + Use static entry for the primary network interface and configure it.
+      + Configure NFS exports conditionally.
+      + Also set NAT for clients behind eth1 via LTSP.
+    - share/debian-edu-config/tools/run-at-firstboot: Exclude separate LTSP
+      servers from SquashFS image generation; the host specific krb5.keytab file
+      needs to be included in the image but isn't yet available.
+
+ -- Wolfgang Schweer <wschweer at arcor.de>  Sat, 13 Jun 2020 11:44:07 +0200
+
 debian-edu-config (2.11.26) unstable; urgency=medium
 
   [ Wolfgang Schweer ]


=====================================
debian/debian-edu-config.enable-nat
=====================================
@@ -18,7 +18,7 @@ NETWORK_TO_NAT=
 OUTSIDE_IF=eth0
 
 # Only enable by default if LTSP is installed
-if [ -e /opt/ltsp ] ; then
+if [ -e /srv/ltsp ] ; then
     NETWORK_TO_NAT="192.168.0.0/24"
 fi
 


=====================================
ldap-bootstrap/gosa-server.ldif
=====================================
@@ -253,7 +253,7 @@ dhcpRange: 10.0.16.20 10.0.31.254
 
 # subnet00.intern shared network
 dn: cn=subnet00.intern,cn=dhcp,cn=tjener,ou=servers,ou=systems,dc=skole,dc=skolelinux,dc=no
-dhcpOption: routers ltspserver00.subnet00
+dhcpOption: routers 192.168.0.254
 dhcpOption: domain-name "intern"
 dhcpOption: subnet-mask 255.255.255.0
 dhcpOption: broadcast-address 192.168.0.255
@@ -263,8 +263,7 @@ dhcpOption: smtp-server postoffice
 dhcpOption: domain-name-servers 10.0.2.2
 dhcpStatements: default-lease-time 432000
 dhcpStatements: max-lease-time 432000
-dhcpStatements: filename "/var/lib/tftpboot/ltsp/$LTSPARCH/pxelinux.0"
-dhcpStatements: next-server ltspserver00.subnet00
+dhcpStatements: next-server 192.168.0.254
 dhcpStatements: authoritative
 dhcpStatements: allow unknown-clients
 dhcpStatements: allow bootp
@@ -285,18 +284,17 @@ dhcpRange: 192.168.0.20 192.168.0.253
 
 # subnet01.intern shared network
 dn: cn=subnet01.intern,cn=dhcp,cn=tjener,ou=servers,ou=systems,dc=skole,dc=skolelinux,dc=no
-dhcpOption: routers ltspserver01.subnet01
+dhcpOption: routers 192.168.1.254
 dhcpOption: domain-name "intern"
 dhcpOption: subnet-mask 255.255.255.0
 dhcpOption: broadcast-address 192.168.1.255
-dhcpOption: root-path "/opt/ltsp/$LTSPARCH"
 dhcpOption: ntp-servers ntp
 dhcpOption: wpad-url "http://wpad/wpad.dat"
 dhcpOption: smtp-server postoffice
 dhcpOption: domain-name-servers 10.0.2.2
 dhcpStatements: default-lease-time 432000
 dhcpStatements: max-lease-time 432000
-dhcpStatements: next-server ltspserver01.subnet01
+dhcpStatements: next-server 192.168.1.254
 dhcpStatements: authoritative
 dhcpStatements: allow unknown-clients
 dhcpStatements: allow bootp


=====================================
share/debian-edu-config/tools/edu-ltsp-install
=====================================
@@ -13,7 +13,7 @@
 # Author/Copyright:	Wolfgang Schweer <wschweer at arcor.de>
 # Licence:			GPL2+
 # first edited:		2019-11-21
-# last edited:		2020-05-25
+# last edited:		2020-06-17
 # 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -57,8 +57,8 @@ workstations and thin clients.
 
 Example 1: '/path/to/edu-ltsp-install --arch amd64' creates diskless workstation support.
 Example 2: '/path/to/edu-ltsp-install --arch amd64 --dist bullseye --thin_type bare'
-           creates diskless workstation and thin client support; the default LTSP
-           client boot defaults to diskless workstation.
+           creates diskless workstation and thin client support; the LTSP client boot
+           defaults to diskless workstation.
 
 This script applies to a system with two NICs on the internal backbone network.
 
@@ -103,6 +103,10 @@ fi
 
 # Common Debian Edu specific configuration (dirs and HERE documents), only minor
 # difference for thin clients and diskless workstation (in ltsp.conf), see below.
+# Next two lines are needed in case of a separate LTSP server.
+ETH0_IP="$(hostname -i)"
+ETH1_IP="$(hostname -I | cut -d' ' -f2)"
+HOSTNAME="$(hostname -s)"
 if [ ! -d /etc/ltsp/client ] ; then
 	mkdir -p /etc/ltsp/client/init
 
@@ -118,6 +122,7 @@ if [ ! -d /etc/ltsp/client ] ; then
 # LTSP configuration file
 # Documentation=man:ltsp.conf(5)
 
+[server]
 # Provide a full menu name for thin/bare-amd64.img
 IPXE_BARE_AMD64_IMG="Plain X2Go Thin Client (64-Bit)"
 # Provide a full menu name for thin/bare-i386.img
@@ -140,11 +145,15 @@ IPXE_X86_64_IMG="Diskless Workstation (64-Bit)"
 DNS_SERVER=10.0.2.2
 SEARCH_DOMAIN=intern
 ADD_IMAGE_EXCLUDES="/etc/ltsp/image-local.excludes"
+# This takes effect for hosts behind the LTSP eth1 interface.
+NAT=1
 
 # In the special [clients] section, parameters for all clients can be defined.
 # Most ltsp.conf parameters should be placed here.
 [clients]
-POST_INIT_PRINTER='cp /etc/ltsp/p910d.conf /etc/default/p910d'
+POST_INIT_PRINTER="cp /etc/ltsp/p910d.conf /etc/default/p910d"
+HOSTS_1="10.0.2.2 tjener.intern tjener"
+HOSTS_2="$ETH1_IP $HOSTNAME"
 EOF
 fi
 
@@ -152,7 +161,7 @@ fi
 # workstations the /skole mountpoint (for autofs) needs to be clean.
 # This applies for both a combined server and a separate LTSP server.
 # For a combined server image the autofs service needs to be enabled (see below).
-if echo "$PROFILE" | grep -Eq 'Workstation' ; then
+if echo "$PROFILE" | grep -Eq 'Workstation|LTSP-Server' ; then
 	cat <<EOF > /etc/ltsp/image-local.excludes
 skole/*
 EOF
@@ -418,7 +427,11 @@ if [ "yes" == "$diskless_workstation"  ] ; then
 PRE_INIT_MAIN_SERVER="systemctl enable autofs"
 POST_INIT_USE_FQDN="sed -i '/10.0.2.2/ s/server/tjener.intern tjener/' /etc/hosts"
 MASK_SYSTEM_SERVICES="apache2 named cups dovecot etckeeper exim4 squid tftpd-hpa \
-icinga2 nmbd smbd systemd-journald xrdp krb5-kdc mariadb cfengine3"
+icinga2 nmbd smbd systemd-journald xrdp krb5-kdc mariadb cfengine3 isc-dhcp-server"
+EOF
+	else
+		cat <<EOF >> /etc/ltsp/ltsp.conf
+MASK_SYSTEM_SERVICES="etckeeper exim4 tftpd-hpa isc-dhcp-server xrdp"
 EOF
 	fi
 	# Temporary workaround needed in some cases for configuring the resolver inside
@@ -469,23 +482,30 @@ EOF
 	else
 	cat <<EOF > /etc/network/interfaces
 auto eth0 eth1
-iface eth0 inet dhcp
-	post-up /usr/sbin/update-hostname-from-ip
+iface eth0 inet static
+	address $ETH0_IP
+	gateway 10.0.0.1
+	dns-search intern
+	dns-nameservers 10.0.2.2
 
 iface eth1 inet static
-	address 192.168.0.254
+	address $ETH1_IP
 EOF
 fi
 
-# Configure NFS
-ltsp nfs
-
 # Next line is needed upon upgrade from LTSP5.
 sed -i '/ltsp/d' /etc/exports
 
+# Adjust NFS exports for separate LTSP servers.
+if [ ! -f /srv/nfs4/home0 ] ; then
+	rm -f /etc/exports.d/edu.exports
+fi
+
+# Configure NFS
+ltsp nfs
+
 # Restart nfs-kernel-server and give feedback about exports if running this
 # script outside of the Debian Installer environment.
 if [ ! -x /sbin/start-stop-daemon.REAL ] ; then
 	exportfs -rav
 fi
-


=====================================
share/debian-edu-config/tools/run-at-firstboot
=====================================
@@ -56,8 +56,11 @@ if echo "$PROFILE" | grep -q Main-Server ; then
 fi
 
 # Create SquashFS image for diskless workstations. This is done here because
-# information from some daemons isn't available during installation.
-if echo "$PROFILE" | grep -q LTSP-Server && [ ! -f /srv/ltsp/images/$ltspimg ] ; then
+# information from some daemons isn't available during installation. It's done
+# for a combined server but not for a separate LTSP server because the image
+# needs to include the krb5.keytab file which isn't available at this time.
+if echo "$PROFILE" | grep -Eq 'Main-Server.*LTSP-Server' && \
+	[ ! -f /srv/ltsp/images/$ltspimg ] ; then
 	/usr/share/debian-edu-config/tools/edu-ltsp-install --dist $dist
 fi
 



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/4b622b7bba61b68f022d1e4bbba9ba95e7bac814...d305ce2f18f5591210a8533123b1c71f5c7dbe4d

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/4b622b7bba61b68f022d1e4bbba9ba95e7bac814...d305ce2f18f5591210a8533123b1c71f5c7dbe4d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20200617/79109ed1/attachment-0001.html>


More information about the debian-edu-commits mailing list