TWiki> DiyDice Web>GeneralNotes (revision 1)EditAttach

General Management of a Machine

Most aspects of a machine's setup are controlled from its LCFG profile. The source to your machine's profile should be put in your LCFG source directory, which you can find on the machine diydice.inf.ed.ac.uk in the directory /diyhome/username/lcfg/source, where username is your DICE username.

If you want a machine that's close to standard FC3 Linux but controlled by LCFG, take a look at dcspaul's "nikita".

If you want a machine that's close to being a DICE machine, yet run by you, take a look at cc's "tatiana".

Put the profile source into your LCFG source dir as follows. Keep the profile source file in a directory called ~/LCFG/source. Then use the "diysubmit" command to submit it to the LCFG server.

The profile should compile within a minute or so. Once it has you will be able to see the profile's status on the LCFG status web page at http://diydice.inf.ed.ac.uk/. Click on "DIY DICE LCFG Status Pages" to see the current LCFG status of each DIY DICE machine, then click on a machine's name for further details. The machine's LCFG status includes whether the machine's LCFG profile has successfully been made or if it contains illegal resources, thus preventing the new profile from being used. You should check the status every time you upload a new version of an LCFG source file. An LCFG profile with compilation errors will not affect the machine, which will simply carry on using the last successfully-made profile until it receives a new one.

If you have made a mistake in the profile, error messages or warnings and some coloured insect icons will appear on the machine's profile status web page. All errors must be eliminated before a new profile will be compiled and supplied to the machine.

Before making changes to a source file consult the Complete Guide to LCFG, which you can find on the LCFG site at <http://www.lcfg.org>.

LCFG Include Files

LCFG source files are run through "cpp", giving you the opportunity to use separate header files to hide clutter and share settings between machines.

Such files are allowed to contain the same sort of LCFG resources that are allowable in normal LCFG files. They should have a name ending in .h and should be put in your ~/LCFG/ include directory.

Copy them to the LCFG server using the diysubmit command.

A file mysettings.h which you had created and uploaded in this way would be included in your machine's LCFG profile by putting this line in your machine's profile source file:

   #include <fred/mysettings.h>

where "fred" stands for your DICE username.

To add an RPM software package

The "updaterpms" LCFG component controls the installation of software (in RPM package files) on the machine. "man lcfg-updaterpms" gives details. It uses the "updaterpms" utility - "man updaterpms" has details on that.

updaterpms consults a pre-defined list of RPM files, and will install and delete RPMs on your machine until it matches this list. The set of software will differ according to what header files you have put at the top of your LCFG source file. (The basic FC3 set gives you all of Fedora Core 3; an Edinburgh set gives you all of FC3 plus extra software, much of it for research or teaching; and a DICE machine is an Edinburgh machine with Informatics-specific software added.)

To add extra software packages, do this:

1. Put the RPM file in your ~/LCFG/packages directory, then use "diysubmit".

2. Set various resources to your machine's LCFG profile as follows. Change all instances of the string "username" to your DICE username to make these resources work.

   /* Make updaterpms look for RPMs in your own LCFG packages directory */
   !updaterpms.rpmpath   mPRECONCAT(http://diy.rpms.inf.ed.ac.uk/username,)

   /* Install an RPM file named whizzo-7.2.1-1.i386.rpm */
   !profile.packages   mADD(+whizzo-7.2.1-1)

   /* Install another RPM, this time with a version wildcard */
   !profile.packages   mADD(+fabbo-*-*)

3. Upload an "rpmlist" file (using "diysubmit" again) to your LCFG packages directory. The "rpmlist" file should be called "rpmlist" and should contain a list of the names of the package files in your packages directory, one per line. The updaterpms software needs this.

To Manage Many RPM Packages

To keep track of a large number of software packages, and to save having to mention each one in your machine's LCFG profile, you can instead list them in a package list file. Package list files in your packagelist directory will be noticed by the LCFG server as long as their names end in .pkgs or .rpms.

The format of a package list file is described in "man updaterpms" in the "RPMCFG file format" section. Package list files must end in .pkgs or .rpms.

To avoid filename collisions please make your username part of the name of your package list files, because at the moment ALL users' packagelist directories are searched by LCFG!

-- StephenQuinney - 05 Oct 2007

Edit | Attach | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 05 Oct 2007 - 13:13:28 - StephenQuinney
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies