From cde82ec07f72c988accdd18619f94c9db5fb177a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 16 Sep 2016 20:59:06 +0200 Subject: added another automatized approach using virsh tools --- other/kickstarts/centos7-x86_64-master.cfg | 108 +++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 other/kickstarts/centos7-x86_64-master.cfg (limited to 'other/kickstarts/centos7-x86_64-master.cfg') diff --git a/other/kickstarts/centos7-x86_64-master.cfg b/other/kickstarts/centos7-x86_64-master.cfg new file mode 100644 index 0000000..ffbd579 --- /dev/null +++ b/other/kickstarts/centos7-x86_64-master.cfg @@ -0,0 +1,108 @@ +# text mode (no graphical mode) +text + +# do not configure X +skipx + +# non-interactive command line mode +cmdline + +# install +install + +# reboot after installation is complete +reboot + +# accept eula +eula --agreed + +# installation path +url --url=http://mirror.switch.ch/ftp/mirror/centos/7/os/x86_64 + +# repository +repo --name="Switch CentOS Repo" --baseurl=http://mirror.switch.ch/ftp/mirror/centos/7/os/x86_64 +# by specifying the update Repo the install process will automatically update to the latest version. If you wish to stay at the initial release version, comment the following line. +repo --name="Switch CentOS Repo Update" --baseurl=http://mirror.switch.ch/ftp/mirror/centos/7/updates/x86_64 + +# Language support +lang en_US.UTF-8 + +# keyboard +keyboard us + +# network +network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=centos7-64-master + +# root password (123qwe, change after cloning) +rootpw --iscrypted $6$LhelAf3MiEiKEXoZ$4Ymdrfp0TJRtQf0DtkfRqjFzQddX72yYvRlHYapeDxMhdG.HGWm04XX1YOCTleKqsUio04hwbb6/1O.ea4RhM/ + +# enable SSH and network manager +services --enabled=NetworkManager,sshd + +# firewall +firewall --enabled +firewall --service=ssh + +# auth config +authconfig --enableshadow --passalgo=sha512 + +# SElinux +selinux --enforcing + +# timezone +timezone --utc Europe/Zurich + +# bootloader +bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet" + +# clear the MBR (Master Boot Record) +zerombr + +# the Setup Agent is not started the first time the system boots +firstboot --disable + +# power off after installation +poweroff + +################################################################################ +# LVM partitions + +bootloader --location=mbr --boot-drive=vda +clearpart --all --drives=vda +ignoredisk --only-use=vda + +part /boot --fstype="xfs" --ondisk=vda --size=512 +part pv.01 --fstype="lvmpv" --ondisk=vda --grow --size=1 + +volgroup vg_main pv.01 +logvol / --fstype="xfs" --name=lv_root --vgname=vg_main --grow --size=2048 +logvol swap --fstype="swap" --name=lv_swap --vgname=vg_main --grow --size=2048 --maxsize=2048 + + +################################################################################ + +#%pre +#parted -s /dev/vda mklabel gpt +#%end + +%packages –nobase +@core +#@server-policy +vim-minimal +%end + +################################################################################ + +%post +# cleanup the installation +yum clean all +# create default ssh keys +ssh-keygen -q -t rsa -N "" -f /root/.ssh/id_rsa +# create default authorized_keys file +cp -p -f --context=system_u:object_r:ssh_home_t:s0 /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys +%end + +################################################################################ + + -- cgit v1.2.3-54-g00ecf