initial debian overlay
This commit is contained in:
1
overlays/system/debian/etc/hostname.ww
Normal file
1
overlays/system/debian/etc/hostname.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{$.Id}}
|
||||
9
overlays/system/debian/etc/network/interfaces
Normal file
9
overlays/system/debian/etc/network/interfaces
Normal file
@@ -0,0 +1,9 @@
|
||||
# This file describes the network interfaces available on your system
|
||||
# and how to activate them. For more information, see interfaces(5).
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
|
||||
# The loopback network interface
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
7
overlays/system/debian/etc/network/interfaces.d/eno1.ww
Executable file
7
overlays/system/debian/etc/network/interfaces.d/eno1.ww
Executable file
@@ -0,0 +1,7 @@
|
||||
auto eno1
|
||||
allow-hotplug eno1
|
||||
iface eno1 inet static
|
||||
address {{.NetDevs.eno1.Ipaddr}}
|
||||
netmask {{.NetDevs.eno1.Netmask}}
|
||||
gateway {{.NetDevs.eno1.Gateway}}
|
||||
|
||||
4
overlays/system/debian/etc/network/interfaces.d/eno2.ww
Executable file
4
overlays/system/debian/etc/network/interfaces.d/eno2.ww
Executable file
@@ -0,0 +1,4 @@
|
||||
# The facility network interface
|
||||
allow-hotplug eno2
|
||||
iface eno2 inet dhcp
|
||||
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_dsa_key.pub.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_dsa_key.pub.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_dsa_key.pub"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_dsa_key.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_dsa_key.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_dsa_key"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_ecdsa_key.pub.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_ecdsa_key.pub.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_ecdsa_key.pub"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_ecdsa_key.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_ecdsa_key.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_ecdsa_key"}}
|
||||
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_ed25519_key.pub"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_ed25519_key.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_ed25519_key.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_ed25519_key"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_rsa_key.pub.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_rsa_key.pub.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_rsa_key.pub"}}
|
||||
1
overlays/system/debian/etc/ssh/ssh_host_rsa_key.ww
Normal file
1
overlays/system/debian/etc/ssh/ssh_host_rsa_key.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/keys/ssh_host_rsa_key"}}
|
||||
14
overlays/system/debian/etc/ssh/sshd_config.ww
Normal file
14
overlays/system/debian/etc/ssh/sshd_config.ww
Normal file
@@ -0,0 +1,14 @@
|
||||
{{Include "/etc/warewulf/ssh/sshd_config"}}
|
||||
|
||||
# This is a Warewulf Template file.
|
||||
#
|
||||
# This file (suffix '.ww') will be automatically rewritten without the suffix
|
||||
# when the overlay is rendered for the individual nodes. Here are some examples
|
||||
# of macros and logic which can be used within this file:
|
||||
#
|
||||
# Node FQDN = {{.Id}}
|
||||
# Node Group = {{.GroupName}}
|
||||
# Network Config = {{.NetDevs.eth0.Ipaddr}}, {{.NetDevs.eth0.Hwaddr}}, etc.
|
||||
#
|
||||
# Goto the documentation pages for more information: http://www.hpcng.org/...
|
||||
|
||||
1
overlays/system/debian/etc/warewulf/warewulf.conf.ww
Normal file
1
overlays/system/debian/etc/warewulf/warewulf.conf.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{Include "/etc/warewulf/warewulf.conf"}}
|
||||
57
overlays/system/debian/init
Executable file
57
overlays/system/debian/init
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is one of those types of files that you shouldn't edit unless you really
|
||||
# know what you are doing and even then you should make a backup.
|
||||
#
|
||||
# Edit at your own risk! DANGER DANGER.
|
||||
|
||||
|
||||
if test -f "/warewulf/config"; then
|
||||
. /warewulf/config
|
||||
else
|
||||
echo "ERROR: Warewulf configuration file not found... rebooting in 1 minute"
|
||||
sleep 60
|
||||
/sbin/reboot
|
||||
fi
|
||||
|
||||
echo "Warewulf v4 is now booting: ${WWHOSTNAME}"
|
||||
echo "debian specific overlay"
|
||||
|
||||
echo "Mounting up kernel file systems"
|
||||
mkdir /proc /dev /sys /run 2>/dev/null
|
||||
mount -t proc proc /proc
|
||||
mount -t devtmpfs devtmpfs /dev
|
||||
mount -t sysfs sysfs /sys
|
||||
mount -t tmpfs tmpfs /run
|
||||
|
||||
chmod 755 /warewulf/wwinit
|
||||
|
||||
echo "Checking Rootfs type"
|
||||
ROOTFSTYPE=`stat -f -c "%T" /`
|
||||
|
||||
if test "${WWROOT}" = "initramfs"; then
|
||||
echo "Provisioned to default initramfs file system: ${ROOTFSTYPE}"
|
||||
echo "Calling WW Init"
|
||||
exec /warewulf/wwinit
|
||||
elif test "${WWROOT}" = "tmpfs"; then
|
||||
if test "${ROOTFSTYPE}" == "tmpfs"; then
|
||||
echo "ERROR: Switching the root file system requires the kernel argument: 'rootfstype=ramfs'"
|
||||
else
|
||||
echo "Setting up tmpfs root file system"
|
||||
mkdir /newroot
|
||||
mount wwroot /newroot -t tmpfs
|
||||
echo "Moving RAMFS to TMPFS"
|
||||
tar -cf - --exclude ./proc --exclude ./sys --exclude ./dev --exclude ./newroot . | tar -xf - -C /newroot
|
||||
mkdir /newroot/proc /newroot/dev /newroot/sys /newroot/run 2>/dev/null
|
||||
echo "Calling switch_root and invoking WW Init"
|
||||
exec /sbin/switch_root /newroot /warewulf/wwinit
|
||||
fi
|
||||
else
|
||||
echo "ERROR: Unknown Warewulf Root file system: ${WWROOT}"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "There was a problem with the provisioning process, rebooting in 1 minute..."
|
||||
sleep 60
|
||||
/sbin/reboot
|
||||
|
||||
9
overlays/system/debian/warewulf/config.ww
Normal file
9
overlays/system/debian/warewulf/config.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
WWCONTAINER={{$.Container}}
|
||||
WWHOSTNAME={{$.Id}}
|
||||
WWROOT={{$.Root}}
|
||||
WWINIT={{$.Init}}
|
||||
WWIPMI_IPADDR="{{$.IpmiIpaddr}}"
|
||||
WWIPMI_NETMASK="{{$.IpmiNetmask}}"
|
||||
WWIPMI_GATEWAY="{{$.IpmiGateway}}"
|
||||
WWIPMI_USER="{{$.IpmiUserName}}"
|
||||
WWIPMI_PASSWORD="{{$.IpmiPassword}}"
|
||||
6
overlays/system/debian/warewulf/init.d/20-loopback
Normal file
6
overlays/system/debian/warewulf/init.d/20-loopback
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
echo "Bringing up lo:127.0.0.1"
|
||||
/sbin/ip link set dev lo up
|
||||
24
overlays/system/debian/warewulf/init.d/75-vnfs_fixes
Normal file
24
overlays/system/debian/warewulf/init.d/75-vnfs_fixes
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
# This will eventually be optional
|
||||
if true; then
|
||||
if [ -f "/etc/pam.d/system-auth" ]; then
|
||||
echo "FIXING: system-auth"
|
||||
sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth
|
||||
fi
|
||||
|
||||
if [ -f "/etc/pam.d/password-auth" ]; then
|
||||
echo "FIXING: password-auth"
|
||||
sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/password-auth
|
||||
fi
|
||||
|
||||
if [ -f "/etc/pam.d/common-account" ]; then
|
||||
echo "FIXING: common-account"
|
||||
sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/common-account
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
chmod 755 /
|
||||
6
overlays/system/debian/warewulf/init.d/80-wwclient
Normal file
6
overlays/system/debian/warewulf/init.d/80-wwclient
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
echo "Starting wwclient"
|
||||
nohup /warewulf/bin/wwclient >/var/log/wwclient.log 2>&1 </dev/null &
|
||||
35
overlays/system/debian/warewulf/init.d/90-selinux
Normal file
35
overlays/system/debian/warewulf/init.d/90-selinux
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
if test -z "$WWROOT"; then
|
||||
echo "Skipping SELinux configuration: Warewulf Root device not set"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -f "/etc/sysconfig/selinux"; then
|
||||
. /etc/sysconfig/selinux
|
||||
else
|
||||
echo "Skipping SELinux configuration: Host config not found: /etc/sysconfig/selinux"
|
||||
exit
|
||||
fi
|
||||
|
||||
if test "$WWROOT" == "initramfs"; then
|
||||
echo "Skipping SELinux configuration: 'Root=initramfs'"
|
||||
if test "$SELINUX" != "disabled"; then
|
||||
echo "WARNING: SELinux prep is being skipped, but SELinux is enabled on host! This may"
|
||||
echo "WARNING: cause the system to not work properly. Try setting 'Root=tmpfs'"
|
||||
sleep 5
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if test "$SELINUX" == "disabled"; then
|
||||
echo "Skipping SELinux setup per /etc/sysconfig/selinux"
|
||||
elif grep -q "selinux=0" /proc/cmdline; then
|
||||
echo "Skipping SELinux setup per kernel command line"
|
||||
else
|
||||
echo "Setting up SELinux"
|
||||
/sbin/load_policy -i
|
||||
/sbin/restorecon -r /
|
||||
fi
|
||||
15
overlays/system/debian/warewulf/init.d/99-test
Normal file
15
overlays/system/debian/warewulf/init.d/99-test
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
#echo `ls /dev`
|
||||
#sleep 10
|
||||
|
||||
#echo `lspci`
|
||||
#sleep 10
|
||||
|
||||
#ip a
|
||||
#sleep 10
|
||||
|
||||
#ls -la /lib/modules
|
||||
#sleep 20
|
||||
17
overlays/system/debian/warewulf/wwinit
Normal file
17
overlays/system/debian/warewulf/wwinit
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Hello from WWINIT"
|
||||
|
||||
. /warewulf/config
|
||||
|
||||
for i in /warewulf/init.d/*; do
|
||||
NAME=`basename $i`
|
||||
echo "Launching: $NAME"
|
||||
sh "$i"
|
||||
done
|
||||
|
||||
echo "Calling $WWINIT..."
|
||||
echo
|
||||
|
||||
sleep 2
|
||||
exec $WWINIT
|
||||
Reference in New Issue
Block a user