I’ve been installing Ubuntu server via kickstart with a custom follow-up script. I’ve stripped some items for posting, but here’s the kickstart.cfg:[code]lang en_US
langsupport en_US
keyboard us
mouse
timezone UTC
rootpw --disabled
#Initial user
generate crypted password with python:
import crypt
print(crypt.crypt(“My Password”, “$6$My Salt”))
user ignition --fullname “Ignition SCADA Server” --iscrypted --password xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
reboot
text
install
cdrom
#System bootloader configuration
bootloader --location=mbr locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Partitioning
part / --fstype ext4 --size 1 --grow --asprimary --label=Root
#System authorization infomation
auth --useshadow --enablemd5
#Network configuration
network --bootproto=static --device=eth0 --ip=192.168.0.xxx/24 --gateway=192.168.0.1 --nameserver=192.168.0.1 --hostname=ign778
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
Other debian installer customizations (owner is “d-i” by default)
preseed partman-auto/choose_recipe select atomic
preseed partman-lvm/device_remove_lvm boolean true
preseed partman-lvm/confirm boolean true
preseed partman-lvm/confirm_nooverwrite boolean true
preseed partman-md/device_remove_md boolean true
preseed partman-md/confirm boolean true
preseed partman-md/confirm_nooverwrite boolean true
preseed partman-partitioning/confirm_write_new_label boolean true
preseed partman/confirm_write_new_label boolean true
preseed partman/choose_partition select “Finish partitioning and write changes to disk”
preseed partman/confirm boolean true
preseed partman/confirm_nooverwrite boolean true
preseed pkgsel/update-policy select unattended-upgrades
preseed --owner partman-basicfilesystems partman-basicfilesystems/no_swap boolean false
#custom packages for installation
%packages
@ ubuntu-server
openssh-server
unzip
xfce4
xfce4-session
xvfb
zip
xmlstarlet
%post
mkdir -p /root/.ssh
umask 022
echo “ssh-rsa AAAAB3Nzaxxxxxxxxxxxxxxxxxxxxxxxxxx user@host” >/root/.ssh/authorized_keys
mkdir -p /home/ignition/.ssh
echo “ssh-rsa AAAAB3Nzaxxxxxxxxxxxxxxxxxxxxxxxxxx user@host” >/home/ignition/.ssh/authorized_keys
chown -R ignition:ignition /home/ignition
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get --yes --ignore-missing --with-new-pkgs upgrade
debconf-set-selections <<debconf-EOF
oracle-java7-installer shared/accepted-oracle-license-v1-1 select true
oracle-java8-installer shared/accepted-oracle-license-v1-1 select true
debconf-EOF
apt-get --yes install oracle-java7-installer oracle-java8-installer
update-java-alternatives -s java-8-oracle
cd /home/ignition
wget --no-verbose ‘http://ks.automation-pros.com/ia/ia-install.sh’
wget --no-verbose ‘http://ks.automation-pros.com/ia/ignition-build7.7.8-linux-x64.zip’
md5sum -c <<md5sum-EOF
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ia-install.sh
379ed4faf188be274bbcea4260ded5f3 ignition-build7.7.8-linux-x64.zip
md5sum-EOF
if test $? -eq 0 ; then
chmod +x ia-install.sh
./ia-install.sh
else
echo "Install aborted - bad download(s) " >badinstall.txt
date >>badinstall.txt
fi[/code]The separate shell script ia-install.sh does the rest:[code]#! /bin/bash
Kickstart post-process to install downloaded ignition zip file and
modules.
tgt="/usr/share/ignition"
cd /home/ignition
rm -rf /etc/ignition /var/log/ignition
mkdir -p “${tgt}” /etc/ignition /var/log/ignition
unzip ?gnition*.zip -d “${tgt}”
for x in .modl ; do if test -f “$x” ; then mv “$x” “${tgt}/user-lib/modules” ; fi ; done
cd “${tgt}/data”
mv gateway. log4j.* /etc/ignition
awk -f - ignition.conf >/etc/ignition/ignition.conf <<-conf-EOF
BEGIN { copyflag=1; printflag=1 }
/^#?wrapper.java.additional/ {
copyflag=0;
if (printflag>0) {
print “wrapper.java.additional.1=-XX:+UseG1GC”;
print “wrapper.java.additional.2=-XX:MaxGCPauseMillis=100”;
print “wrapper.java.additional.3=-Xloggc:/var/log/ignition/javagc-%WRAPPER_TIME_YYYYMMDDHHIISS%.log”;
print “wrapper.java.additional.4=-Ddata.dir=${tgt}/data”;
print “wrapper.java.additional.5=-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false”;
print “wrapper.java.additional.6=-XX:+PrintGCDetails”;
print “wrapper.java.additional.7=-XX:+PrintGCTimeStamps”;
print “wrapper.java.additional.8=-XX:+PrintGCDateStamps”;
printflag=0;
} }
! /^#?wrapper.java.additional/ { copyflag=1 }
/^wrapper.logfile=/ { copyflag=0; print “wrapper.logfile=/var/log/ignition/wrapper.log” }
copyflag>0 { print }
conf-EOF
mv ignition.conf /etc/ignition/ignition.conf.orig
for x in /etc/ignition/* ; do ln -s “$x” . ; done
cd “$tgt”
chmod +x .sh
xml="$(readlink -f "$(find -path '/main/*/web.xml’)")"
if test -f “${xml}” ; then
xmlstarlet ed -L
-u “/:web-app/:context-param[:param-name=‘logs.dir’]/:param-value”
-v “/var/log/ignition/”
-u “/:web-app/:context-param[:param-name=‘etc.dir’]/:param-value”
-v “/etc/ignition/”
“$xml”
fi
chown -R ignition:ignition “$tgt” /etc/ignition /var/log/ignition
cd /etc/init.d
rm -f ignition
ln -s “${tgt}/ignition.sh” ignition
update-rc.d ignition defaults[/code]You’ll have to fix up various parts for your situation, but I’ve been pleased. I modified the install ISO’s boot menu to have a default entry that launches the kickstart. It’s basically hands-free once started. Total deployment time from VM allocation in virt-manager to running Ignition is about ten minutes.