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

Multiple master nodes syncing images

Scheduled Pinned Locked Moved Solved
FOG Problems
3
5
757
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.
  • B
    Baessens
    last edited by Baessens Nov 13, 2019, 4:18 AM Nov 13, 2019, 9:20 AM

    I have two standalone fog nodes, each on a different site. I want to automatically sync images from node A to B. What is the best way to do this? Do i need the location plugin for this?

    I understand I have to export/import the Images list.
    I will only be creating images on node A.

    The reason i’m not using a storage node, is cause I want to be able to use fast deploy from both nodes.

    EDIT: i don’t want to have to register my hosts

    Thanks in advance !

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by george1421 Nov 13, 2019, 4:17 AM Nov 13, 2019, 10:15 AM

      On your (master) just add the remote FOG server as a storage node (in name only). You will need to add the remote fog server using the management id of fogproject with the management password found in the /opt/fog/.fogsettngs file on the remote FOG server.

      With that said this is a perfect use case of a storage node coupled with the location plugin if you are only concerned about fast deploy. The down side is that all of the remote computers with the fog client on it will have to connect to the master node to get their instructions and you can only capture images to the master node.

      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!

      B 1 Reply Last reply Nov 13, 2019, 10:21 AM Reply Quote 0
      • B
        Baessens @george1421
        last edited by Nov 13, 2019, 10:21 AM

        @george1421 As always, thanks for the quick reply. Another reason i don’t want to use a storage node with location plugin, is that I then have to register my host first, before i can deploy an image. Unless this is incorrect?

        G 1 Reply Last reply Nov 13, 2019, 10:24 AM Reply Quote 0
        • G
          george1421 Moderator @Baessens
          last edited by Nov 13, 2019, 10:24 AM

          @Baessens Yes the storage node concept requires registration first so the target computer knows where to find the image. If you are using the load and go method (i.e. pxe boot and then select deploy image from the iPXE menu) you will need to use multiple normal mode FOG servers just as you outlined.

          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!

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Nov 13, 2019, 10:47 AM

            @Baessens In this special case I’d suggest you use basic Linux commands to export/import image definitions and sync the image files to your other node.

            • Optional: Create a sync user account on your main master node - otherwise you’d use the root account to do that but don’t use the fogproject account!
            • Setup SSH keys to be able to login using the sync (or root) account from node B to node A
            • Setup a cron job on your node B to do the DB and file sync
            • Make sure rsync is installed on both nodes.

            Here is just a quick outline of how you might do this (untested!):

            #!/bin/bash
            
            ssh syncuser@nodeA mysqldump -u root -pPassw0rd fog images >/tmp/images.sql
            mysql -u root  -pPassw0rd </tmp/images.sql
            rsync -ave ssh syncuser@nodeA:/images /images >>/var/log/fog/myimagesync.log 2>&1
            

            This will wipe the images table on your node B and import all the definitions you have on node A.

            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 1
            • 1 / 1
            1 / 1
            • First post
              2/5
              Last post

            188

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project