Skip to content

Commit

Permalink
EL9 initial templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvin committed Nov 12, 2024
1 parent 79e3dd5 commit 34bb137
Show file tree
Hide file tree
Showing 59 changed files with 364 additions and 303 deletions.
78 changes: 70 additions & 8 deletions config/core/base.pan
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ variable SITE_ADDITIONAL_PACKAGES ?= undef;
variable OS_VERSION_PARAMS ?= nlist(
"distribution", "el",
"family", "el",
"major", "el8",
"majorversion", "8",
"major", "el9",
"majorversion", "9",
"minor", "x",
"flavour", "x",
"version", "el8x",
"arch", "x86_64"
"version", "el9x",
"arch", "x86_64",
);

variable RPM_BASE_FLAVOUR = '8';
variable RPM_BASE_FLAVOUR_VERSIONID = 8;
variable RPM_BASE_FLAVOUR = '9';
variable RPM_BASE_FLAVOUR_VERSIONID = 9;
variable RPM_BASE_FLAVOUR_NAME = format('el%s',RPM_BASE_FLAVOUR_VERSIONID);


Expand All @@ -38,10 +38,35 @@ required = no
variable SPMA_BACKEND ?= 'yumdnf';
variable DEBUG = debug(format('%s: SPMA_BACKEND=%s', OBJECT, to_string(SPMA_BACKEND)));

@{
desc = if true remove packages that are no longer part of the profile
values = boolean
default = true
required = no
}
variable SPMA_REMOVE_OBSOLETE_PACKAGES ?= false;


# Use NetworkManager/nmstate to configure the network
variable OS_NETWORK_USE_NETWORK_MANAGER ?= true;
# If not using NetworkManager, let tQUATTOR_TYPES_NETWORK_BACKEND undefined to use default
variable QUATTOR_TYPES_NETWORK_BACKEND = if ( OS_NETWORK_USE_NETWORK_MANAGER ) {
'nmstate';
};


@{
desc = variants of glibc langpack to use
values = list of strings matching a RPM variant or null to disable explicit installation of langpack
default = 'langpack-en'
required = no
}
variable OS_GLIBC_LANGPACKS ?= list('langpack-en');


