Automate FOG Installation?
-
Hello everyone!
I am currently looking into the vast FOG Installation scripts and I am attempting to find a way to automate the installation of FOG Servers with the exact same configurations. (Not Storage Nodes)Scenario: Include FOG as a default install option in a custom Ubuntu Server ISO. It must install automatically without needing user input. Everything in my ISO works perfectly, but I cannot find a way to make the FOG Installation scripts “Static”.
What I’ve Tried:
Setting Static Variables within the scripts,
Manual Expect Script
AutoExpect Scripts
xdotool
Piping answers “via TXT file, and execution command”
(Probably more, but I don’t remember at this point.)Any help would be much appreciated! Thank you.
-
@TBuzaTechnician Have you tried running the installer like this yet?
./installfog.sh -y
This will just run through using all settings as default. If you need to modify specific settings there are command line switches for a lot of things and we could even add more if there is need to. Just run
./installfog.sh --help
to show the command line switches. Be aware, there is an issue with the long form command line switches like--ssl-path ...
- they simply don’t work but the short form-c ...
should do. -
@TBuzaTechnician By the way, we use this so called auto answer mode of the installer too. Thanks to @Wayne-Workman we have an automated installer test running: http://fogtesting.theworkmans.us/
-
@Sebastian-Roth Thanks for the help! I will give it a try. I Know a few of the defaults are include things I want to avoid. Like using the FOG DHCP service.
-
@TBuzaTechnician The default is to not make FOG the DHCP…
-
Hello!
Thanks for the help. Just in case someone has a similar scenario… You can find what I did below.
Here I modified the initial values to what I needed. This seemed to have made sure that the values I entered were the settings to be used when installed. After doing this, I ran with the -y switch and without, and both seemed to work fine.
\fogproject-1.5.7\bin\installfog.sh (Lines 351 - 371)
[[ -z $dnsaddress ]] && dnsaddress="" [[ -z $username ]] && username="" [[ -z $password ]] && password="" [[ -z $osid ]] && osid="" [[ -z $osname ]] && osname="" [[ -z $dodhcp ]] && dodhcp="" [[ -z $bldhcp ]] && bldhcp="" [[ -z $installtype ]] && installtype="" [[ -z $interface ]] && interface="" [[ -z $ipaddress ]] && ipaddress="" [[ -z $hostname ]] && hostname="" [[ -z $routeraddress ]] && routeraddress="" [[ -z $plainrouter ]] && plainrouter="" [[ -z $blexports ]] && blexports=1 [[ -z $installlang ]] && installlang=0 [[ -z $bluseralreadyexists ]] && bluseralreadyexists=0 [[ -z $guessdefaults ]] && guessdefaults=1 [[ -z $doupdate ]] && doupdate=1 [[ -z $ignorehtmldoc ]] && ignorehtmldoc=0 [[ -z $httpproto ]] && httpproto="http" [[ -z $fogpriorconfig ]] && fogpriorconfig="$fogprogramdir/.fogsettings"
Again, thank you for the help!
-
@TBuzaTechnician You can also pre-place your .fogsettings file, rather than modifying the source code every time. Here’s a writeup on that settings file:
https://wiki.fogproject.org/wiki/index.php?title=.fogsettings
Modifying the source is cool too, whatever shakes your feathers. -
@Wayne-Workman Thanks for the info. I did modify the .fogsettings file at first, but I was receiving errors for “invalid response” whenever I attempted to install. I just copied the .fogsettings from a working installation.