• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Automate FOG Installation?

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    3
    8
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TBuzaTechnician
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @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.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        T 1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by

          @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/

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 1
          • T
            TBuzaTechnician @Sebastian Roth
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • S
              Sebastian Roth Moderator
              last edited by

              @TBuzaTechnician The default is to not make FOG the DHCP…

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 1
              • T
                TBuzaTechnician
                last edited by

                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!

                Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                • Wayne WorkmanW
                  Wayne Workman @TBuzaTechnician
                  last edited by

                  @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.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    TBuzaTechnician @Wayne Workman
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    156

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project