Difference: SystemInformation (1 vs. 6)

Revision 62015-02-13 - squinney

Line: 1 to 1
 
META TOPICPARENT name="DocsForLCFGUsers"
Changed:
<
<

System Information

>
>

System Information

  In LCFG various information describing the system is stored in the sysinfo component. The idea is that the LCFG profile should be the canonical repository for any information describing the machine. This provides a standard API for discovering details of the current system (e.g. platform, architecture) and avoids lots of components having to contain spaghetti code to do all the discovery using local tools (which also requires the presence of certain tools).

Added:
>
>
Information is provided separately on how to query this information from LCFG components and shell scripts, see SysInfoDevel for details.
 

Platform and Operating System

In LCFG we have the concept of a platform which is related to the operating system (and its major/minor versions) and also the architecture. Different resources of an LCFG profile (e.g. package lists and buckets) need to refer to different combinations of the operating system name, version and the architecture. In the headers there are cpp macros which can be used as well as associated resources in the sysinfo component. These macros (and thus the resources) MUST be defined for all managed platforms so can be relied on for forming any other resources.

Line: 47 to 49
  Where OS_RELEASE_MAJOR is the major version for a platform and OS_RELEASE_MINOR is the minor version for a platform (e.g. SL60 has a major version of 6 and a minor version of 0 - zero). Currently major is only defined where there is a minor version (which is why they are not there for F13).
Added:
>
>

Features

The sysinfo component provides a sysinfo.features resource which can be used like a tag list to add flags which describe general features of your system. Currently the only standard feature is logrotate_needs_su which is enabled by default on EL7 profiles to indicate that the su directive must be used for LCFG component logrotate configuration files.

 

Paths

The following standard paths are defined by default. The macros are defined in the lcfg/hidden/lcfgvars.h header and can be used from within any header, note that some macros are defined as relative to the values of other macros. The SysInfo resources are defined in the lcfg/defaults/sysinfo.h header in terms of the macros.

Revision 52015-02-10 - squinney

Line: 1 to 1
 
META TOPICPARENT name="DocsForLCFGUsers"

System Information

In LCFG various information describing the system is stored in the sysinfo component. The idea is that the LCFG profile should be the canonical repository for any information describing the machine. This provides a standard API for discovering details of the current system (e.g. platform, architecture) and avoids lots of components having to contain spaghetti code to do all the discovery using local tools (which also requires the presence of certain tools).

Added:
>
>
 

Platform and Operating System

In LCFG we have the concept of a platform which is related to the operating system (and its major/minor versions) and also the architecture. Different resources of an LCFG profile (e.g. package lists and buckets) need to refer to different combinations of the operating system name, version and the architecture. In the headers there are cpp macros which can be used as well as associated resources in the sysinfo component. These macros (and thus the resources) MUST be defined for all managed platforms so can be relied on for forming any other resources.

Line: 45 to 47
  Where OS_RELEASE_MAJOR is the major version for a platform and OS_RELEASE_MINOR is the minor version for a platform (e.g. SL60 has a major version of 6 and a minor version of 0 - zero). Currently major is only defined where there is a minor version (which is why they are not there for F13).
Changed:
<
<
-- Main.squinney - 2011-06-01
>
>

Paths

The following standard paths are defined by default. The macros are defined in the lcfg/hidden/lcfgvars.h header and can be used from within any header, note that some macros are defined as relative to the values of other macros. The SysInfo resources are defined in the lcfg/defaults/sysinfo.h header in terms of the macros.

Macro Resource Standard Value Purpose
LCFGLIB sysinfo.path_lcfglib /usr/lib/lcfg  
LCFGDATA sysinfo.path_lcfgdata LCFGLIB/conf Directory for templates and other fixed configuration files. Files are normally stored in subdirectories with the same name as the component.
LCFGBIN sysinfo.path_lcfgbin /usr/bin Directory for user binaries.
LCFGSBIN sysinfo.path_lcfgsbin /usr/sbin Directory for system binaries.
LCFGCOMP sysinfo.path_lcfglib LCFGLIB/components Directory for components.
LCFGVAR sysinfo.path_lcfgvar /var/lcfg Base directory for writeable files.
LCFGLOG sysinfo.path_lcfglog LCFGVAR/log Directory for log files.
LCFGROTATED sysinfo.path_lcfgrotated /etc/logrotate.d Directory for log rotate configuration files.
LCFGTMP sysinfo.path_lcfgtmp LCFGVAR/tmp Directory for temporary files.
LCFGCONF sysinfo.path_lcfgconf LCFGVAR/conf Directory for generated files to be preserved between object runs.
LCFGPOD sysinfo.path_lcfgpod LCFGLIB/doc/pod Base directory for documentation POD files.
LCFGOM sysinfo.path_lcfgom LCFGBIN/om The "om" program

The following paths are only defined on Redhat systems. Note the lack of associated macros, these values can only be referenced via the resource.

Resource Value Purpose
sysinfo.path_sysconfig /etc/sysconfig Directory for sysconfig files
sysinfo.path_portrelease /sbin/portrelease Location of the portrelease tool
sysinfo.path_portreserve /etc/portreserve Directory for portreserve configuration files

