1# Minimal Kickstart file 2install 3text 4reboot 5lang en_US.UTF-8 6 7# repo to install the OS 8url --url=<%= @mirror %>/Everything/x86_64/os/ 9 10keyboard us 11network --bootproto dhcp 12rootpw <%= @password %> 13authconfig --enableshadow --passalgo=sha512 --enablefingerprint 14firewall --enabled --ssh 15selinux --enforcing 16timezone --utc America/Los_Angeles 17#firstboot --disable 18bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH crashkernel=auto" 19zerombr 20clearpart --all --initlabel 21autopart --type=lvm 22repo --name=everything --baseurl=<%= @mirror %>/Everything/x86_64/os/ 23 24#Just core packages 25%packages --nobase 26@core 27ntp 28@c-development 29@development-tools 30@rpm-development-tools 31ncurses-devel 32vim 33bc 34kexec-tools 35cmake 36libstdc++-static 37python-netaddr 38python-futures 39%end 40 41%post --log=/root/anaconda-post.log 42echo Kickstart post 43 44chkconfig NetworkManager off 45chkconfig network on 46 47chkconfig ntpd on 48 49dnf config-manager --add-repo=http://alt.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/fedora-rawhide-kernel-nodebug.repo 50 51yum -y clean metadata 52yum -y update 53 54hostname <%= @name %>.<%= @domain %> 55echo "<%= @name %>.<%= @domain %>" > /etc/hostname 56 57cat > /usr/local/bin/bpf-kernel-setup <<'DELIM__' 58#!/bin/bash 59set -e -x 60numcpu=$(grep -c ^processor /proc/cpuinfo) 61 62git clone https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 63cd net-next/ 64 65cp /boot/config-$(uname -r) ./ 66cp ./config-$(uname -r) .config 67 68make -j$numcpu mrproper 69make -j$numcpu nconfig 70make -j$numcpu bzImage 71make -j$numcpu modules 72sudo make modules_install 73sudo make install 74sudo make INSTALL_HDR_PATH=/usr/local headers_install 75 76release=$(<include/config/kernel.release) 77echo "kexec -l /boot/vmlinuz-$release --initrd=/boot/initramfs-$release.img --reuse-cmdline; reboot" > /usr/local/bin/kexec-$release 78chmod +x /usr/local/bin/kexec-$release 79ln -fs kexec-$release /usr/local/bin/kexec-latest 80 81DELIM__ 82chmod +x /usr/local/bin/bpf-kernel-setup 83 84cat > /usr/local/bin/bpf-llvm-setup <<'DELIM__' 85#!/bin/bash 86set -e -x 87numcpu=$(grep -c ^processor /proc/cpuinfo) 88 89git clone https://github.com/llvm-mirror/llvm.git 90git clone https://github.com/llvm-mirror/clang.git llvm/tools/clang 91mkdir llvm/build/ 92cd llvm/build/ 93 94cmake .. \ 95 -DBUILD_SHARED_LIBS=OFF \ 96 -DCMAKE_BUILD_TYPE=Release \ 97 -DLLVM_ENABLE_TERMINFO=OFF \ 98 -DLLVM_TARGETS_TO_BUILD="ARM;CppBackend;X86;BPF" \ 99 -DCMAKE_INSTALL_PREFIX=/opt/local/llvm 100 101make -j$numcpu 102sudo make install 103grep -q llvm $HOME/.bashrc || echo 'PATH=/opt/local/llvm/bin:$PATH' >> $HOME/.bashrc 104 105DELIM__ 106chmod +x /usr/local/bin/bpf-llvm-setup 107 108cat > /usr/local/bin/bcc-setup <<'DELIM__' 109#!/bin/bash 110set -e -x 111 112git clone https://github.com/svinota/pyroute2.git 113(cd pyroute2; make install) 114 115numcpu=$(grep -c ^processor /proc/cpuinfo) 116 117git clone https://github.com/iovisor/bcc.git 118mkdir bcc/build/ 119cd bcc/build/ 120export PATH=/opt/local/llvm/bin:$PATH 121cmake .. -DCMAKE_INSTALL_PREFIX=/usr 122make -j$numcpu 123DELIM__ 124chmod +x /usr/local/bin/bcc-setup 125 126%end 127