1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/packaging/live-iso/villas.ks

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

197 lines
3.8 KiB
Text
Raw Permalink Normal View History

2022-03-06 05:20:56 -05:00
# Kickstart file for VILLAS installation
#
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
2022-03-06 05:20:56 -05:00
# SPDX-License-Identifier: Apache-2.0
# Configuration
lang en_US.UTF-8
keyboard us
timezone Europe/Berlin
selinux --disabled
firewall --disabled
services --enabled=sshd,NetworkManager,chronyd,sshd,tuned,initial-setup
2022-03-06 05:20:56 -05:00
network --bootproto=dhcp --device=link --activate --hostname=villas
rootpw --plaintext villas-admin
shutdown
2022-03-06 05:20:56 -05:00
bootloader --timeout=1 --append "preempt=full"
zerombr
clearpart --all --initlabel --disklabel=msdos
part / --size=8192 --fstype ext4
# make sure that initial-setup runs and lets us do all the configuration bits
firstboot --reconfig
# Add repositories
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
# Install packages
%packages
@core
@hardware-support
-@dial-up
-@input-methods
-@standard
rng-tools
initial-setup
glibc-langpack-en
# remove this in %post
dracut-config-generic
-dracut-config-rescue
2022-03-06 05:20:56 -05:00
dracut-live
# install tools needed to manage and boot arm systems
-uboot-images-armv7
-initial-setup-gui
-glibc-all-langpacks
-trousers
-gfs2-utils
-reiserfs-utils
# Intel wireless firmware assumed never of use for disk images
-iwl*
-ipw*
-usb_modeswitch
-generic-release*
kernel
kernel-modules
kernel-modules-extra
# Some custom packages
tuned
tuned-profiles-realtime
# Tools
2022-03-06 05:20:56 -05:00
autoconf
automake
bash-completion
bind-utils
2022-03-06 05:20:56 -05:00
bison
chrony
cmake
curl
2022-03-06 05:20:56 -05:00
dia
doxygen
flex
gcc
gcc-c++
git
graphviz
iproute
jq
libtool
lshw
make
mercurial
nano
ninja-build
openssh-clients
2022-03-06 05:20:56 -05:00
pkgconfig
procps-ng
2022-03-06 05:20:56 -05:00
protobuf-c-compiler
protobuf-compiler
psmisc
python-pip
tar
texinfo
tmux
2022-03-06 05:20:56 -05:00
traceroute
wget
2022-03-06 05:20:56 -05:00
# Libraries and build-time dependencies of VILLASnode
openssl-devel
2022-03-06 05:20:56 -05:00
protobuf-devel
protobuf-c-devel
libuuid-devel
libconfig-devel
libnl3-devel
libcurl-devel
jansson-devel
spdlog-devel
fmt-devel
libwebsockets-devel
zeromq-devel
nanomsg-devel
librabbitmq-devel
mosquitto-devel
libibverbs-devel
librdmacm-devel
re-devel
libusb-devel
lua-devel
librdkafka-devel
%end
# Custom post installer
%post
2022-03-06 05:20:56 -05:00
# Install VILLASnode
mkdir /villas
git clone https://git.rwth-aachen.de/acs/public/villas/node.git /villas/node
2022-03-06 05:20:56 -05:00
cd /villas/node
git submodule update --init common
2022-03-06 05:20:56 -05:00
bash ./packaging/deps.sh
2022-03-06 05:20:56 -05:00
mkdir build
cd build
2022-03-06 05:20:56 -05:00
cmake ..
make -j$(nproc) install
2022-03-06 05:20:56 -05:00
echo /usr/local/lib64 > /etc/ld.so.conf.d/local.conf
ldconfig
# Select real-time tuned profile
PROC=$(nproc)
ISOLATED_CORES=
if ((PROC > 4)); then
ISOLATED_CORES+=$(seq -s, $((PROC/2)) $((PROC-1)))
fi
echo isolated_cores=${ISOLATED_CORES} >> /etc/tuned/realtime-variables.conf
tuned-adm profile realtime
2022-03-06 05:20:56 -05:00
# Install patched files
cd /villas/node/packaging/live-iso
make patched
rsync --ignore-errors --archive --verbose /villas/node/packaging/live-iso/build/patched_files/ /
%end
# From fedora-disk-base
%post
2022-03-06 05:20:56 -05:00
# Find the architecture we are on
arch=$(uname -m)
2022-03-06 05:20:56 -05:00
releasever=$(rpm --eval '%{fedora}')
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
2022-03-06 05:20:56 -05:00
echo "Packages within this disk image"
2022-03-06 05:20:56 -05:00
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# remove random seed, the newly installed instance should make it's own
rm -f /var/lib/systemd/random-seed
# The enp1s0 interface is a left over from the imagefactory install, clean this up
2022-03-06 05:20:56 -05:00
rm -f /etc/NetworkManager/system-connections/*.nmconnection
dnf -y remove dracut-config-generic
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
2022-03-06 05:20:56 -05:00
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*
%end