The following paths have different values on SL6 and SL7. Note the lack of associated macros, these values can only be referenced via the resource.

Resource SL6 SL7 Purpose
sysinfo.path_lcfgrun <%sysinfo.path_lcfgtmp%> /run/lcfg Directory for component run files (used to note the component has been started)
sysinfo.path_lcfgstatus <%sysinfo.path_lcfgvar%>/status <%sysinfo.path_lcfgrun%>/status Directory for component status files (and temporary override files)
sysinfo.path_lcfglock <%sysinfo.path_lcfgvar%>/lock /run/lock/lcfg Directory for component lock files
sysinfo.path_initd /etc/init.d Not defined Directory for SysVinit files
sysinfo.path_init_tool /sbin/service /usr/bin/systemctl The tool for interacting with the init system

-- Main.squinney - 2015-02-10

Revision 42014-10-08 - squinney

Line: 1 to 1
 
META TOPICPARENT name="DocsForLCFGUsers"

System Information

Line: 10 to 10
  The operating system information is held in the OS_ID and OS_ID_FULL macros and also the sysinfo.os_id and sysinfo.os_id_full resources. The operating system macros and resources never contain references to the architecture, only the name and version of the operating system. The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).
Changed:
<
<
The LCFG platform information is held in the LCFG_PLATFORM and LCFG_PLATFORM_FULL macros and also the sysinfo.platform and sysinfo.platform_full resources. As well as the name and version of the operating system, the macros and resources will have an _64 suffix on x86_64 platforms (but not on i386/i686). The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).
>
>
As well as the name of the operating system there is the concept of the base OS which is held in the OS_BASIS macro and the sysinfo.os_base resource. This is useful where a operating system is rebuilt by various vendors (e.g. RHEL is also available as Centos, ScientificLinux and Oracle Linux). When the OS is not a rebuilt version of another then the base and id will be the same. This value does not include any information about the architecture or the minor release. It is most useful for reference in resource values which are invariant for the rebuild (e.g. a configuration file template which is the same for all rebuilds of an OS).

The LCFG platform information is held in the LCFG_PLATFORM and LCFG_PLATFORM_FULL macros and also the sysinfo.platform and sysinfo.platform_full resources. For an OS there is a default architecture, up to and including SL6 this was 32bit and from EL7 onwards it is 64bit. Where an OS is available as multiple platforms with different architectures the alternatives have a suffix added to the name. For example, on SL6 the 32bit platform is known as sl6 and the 64bit platform is known as sl6_64. The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).

  Here are some examples which hopefully make this clear:
Changed:
<
<
Macro Resource Scientific Linux 5.5 (x86_64) Scientific Linux 5.5 (i386) Scientific Linux 6.1 (x86_64) Scientific Linux 6.1 (i686) Fedora Linux 13 (x86_64) Fedora Linux 13 (i686)
OS_ID sysinfo.os_id sl5 sl5 sl6 sl6 f13 f13
OS_ID_FULL sysinfo.os_id_full sl55 sl55 sl61 sl61 f13 f13
LCFG_PLATFORM sysinfo.platform sl5_64 sl5 sl6_64 sl6 f13_64 f13
LCFG_PLATFORM_FULL sysinfo.platform_full sl55_64 sl55 sl61_64 sl61 f13_64 f13
ARCH_NAME sysinfo.arch x86_64 i386 x86_64 i686 x86_64 i686
BASEARCH sysinfo.basearch x86_64 i386 x86_64 i386 x86_64 i386
>
>
Macro Resource Scientific Linux 5.5 (x86_64) Scientific Linux 5.5 (i386) Scientific Linux 6.1 (x86_64) Scientific Linux 6.1 (i686) RHEL 7.0 (x86_64) SL 7.0 (x86_64)
OS_BASE sysinfo.os_base sl5 sl5 sl6 sl6 el7 el7
OS_ID sysinfo.os_id sl5 sl5 sl6 sl6 el7 sl7
OS_ID_FULL sysinfo.os_id_full sl55 sl55 sl61 sl61 el70 sl70
LCFG_PLATFORM sysinfo.platform sl5_64 sl5 sl6_64 sl6 el7 sl7
LCFG_PLATFORM_FULL sysinfo.platform_full sl55_64 sl55 sl61_64 sl61 el70 sl70
ARCH_NAME sysinfo.arch x86_64 i386 x86_64 i686 x86_64 x86_64
BASEARCH sysinfo.basearch x86_64 i386 x86_64 i386 x86_64 x86_64
 

Examples of usage

Revision 32011-06-01 - squinney

Line: 1 to 1
 
META TOPICPARENT name="DocsForLCFGUsers"

System Information

Line: 40 to 40
 
OS_RELEASE_MAJOR sysinfo.os_release_major 5 6 undefined
Changed:
<
<
>
>
Where OS_RELEASE_MAJOR is the major version for a platform and OS_RELEASE_MINOR is the minor version for a platform (e.g. SL60 has a major version of 6 and a minor version of 0 - zero). Currently major is only defined where there is a minor version (which is why they are not there for F13).
  -- Main.squinney - 2011-06-01 \ No newline at end of file