@{
desc = Define the base name used for OS-related YUM repositories.
values = dict of string, each entry being either a host name or a OS major version (e.g. el8). \
values = dict of string, each entry being either a host name or a OS major version (e.g. el9). \
The value is used as the name part of the YUM repository name (before the first '-').
default = none
required = yes
Expand Down Expand Up @@ -85,7 +110,7 @@ variable BASE_OS_REPOSITORY_TEMPLATE ?= if ( !is_null(BASE_OS_REPOSITORY_TEMPLAT
@{
desc = use iptables and ip6tables services instead of firewalld
value = true or false
default = false (EL8 default is to use firewalld)
default = false (EL9 default is to use firewalld)
required = no
}
variable OS_USE_IPTABLES_SERVICES ?= false;
Expand All @@ -109,6 +134,39 @@ variable ERROR = if ( OS_USE_IPTABLES_SERVICES && is_defined(OS_ENABLE_FIREWALLD
};


@{
desc = install iscsi tools and start iscsi daemon if true
values = boolean
default = false
required = no
}
variable OS_CORE_ISCSI_ENABLED ?= false;

@{
desc = if true, install only the minimal set of RPM
values = boolean
default = false
required = no
}
variable OS_CORE_ONLY ?= false;

@{
desc = if true, install RDMA package
values = boolean
default = false
required = no
}
variable OS_CORE_RDMA_ENABLED ?= false;

@{
desc = if true, install smartmontools package and start smartd service
values = boolean
default = true
required = no
}
variable OS_CORE_SMARTD_ENABLED ?= true;


variable OS_BASE_CONFIG_SITE ?= null;

variable KERNEL_FIRMWARE_ARCH ?= "noarch";
Expand Down Expand Up @@ -164,6 +222,10 @@ variable OS_USE_MICROCODE_CTL ?= false;
# Use ncm-systemd instead of ncm-chkconfig to process ncm-chkconfig configuration
include 'components/systemd/legacy/chkconfig';

# Configure ncm-spma process_obsoletes
include 'components/spma/config';
'/software/components/spma/process_obsoletes' = SPMA_REMOVE_OBSOLETE_PACKAGES;

# Install microcode_ctl package if needed
'/software/packages' = {
if (OS_USE_MICROCODE_CTL) {
Expand Down
2 changes: 1 addition & 1 deletion config/core/boot.pan
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
Template listing boot options for all EL8 hosts.
Template listing boot options for all EL9 hosts.
}

unique template config/core/boot;
Expand Down
6 changes: 2 additions & 4 deletions config/core/daemons.pan
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
unique template config/core/daemons;

variable OS_CORE_POSTFIX ?= false;
variable OS_CORE_ONLY ?= false;
variable OS_CORE_ISCSI_ENABLED ?= false;

variable OS_WANTED_DEFAULT_DAEMONS ?= {
append('sshd');
Expand All @@ -17,7 +19,6 @@ variable OS_WANTED_DEFAULT_DAEMONS ?= {
};

variable OS_UNWANTED_DEFAULT_DAEMONS ?= {
append('abrt');
append('avahi-daemon');
append('bluetooth');
append('cups');
Expand All @@ -38,9 +39,6 @@ variable OS_UNWANTED_DEFAULT_DAEMONS ?= {
append('stap-server');
append('tog-pegasus');
append('wpa_supplicant');
append('yum');
append('yum-cron');
append('yum-updatesd');
if ( OS_CORE_ONLY || ! OS_CORE_ISCSI_ENABLED ) {
append('iscsi');
append('iscsid');
Expand Down
2 changes: 0 additions & 2 deletions config/core/firewalld.pan
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ unique template config/core/firewalld;
# Add firewalld RPM
'/software/packages' = {
pkg_repl('firewalld');
# iptables is a dependency for firewalld but sometimes fails to be properly installed
pkg_repl('iptables');
SELF;
};

Expand Down
2 changes: 1 addition & 1 deletion config/core/iptables-services.pan
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ unique template config/core/iptables-services;

# Install package providing iptables and ip6tables services
'/software/packages' = {
pkg_repl('iptables-services');
pkg_repl('iptables-nft-services');
SELF;
};

Expand Down
4 changes: 3 additions & 1 deletion config/quattor/aii.pan
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

unique template config/quattor/aii;

## disable
variable AII_OSINSTALL_OPTION_LANG_SUPP = list('none');
variable AII_OSINSTALL_OPTION_ZEROMBR_ARGS = list('');
variable AII_OSINSTALL_NEEDS_SECTION_END = true;
variable AII_OSINSTALL_KS_PXEBOOT_FIRST ?= true;

variable AII_OSINSTALL_OS_VERSION ?= if ( is_defined(YUM_OS_DISTRIBUTION_NAME) ) {
YUM_OS_DISTRIBUTION_NAME + '-' + OS_VERSION_PARAMS['arch'];
Expand All @@ -27,6 +27,8 @@ include { 'quattor/aii/config' };

'/system/aii/osinstall/ks/packages_args' = list('--ignoremissing');

'/system/aii/osinstall/ks/pxeboot' = AII_OSINSTALL_KS_PXEBOOT_FIRST;

'/system/aii/osinstall/ks/end_script' = '%end';

# crucial since all network devices are under NM control (eg bnx2x 10g needs it)
Expand Down
4 changes: 2 additions & 2 deletions repository/config/os.pan
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ values = true or false
default = false
required = no
}
variable REPOSITORY_CENTOS_EXTRAS_ENABLED ?= false;
variable REPOSITORY_CENTOS_EXTRAS_ENABLED ?= true;

variable YUM_OS_SNAPSHOT_NS ?= error('YUM_OS_SNAPSHOT_NS should already have been defined');

Expand All @@ -34,7 +34,7 @@ include { 'repository/config/quattor' };
variable OS_REPOSITORY_LIST ?= {
append(BASE_OS_REPOSITORY_TEMPLATE);
append(OS_VERSION_PARAMS['major']+'_'+'appstream');
append(OS_VERSION_PARAMS['major']+'_'+'powertools');
append(OS_VERSION_PARAMS['major']+'_'+'crb');
if ( REPOSITORY_CENTOS_EXTRAS_ENABLED ) {
append(OS_VERSION_PARAMS['major']+'_'+'extras');
};
Expand Down
58 changes: 0 additions & 58 deletions rpms/additional-devel.pan

This file was deleted.

24 changes: 18 additions & 6 deletions rpms/base.pan
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
unique template rpms/base;

variable OS_CORE_ONLY ?= false;
variable OS_CORE_ISCSI_ENABLED ?= false;
variable OS_CORE_RDMA_ENABLED ?= false;

# Default for variables used are/must be defined in config/core/base.pan

# Base packages
'/software/packages' = {
Expand All @@ -28,8 +25,8 @@ variable OS_CORE_RDMA_ENABLED ?= false;
pkg_repl('mcelog');
pkg_repl('microcode_ctl');
pkg_repl('NetworkManager');
# network-scripts is required by ncm-network 21.4.0
pkg_repl('network-scripts');
# ncm-network relies on ifcfg scripts
pkg_repl('NetworkManager-initscripts-updown');
pkg_repl('net-tools');
pkg_repl('openssh');
pkg_repl('openssh-server');
Expand All @@ -45,6 +42,16 @@ variable OS_CORE_RDMA_ENABLED ?= false;
pkg_repl('vim');
pkg_repl('wget');

if ( is_defined(OS_GLIBC_LANGPACKS) && !is_null(OS_GLIBC_LANGPACKS) ) {
if ( is_list(OS_GLIBC_LANGPACKS) ) {
foreach (i; langpack; OS_GLIBC_LANGPACKS) {
pkg_repl(format('glibc-%s', langpack));
};
} else {
error('OS_GLIBC_LANGPACKS must be a list');
};
};

SELF;
};

Expand All @@ -58,6 +65,10 @@ variable OS_CORE_RDMA_ENABLED ?= false;
# ncm-spma will keep trying removing all kernels and only the running one will be kept.
pkg_repl('kernel');

# chkconfig: required by several Quattor components
pkg_repl('chkconfig');
pkg_repl('initscripts');

# grub2 doesn't seem to be part of core or base group...
pkg_repl('grub2');

Expand All @@ -68,6 +79,7 @@ variable OS_CORE_RDMA_ENABLED ?= false;
pkg_repl('linux-firmware');
pkg_repl('postfix');
if ( OS_CORE_RDMA_ENABLED ) pkg_repl('rdma');
if ( OS_CORE_SMARTD_ENABLED ) pkg_repl('smartmontools');

if ( ! OS_CORE_ONLY ) {
pkg_repl('chrony');
Expand Down
18 changes: 18 additions & 0 deletions rpms/bind-server.pan
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
unique template rpms/bind-server;

@{
desc = choose between standard and chrooted bind server
values = true for using the chrooted bind server
default = false
required = no
}
variable OS_BIND_CHROOTED ?= false;

'/software/packages' = {
pkg_repl('bind');
if ( OS_BIND_CHROOTED ) {
pkg_repl('bind-chroot');
};

SELF;
};
21 changes: 0 additions & 21 deletions rpms/conditional/infiniband.pan

This file was deleted.

Loading

0 comments on commit 34bb137

Please sign in to comment.