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

    Upgrade FOG without internet connection

    Scheduled Pinned Locked Moved
    Linux Problems
    5
    11
    1.3k
    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.
    • O
      Oleg
      last edited by

      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!

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

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

        O 1 Reply Last reply Reply Quote 0
        • O
          Oleg @Sebastian Roth
          last edited by

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

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

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

            george1421G 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @Sebastian Roth
              last edited by

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

              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!

              Tom ElliottT 1 Reply Last reply Reply Quote 0
              • Tom ElliottT
                Tom Elliott @george1421
                last edited by

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

                #!/bin/bash
                path=$1
                configpath=$2
                [[ -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…)

                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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                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

                O 1 Reply Last reply Reply Quote 1
                • O
                  Oleg @Tom Elliott
                  last edited by

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

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

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by Sebastian Roth

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

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

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

                        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/

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

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

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

                          152

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project