Making Fog Portable



  • Is there a way?

    We have our standard FOG servers, and we have FOG virtualized on laptops. These laptops use the identical Virtual Machine. The IP for this VM’s MAC is reserved in each of 60+ subnets, which the laptops can visit.

    We want the VM powered up at the site where it takes on the properties (IP) of that site. eg: FOG_TFTP_HOST, FOG_WEB_HOST, FOG_WOL_HOST, /tftpboot/default.ipxe and wherever else it needs to be configured for full functionality.

    We do not want the techs to be logging into host OS, or need to perform the changes manually through the web interface.

    We want a turn-key solution for the techs. Plug-in, Power-Up, Automatically Reconfigures without intervention.

    Is this possible now without reconfiguring the server?

    Can it be made possible without manual intervention?

    If no to either, can it be made possible?

    I’ve harvested some ideas from the forums, and added some of our own to include this in /etc/rc.local:

    IP=`ip addr list eth0 | grep "inet " |cut -d" " -f6|cut -d/ -f1`
    mysql --user=root -pOurPassword -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_TFTP_HOST';" fog
    mysql --user=root -pOurPassword -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_WEB_HOST';" fog
    mysql --user=root -pOurPassword -e "UPDATE \`globalSettings\` SET \`settingValue\` = '$IP' WHERE \`settingKey\` ='FOG_WOL_HOST';" fog
    mysql --user=root -pOurPassword -e "UPDATE \`nfsGroupMembers\` SET \`ngmHostname\` = '$IP' WHERE \`ngmMemberName\` ='DefaultMember';" fog
    

    I’ll let you know how it goes.



  • @george1421 Wouldn’t Know How To check if it’s in the repo, but I can give it a shot almost home.


  • Moderator

    @juice381 Can you manually install that package from the Odroid debian repository? Does it even exist in that repository?



  • @george1421 said in Making Fog Portable:

    @juice381 Sure on the getting multicast working too. I’m sure its just a package name or pre-req this is needed. Once we can find the exact cause the developers can have a look at the installer code and made exceptions for your specific issue.

    I think your project would be good one to document for a low cost mobile deployment server that could be used in small sales offices where you need a local fog server (storage node) because of the bandwidth issues, but still manage it from a central location.

    I agree and for my use case as well. Where I have clients that need remaining or during implementation of new clients. I could see this being a huge time saver.

    I think it’s the package. It may need to be updated. For 16.04 support.

    https://launchpad.net/ubuntu/xenial/+package/udpcast


  • Moderator

    @juice381 Sure on the getting multicast working too. I’m sure its just a package name or pre-req this is needed. Once we can find the exact cause the developers can have a look at the installer code and made exceptions for your specific issue.

    I think your project would be good one to document for a low cost mobile deployment server that could be used in small sales offices where you need a local fog server (storage node) because of the bandwidth issues, but still manage it from a central location.



  • @george1421 said in Making Fog Portable:

    @juice381 It would be interesting to know of the stats you get with the mobile fog server.

    i.e.

    1. unicast to a single computer (with d-link)
    2. unicast to 2 computers (simultaneously with d-link)
    3. unicast to 2 computers (simultaneously with enterprise class switch).

    I’m interested in what the Odroid can do, but also the impact of that d-link over an enterprise switch. We see in the forums that the low (discount) switches are under powered for imaging where you will get 1/3 the speed for a multi deployment from a low end switch over an enterprise switch if the switch is the only thing that changes in the mix.

    I can run those bench marks tonight. I have an enterprise class cisco switch at home.

    I would really love to get multicast working as well. So I’ll be busy on that as well.


  • Moderator

    @juice381 It would be interesting to know of the stats you get with the mobile fog server.

    i.e.

    1. unicast to a single computer (with d-link)
    2. unicast to 2 computers (simultaneously with d-link)
    3. unicast to 2 computers (simultaneously with enterprise class switch).

    I’m interested in what the Odroid can do, but also the impact of that d-link over an enterprise switch. We see in the forums that the low (discount) switches are under powered for imaging where you will get 1/3 the speed for a multi deployment from a low end switch over an enterprise switch if the switch is the only thing that changes in the mix.



  • Materials
    1.Odroid C2 $40.00

    1. Samsung Micro SD Evo 15.00
    2. Dlink 5 port Gigabit switch 15.00

    Here is what it will look like. In the pic is an RPI this was my first attempt. But the odroid is no bigger. Waiting for my case to arrive.

    alt text

    alt text



  • @george1421 said in Making Fog Portable:

    @juice381 So if you can extract that configuring updcast stage from the install and then manually execute the commands can you find the exact command that breaks the script?

    I’ll give it a shot. Will have to be later tonight I’m at my 9-5.


  • Moderator

    @juice381 So if you can extract that configuring updcast stage from the install and then manually execute the commands can you find the exact command that breaks the script?



  • @Wayne-Workman Finally got this working with m y odroid c2. The problem is definitely with the failure I was receiving during the fog install at the “Configuring UDPCast” Stage. I commented out that portion of the fog install. Understanding i’m killing my multicast abilities. Fog completed it’s installation and thus created the .fogsettings file. I ran your script and viola up and running super portable fog server. Thanks for the assist here. Hopefully I can get UDPcast working properly at some point.


  • Moderator

    @juice381 If you have tcpdump installed on your fog server you can collect the dhcp boot of the target computer. That dump file should contain the server that is sending the duplicate dhcp option 66.

    This is the tcpdump command you need: tcpdump -w output.pcap port 67 or port 68 or port 69 Start the tcpdump program running then pxe boot the target computer until the error then abort tcpdump. You can (and should) inspect the pcap file with wireshark. You will see the dhcp request from your target computer as well as the replies from the dhcp server and any dhcp proxy servers. I do have to say, for this to work, your fog server, dhcp server and pxe booting client computer must be on the same subnet. If so, then you can capture the dhcp broadcasts in this manner.



  • @Wayne-Workman Only dhcp server I have running is the one from my ISP’s router. I’ll double check that shortly. I do have another fog server however I turn that off when testing. In fact if I change the ip back to 22 I reach the fog menu. I’ll get a screen shot of that too.



  • @george1421 ONe other note there is one failure during install. it has to do with the udpconf towards the end of the installation process. Maybe that’s the key here? I have followed tutorials on how to re-mediate that as well to no avail.



  • @george1421 said in Making Fog Portable:

    @juice381 Its still perplexing why the installfog.sh file is not creating the .fogsettings file. I think if you uncover that reason the rest will fall into place.

    Did you disable selinux and the firewall?

    Are you launching the fog install script with sudo? Does it run through and ask you all of the questions it should? Then it just doesn’t do anything? It almost sounds like selinux is blocking the installer script from writing to the places it needs to.

    In regards to your error screen below, do you have another dnsmasq server running that is sending out the legacy ip address? It is saying that you are getting a duplicate option 66 {next-server} from dhcp.

    Thanks for the response. No I have a fog server setup from which i copied the fogsetting file. However I turn it off before I start testing with my portable fog. The screen below is showing you the ip .13 that i changed it to from the .22 it is still referencing for IPXE. It was the original ip Not sure where it is getting it from. I’ll google how to disable selinux. Armbian doesn’t seem to have ufw installed as running sudo ufw disable reports an error.

    I do install it using sudo access infact sudo -i so i’m running as root.


  • Moderator

    @juice381 Its still perplexing why the installfog.sh file is not creating the .fogsettings file. I think if you uncover that reason the rest will fall into place.

    Did you disable selinux and the firewall?

    Are you launching the fog install script with sudo? Does it run through and ask you all of the questions it should? Then it just doesn’t do anything? It almost sounds like selinux is blocking the installer script from writing to the places it needs to.

    In regards to your error screen below, do you have another dnsmasq server running that is sending out the legacy ip address? It is saying that you are getting a duplicate option 66 {next-server} from dhcp.


  • Moderator

    @juice381 I need to know more about the network, other fog servers, dhcp servers, and other things.

    Also - this script does much more than just modifying ltsp.conf - that’s one of many places that requires modification. There are web file changes, database changes, tftp changes. This script only works on a full fog server.



  • @Wayne-Workman I have made some progress, what I have done was copied the .fogsettings file from another working fog I had running (not active when I’m testing) to its proper location. Then changed the IP and rebooted. The script ran 3 minutes later and updated what looks like all the locations it would. ltsp.conf, .fogsettings, I had to create the log file for the script to dumps it log files manually. So the only thing that is perplexing me is why IPXE is still pointing to the original ip. See pic below. alt text


  • Moderator

    @juice381 I’ve ordered a raspberry pi 3b, I will be able to test once it comes in. Because the project and scripts work on Debian I expect no problems.

    Also 1.3.0 RC-8 had issues with db creation. This is fixed in RC-9 already.



  • @Wayne-Workman said in Making Fog Portable:

    https://github.com/wayneworkman/FOGUpdateIP

    SO the script is still looking for fog install by way of .fogsettings. however armbian after installing fog doesn’t have a .fogsettings file. I’m using armbian becacuse mate refuses to install mysql and thus I can’t test as fog db can’t be creteed.


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.