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

[SCRIPT] FOG tools

Scheduled Pinned Locked Moved
Tutorials
3
11
5.7k
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.
  • W
    Wayne Workman
    last edited by Jun 15, 2015, 12:18 PM

    That is super sweet.

    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
    • W
      Wayne Workman
      last edited by Jun 15, 2015, 2:11 PM

      Now that we know we can change compression settings post-upload,

      Would it make sense to always upload with compression set at 0 and then compress server-side afterwards?

      Then, we wouldn’t need FTP client side to move images from /images/dev to /images because after compression completes, the image could be moved?

      Maybe even a progress bar for the compression progress could be displayed under “Tasks” ?

      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/

      C 1 Reply Last reply Jun 15, 2015, 2:19 PM Reply Quote 1
      • C
        ch3i Moderator @Wayne Workman
        last edited by Jun 15, 2015, 2:19 PM

        @Wayne-Workman said:

        Then, we wouldn’t need FTP client side to move images from /images/dev to /images because after compression completes, the image could be moved?

        Depends the server performance, if you have multiple uploads you will have a high cpu utilization.

        1 Reply Last reply Reply Quote 0
        • C
          ch3i Moderator
          last edited by Jun 15, 2015, 2:54 PM

          Updated :

          • Correct rights problem on new imgs
          • Adding progression bar using PV

          With progression :

          #########################################################
          #                 FOG Images tools                      #
          #########################################################
          
          Changing compression of MASTER_WB from 0 to 5 :
          
                                   
          Backup img...Done
           
          Compress new img...In progress
          24,2MO 0:00:00 [  78MB/s] [=======================================================>] 100%            
          73,3GO 0:18:12 [68,7MB/s] [=======================================================>] 100%            
          37,5GO 0:09:58 [64,1MB/s] [=======================================================>] 100%            
           5,1kO 0:00:00 [ 394kB/s] [=======================================================>] 100%            
           142MO 0:00:00 [ 163MB/s] [=======================================================>] 100%            
           
          Compress new img...Done
                                       
          Remove backups...Done
                                        
          Update database...Done
          Exiting...
          

          The size isn’t the compressed size, but size before.

          1 Reply Last reply Reply Quote 0
          • J
            Joseph Hales Testers
            last edited by Jun 15, 2015, 2:55 PM

            I would think multiple uploads would be an edge case I would love to have this as a feature especially if it could compress a temp copy so you could deploy immediately.

            RTFM

            W 1 Reply Last reply Jun 15, 2015, 3:57 PM Reply Quote 0
            • W
              Wayne Workman @Joseph Hales
              last edited by Jun 15, 2015, 3:57 PM

              @Joseph-Hales said:

              I would think multiple uploads would be an edge case I would love to have this as a feature especially if it could compress a temp copy so you could deploy immediately.

              Well, I suppose the uncompressed copy could serve as the “temp” copy.

              And, I suppose FTP could go ahead and just move that over from /dev to /images like normal

              and in the background, the server could compress the /images image to /dev and when it’s done (and waiting for active tasks for that image to complete), it could replace it with the compressed copy?

              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 2
              • J
                Joseph Hales Testers
                last edited by Jun 15, 2015, 3:59 PM

                That would be perfect.

                RTFM

                1 Reply Last reply Reply Quote 0
                • W
                  Wayne Workman
                  last edited by Jun 16, 2015, 5:23 PM

                  I think this is easily accomplished.

                  Using Ch3i’s script for compression, and making that automated, and scheduling a Cron task on the server to run that script every hour or so should do the trick.

                  The script will need a default compression set, and it’ll need to check the DB for any images that aren’t set to that default (say, compression 1). Then, it would check to see if that image exists in it’s storage node, if so, recompress it to /node/dev , and then check the DB if there are active tasks associated with that image… and just wait till they get done, then replace the old image with the new.

                  I think I can do this, I’ll try tonight or tomorrow night.

                  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/

                  W 1 Reply Last reply Jun 17, 2015, 3:23 AM Reply Quote 2
                  • W
                    Wayne Workman @Wayne Workman
                    last edited by Wayne Workman Jun 16, 2015, 9:25 PM Jun 17, 2015, 3:23 AM

                    @Wayne-Workman said:

                    I think I can do this, I’ll try tonight or tomorrow night.

                    Didn’t get to this tonight… passed out straight away after work. It was a long and tough day.
                    And my laptop is acting up… I replaced the fan in it yesterday and the fan was literally the very last component I could take out of the plastic frame… I think I’m going to have to open it up again and re-do the thermal compound, might have used too much. It’s the worst designed laptop I’ve ever seen… It’s like they wanted to make cleaning/replacing the fan & radiator as difficult as possible.

                    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
                    • W
                      Wayne Workman
                      last edited by Jul 12, 2015, 3:15 PM

                      Bumping this thread.

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

                      140

                      Online

                      12.1k

                      Users

                      17.3k

                      Topics

                      155.3k

                      Posts
                      Copyright © 2012-2024 FOG Project