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

keeping Ubuntu client updated

Scheduled Pinned Locked Moved Unsolved
Linux Problems
3
7
408
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.
  • H
    hsikkema
    last edited by Apr 3, 2023, 6:17 PM

    Is there a way to use FOG to keep a room of Ubunutu clients updated? My thoughts were to update a machine, pull an image and then deploy it to the entire lab again. But how is this done in an automated fashion? (like at 3 AM on Monday morning - with no user interaction)

    P 1 Reply Last reply Apr 3, 2023, 8:10 PM Reply Quote 0
    • P
      pauleb @hsikkema
      last edited by Apr 3, 2023, 8:10 PM

      @hsikkema

      Are you sure, that fog is the best solution for this?

      Just for updating the software it is quite some overhead and a lot of writes on your hard disks.

      I keep my Ubuntu PCs up to date with unattended upgrades. To just download the packages once I use apt-cacher-ng but you could also setup your own mirror of the Ubuntu repos with something like rsyncmirror.

      If you start your clients via BIOS / UEFI alarm function or via wake on lan you can control the time when the updates are applied. Of course you could throw cron in the mix and don’t use unattended updates. This probably would be a way to work around user experience issues on older machines if you don’t want an update to start while user is in front of the machine. In this scenario you also would have to disable the desktop specific GUI - update mechanism to prevent it from nagging your users.

      H 1 Reply Last reply Apr 3, 2023, 9:37 PM Reply Quote 0
      • H
        hsikkema @pauleb
        last edited by Apr 3, 2023, 9:37 PM

        @pauleb We need FOG also to maintain the system already (sending out a current version of the image to eliminate student changes and stored files in a school) and would like to add in keeping the system up to date (updates and upgrades).

        So, I was hoping to deploy an image, update it, capture an image, and then deploy the image to all machines. But I do not know how to accomplish this sequence.

        G 1 Reply Last reply Apr 3, 2023, 10:14 PM Reply Quote 0
        • G
          george1421 Moderator @hsikkema
          last edited by Apr 3, 2023, 10:14 PM

          @hsikkema There are ways to do things with the FOG environment some straight forward and other kind of a home brew approach.

          So it sounds like you are trying to create a deep freeze like environment with FOG, where at the end of the day the computers are reset to a know / clean configuration. This might be possible.

          I know with FOG you can schedule a deployment using the cron method. This adds a task into the crontab to deploy an image at a later time/date. So you can schedule a deployment task for computer at 6pm. Now comes the homebrew bit, you could setup a crontab job to create a schedule a deployment at 6pm for computer. The net bit would be could we schedule a deployment to a group of computers?

          So the next issue is if you don’t have the fog client installed on the target computer, you will need to create a FOG snapin to issue a restart command to the target computer. You have a deployment scheduled at 6pm so you will need to reboot the target computers at 6:05pm as they reboot they will pick up the imaging job.

          As for keeping them updated. I think for the target computers you should just setup apt to auto install updates and then only update the golden image when you have a major change to the image. The capture/deploy method if it went sideways you could come into a classroom full of botched computers.

          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
          • H
            hsikkema
            last edited by Apr 3, 2023, 10:58 PM

            @george1421 Yes - like deepfreeze. I am able to schedule an image deployment using FOG cron. Would I do:

            • 5 PM backup of the golden image on the server
            • 6 PM DEPLOY golden image at 6 PM (done through FOG task CRON scheduling)
            • 7 PM use crontab to update/upgrade with the system running after the deployment, what/how do I run an upgrade and update (i.e. what single command could I run in CRONTAB to accomplish this?) I could run an Ubuntu system upgrade once per month or so. Or do all these updates and upgrades run automatically – how can I set the time?
            • 7:50 PM do a CRONtab reboot 50 19 * * * /sbin/shutdown -r +5
            • 8 PM CAPTURE new golden image (done through FOG task CRON scheduling)
            • 9 PM DEPLOY new golden image to the entire computer lab (.done through FOG task CRON scheduling)

            BTW, I have FOG on the client machine (at least it runs at boot, using PXE)

            G 1 Reply Last reply Apr 3, 2023, 11:10 PM Reply Quote 0
            • G
              george1421 Moderator @hsikkema
              last edited by Apr 3, 2023, 11:10 PM

              @hsikkema said in keeping Ubuntu client updated:

              7 PM use crontab to update/upgrade with the system running after the deployment, what/how do I run an upgrade and update (i.e. what single command could I run in CRONTAB to accomplish this?) I could run an Ubuntu system upgrade once per month or so. Or do all these updates and upgrades run automatically – how can I set the time?

              For after deployment updates I would use a snapin. That snapin is for application deployment, but it could just as easily run a command on the target computer like apt-get update && apt-get upgrade -y or something like that.

              Now there are somethings I don’t know off the top of my head is can a capture be schedule via cron. And how many tasks (activities) can be scheduled by cron.

              NOW there is an alternate thing you could use too. FOG has an API interface where you could program actions via powershell or curl calls to animate FOG imaging.

              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!

              G 1 Reply Last reply Apr 3, 2023, 11:30 PM Reply Quote 0
              • G
                george1421 Moderator @george1421
                last edited by Apr 3, 2023, 11:30 PM

                OK a bit more background here.

                The scheduled tasks (cron style) are added to a table in the fog database. To automate the process a bit you will need to use the mysql cli commands to import the tasks into the table. If you are familiar with linux and mysql the activity is pretty easy.

                The table layout is as such

                MariaDB [fog]> describe scheduledTasks;
                
                +---------------+---------------------+------+-----+---------+----------------+
                | Field         | Type                | Null | Key | Default | Extra          |
                +---------------+---------------------+------+-----+---------+----------------+
                | stID          | int(11)             | NO   | PRI | NULL    | auto_increment |
                | stName        | varchar(240)        | NO   |     | NULL    |                |
                | stDesc        | longtext            | NO   |     | NULL    |                |
                | stType        | varchar(24)         | NO   |     | NULL    |                |
                | stTaskTypeID  | mediumint(9)        | NO   |     | NULL    |                |
                | stMinute      | varchar(240)        | NO   |     | NULL    |                |
                | stHour        | varchar(240)        | NO   |     | NULL    |                |
                | stDOM         | varchar(240)        | NO   |     | NULL    |                |
                | stMonth       | varchar(240)        | NO   |     | NULL    |                |
                | stDOW         | varchar(240)        | NO   |     | NULL    |                |
                | stIsGroup     | varchar(2)          | NO   |     | 0       |                |
                | stGroupHostID | int(11)             | NO   |     | NULL    |                |
                | stImageID     | int(11)             | NO   |     | NULL    |                |
                | stShutDown    | varchar(2)          | NO   |     | NULL    |                |
                | stOther1      | varchar(240)        | NO   |     | NULL    |                |
                | stOther2      | varchar(240)        | NO   |     | NULL    |                |
                | stOther3      | varchar(240)        | NO   |     | NULL    |                |
                | stOther4      | varchar(240)        | NO   |     | NULL    |                |
                | stOther5      | varchar(240)        | NO   |     | NULL    |                |
                | stDateTime    | bigint(20) unsigned | NO   |     | 0       |                |
                | stActive      | varchar(2)          | NO   |     | 1       |                |
                +---------------+---------------------+------+-----+---------+----------------+
                21 rows in set (0.001 sec)
                

                Here is a scheduled task in that table waiting for time to expire.

                MariaDB [fog]> select * from scheduledTasks;
                +------+-------------+--------+--------+--------------+----------+--------+-------+---------+-------+-----------+---------------+-----------+------------+----------+----------+----------+----------+----------+------------+----------+
                | stID | stName      | stDesc | stType | stTaskTypeID | stMinute | stHour | stDOM | stMonth | stDOW | stIsGroup | stGroupHostID | stImageID | stShutDown | stOther1 | stOther2 | stOther3 | stOther4 | stOther5 | stDateTime | stActive |
                +------+-------------+--------+--------+--------------+----------+--------+-------+---------+-------+-----------+---------------+-----------+------------+----------+----------+----------+----------+----------+------------+----------+
                |    1 | Deploy Task |        | C      |            1 | 45       | 12     | 12    | 5       |       |           |             1 |         0 |            |          | -1       | fog      | 1        |          |          0 | 1        |
                +------+-------------+--------+--------+--------------+----------+--------+-------+---------+-------+-----------+---------------+-----------+------------+----------+----------+----------+----------+----------+------------+----------+
                1 row in set (0.000 sec)
                

                I didn’t check to see if I could schedule a snapin deployment task. But this might get you headed in the direction for a home brew solution.

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

                191

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project