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/centos5-x86_64-master.cfg | 99 ++++++++++++++++++++++++++ other/kickstarts/centos6-i386-master.cfg | 100 ++++++++++++++++++++++++++ other/kickstarts/centos6-x86_64-master.cfg | 100 ++++++++++++++++++++++++++ other/kickstarts/centos7-x86_64-master.cfg | 108 +++++++++++++++++++++++++++++ other/kickstarts/handmade/Centos5-32.cfg | 24 +++++++ other/kickstarts/handmade/Centos5-64.cfg | 24 +++++++ other/kickstarts/handmade/Centos6-32.cfg | 30 ++++++++ other/kickstarts/handmade/Centos6-64.cfg | 30 ++++++++ other/kickstarts/handmade/Centos7-64.cfg | 32 +++++++++ 9 files changed, 547 insertions(+) create mode 100644 other/kickstarts/centos5-x86_64-master.cfg create mode 100644 other/kickstarts/centos6-i386-master.cfg create mode 100644 other/kickstarts/centos6-x86_64-master.cfg create mode 100644 other/kickstarts/centos7-x86_64-master.cfg create mode 100644 other/kickstarts/handmade/Centos5-32.cfg create mode 100644 other/kickstarts/handmade/Centos5-64.cfg create mode 100644 other/kickstarts/handmade/Centos6-32.cfg create mode 100644 other/kickstarts/handmade/Centos6-64.cfg create mode 100644 other/kickstarts/handmade/Centos7-64.cfg (limited to 'other/kickstarts') diff --git a/other/kickstarts/centos5-x86_64-master.cfg b/other/kickstarts/centos5-x86_64-master.cfg new file mode 100644 index 0000000..8a94138 --- /dev/null +++ b/other/kickstarts/centos5-x86_64-master.cfg @@ -0,0 +1,99 @@ +# text mode (no graphical mode) +text + +# do not configure X +skipx + +# non-interactive command line mode +cmdline + +# install +install + +# installation path +url --url=http://mirror.switch.ch/ftp/mirror/centos/5/os/x86_64 + +# repository +repo --name="Switch CentOS Repo" --baseurl=http://mirror.switch.ch/ftp/mirror/centos/5/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/5/updates/x86_64 + +# Language support +lang en_US.UTF-8 + +# keyboard +keyboard us + +# network +network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=centos5-64-master + +# root password (123qwe, change after cloning) +rootpw --iscrypted $6$LhelAf3MiEiKEXoZ$4Ymdrfp0TJRtQf0DtkfRqjFzQddX72yYvRlHYapeDxMhdG.HGWm04XX1YOCTleKqsUio04hwbb6/1O.ea4RhM/ + +# firewall +firewall --enabled +firewall --port=22:tcp + +# 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 + +# do not remove any partition (preserve the gpt label) +clearpart --none + +# creates a partition on the system +part /boot --fstype=ext3 --size=500 +part pv.00 --grow --asprimary --size=1 + +# Increased pesize from 4096 KB to 262144 KB (0.25GB) to allow bigger logvols +# Keep 20% of volgroup reserved for future use +volgroup vg_main --pesize=262144 pv.00 + +# Use default swap size +logvol swap --name=lv_swap --vgname=vg_main --recommended + +# Allocate the rest to / +logvol / --fstype=ext4 --name=lv_root --vgname=vg_main --size=1 --grow + +################################################################################ + +%pre +parted -s /dev/vda mklabel msdos + +%packages –nobase +@core +vim-minimal + +################################################################################ + +%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 + +################################################################################ diff --git a/other/kickstarts/centos6-i386-master.cfg b/other/kickstarts/centos6-i386-master.cfg new file mode 100644 index 0000000..3013505 --- /dev/null +++ b/other/kickstarts/centos6-i386-master.cfg @@ -0,0 +1,100 @@ +# text mode (no graphical mode) +text + +# do not configure X +skipx + +# non-interactive command line mode +cmdline + +# install +install + +# installation path +url --url=http://mirror.switch.ch/ftp/mirror/centos/6/os/i386 + +# repository +repo --name="Switch CentOS Repo" --baseurl=http://mirror.switch.ch/ftp/mirror/centos/6/os/i386 +# 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/6/updates/i386 + +# Language support +lang en_US.UTF-8 + +# keyboard +keyboard us + +# network +network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=centos6-32-master + +# root password (123qwe, change after cloning) +rootpw --iscrypted $6$LhelAf3MiEiKEXoZ$4Ymdrfp0TJRtQf0DtkfRqjFzQddX72yYvRlHYapeDxMhdG.HGWm04XX1YOCTleKqsUio04hwbb6/1O.ea4RhM/ + +# 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 + +# do not remove any partition (preserve the gpt label) +clearpart --none + +# creates a partition on the system +part /boot --fstype=ext4 --size=500 +part pv.00 --grow --asprimary --size=1 + +# Increased pesize from 4096 KB to 262144 KB (0.25GB) to allow bigger logvols +# Keep 20% of volgroup reserved for future use +volgroup vg_main --pesize=262144 pv.00 --reserved-percent=20 + +# Use default swap size +logvol swap --name=lv_swap --vgname=vg_main --recommended + +# Allocate the rest to / +logvol / --fstype=ext4 --name=lv_root --vgname=vg_main --size=1 --grow + +################################################################################ + +%pre +parted -s /dev/vda mklabel gpt + +%packages –nobase +@core +@server-policy +vim-minimal + +################################################################################ + +%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 + +################################################################################ diff --git a/other/kickstarts/centos6-x86_64-master.cfg b/other/kickstarts/centos6-x86_64-master.cfg new file mode 100644 index 0000000..4528499 --- /dev/null +++ b/other/kickstarts/centos6-x86_64-master.cfg @@ -0,0 +1,100 @@ +# text mode (no graphical mode) +text + +# do not configure X +skipx + +# non-interactive command line mode +cmdline + +# install +install + +# installation path +url --url=http://mirror.switch.ch/ftp/mirror/centos/6/os/x86_64 + +# repository +repo --name="Switch CentOS Repo" --baseurl=http://mirror.switch.ch/ftp/mirror/centos/6/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/6/updates/x86_64 + +# Language support +lang en_US.UTF-8 + +# keyboard +keyboard us + +# network +network --onboot yes --device eth0 --bootproto dhcp --noipv6 --hostname=centos6-64-master + +# root password (123qwe, change after cloning) +rootpw --iscrypted $6$LhelAf3MiEiKEXoZ$4Ymdrfp0TJRtQf0DtkfRqjFzQddX72yYvRlHYapeDxMhdG.HGWm04XX1YOCTleKqsUio04hwbb6/1O.ea4RhM/ + +# 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 + +# do not remove any partition (preserve the gpt label) +clearpart --none + +# creates a partition on the system +part /boot --fstype=ext4 --size=500 +part pv.00 --grow --asprimary --size=1 + +# Increased pesize from 4096 KB to 262144 KB (0.25GB) to allow bigger logvols +# Keep 20% of volgroup reserved for future use +volgroup vg_main --pesize=262144 pv.00 --reserved-percent=20 + +# Use default swap size +logvol swap --name=lv_swap --vgname=vg_main --recommended + +# Allocate the rest to / +logvol / --fstype=ext4 --name=lv_root --vgname=vg_main --size=1 --grow + +################################################################################ + +%pre +parted -s /dev/vda mklabel gpt + +%packages –nobase +@core +@server-policy +vim-minimal + +################################################################################ + +%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 + +################################################################################ 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 + +################################################################################ + + diff --git a/other/kickstarts/handmade/Centos5-32.cfg b/other/kickstarts/handmade/Centos5-32.cfg new file mode 100644 index 0000000..0aa25ef --- /dev/null +++ b/other/kickstarts/handmade/Centos5-32.cfg @@ -0,0 +1,24 @@ +# Kickstart file automatically generated by anaconda. + +install +url --url http://swissmirror.silyus.net/centos/5.8/os/i386 +lang en_US.UTF-8 +keyboard us +network --device eth0 --bootproto dhcp --hostname CentOS-5-32-Master +rootpw --iscrypted $1$U9eue073$hpWqFVoP4I6.dvT0qz2uB/ +firewall --enabled --port=22:tcp +authconfig --enableshadow --enablemd5 +selinux --enforcing +timezone --utc Europe/Zurich +bootloader --location=mbr --driveorder=vda +# The following is the partition information you requested +# Note that any partitions you deleted are not expressed +# here so unless you clear all partitions first, this is +# not guaranteed to work +#clearpart --linux +#part / --fstype ext3 --size=1 --grow --asprimary +#part swap --size=1024 --asprimary + +%packages +@core +sgpio diff --git a/other/kickstarts/handmade/Centos5-64.cfg b/other/kickstarts/handmade/Centos5-64.cfg new file mode 100644 index 0000000..a6e22a7 --- /dev/null +++ b/other/kickstarts/handmade/Centos5-64.cfg @@ -0,0 +1,24 @@ +# Kickstart file automatically generated by anaconda. + +install +url --url http://swissmirror.silyus.net/centos/5.8/os/x86_64 +lang en_US.UTF-8 +keyboard us +network --device eth0 --bootproto dhcp --hostname CentOS-5-64-Master +rootpw --iscrypted $1$LlZErziA$y7scQObxRfmO4HZc0wfhO0 +firewall --enabled --port=22:tcp +authconfig --enableshadow --enablemd5 +selinux --enforcing +timezone --utc Europe/Zurich +bootloader --location=mbr --driveorder=vda +# The following is the partition information you requested +# Note that any partitions you deleted are not expressed +# here so unless you clear all partitions first, this is +# not guaranteed to work +#clearpart --linux +#part / --fstype ext3 --size=1 --grow --asprimary +#part swap --size=1024 --asprimary + +%packages +@core +sgpio diff --git a/other/kickstarts/handmade/Centos6-32.cfg b/other/kickstarts/handmade/Centos6-32.cfg new file mode 100644 index 0000000..13f9a29 --- /dev/null +++ b/other/kickstarts/handmade/Centos6-32.cfg @@ -0,0 +1,30 @@ +# Kickstart file automatically generated by anaconda. + +#version=DEVEL +install +url --url=http://swissmirror.silyus.net/centos/6.3/os/i386 +lang en_US.UTF-8 +keyboard us +network --onboot yes --device eth0 --bootproto dhcp --noipv6 +rootpw --iscrypted $6$cybIqb74.gcQQCoV$oqwTnlZbhgVKc5yZJuRZDEhKjFNv2ha3WTbra9BhbvPxdfu/23Pr8XXA5YW6G.trb65Q60Ji3Vapmd5Eek4Od0 +firewall --service=ssh +authconfig --enableshadow --passalgo=sha512 +selinux --enforcing +timezone --utc Europe/Zurich +bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet" +# The following is the partition information you requested +# Note that any partitions you deleted are not expressed +# here so unless you clear all partitions first, this is +# not guaranteed to work +#clearpart --none + + +#part swap --asprimary --size=1024 +#part / --fstype=ext4 --grow --asprimary --size=200 + +repo --name="CentOS" --baseurl=http://swissmirror.silyus.net/centos/6.3/os/i386 --cost=100 + +%packages +@core +@server-policy +%end \ No newline at end of file diff --git a/other/kickstarts/handmade/Centos6-64.cfg b/other/kickstarts/handmade/Centos6-64.cfg new file mode 100644 index 0000000..fa0954b --- /dev/null +++ b/other/kickstarts/handmade/Centos6-64.cfg @@ -0,0 +1,30 @@ +# Kickstart file automatically generated by anaconda. + +#version=DEVEL +install +url --url=http://swissmirror.silyus.net/centos/6.3/os/x86_64/ +lang en_US.UTF-8 +keyboard us +network --onboot yes --device eth0 --bootproto dhcp --noipv6 +rootpw --iscrypted $6$LhelAf3MiEiKEXoZ$4Ymdrfp0TJRtQf0DtkfRqjFzQddX72yYvRlHYapeDxMhdG.HGWm04XX1YOCTleKqsUio04hwbb6/1O.ea4RhM/ +firewall --service=ssh +authconfig --enableshadow --passalgo=sha512 +selinux --enforcing +timezone --utc Europe/Zurich +bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet" +# The following is the partition information you requested +# Note that any partitions you deleted are not expressed +# here so unless you clear all partitions first, this is +# not guaranteed to work +#clearpart --none + + +#part swap --onpart=vda1 +#part / --fstype=ext4 --onpart=vda2 + +repo --name="CentOS" --baseurl=http://swissmirror.silyus.net/centos/6.3/os/x86_64/ --cost=100 + +%packages +@core +@server-policy +%end \ No newline at end of file diff --git a/other/kickstarts/handmade/Centos7-64.cfg b/other/kickstarts/handmade/Centos7-64.cfg new file mode 100644 index 0000000..b985f80 --- /dev/null +++ b/other/kickstarts/handmade/Centos7-64.cfg @@ -0,0 +1,32 @@ +#version=RHEL7 +# System authorization information +auth --enableshadow --passalgo=sha512 + +# Use CDROM installation media +cdrom +# Run the Setup Agent on first boot +firstboot --enable +ignoredisk --only-use=vda +# Keyboard layouts +keyboard --vckeymap=us --xlayouts='us' +# System language +lang en_US.UTF-8 + +# Network information +network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto +network --hostname=centos7test +# Root password +rootpw --iscrypted $6$3M1tV8rDh8wtW390$g0hBugm3NBQZrYm7cBL4XfARtvuqjzEI1kHBt965W/Hhrus4VteDumTQoLCiISjbTrv1Jnzqs.GWHtlh3Ewkh. +# System timezone +timezone America/New_York --isUtc +# System bootloader configuration +bootloader --location=mbr --boot-drive=vda +autopart --type=lvm +# Partition clearing information +clearpart --none --initlabel + +%packages +@core + +%end + -- cgit v1.2.3-54-g00ecf