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

    Offline installation

    Scheduled Pinned Locked Moved Unsolved
    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.
    • M
      matthewadams12
      last edited by matthewadams12

      Hi all,

      I’m curious if there’s a way to facilitate an offline installation of Fog server. In particular, I’d like to be able to ask the installfog.sh script for all of the packages needed, like ./installfog.sh --list-packages so that I can for it in $(./installfog.sh --list-packages); do sudo apt install --download-only $it; done.

      Is there a way to do that now?

      Thanks,
      Matthew

      Tom ElliottT JJ FullmerJ 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @matthewadams12
        last edited by

        @matthewadams12 If you have already installed fog, look at the /opt/fog/.fogsettings file particularly the “packages” variable

        This should contain all the necessary packages needed to install on the server.

        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

        M 1 Reply Last reply Reply Quote 1
        • M
          matthewadams12 @Tom Elliott
          last edited by

          @Tom-Elliott Will do, however, if the list of packages ever changes, I’d somehow need to know that.

          What would be reliable, however, is to add the feature as described above: ./installfog.sh --list-packages. What do you think?

          1 Reply Last reply Reply Quote 0
          • M
            matthewadams12
            last edited by

            FYI filed issue https://github.com/FOGProject/fogproject/issues/576

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

              @matthewadams12 I’m not fully understand what exactly you’re requesting.

              The packages line in the fogsettings file is all the packages installed for FOG to operate.

              Of course you’re correct this can be manually edited.

              However, this is used at the initial install and built that way. Future upgrades typically use the information from this line for checking unless there’s a significant need to change it?

              The reason I’m hesitant is it’s completely based on the OS installed (and its relevant version) and can be changed:
              https://github.com/FOGProject/fogproject/blob/master/lib/ubuntu/config.sh
              https://github.com/FOGProject/fogproject/blob/master/lib/redhat/config.sh
              https://github.com/FOGProject/fogproject/blob/master/lib/arch/config.sh

                  case $linuxReleaseName_lower in
                      *ubuntu*|*bian*|*mint*)
                          initdsrc="../packages/init.d/ubuntu"
                          ;;
                      *)
                          initdsrc="../packages/init.d/redhat"
                          ;;
                  esac
              

              https://github.com/FOGProject/fogproject/blob/master/lib/common/functions.sh#L658

              There’s so much that can change just at the time you run the installer I don’t know of a simple “–list-packages” argument that would be accurate without assuming fogsettings packages as the options on upgrades at least

              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

              M 1 Reply Last reply Reply Quote 0
              • M
                matthewadams12 @Tom Elliott
                last edited by

                @Tom-Elliott I understand that the list of packages depends on the OS installed, and, if I understood you correctly, the packages listed in the .fogsettings.

                What I’m asking for is a way to calculate, on the target machine, the list of packages (& versions?) that would be needed to be installed in order for fog to be installed for the first time or for the existing fog installation to be upgraded. That’s why I suggested that it be an argument to installfog.sh.

                Imagine my fog server is on a network that is completely isolated from the Internet. I have to be able to calculate the list of packages (& versions?) fog needs to operate, cp that list to an SD card or whatever as, say, deps.txt, then walk over to the machine with the same OS that does have Internet, mount the SD card, then do something like cat /media/.../deps.txt | apt-get install --download-only --bundle or whatever. After all the bundles are downloaded, copy them to the SD card & sneakernet them back to the isolated fog server and install them.

                Capice?

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

                  @matthewadams12

                  I understand what you’re requesting, but we don’t put limits to what can “also” be added to the list of packages.

                  Here’s the List for Ubuntu (Modern versions at least)
                  apache2 build-essential cpp curl g++ gawk gcc genisoimage git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-fastcgi libapache2-mod-php libc6 libcurl3 liblzma-dev m4 mariadb-client mariadb-server net-tools nfs-kernel-server openssh-server php-fpm php php-cli php-curl php-gd php-json php-ldap php-mbstring php-mysql php-mysqlnd tar tftpd-hpa tftp-hpa vsftpd wget zlib1g

                  Here’s the list for Redhat based OS (Modern versions beyond Centos/Redhat 7)
                  curl dhcp-server gcc gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-json php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux-user vsftpd wget xz-devel

                  But I am also unware that this is even potentially possible since we require internet access at the time of install.

                  So, if you’re able to take an SD card, load the packages, then reinsert that SD Card to the machine to install, why couldn’t you just run the installer from an “internet established link” then disconnect and isolate it?

                  I understand what you’re requesting, but there’s various reasons this was not put into place in the past.

                  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

                  1 Reply Last reply Reply Quote 0
                  • JJ FullmerJ
                    JJ Fullmer Testers @matthewadams12
                    last edited by

                    @matthewadams12 Why do you need the Fog Server to be offline?
                    Maybe there’s a solution where we can isolate just the part you want to isolate. i.e. if you are trying to remove internet access where images are stored you could setup a storage node and keep that offline after initial install. The storage node would also need packages and updates to fog, but you could capture them during updates on the main server and then sneakernet them to the storage node.

                    Storage nodes are just what I’m using as an example. If it’s not the images stored on the server you’re trying to isolate, then there could still be another solution. You could also firewall the server with your external firewall or the os firewall to only allow access to the fog github page for update downloads and then the repo sites that download the package updates?

                    Just thought I’d throw out some other possibilities.

                    Have you tried the FogApi powershell module? It's pretty cool IMHO
                    https://github.com/darksidemilk/FogApi
                    https://fogapi.readthedocs.io/en/latest/
                    https://www.powershellgallery.com/packages/FogApi
                    https://forums.fogproject.org/topic/12026/powershell-api-module

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

                    183

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project