Offline installation
-
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 canfor it in $(./installfog.sh --list-packages); do sudo apt install --download-only $it; done
.Is there a way to do that now?
Thanks,
Matthew -
@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.
-
@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? -
FYI filed issue https://github.com/FOGProject/fogproject/issues/576
-
@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.shcase $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
-
@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 likecat /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?
-
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.
-
@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.