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

Auto registration for unregistered hosts with Quick registration and invetory

Scheduled Pinned Locked Moved
Tutorials
7
29
14.6k
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
    mrzo
    last edited by Mar 11, 2015, 8:29 AM

    Thanks. No problem to editing some php code, but wanted to avoid this kind of customization for future fog updates (they probably overide this). But will, if I dont find other solution. I thought about this when I realised the boot menu is generated by php, but dont known the system yet. So great to pointing me to right class and code.

    Regarding the computers, they will be refurbished and they will be (should be) set up to boot from network and without need to connect keyboard (as we asked for this).

    Extracting MACs from log file is option, but for me problably most complicated. But when the script is done and functional, at least the possibility of error will be lower (agains manually recording it).

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Mar 11, 2015, 11:08 AM

      I can help you with the scripting. Do you prefer setting up a DHCP server (which you will need at some point anyway) or capturing the MAC addresses via tcpdump (you’d need a capture PC)??

      Either way is a bit of extra work. DHCP pool setup or tcpdump capture, your choice… The good thing about the tcpdump solution is that you can use a laptop and walk from PC to PC, connect it straight to your laptop, capture boot it, wait for the DHCP request and off to the next…

      On the other hand editing the boot menu and quick registrating all of them seems even less work. Which ever you choose it would be wise to follow some kind of order.

      By the way, do you want to use random dynamic IPs (DHCP range) or static IPs assigned by your DHCP server?

      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
      • M
        mrzo
        last edited by Mar 11, 2015, 12:34 PM

        I think the simplest solution will be edit the php code. Thanks for offering a help, if I’ll need something I’ll use it.

        1 Reply Last reply Reply Quote 0
        • J
          Junkhacker Developer
          last edited by Mar 11, 2015, 6:13 PM

          or, you could enable Fog quick registration
          fog configuration > fog settings > fog quick registration

          signature:
          Junkhacker
          We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott
            last edited by Mar 11, 2015, 6:31 PM

            I guess I’m not understanding what you’re trying to do.

            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
            • M
              mrzo
              last edited by Mar 12, 2015, 5:47 AM

              [quote=“Junkhacker, post: 43692, member: 21583”]or, you could enable Fog quick registration
              fog configuration > fog settings > fog quick registration[/quote]
              I count on it. But as I understood, quick registration only helps with naming, assigning image to registering hostsetc… But you must register host normaly (choose one of registration option from FOG boot menu, manualy register it on web page, etc…) Or am I mistaken?

              1 Reply Last reply Reply Quote 0
              • M
                mrzo
                last edited by Mar 12, 2015, 6:00 AM

                [quote=“Tom Elliott, post: 43696, member: 7271”]I guess I’m not understanding what you’re trying to do.[/quote]
                I thought I explained it well, guess not… 😄 Simply - I want register (and deploy image to) 150 new computers without need to plug every one of them to keyboard and monitor and I want it do quickly as possible when they arrive. My idea was to plug them few at the time to power and network, boot them, they automaticaly register to FOG with inventory info, they shutdown. I add these computers to one “deploy” group , add task to this group to deploy image, power on computers, let it do its works move them to “finished” group and repeat.

                I wanted do this with clonezlilla as we did it before, but I like the idea of have them registered, with invetory, have multiple different images ready for them when needed… So I started playing with FOG.

                1 Reply Last reply Reply Quote 0
                • W
                  Wayne Workman
                  last edited by Mar 12, 2015, 12:40 PM

                  I think that’s easily done in the current SVN revision.

                  The newer revisions actually have a web GUI for editing the boot menu to your liking, including just quick-registering clients that aren’t registered. That’s probably the most common use for it.

                  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
                  • J
                    Junkhacker Developer
                    last edited by Mar 12, 2015, 3:24 PM

                    [quote=“mrzo, post: 43743, member: 28859”]I count on it. But as I understood, quick registration only helps with naming, assigning image to registering hostsetc… But you must register host normaly (choose one of registration option from FOG boot menu, manualy register it on web page, etc…) Or am I mistaken?[/quote]

                    from the pop up description on this setting [CODE]Enable FOG Quick Registration auto population feature (0 = disabled, 1=enabled). If this feature is enabled, FOG will auto populate the host settings and automatically image the computer without any user intervention.[/CODE]

                    signature:
                    Junkhacker
                    We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mrzo
                      last edited by Mar 13, 2015, 6:03 AM

                      I don’t only read this information, but I also tried it. Not sure how it should work, but with Quick Registration configured, result was, when I booted targeted computer, FOG boot menu showed, and after few seconds computer booted back to OS on harddrive. When I manually choosed Quick registration and inventory from menu, host was registered with proper name given by settings, image was associated etc… But my interaction was needed. That is why I asked about possibility to choose Quick registration automaticaly from menu. This is for FOG 1.2.0 (I tried install trunk version also, but was not able to access FOG configuration page, so I did go back to 1.2.0) Am I missing something?

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by Mar 15, 2015, 7:28 PM

                        Sorry for the wall in advance. I actually was looking for this feature myself, looked at the Quick Registration Auto Population but found it didnt auto reg if something wasnt registered. I eventually figured it out and made the modification myself. If someone could provide some feedback on this, that would be great. Basically what I did was use the Host Is Valid check to make an if statement to choose between to variable = “” statements. This was all done in the BootMenu.class.php file right at line 138, might be different for you, I have FOG 1.2.0. This does require Auto Population to be turned on and configured to your specifications so as to properly fill out the sequential naming.

                        Attached is a screenshot of what it looks like for me. I’m sure this could be more appropriately coded, but I’m not the best at php.

                        TOM, If this isn’t already included, maybe we could add this and give it an on/off button in the webui?

                        Note: “DESTRUCTIVE: This will forcefully register and image ANY computer that is booted via PXE and isn’t already registered. I do not recommend this at all for a production network. Use with caution in a secure deployment network.”

                        [PHP]
                        ####Add this
                        if ($this->Host && $this->Host->isValid()){
                        $defchoice2 = “choose --default fog.local --timeout $timeout target && goto ${target}\n”;
                        }ELSE{
                        $defchoice2 = “choose --default fog.reg --timeout $timeout target && goto ${target}\n”;
                        }
                        ####Don’t touch this

                                    if ($Advanced)
                                            $this->pxemenu['fog.advanced'] = 'Advanced Menu';
                                    $this->memdisk = "kernel $memdisk";
                                    $this->memtest = "initrd $memtest";
                                    $this->kernel = "kernel $bzImage root=/dev/ram0 rw ramdisk_size=$ramsize ip=dhcp dns=$dns keymap=$keymap web=${webserver}${webroot} consoleblank=0 ";
                                    $this->initrd = "imgfetch $imagefile\n";
                        

                        ####Modify this
                        $this->defaultChoice = “$defchoice2”;
                        ####[/PHP]

                        [url=“/_imported_xf_attachments/1/1788_Screenshot 2015-03-15 14.17.35.png?:”]Screenshot 2015-03-15 14.17.35.png[/url]

                        1 Reply Last reply Reply Quote 0
                        • T
                          Tom Elliott
                          last edited by Mar 15, 2015, 9:55 PM

                          This already exists for dev fog.

                          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
                          • ?
                            A Former User
                            last edited by Mar 15, 2015, 11:19 PM

                            Ahh, OK. I probably didn’t look hard/long enough. I am really good at missing information that’s right in front of me. I just got started with FOG last week and I must say I’m thoroughly impressed with it.

                            1 Reply Last reply Reply Quote 0
                            • M
                              mrzo
                              last edited by Mar 16, 2015, 9:11 AM

                              So, the solution could be install the trunk version?

                              1 Reply Last reply Reply Quote 0
                              • T
                                Tom Elliott
                                last edited by Mar 16, 2015, 9:15 AM

                                In as simple terms as possible, yes!

                                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
                                • M
                                  mrzo
                                  last edited by Mar 26, 2015, 6:56 AM

                                  Is it possible to shutdown computer after auto populating with given image instead of restarting (and booting from HD)?

                                  1 Reply Last reply Reply Quote 0
                                  • Joseph HalesJ
                                    Joseph Hales Testers
                                    last edited by Mar 26, 2015, 3:59 PM

                                    It should be possible to customize your fog to allow for this but its not settable in fog you would have to see how the web gui does it when you manually deploy an image and check the shutdown after task box.

                                    RTFM

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mrzo
                                      last edited by Apr 20, 2015, 6:49 AM

                                      Have som problems with Fog - some computers don’t register correctly and when I checked the database, the host is registered with hostID 0 - related MAC address is in the table hostMAC (with hostID 0) but host is not showing in hosts list, and is not recognised as registered. Using older trunk version 3153.

                                      When I manualy delete these two records from database, host register correctly. I have only two PC with thos problem and dont know why these two.

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        mrzo
                                        last edited by Apr 20, 2015, 7:10 AM

                                        Just had third case - notice message “Host is not valid.” instead of “Done, with imaging”. Again delete from database, and host regiter succefully through automatic Quick registration.

                                        1 Reply Last reply Reply Quote 0
                                        • Joseph HalesJ
                                          Joseph Hales Testers
                                          last edited by Apr 20, 2015, 1:32 PM

                                          I think this was addressed in a later SVN.

                                          RTFM

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

                                          205

                                          Online

                                          12.1k

                                          Users

                                          17.3k

                                          Topics

                                          155.3k

                                          Posts
                                          Copyright © 2012-2024 FOG Project