Difference between revisions of "Groovix Net Control"

From GroovixWiki
Jump to: navigation, search
Line 3: Line 3:
 
The Groovix system provides all networked workstations with unified profiles and software updates as part of the Groovix update process. This process is done through a system called Groovix NetCustomization or GNC. It queries updates, fixes and system changes from the [[Groovix Server]] and runs them automatically. If the system has not applied these updates, they are downloaded and installed automatically.  
 
The Groovix system provides all networked workstations with unified profiles and software updates as part of the Groovix update process. This process is done through a system called Groovix NetCustomization or GNC. It queries updates, fixes and system changes from the [[Groovix Server]] and runs them automatically. If the system has not applied these updates, they are downloaded and installed automatically.  
  
Normally, this process is performed on boot up or customized to your specific update schedule; however, this process can be run manually at any time by typing <font class="code">/etc/init.d/groovix-netcustomization start</font> in an [[xterm]] window. Every time Groovix NetCustomization is run, the results of that process are dumped into a log file that can be accessed for reference or troubleshooting located at <font class="code">/var/log/groovix/netcustomization.log</font>.
+
Normally, this process is performed on boot up, or can be customized to a specific update schedule; however, this process can be run manually at any time by typing <font class="code">/etc/init.d/groovix-netcustomization start</font> in an [[xterm]] window. Every time Groovix NetCustomization is run, the results of that process are dumped into a log file that can be accessed for reference or troubleshooting located at <font class="code">/var/log/groovix/netcustomization.log</font>.
  
  

Revision as of 22:38, 24 April 2012

The Groovix system provides all networked workstations with unified profiles and software updates as part of the Groovix update process. This process is done through a system called Groovix NetCustomization or GNC. It queries updates, fixes and system changes from the Groovix Server and runs them automatically. If the system has not applied these updates, they are downloaded and installed automatically.

Normally, this process is performed on boot up, or can be customized to a specific update schedule; however, this process can be run manually at any time by typing /etc/init.d/groovix-netcustomization start in an xterm window. Every time Groovix NetCustomization is run, the results of that process are dumped into a log file that can be accessed for reference or troubleshooting located at /var/log/groovix/netcustomization.log.


Setting up Groovix Server for GNC

Coming Soon


GNC Scripts

GNC updates are contained in their own directory in /var/www/groovix/gnc/updates/[customer] where [customer] is the name of your Groovix site. Your Groovix site can found in the /etc/groovix/version file.

Each GNC update has a file at the root of the directory called gnc; the gnc file is written in bash script as a series of commands listed in the order they should be run. Groovix provides parameters and commands that customize how and when GNC updates are run and which workstations will run them, these are described in more detail below.

Each workstation downloads and executes the script individually after downloading it from Open Sense servers or your local Groovix Server. GNC updates that have been downloaded and executed can be found locally on each workstation in the /var/lib/groovix/updates/master.bash file. The log file for GNC is located at /var/log/groovix/netcustomization.log, this only contains the information from the last time GNC was run. To check that a specific GNC script was successful, a file named complete will be located on the local machine under /var/lib/groovix/updates/[updatename]/.

The /var/www/groovix/gnc/updates/[customer] directory contains separate directories for the different types, sites, and labels for your deployment. GNC updates that only apply to a specific workstation type (ex. web, kiosk type) should be placed in the directory for that type (ex. /var/lib/groovix/updates/web/). Updates placed in the /var/www/groovix/gnc/updates/default directory are applied to all workstations.


Script Structure

To have predictable results with how GNC scripts are run, each GNC directory name should follow a formula of a four digit number and a short description of the update. A dash ( - ) should be used instead of any spaces and your script directory should end with a number based on how many of that type already exist; if none exist, use the number 1 (ex. 20120101-homepage-1). As your preferences and hardware change over time, you will end up with multiple scripts of the same type which could conflict with one another; this last number makes sure the most recent script is run last, (ex. 0600-desktop-fix-1 will run prior to 0600-desktop-fix-2).

When a Groovix workstation downloads multiple updates, it runs them in sequential order. 0-1000 is reserved for GNC updates that need to be run first, 2000's are run next followed by 9000 for GNC updates that need to be run last. If it is not critical to run an update, begin the update name with the date the update is created starting with the year (ex. 20110101-floppy-fix). Only use the 1000's or 9000's if your GNC update is required to be run before or after all other updates. If an update changes its function over time or is repurposed, add a -1, -2, etc. to the end of the new update name (ex. 0125-gdm-fix-1); this ensures that this update is applied after the older version and that workstations that already have this update, run it again with the latest change(s).

When you are ready to make your own GNC update, run the cp -rp var/www/groovix/gnc/doc/template/ [updatename] command to create a copy of the template where [updatename] is the name of your update; make sure to name the update according to the rules mentioned above for best results.


Script Rules & Formatting

  • Each update must have a gnc file in the root of the update directory
  • Update directories are named with a number, followed by the description
  • Update directories named with 0000-1000 are run first
  • Update directories named by date (20110228) run after initial updates
  • Update directories named 9000+ are run after all other updates
  • If files are included in your update other than gnc, create the directory structure those files will reside in
  • The first line of the gnc batch script contains the parameters that dictate how the update will be ran


GNC Script Parameters

  • abort - exits the script if an error occurs so it can be run again. Avoid the abort flag for conditional arguments (like If statements) or use set +e before the conditional and set -e after the conditional in your script.
  • attemptonce - as soon as it attempts to run the update, it will never run it again.
  • background - no longer in use.
  • depends - not available for use at this time. Will run the update when a prior update has been run successfully.
  • onlybuild - runs the script only when building the image
  • onlyinstall - runs the script only during the imaging process
  • onlylive - runs the script only when booting from a live cd
  • runonce - if the result of the script is successful, it never runs again
  • skipbuild - skips running the script when building the image
  • skipinstall - skips running the script during the imaging process
  • skiplive - skips running the script if booting from a live cd


GNC Script Commands

  • gncget [filename] - gets file and places it in that same location
  • apt-get-dontask install - unattended package install with all defaults
  • apt-get-dontask remove - unattended package uninstall
  • bashconfset.pl
  • pyconfset.pl
  • --mod 644 - allows file to be downloaded from server
  • --gunzip - will automatically look for .gz extension, download, unzip, and place the files
  • --tgz - will automatically tar and gzip


GNC Script Examples

Note: Groovix Network Customization scripts all follow the structure, rules, and syntax documented in the Script Structure section above. Please familiarize yourself with this section before continuing on to the GNC script examples as the examples assume this knowledge is known beforehand.

GNC Examples


See Also