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

.FogSettings Auto Edit IP and Hostname

Scheduled Pinned Locked Moved
FOG Problems
4
8
1.4k
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.
  • F
    FlareImp
    last edited by Dec 5, 2022, 4:40 PM

    I have an image of Ubuntu with the fog files ready to be installed that we use to push out our fog nodes at our different sites. the problem I am having is that every time we deploy a node, we have to manually edit the .fogsettings file to set the new IP Address and the new Hostname. Is there a way to Change the Server IP Address and the Hostname by having it pull them automatically from the current system being setup?

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Dec 5, 2022, 4:46 PM

      @FlareImp Well, why don’t you generate the .fogsettings file with the right IP and hostname before running the FOG installer?

      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

      F 1 Reply Last reply Dec 5, 2022, 4:54 PM Reply Quote 0
      • F
        FlareImp @Sebastian Roth
        last edited by Dec 5, 2022, 4:54 PM

        @sebastian-roth I don’t follow

        G 1 Reply Last reply Dec 5, 2022, 5:21 PM Reply Quote 0
        • G
          george1421 Moderator @FlareImp
          last edited by Dec 5, 2022, 5:21 PM

          @flareimp I’m a bit confused here too.

          we have to manually edit the .fogsettings file to set the new IP Address and the new Hostname

          Are you creating multiple instances of a FOG server? Kind of using a fog server to deploy a new fog server? The .fogsettings file is only used during the setup and then upgrade of a fog server, never for image deployment.

          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!

          F 1 Reply Last reply Dec 5, 2022, 6:14 PM Reply Quote 0
          • F
            FlareImp @george1421
            last edited by Dec 5, 2022, 6:14 PM

            @george1421 Sorry for not being clear. I uploaded an image of Ubuntu with the fog install files and .fogsettings already loaded onto it. All a tech needs to do is change the .fogsettings file to match the node they are imaging and then re-run the fog installer with the -y command. currently after imaging they need to nano into the .fogsettings file and manually set the ip address and the hostname for that machine before running the installer. I am trying to get it to where when we image a node it can be auto installed rather than have someone set it up.

            G 1 Reply Last reply Dec 5, 2022, 7:20 PM Reply Quote 0
            • G
              george1421 Moderator @FlareImp
              last edited by george1421 Dec 5, 2022, 1:24 PM Dec 5, 2022, 7:20 PM

              @flareimp Ah ok. You will want to do that with a post install script. A post install script will execute just after the image is pushed to the computer and just before the cloning completes.

              With the post install script the ideal is to connect to the deployed image’s hard drive, make the adjustments to the .fogsettings file. The continue on with the reset of imaging. The only thing you will need to do before you capture the image is create a script that will run within the context of the newly imaged computer to run the installer command with the -y to execute the installer. Before SystemD (i.e. SysV) I would just create a 99local file in the startup folder that would execute the first time boot up commands. That 99local script would then remove itself from the startup folder so it would only execute once. There maybe something more elegant that can be done with SystemD.

              The basic concepts are laid out here. I know this post is windows centric, but the way we go about it is very similar under linux. I just haven’t had a chance to write a linux equivalent of this tutorial: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed

              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!

              F 1 Reply Last reply Dec 6, 2022, 4:09 PM Reply Quote 1
              • F
                FlareImp @george1421
                last edited by Dec 6, 2022, 4:09 PM

                @george1421 Okay, thank you very much!

                W 1 Reply Last reply Dec 7, 2022, 2:27 AM Reply Quote 0
                • W
                  Wayne Workman @FlareImp
                  last edited by Wayne Workman Dec 6, 2022, 8:28 PM Dec 7, 2022, 2:27 AM

                  @flareimp There’s other options as well. You could do either of the below.

                  The below script is a one-use script that someone could run manually. After updating the IP via the OS configuration, you can run this script that will update all the FOG IP bits for you.
                  https://github.com/FOGProject/fog-community-scripts/tree/master/updateIP

                  This next script below will continuously update FOG’s IP settings to match the local interface IP address. You could package this with the fog server image you have so everything just works out-of-box.
                  https://github.com/FOGProject/fog-community-scripts/tree/master/MakeFogMobile

                  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
                  • 1 / 1
                  1 / 1
                  • First post
                    6/8
                    Last post

                  148

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project