Add kickstart files for Fedora 20 installer
These kickstart files take the Fedora 20 installer through the first stage of installation. The three files differ in what is configured when the freshly installed system reboots: ks-ssh.cfg: user osbash (password: osbash) can log in with the insecure Vagrant key and use password-less sudo for all commands. ks-vbadd.cfg VirtualBox guest additions are installed from /dev/sr1 (will be put there by install script); a script is installed to run activate_autostart.sh from an auto-mounted shared folder upon reboot. ks-all.cfg: Enables both VM access methods described above. Partial-Bug: 1312764 Implements: blueprint openstack-training-labs Change-Id: I8d29b775b380f4efdcbca61ed1667b84db572bf5
This commit is contained in:
parent
dcf7e7ef1d
commit
7d1f7434a4
75
labs/lib/osbash/netboot/ks-all.cfg
Normal file
75
labs/lib/osbash/netboot/ks-all.cfg
Normal file
@ -0,0 +1,75 @@
|
||||
#platform=x86, AMD64, or Intel EM64T
|
||||
#version=DEVEL
|
||||
# Install OS instead of upgrade
|
||||
install
|
||||
# Keyboard layouts
|
||||
keyboard 'us'
|
||||
# Reboot after installation
|
||||
reboot --eject
|
||||
# Root password
|
||||
rootpw --plaintext osbash
|
||||
# User
|
||||
user --name=osbash --password=osbash --plaintext
|
||||
# System timezone
|
||||
timezone Etc/UTC --isUtc
|
||||
# System language
|
||||
lang en_US
|
||||
# Firewall configuration
|
||||
firewall --disabled
|
||||
# System authorization information
|
||||
auth --useshadow --passalgo=sha512
|
||||
# Use CDROM installation media
|
||||
cdrom
|
||||
# Use text mode install
|
||||
text
|
||||
# SELinux configuration
|
||||
selinux --permissive
|
||||
# Do not configure the X Window System
|
||||
skipx
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
|
||||
part /boot --fstype=ext4 --size=1024
|
||||
part pv.0 --grow --size=1
|
||||
volgroup ROOTDISK --pesize=4096 pv.0
|
||||
logvol swap --name=swap --vgname=ROOTDISK --recommended
|
||||
logvol / --fstype=ext4 --name=root --vgname=ROOTDISK --size=1 --grow
|
||||
|
||||
%pre --interpreter=bash
|
||||
%end
|
||||
#-------------------------------------------------------------------------------
|
||||
# Enable ssh login with insecure Vagrant key and password-less sudo for osbash
|
||||
# Install VirtualBox guest additions, bootstrap osbashauto
|
||||
%post --interpreter=/bin/bash
|
||||
DIR=/home/osbash/.ssh
|
||||
mkdir $DIR
|
||||
wget -O $DIR/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
||||
chmod 700 $DIR
|
||||
chmod 400 $DIR/authorized_keys
|
||||
chown -R osbash:osbash $DIR
|
||||
echo "osbash ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
echo "Defaults:osbash !requiretty" >> /etc/sudoers
|
||||
|
||||
yum -y install dkms
|
||||
|
||||
mount /dev/sr1 /mnt
|
||||
/mnt/VBoxLinuxAdditions.run
|
||||
umount /mnt
|
||||
|
||||
echo -e '#!/bin/bash\nbash /media/sf_*/autostart/*activate_autostart.sh\nrm /media/*/autostart/*activate_autostart.sh' > /etc/init.d/osbash
|
||||
chmod 755 /etc/init.d/osbash
|
||||
ln -s ../init.d/osbash /etc/rc2.d/S40osbash
|
||||
%end
|
||||
#-------------------------------------------------------------------------------
|
||||
# tar, bzip2, kernel-{devel,headers}: needed for VirtualBox guest additions
|
||||
# (but not in @core)
|
||||
%packages
|
||||
wget
|
||||
tar
|
||||
bzip2
|
||||
kernel-devel
|
||||
kernel-headers
|
||||
%end
|
58
labs/lib/osbash/netboot/ks-ssh.cfg
Normal file
58
labs/lib/osbash/netboot/ks-ssh.cfg
Normal file
@ -0,0 +1,58 @@
|
||||
#platform=x86, AMD64, or Intel EM64T
|
||||
#version=DEVEL
|
||||
# Install OS instead of upgrade
|
||||
install
|
||||
# Keyboard layouts
|
||||
keyboard 'us'
|
||||
# Reboot after installation
|
||||
reboot --eject
|
||||
# Root password
|
||||
rootpw --plaintext osbash
|
||||
# User
|
||||
user --name=osbash --password=osbash --plaintext
|
||||
# System timezone
|
||||
timezone Etc/UTC --isUtc
|
||||
# System language
|
||||
lang en_US
|
||||
# Firewall configuration
|
||||
firewall --disabled
|
||||
# System authorization information
|
||||
auth --useshadow --passalgo=sha512
|
||||
# Use CDROM installation media
|
||||
cdrom
|
||||
# Use text mode install
|
||||
text
|
||||
# SELinux configuration
|
||||
selinux --permissive
|
||||
# Do not configure the X Window System
|
||||
skipx
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
|
||||
part /boot --fstype=ext4 --size=1024
|
||||
part pv.0 --grow --size=1
|
||||
volgroup ROOTDISK --pesize=4096 pv.0
|
||||
logvol swap --name=swap --vgname=ROOTDISK --recommended
|
||||
logvol / --fstype=ext4 --name=root --vgname=ROOTDISK --size=1 --grow
|
||||
|
||||
%pre --interpreter=bash
|
||||
%end
|
||||
#-------------------------------------------------------------------------------
|
||||
# Enable ssh login with insecure Vagrant key and password-less sudo for osbash
|
||||
%post --interpreter=/bin/bash
|
||||
DIR=/home/osbash/.ssh
|
||||
mkdir $DIR
|
||||
wget -O $DIR/authorized_keys https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub
|
||||
chmod 700 $DIR
|
||||
chmod 400 $DIR/authorized_keys
|
||||
chown -R osbash:osbash $DIR
|
||||
echo "osbash ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
echo "Defaults:osbash !requiretty" >> /etc/sudoers
|
||||
%end
|
||||
|
||||
%packages
|
||||
wget
|
||||
%end
|
64
labs/lib/osbash/netboot/ks-vbadd.cfg
Normal file
64
labs/lib/osbash/netboot/ks-vbadd.cfg
Normal file
@ -0,0 +1,64 @@
|
||||
#platform=x86, AMD64, or Intel EM64T
|
||||
#version=DEVEL
|
||||
# Install OS instead of upgrade
|
||||
install
|
||||
# Keyboard layouts
|
||||
keyboard 'us'
|
||||
# Reboot after installation
|
||||
reboot --eject
|
||||
# Root password
|
||||
rootpw --plaintext osbash
|
||||
# System timezone
|
||||
timezone Etc/UTC --isUtc
|
||||
# System language
|
||||
lang en_US
|
||||
# Firewall configuration
|
||||
firewall --disabled
|
||||
# System authorization information
|
||||
auth --useshadow --passalgo=sha512
|
||||
# Use CDROM installation media
|
||||
cdrom
|
||||
# Use text mode install
|
||||
text
|
||||
# SELinux configuration
|
||||
selinux --permissive
|
||||
# Do not configure the X Window System
|
||||
skipx
|
||||
|
||||
# System bootloader configuration
|
||||
bootloader --location=mbr
|
||||
# Partition clearing information
|
||||
clearpart --all
|
||||
|
||||
part /boot --fstype=ext4 --size=1024
|
||||
part pv.0 --grow --size=1
|
||||
volgroup ROOTDISK --pesize=4096 pv.0
|
||||
logvol swap --name=swap --vgname=ROOTDISK --recommended
|
||||
logvol / --fstype=ext4 --name=root --vgname=ROOTDISK --size=1 --grow
|
||||
|
||||
%pre --interpreter=bash
|
||||
%end
|
||||
#-------------------------------------------------------------------------------
|
||||
# Install VirtualBox guest additions, bootstrap osbashauto
|
||||
%post --interpreter=/bin/bash
|
||||
|
||||
yum -y install dkms
|
||||
|
||||
mount /dev/sr1 /mnt
|
||||
/mnt/VBoxLinuxAdditions.run
|
||||
umount /mnt
|
||||
|
||||
echo -e '#!/bin/bash\nbash /media/sf_*/autostart/*activate_autostart.sh\nrm /media/*/autostart/*activate_autostart.sh' > /etc/init.d/osbash
|
||||
chmod 755 /etc/init.d/osbash
|
||||
ln -s ../init.d/osbash /etc/rc2.d/S40osbash
|
||||
|
||||
%end
|
||||
#-------------------------------------------------------------------------------
|
||||
# tar, bzip2, kernel-{devel,headers}: needed for VirtualBox guest additions
|
||||
# (but not in @core)
|
||||
%packages
|
||||
tar
|
||||
bzip2
|
||||
kernel-devel
|
||||
kernel-headers
|
||||
%end
|
Loading…
x
Reference in New Issue
Block a user