• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. iyoung
    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 27
    • Best 5
    • Controversial 0
    • Groups 0

    iyoung

    @iyoung

    5
    Reputation
    1.2k
    Profile views
    27
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    iyoung Unfollow Follow

    Best posts made by iyoung

    • Virtualbox Cloning to make new SNs

      I’ve had to do get rid of, change and recreate new SN so many time due to not having dedicated hardware for the SN. I had been using the 6200 pro boxes we had around. Thus, whenever we needed to replace our old dc5700s and dc7700s, instead of buying new hardware, we used the same set of 6200s. And since my project wasn’t business critical (even though it saved us about $100 per month) I was forced to adapt. Just another day in I.T.

      So I did a little write up on how to make new FOG storage nodes without having to reinstall everything by using the cloning feature in Oracle’s Virtualbox.

      Cloning a FOG Storage Node virtual machine (VirtualBox)

      This guide assumes you have Ubuntu 16.04 with FOG trunk installed (Currently 1.3.0 RC11).
      The best time to do the cloning is after running the installer, but before adding the Node to the main server, so that an images aren’t also cloned.

      1. First step, do a shutdown of the system. Go to the VirtualBox manager window and right click on the VM and click on ‘Clone…’

      0_1475098158862_FogSNClone_1.PNG

      The dialogue box will ask you for the name, type of clone, how you want any possible snapshots handled and if you want to change the MAC address. The name is just what appears in VirtualBox, so choose whatever you desire there.

      0_1475098167509_FogSNClone_2.PNG

      In this example, we want the new VM to be as independent from the parent VM as possible, so set Clone type to ‘Full Clone’, Snapshots to ‘Everything’ and check to reinitialize any MAC address. Then click ‘Clone.’ This process can take a while, even though there aren’t any images, depending on disk speed.

      0_1475098173143_FogSNClone_3.PNG

      1. Next we will start up the new VM. The username and password will be the same as the parent VM. After logging in, enter
      sudo nano /etc/network/interfaces
      

      This will bring up the configuration file for NICs on the VM, use the arrow keys to navigate. In this example, there is only one interface, though you may have more. The dns-search option will most likely refer to your domain name if you are a Windows environment and dns-nameservers are the IP addresses, not hostnames, of DNS servers. After filling the information in, press Control-X, then y followed by enter. This will save the interface configuration.

      0_1475098394045_FogSNClone_4.PNG

      1. Next up, we will change the hostname to reflect what we made the name in VirtualBox (you can change it to whatever in your own environment.) To edit both of the files we need to change enter:
      sudo nano /etc/hosts
      
      sudo nano /etc/hostname
      

      In both examples shown, the hostname has already been changed from “FogUbunSN1” to “FogUbunSN3.”

      0_1475098384906_FogSNClone_5.PNG

      0_1475098374887_FogSNClone_6.PNG

      1. IMPORTANT, make sure you now reboot the VM, so that it can apply all of the setting we just modified.

      2. Now we will modify the FOG installers settings file to reflect the changes we’ve made. Enter

      sudo nano /opt/fog/.fogsettings
      

      On the screen displayed, the only option that we need to change is the first one ‘ipaddress’. For security you can also change the ‘password’ field, though using a password generator is recommended.

      1. If you used a SSH connection you can leave the SSH keys the same, but if you went to the trouble of being more security with the first storage node, why not with the clone. If you don’t have OpenSSH installed, use
      sudo apt-get install openssh-server
      
      1. . First off, generate your SSH keys. Putty’s key generator is used in this example. (You can also change the bit amount to 4096, which is what is used in all the keys in this example)

      0_1475098360481_FogSNClone_7.PNG

      After generating the keys, the public key will be displayed, along with field for ‘Key comment’ and ‘Key passphrase’ both of these field are optional, though the VMs hostname is common in the comment field. You should then have both the public and private keys in a secure location. To get the public key on the VM, this example uses a password secured SSH connection, though you can use other methods. Run the following commands

      mkdir ~/.ssh
      chmod 700 ~/.ssh
      nano ~/.ssh/authorized_keys
      

      To create the key file. Paste the public key into file by copying the text and then right clicking inside the putty window. This should paste the key as a single line of text. After saving and closing the file, run

      chmod 600 ~/.ssh/authorized_keys
      
      1. All that’s left to do now is run the installer and add the node to the main FOG server
      cd /root/fogproject/bin
      ./installfog.sh
      

      :EOF

      If you notice any tipos, grammatical error, things I did wrong in

      STR="bash"
      echo $str
      

      or things I did wrong in FOG, please don’t be afraid to comment

      Sources:
      https://help.ubuntu.com/lts/serverguide/network-configuration.html
      https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none
      https://support.hostgator.com/articles/specialized-help/technical/ssh-keying-through-putty-on-windows-or-linux

      And of course

      https://wiki.fogproject.org/wiki/index.php

      posted in Tutorials
      I
      iyoung
    • RE: Replicating the Storage Node itself

      @Wayne-Workman I’m using Ubuntu Server, so I won’t be able to include screen shots of that part, which looks to be RH Linux thing. I’ll just add the text and cite the article.

      posted in General
      I
      iyoung
    • RE: Hardware Currently Working with FOG v1.x.x

      HP Compaq 6200 Pro
      Intel 82579LM Gigabyte Network Connection
      undionly.kpxe
      FOG 1.2.0
      03-16-2016
      Single Disk - Resizable

      Note on 6200 - I’ve occasionally run into issues with SD - R where after imaging, Explorer reports the shrunken size of the partition but Disk Management show the partitions being the right size (first part being 100 to 350mb and the second part the rest of the disk) To remedy this go to DISKPART, select the miss-sized partition and run EXTEND FILESYSTEM.

      HP DC7700
      Broadcom NetXtreme Gigabit Ethernet
      undionly.kpxe
      FOG 1.2.0
      03-18-2016
      Single Disk - Resizable

      Note on 6200 and DC7700 - Also as is noted here, HP adds partitions that make using Single Disk - Resizable fail out. The partition is also created when making update to the BIOS. Unlike what the article listed says however, you can delete the partition using DISKPART.

      posted in Hardware Compatibility
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      @george1421 @tom-elliott I’ll spin up a host to see if it’s an issue on fresh installs of 1.3.0.

      posted in FOG Problems
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      @iyoung Test completed. LDAP plugin added and test login succeeded.

      posted in FOG Problems
      I
      iyoung

    Latest posts made by iyoung

    • RE: AddHostModel and AddHostSerial

      Sorry on the late response. Yes to what @Tom-Elliott said, I went to /var/www/fog/lib/hooks/ and set active = true on the aforementioned hooks.

      posted in General
      I
      iyoung
    • AddHostModel and AddHostSerial

      FOG Version: 1.4.0

      When I enable these hooks, the values show up on the Host Management page as they should. But one thing that I’ve noticed is that the size of the overall bar/column at the top of the table stays the same size, such that, when you enable one option, everything on a row is pushed closer together. Enabling both hooks removes the ability to do quick tasks from the Host Management page.

      My question is: Is there a way to widen the top bar so that everything shows up when both hooks are enabled or is that something that would have to be changed in the code in multiple places?

      0_1494948854682_add_serial_off.PNG
      0_1494948871061_add_serial_on.PNG
      0_1494948999005_add_both_on.PNG

      posted in General
      I
      iyoung
    • Unable to read Apache log files in web GUI
      Server
      • FOG Version: 1.3.4
      • OS: Ubuntu 16.04.1 LTS
      Client
      • Service Version:
      • OS:
      Description

      I’m getting ‘Unable to open file for reading’ message when I try to read any of the Apache log files. If I modify /etc/logrotate.d/apache2 to change ‘create 640 root adm’ to ‘create 655 root adm’ should that fix the log issue, unless some other program modifies logrotate? Or should I just schedule ‘chmod 655’ to run every day on /var/log/apache2/*.log?

      posted in Linux Problems
      I
      iyoung
    • RE: LDAP Plugin

      If @george1421’s suggestion doesn’t work, in my setup of the plugin, I left the ‘Bind DN’ and ‘Bind Password’ fields blank, from reading this post. But my AD might be set up wrong.

      posted in FOG Problems
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      @iyoung Test completed. LDAP plugin added and test login succeeded.

      posted in FOG Problems
      I
      iyoung
    • RE: Plugin Management on 1.3.0

      @Tom-Elliott Thanks, that took care of it. My Google Search-fu clearly needs work.

      posted in FOG Problems
      I
      iyoung
    • Plugin Management on 1.3.0
      Server
      • FOG Version: 1.3.0 (Official from SF)
      • OS: Ubuntu 16.10 Server
      Client
      • Service Version:
      • OS: Windows 10
      Description

      After creating a fresh Ubuntu install (again) and installing FOG from SF, I went to enable the plugin system. After checking the box under ‘FOG Settings’, I clicked over to the ‘Plugin Management’ icon and I got a HTTP 500 error. Below is the corresponding entry in the Apache error log. The only change I had made to the server prior was installing ssh-server, molly-guard and aptitude. At the start of the FOG install, I did see a message saying that the installer would have to reinstall apache and php files, which I accepted.

      [Thu Dec 29 13:10:20.858079 2016] [php7:error] [pid 31667] [client 192.168.34.119:54638] PHP Fatal error: Uncaught Error: Call to a member function set() on null in /var/www/fog/lib/fog/plugin.class.php:153\nStack trace:\n#0 /var/www/fog/lib/fog/plugin.class.php(195): Plugin->_getDirs()\n#1 /var/www/fog/lib/pages/pluginmanagementpage.class.php(47): Plugin->getPlugins()\n#2 /var/www/fog/lib/fog/fogpagemanager.class.php(394): PluginManagementPage->__construct()\n#3 [internal function]: FOGPageManager->{closure}('/var/www/html/f...')\n#4 /var/www/fog/lib/fog/fogpagemanager.class.php(399): array_map(Object(Closure), Array)\n#5 /var/www/fog/lib/fog/fogpagemanager.class.php(182): FOGPageManager->_loadPageClasses()\n#6 /var/www/fog/management/index.php(49): FOGPageManager->render()\n#7 {main}\n thrown in /var/www/fog/lib/fog/plugin.class.php on line 153, referer: http://192.168.34.28/fog/management/index.php?node=about&sub=settings
      

      0_1483039241764_Fog130install.PNG

      posted in FOG Problems
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      @Tom-Elliott I looked at the creation date of my main FOG server and it looks like it was created on 09/15/2016, and I know that I went right to trunk when I installed FOG. I skimmed this thread which is, for the most part, newer than that. Was php-ldap added more recently?

      posted in FOG Problems
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      Just looking at FOG installing now, I can see php7.1-ldap in the “Packages to be installed.” The only things I changed before installing FOG were installing aptitude and ssh-server.

      OS: Ubuntu 16.10 Server
      FOG: 1.3.0 (SVN 6051)

      posted in FOG Problems
      I
      iyoung
    • RE: LDAP plugin on 1.3.0

      @george1421 @tom-elliott I’ll spin up a host to see if it’s an issue on fresh installs of 1.3.0.

      posted in FOG Problems
      I
      iyoung