Revision 22011-06-01 - cc

Line: 1 to 1
 
META TOPICPARENT name="DocsForLCFGUsers"

System Information

Line: 6 to 6
 

Platform and Operating System

Changed:
<
<
In LCFG we have the concept of a platform which is related to the operating system (and it's major/minor versions) and also the architecture. Different resources of an LCFG profile (e.g. package lists and buckets) need to refer to different combinations of the operating system name, version and the architecture. In the headers there are cpp macros which can be used as well as associated resources in the sysinfo component. These macros (and thus the resources) MUST be defined for all managed platforms so can be relied on for forming any other resources.
>
>
In LCFG we have the concept of a platform which is related to the operating system (and its major/minor versions) and also the architecture. Different resources of an LCFG profile (e.g. package lists and buckets) need to refer to different combinations of the operating system name, version and the architecture. In the headers there are cpp macros which can be used as well as associated resources in the sysinfo component. These macros (and thus the resources) MUST be defined for all managed platforms so can be relied on for forming any other resources.
  The operating system information is held in the OS_ID and OS_ID_FULL macros and also the sysinfo.os_id and sysinfo.os_id_full resources. The operating system macros and resources never contain references to the architecture, only the name and version of the operating system. The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).

Revision 12011-06-01 - squinney

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="DocsForLCFGUsers"

System Information

In LCFG various information describing the system is stored in the sysinfo component. The idea is that the LCFG profile should be the canonical repository for any information describing the machine. This provides a standard API for discovering details of the current system (e.g. platform, architecture) and avoids lots of components having to contain spaghetti code to do all the discovery using local tools (which also requires the presence of certain tools).

Platform and Operating System

In LCFG we have the concept of a platform which is related to the operating system (and it's major/minor versions) and also the architecture. Different resources of an LCFG profile (e.g. package lists and buckets) need to refer to different combinations of the operating system name, version and the architecture. In the headers there are cpp macros which can be used as well as associated resources in the sysinfo component. These macros (and thus the resources) MUST be defined for all managed platforms so can be relied on for forming any other resources.

The operating system information is held in the OS_ID and OS_ID_FULL macros and also the sysinfo.os_id and sysinfo.os_id_full resources. The operating system macros and resources never contain references to the architecture, only the name and version of the operating system. The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).

The LCFG platform information is held in the LCFG_PLATFORM and LCFG_PLATFORM_FULL macros and also the sysinfo.platform and sysinfo.platform_full resources. As well as the name and version of the operating system, the macros and resources will have an _64 suffix on x86_64 platforms (but not on i386/i686). The "full" variants will also contain the minor version when that is applicable (e.g SL5.5 or SL6.1).

Here are some examples which hopefully make this clear:

Macro Resource Scientific Linux 5.5 (x86_64) Scientific Linux 5.5 (i386) Scientific Linux 6.1 (x86_64) Scientific Linux 6.1 (i686) Fedora Linux 13 (x86_64) Fedora Linux 13 (i686)
OS_ID sysinfo.os_id sl5 sl5 sl6 sl6 f13 f13
OS_ID_FULL sysinfo.os_id_full sl55 sl55 sl61 sl61 f13 f13
LCFG_PLATFORM sysinfo.platform sl5_64 sl5 sl6_64 sl6 f13_64 f13
LCFG_PLATFORM_FULL sysinfo.platform_full sl55_64 sl55 sl61_64 sl61 f13_64 f13
ARCH_NAME sysinfo.arch x86_64 i386 x86_64 i686 x86_64 i686
BASEARCH sysinfo.basearch x86_64 i386 x86_64 i386 x86_64 i386

Examples of usage

  1. The local package buckets are based on the LCFG platform. For example sl6_64/lcfg and sl6/lcfg (which is <%sysinfo.platform%>/lcfg). They are architecture-dependent but do not change for a minor release.
  2. The core lcfg package list is named based on the operating system ID. For example lcfg_sl5_lcfg.rpms or lcfg_f13_lcfg.rpms (which is lcfg_<%sysinfo.os_id%>_lcfg.rpms). There is only one core lcfg package list for an entire operating system, it is the same for all architectures and any minor-versions.
  3. Various package lists, e.g. base, desktop, kernel, are dependent on the operating system, architecture and the minor version. For example, lcfg_sl60_base.rpms and lcfg_sl55_64_base.rpms (which is lcfg_<%sysinfo.platform_full%>_base.rpms).

Other OS Information

The following extra macros and resources MAY be defined for a platform but there is no requirement that they exist so care must be taken when used in other resources. They do not vary on a per-architecture basis.

Macro Resource Scientific Linux 5.5 Scientific Linux 6.1 Fedora Linux 13
OS_NAME sysinfo.os_name linux linux linux
OS_VERSION sysinfo.os_version scientific scientific fedora
OS_RELEASE sysinfo.os_release 5 6 13
OS_RELEASE_MINOR sysinfo.os_release_minor 5 1 undefined
OS_RELEASE_MAJOR sysinfo.os_release_major 5 6 undefined

-- Main.squinney - 2011-06-01

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback