Upgrade FOG without internet connection

  • We use version 1.5.8 and need to update to 1.5.9 because of problems with restoring images. With the 1.5.9 it seems to work fine.
    We have multiple servers, where the installer will not be able to downlad packages and will fail then.
    Which directories and files are important to copy, to upgrade the server from 1.5.8 to 1.5.9?
    Are there any specific packages which should be installed?

    Thanks in advance!

  • Senior Developer

    @Oleg I lost track of this but stumbled upon it just now. Thinking some more about it I find that we should not try to fix this within the FOG installer. We have done so many times and it just makes it a nightmare to keep up to date with the different OS requirements and specifics…

    So you might follow the steps Tom outlined some time ago - maybe you already did. If you need more detailed information on that, then let us know.

  • It is probably really wasteful for nothing more than a FOG server, but you can mirror RPM repos really easily and host them locally for systems to access. I’ve done this before. I can say I had more problem’s with RHEL’s repos than any other. Sometimes packages there would simply be missing. Never had this issue with CentOS or Ubuntu repositories (which I’ve also mirrored and hosted locally).

  • Senior Developer

    @Oleg I thought I had an easy route for you to go as it works fine when testing an update on CentOS. But then I had a look at some of your other posts and saw that you possibly use Ubuntu Linux. The 1.5.9 installer does some major cleanup of packages from external deb.sury.org (a.k.a ondrej) repos that we used for a long time. This will purge some of the packages from your system and will leave you with a non-functional FOG server - as it can’t install the packages from the official Ubuntu repos on you offline server. So please do not try to run the FOG 1.5.9 installer on an offline Ubuntu Linux system!

  • Senior Developer

    This post is deleted!

  • @tom-elliott Thanks! Looks good and I will give it a try

  • Senior Developer

    @george1421, @Oleg, @Sebastian-Roth The large majority of the time, the only changes are gui based.

    So, I have a script I run, that allows me to switch just the GUI/web facing stuff, between one another. So, for example, most of the time, my environment runs working-1.6. But when I need to edit something in dev-branch I do these steps:

    1. switch branches from working-1.6 to dev-branch.
    2. swap out my GUI facing things
    3. make the needed change
    4. update dev-branch
    5. switch branches from dev-branch to working-1.6
    6. swap out my GUI facing things

    Offline installer could do something like that, just we need to ensure the end user copies the inits and have a specific location for them within the unpacked tarball. Of course we haven’t coded for this yet, so the best I can do for right now is basic steps to get there.

    1. Download the tarball on USB stick, or whatever.
    2. Download the Inits and hash files on same USB stick
    3. Download the Kernels and hash files on same USB stick
    4. Download the FOG Client installer(s) and hash files on same USB stick
    5. Extract the tarball.
    6. Place, as appropriate, the inits, kernels, and fog client installers into the extracted location.
    7. Do everything we normally do, just without the package update/install process. ANd without downloading the stuff we pulled above.

    For my script I do:

    [[ -z $path || ! -e "$HOME/$path" ]] && path="$HOME/fogproject"
    [[ -z $configpath || ! -e "$configpath" ]] && configpath="$HOME/config.class.php"
    [[ ! -e "$configpath" && -e /var/www/fog/lib/fog/config.class.php ]] && cp /var/www/fog/lib/fog/config.class.php $configpath
    [[ ! -e $configpath ]] && {
        echo "No configuration file available. Please make sure this file exists"
        exit 1
    rsync -a --no-links -heP --delete $path/packages/web/ /var/www/fog/
    cp $configpath /var/www/fog/lib/fog/config.class.php
    chown -R apache:apache /var/www/fog
    chown -R fogproject:apache /var/www/fog/service/ipxe

    It can take 2 arguments.
    1st argument is the path to copy from. If the path does not exist or is not defined, it will assume $HOME/fogproject is the path.

    2nd argument is where the config file will be copied from when copying back the data. The the configpath is not defined, it will assume $HOME/config.class.php. If the file does not exist at $configpath, it will copy the file from /var/www/fog/lib/fog/config.class.php and place it at $configpath location. If the $configpath does not exist, it will exit the script as we don’t have a config that will allow the web folder to work properly.

    Of course there’s some minor issues (all which can relatively easily be edited or add more argument controls. Such as web path, user (apache vs www-data vs nginx vs. etc…)

  • Moderator

    @sebastian-roth I don’t think its possible without interent access. (Speaking from a RHEL perspective) for the libraries and packages if there was an internal repository (which of course internet access is needed to populate) all of the distribution files could be made internally. I assume that for the Debian variants its also possible to create an off-line package repository.

    The issue is downloading the precompiled binaries from the FOG. How could that be bypassed.

  • Senior Developer

    @Oleg I don’t think there is much we can do at the moment. While I have not tested it yet I am fairly sure the 1.5.9 FOG installer is not capable of doing an offline upgrade.

    @Tom-Elliott @george1421 @Wayne-Workman What’s your thoughts on this?

  • @sebastian-roth
    initially there was of course an internet connection but currently not possible.

  • Senior Developer

    @Oleg How did you initially install those FOG servers I am wondering!? Currently the installer needs access to the internet!

    We have discussed making it offline capable but this won’t be before the next release 1.5.10 or maybe even FOG 1.6.x…