Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.0 < 7.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'pdemon-sap', '3.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Sap
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with sap
- Usage
- Reference
- Data Types
- Limitations
- Development
- Contributors
Overview
The sap module provides packages, settings and other requirements for installing specific SAP products on this node.
Module Description
This module takes care that the SAP recommendations for installing specific SAP products on the Linux operating system are fulfilled on the current node. The configuration is based on the corresponding SAP OSS notes describing the necessary steps.
Keep in mind, this module is not related in any way to official SAP software distribution nor is it supported in any way by official SAP contracts. This is my private module to speed up the installation of SAP software in a controlled puppetized way, so absolutely no warranty at all!
Setup
What sap affects
- local packages
- local configuration files
- local service configurations
Beginning with sap
There are two mandatory parameters for the environment:
enabled_components
- An array of target components that are enabled on this host.system_ids
- An array of the SIDs which will be present on this machine
The following declaration will enable baseline packages for an SAP instance named 'PR0':
class { 'sap':
system_ids => {'PR0'
components => ['base'],
backend_databases => ['db6'],
},
}
Alternatively these values can also be set in hiera:
---
sap::system_ids:
- PR0
components:
- 'base'
backend_databases:
- 'db6'
Usage
This module is broken up into several classes which apply functionality to different stages of an SAP install.
- sap - Central class which brings in all pre-install dependencies, defines the SAP facts, and manages mount-points
- sap::management - Configures an installed SAP instance including user profile changes, sap profile definitions, and other OS level application setup
All interaction with the sap module should be done through the classes listed above. Note that the base 'sap' class must be configured for the other parent classes to function.
Reference
See the references file.
Data Types
Sap::SIDConfigEntry
components
- a list of associated sap applications to enable for this SID (mandatory).backend_databases
- types of databases to which this system connects (mandatory for SIDs with 'base' enabled)manage_profiles
- Flag indicating whether the instance profiles for this SID should be managed. When true,instances
,databases
, andprimary_backend_db
become mandatory parameters!manage_default_profile
- Flag indicating whether DEFAULT.PFL for this SID should be managed. When true, it is created, otherwise it is left absent.exclude_common_mount_points
- flag indicating if this SID should skip SID specific entries for the 'common' mountpoint. Some system types do not have /sapmnt directories (e.g. a DAA instance or liveCache)pattern_map
- A hash mapping pattern lookup keys to regular expressions which are unique to this SID. Note that if one is added it must have a corresponding value added inpattern_values
.pattern_values
- Mapping from a pattern lookup key to the value which should be provided wherever the corresponding pattern is found.instances
- Hash detailing the instances which are part of this SID. Entries are keyed byinstance class
and contain the corresponding Sap::SidInstance detail.databases
- Hash detailing the database parameters for this SID. Entries in this hash are keyed byinstance class
and contain the parameters described by Sap::SidDatabase.primary_backend_db
- Specifies the primary database backend used by the application servers in this instance. This should map to an entry in `databases'default_pfl_entries
- Hash of profile keys and the desired value which will be appended to the end of the DEFAULT.PFL file for this instance. Currently not validated.sec_info_rules
- Array of Sap::SecInfo entries to be included in the secinfo rule file for this SIDreg_info_rules
- Array of Sap::RegInfo entries to be included in the reginfo rule file for this SIDdb2_query_schedules
- Array of Sap::Db2QuerySchedule entries to be deployed on each database node of this SID.
Sap::MessageServer
A set of parameters defining the attributes required to construct the communication parameters for a given message server. Each entry corresponds to a single SID and is comprised of the following fields:
class
- Indication of the type of message server. Currently limited to the values described in Sap::InstClassSapCs. This is used to determine the range from which this message server port is allocated.number
- Instance number corresponding to the Central Services component of this SID.port_override
- Optional override field allowing an explicit port to be specified instead of the normal calculated port. This should be avoided.
Acceptable input example:
{
'class' => 'cs-abap',
'number' => '02',
}
Sap::SIDDatabase
Hash describing an instance which is part of a given SAP SID. For example, a DB2 database instance.
Each entry has four possible keys:
base_port
- The TCP/IP port used as a starting point for configuring this instance. It will be added to thecom_port
to determine the first communication port for this database.com_port
- The TCP/IP port used to by clients to connect to this database instance.ha_mode
- Indicates the HA mode used by this database. Valid values are described by Sap::DbHaModenodes
- An array containing the trusted cert names of each node that is part of this database cluster.
Acceptable input example:
{
'base_port' => '5900',
'com_port' => '5912',
'ha_mode' => 'hadr',
'nodes' => [
'prd-dba.example.org',
'prd-dbb.example.org',
],
}
Sap::SIDInstance
Hash describing an instance which is part of a given SAP SID. For example, an ABAP Application Server.
Each entry has four possible keys:
number
- The Sap::InstNumber which corresponds to this instance.types
- A hash mapping the Sap::InstType to an array of hosts on which the given instance is present. Note that there may be different names for the same kind of instance.host
- Instances which can move between hosts have a virtual host name or service IP which facilitates this process. This field specifies the name used to install this instance.legacy_start_profile
- Older versions of SAP netweaver have separateSTART
profiles which handle initialization. See sapnote 1751381 for detail. If unspecified this defaults tofalse
.
Acceptable input example:
{
'number' => '00',
'types' => {
'D' => [ 'node2.example.com', 'node3.example.com' ],
'DVEBMGS' => [ 'node1.example.com' ],
},
'legacy_start_profile' => true,
}
Alternate example describing a Central Services instance with a virtual hostname.
{
'number' => '01',
'types' => {
'ASCS' => [ 'node1.example.com', 'node2.example.com' ],
},
'legacy_start_profile' => true,
}
Sap::InstNumber
A two digit number assigned to a given instance within an SID. For example, an SAP instance named ASCS01
the InstNumber is 01
.
Acceptable input:
01
10
99
These must not be reused within an SID for different purposes.
Sap::SecRuleMode
A Indicates whether a given entry in sec_info or reg_info corresponds to a 'permit' or 'deny'. Only P
and D
are valid.
Sap::TargetProgram
Component of a sec_info or reg_info entry corresponding to a given target executable. Accepts only ANSI printable strings 64 characters in length or less. A wildcard may be included, however, it must appear at the end of the string.
Examples:
* # true
/bin/* # true
/bin/rsync # true
*sync # false
/bin/*sap # false
Sap::HostRuleEntry
Entry used in the HOST, ACCESS, CANCEL, and USER-HOST components of sec_info and reg_info files. Entries can include any of the following
*
- A full wildcard - don't put anything else if you have this one!prd-app00
- A valid hostnameprd-app00.example.org
- A valid fully qualified hostname*.example.org
- A wildcard domain name - note that it is unclear whether subdomains are accepted192.168.0.15
- An IPv4 address without CIDR/Netmask192.168.0.*
- A wildcard can be substituted to catch all hosts in a /24 network. This can be extended for /16 and /8, however, a wildcard must be present at each level. E.g.192.168.*.*
or10.*.*.*
Sap::SecUser
Represents a single user (or a wildcard user) for a rule entry in the sec_info file on a Netweaver application server. Single user names up to 11 characters in length are accepted or a *
can be specified to allow any user.
Examples:
* # true
maxusername # true
SAPUSER # true
toolongusername # false
sap* # false
sapuser1,sapuser2 # false
Sap::SecInfo
A rule specifying which remote users are allowed to execute a given command or command pattern on a list of target hosts from a list of remote hosts. See Sap Note 614971 for further details.
MODE
- is this a permit or deny rule?TP
- the program which is attempting to execute. See Sap::TargetProgram for detail.USER
- which specific user is allowed to run this?. See Sap::SecUser for detail.HOST
- An array of hosts on which TP might execute. See Sap::HostRuleEntry for detail.USER-HOST
- An array of hosts from which USER might remotely connect to HOST. See Sap::HostRuleEntry for detail.
Sap::RegInfo
A rule specifying which target programs are allowed to register on what hosts. Additionally, the rule may constrain the remote hosts which can start or stop the target program. See Sap Note 1069911 for further details.
MODE
- is this a permit or deny rule?TP
- the program which is attempting to execute. See Sap::TargetProgram for detail.HOST
- An array of hosts on which TP might execute. See Sap::HostRuleEntry for detail.ACCESS
- An array of hosts which may remotely connect to start TP on HOST. See Sap::HostRuleEntry for detail.CANCEL
- An array of hosts which may remotely connect to stop TP on HOST. See Sap::HostRuleEntry for detail.
Sap::Db2Schema
Simple pattern matching type which enforces sane detection of standard SAP DB2 database schemas. These schemas always have the form SAP${sid}
. For example, a system with SID ECP
would have a schema named SAPECP
.
Examples:
SAPEQ0 # true
SAPSCP # true
SAPPRD # true
SAPTOOLONG # false
NOTSAP # false
sapecp # false
Sap::Db2QuerySchedule
Details a given DB2 query script along with it's execution frequency. This script assumes the schema matches.
query_file_name
- basename of the file which defines the query.query_content
- URL pointing to the source file of the query which will be deployed. See shipment_history_extraction for implementation reference.schema
- Optional override of the standardSAP${sid}
schema name. See Sap::Db2Schema for detail.cron_entry
- A hash detailing the scheduling parameters for the cron job associated with this query. See cron_core for detailoutput_target
- Absolute path used as the output file target by the query associated with this schedule entry.output_group
- Ownership of the output_target is changed to this group after it is created.monitor_alias
- Virtual IP or associated DNS name used to restrict execution in clustered environments. The query will only be executed if this entry is present.
Sap::ClusterFenceDataLpar
Details the arguments used to configure a fence_lpar STONITH agent.
ipaddr
- IP address or hostname of the fencing HMClogin
- Login username for the HMCmanaged
- Name of the CEC or managed system which hosts the target LPAR(s)identity_file
- Private key file used to connect to the HMCpcmk_delay_max
- a random maximum delay for stonith actions to prevent double fencingpcmk_host_map
- mapping of trusted host names to the LPAR definitions in the HMC
Note that the managed
frames can be listed from the HMC shell via lssyscfg -r sys -F name
Actual LPAR names used within the pcmk_host_map
parameter can be listed via lssyscfg -m host -r lpar -F name | sort
where host is the name of a managed system.
# in the HMC rshell
for HOST in $(lssyscfg -r sys -F name); do echo $HOST; lssyscfg -r lpar -m $HOST -F name; echo ''; done
SAP Base Class
I just want sap, what's the minimum I need
Declare your SID(s) and the 'base' component in hiera:
---
sap::system_ids:
- PR0
components:
- 'base'
backend_databases:
- 'db6'
Within your manifest include the SAP profile.
include 'sap'
I just want ABAP stack, JAVA stack and ADS on target node.
This example configures the total pre-requisite stack for ADS.
class { 'sap':
system_ids => ['AP0'],
enabled_components => [
'base',
'base_extended',
'ads'
],
}
class { 'sap':
system_ids => {'AP0'
components => [
'base',
'base_extended',
'ads',
],
backend_databases => ['db6'],
},
}
SAP Clustering
Full cluster with fencing. Note that this is in a PowerVM environment.
class { 'sap::cluster':
enable_fencing => true,
sid_rules => {
PR0 => {
node_roles => {
'pr0-app00.example.org' => [ 'app-standard' ],
'pr0-app01.example.org' => [ 'app-standard' ],
'pr0-dba.example.org' => [ 'db-standard' ],
'pr0-dbb.example.org' => [ 'db-standard' ],
},
components => [
{
type => 'ScsErs',
data => {
ers_ip => '10.0.0.10',
ers_inst => {
type => 'ERS',
number => '02',
host => 'prd0-ers.example.org',
},
scs_ip => '10.0.0.11',
scs_inst => {
type => 'ASCS',
number => '01',
host => 'prd0-scs.example.org',
},
}
},
],
},
fence_agents => [
type => 'fence_lpar',
data => {
ipaddr => 'hmc00.example.org',
login => 'service-fence',
managed => 'host0',
identity_file => '/root/.ssh/service_fence_rsa',
pcmk_delay_max => 10,
pcmk_host_map => {
'pr0-app00.example.org' => 'pr0-app00',
'pr0-app01.example.org' => 'pr0-app01',
'pr0-dba.example.org' => 'pr0-dba',
'pr0-dbb.example.org' => 'pr0-dbb',
},
},
],
},
}
Similar configuration in hiera, however, in this case additional filesystem resources have been configured on the database side which are needed for a Commvault configuration.
sap::cluster::sid_rules:
PR0:
node_roles:
'pr0-app00.example.org':
- 'app-scs'
- 'app-standard'
'pr0-app01.example.org':
- 'app-scs'
- 'app-standard'
'pr0-dba.example.org':
- 'db-standard'
'pr0-dbb.example.org':
- 'db-standard'
components:
- type: 'ScsErs'
data:
ers_ip: '10.0.0.103'
ers_inst:
type: 'ERS'
number: '42'
host: 'pr0-ers'
legacy_start_profile: true
scs_ip: '10.0.0.101'
scs_inst:
type: 'ASCS'
number: '41'
host: 'pr0-cs'
legacy_start_profile: true
- type: 'As'
data:
as_instances:
- type: 'DVEBMGS'
number: '40'
host: 'pr0-app00'
legacy_start_profile: true
- type: 'D'
number: '40'
host: 'pr0-app01'
legacy_start_profile: true
- type: 'Db2'
data:
db_ip: '10.0.0.102'
mode: 'log_shipping'
volumes:
- volgrpname: 'db2cv'
exclusive: true
filesystems:
- volume_group: 'db2cv'
logical_volume: 'db2cvarch'
directory: '/db2/PR0/commvault/archive'
fstype: 'xfs'
- volume_group: 'db2cv'
logical_volume: 'db2cvaudit'
directory: '/db2/PR0/commvault/audit'
fstype: 'xfs'
- volume_group: 'db2cv'
logical_volume: 'db2cvretrieve'
directory: '/db2/PR0/commvault/retrieve'
fstype: 'xfs'
- volume_group: 'db2cv'
logical_volume: 'db2cvjobres'
directory: '/db2/PR0/commvault/job_results'
fstype: 'xfs'
sap::cluster::fence_agents:
- type: 'fence_lpar'
data:
ipaddr: 'hmc00.example.org'
login: 'service-fence'
managed: 'host0'
identity_file: '/root/.ssh/service_fence_rsa'
pcmk_delay_max: 10
pcmk_host_map:
'pr0-app00.example.org': 'pr0-app00'
'pr0-app01.example.org': 'pr0-app01'
'pr0-dba.example.org': 'pr0-dba'
'pr0-dbb.example.org': 'pr0-dbb'
Limitations
This module has been built on and tested against Puppet 5.5 and higher.
The module has been tested on:
- RedHat Enterprise Linux 7
It should also work on:
- CentOS 6/7
- Oracle Enterprise Linux 6/7
- Scientific Linux 6/7
Testing on other platforms has been light and cannot be guaranteed.
Development
If you like to add or improve this module, feel free to fork the module and send me a merge request with the modification.
Contributors
Check out the contributor list.
Reference
Table of Contents
Classes
sap
: Installs prerequisites for an SAP environment on RedHat derivativessap::cluster
: Configures a node with the appropriate SAP cluster resourcessap::cluster::prepare
: Ensure local SAP configuration is ready for a clustered environmentsap::config
: Private class used to control configuration file deployment.sap::config::common
: Trick SAP into thinking this host is running a supported RHELsap::config::limits
: Generates an etc limits file for each relevant enabled component.sap::config::mount_points
: Creates and manages mountpoints relevant to each instance type.sap::config::router
: Class: sap::config::router This class contain the configuration for SAP Router Parameters: This module has no parameters Actions: Tsap::config::sysctl
: Configures sysctl parameters for the selected components.sap::config::tmpfs
: Ensures that the tmpfs partition is configured per SAP recommendations Add swap space check persap::install
: Installs the packages associated with the selected setssap::install::mount_dependencies
: Installs dependent modules needed for mount pointssap::management
: Manages configuration post install of SAP.sap::management::ads_fonts
: Deploys font and XDC files to ADS systemssap::management::db2_queries
: Implementation detail - creates sql query scheduling infrastructuresap::management::dotfiles
: Manages the dotfiles belonging to SAP users.sap::management::etc_services
: Creates all relevant etc services entries for this systemsap::management::firewall
: Creates all relevant firewall rules for this systemsap::management::permissions
: Implementation detail - corrects permissions as neededsap::management::profiles
: Creates the profiles files in /sapmnt/SID/profile for each SIDsap::params
: This module contains the parameters for SAP Netweaversap::service
: Configures OS level services required for SAP Netweaver instancessap::service::cloudconnector
: SAP Cloud Connector service configurationsap::service::router
: Configures the SAP Router service
Defined types
sap::cluster::as
sap::cluster::as_inst
: Creates Corosync/Pacemaker cluster rules for a single AS instance.sap::cluster::db2
: Creates Corosync/Pacemaker cluster rules for a SAP DB2 HA/DR instance.sap::cluster::fence_lpar
: Creates Corosync/Pacemaker rules for a fence_lpar STONITH devicesap::cluster::filesystem
: Creates Corosync/Pacemaker cluster rules for a filesystem resource.sap::cluster::lvm
: Creates Corosync/Pacemaker cluster rules for an LVM resource.sap::cluster::scsers
: Creates Corosync/Pacemaker cluster rules for an (A)SCS/ERS instance.sap::config::mount_point
: Declares a single directory or mountpoint.sap::management::db2_query_schedule
: Implementation detail - a query file & associate cron schedule
Functions
multiregsubst
: Performs a series of substitutions on the same target stringsap::cluster::filter_nodes
: Simple function to retrieve only the nodes with a desired rolesap::sysctl_calculated_values
: Recursive function used to compute the value for a sysctl var.sap::sysctl_line
: This function converts a sysctl entry hash into a string line.
Data types
Sap::ABAPLang
Sap::ABAPLoginGroup
Sap::ABAPPassword
: Ideally: type Sap::ABAPPassword = Sensitive[Pattern[/\A[[:graph:]]{1,40}\z/]]Sap::ABAPUser
Sap::AbapClient
Sap::BackendDatabase
: Constrained list of backend databases SAP might connect toSap::ClusterAs
: Used to model linux high availability rules for one or more application server instances. Note that this does not support the 'primary applicSap::ClusterComponent
: Higher level model for linux high-availability rules which captures the type and any subcomponents of each componentSap::ClusterComponentType
: Constrains the list of valid resource typesSap::ClusterDb2
: Used to model linux high availability rules for a HADR based DB2 cluster Note that this assumes a single SID per instance. (SAP typically assSap::ClusterDbMode
Sap::ClusterFence
Sap::ClusterFenceData
Sap::ClusterFenceDataLpar
Sap::ClusterFenceHostMap
Sap::ClusterFenceType
Sap::ClusterFilesystem
Sap::ClusterLvm
: Parameters for an LVM volumeSap::ClusterNodeRoles
: Mapping from each node to an array listing all of the roles this node fulfills within this cluster. For example { 'pr0-ap00' => [ 'app-stanSap::ClusterScsErs
: Used to model linux high availability rules for an (A)SCS/ERS pairSap::Db2QuerySchedule
Sap::Db2Schema
Sap::DbHaMode
Sap::FirewallRule
Sap::FirewallRulePort
Sap::FirewallServices
Sap::FsType
: Supported filesystemsSap::HostRuleEntry
Sap::InstClass
Sap::InstClassAux
Sap::InstClassDb
Sap::InstClassSap
Sap::InstClassSapApp
Sap::InstClassSapCs
Sap::InstData
: Simple structure containing the type of an instance along with it's instance number and the host name of the server on which it must run. ThiSap::InstNumber
Sap::InstType
Sap::MessageServer
: Describes the message server information needed for an external connection to a given SID.Sap::MountPointSIDMode
Sap::MountPoints
Sap::NodeRole
Sap::PuppetUrl
Sap::Reginfo
Sap::SID
: Format of an SAP system IDSap::SIDClusterData
Sap::SIDConfigEntry
: Configuration entry for a SIDSap::SIDDatabase
Sap::SIDDatabaseDb2
: Hash describing an instance which is part of a given SAP SID.Sap::SIDInstance
: Structure detailing the attributes of a given SAP instance class. This is assigned as a component of a specific SID's sidconfigentry. Note tSap::SapComponent
: Structure representing each valid component which could be installed on an SAP server. Theads
- Adobe Document Services `baSap::ScheduleEntry
Sap::SecRuleMode
Sap::SecUser
Sap::Secinfo
Sap::SourceURL
Sap::SourcedFile
Sap::TargetProgram
Sap::VgLvName
: This artificially restricts vg names to [a-zA-Z0-9_]{2,} for simplification purposes.
Classes
sap
This module manages SAP prerequisites for several types of SAP installations based on corresponding SAP OSS notes
Examples
Application server containing an ADS instance and a Netweaver instance
class { 'sap':
system_ids => {
'PR0' => {
'components' => [
'base',
'base-extended',
'ads',
],
'backend_database' => [ 'db2' ],
},
},
}
Parameters
The following parameters are available in the sap
class:
system_ids
pattern_map
create_mount_points
mount_points
router_oss_realm
manage_mount_dependencies
router_rules
distro_text
component_packages
backenddb_packages
message_servers
bash_source_profile
manage_firewall
deployed_fonts
deployed_xdc
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
An hash of SAP system IDs (SIDs) which will be present on the target host along with the following possible attributes for each SID:
components
- a list of associated sap applications to enable for this SID (mandatory)backend_databases
- types of databases to which this system connects (mandatory for SIDs with 'base' enabled)manage_profiles
- Flag indicating whether the instance profiles for this should be managed by the module. If specifiedinstances
,databases
, andprimary_backend_db
become mandatory parameters!exclude_common_mount_points
- flag indicating if this SID should skip SID specific entries for the 'common' mountpoint. Some system types do not have /sapmnt directories (e.g. a DAA instance or liveCache)pattern_map
- A hash mapping pattern lookup keys to regular expressions which are unique to this SID. Note that if one is added it must have a corresponding value added inpattern_values
pattern_values
- Mapping from a pattern lookup key to the value which should be provided wherever the corresponding pattern is found.instances
- Hash detailing the instances which are part of this SID. Entries are keyed byinstance class
and contain the corresponding Sap::SidInstance detail. See Data Types in the readme for detail.databases
- Hash detailing the database parameters for this SID. Entries in this hash are keyed byinstance class
. For detail, see Data Types in the readmeprimary_backend_db
- Sap::InstClassDb of the primary backend database for this nodedefault_pfl_entries
- Hash of profile keys and the desired value which will be appended to the end of the DEFAULT.PFL file for this instance. Currently not validated.sec_info_rules
- Array of Sap::SecInfo entries which will be inserted before the final rules in the secinfo file.reg_info_rules
- Array of Sap::RegInfo entries which will be inserted before the final rules in the reginfo file.db2_query_schedules
- Array of Sap::Db2QuerySchedule entries describing a query script file, associated parameters, and the desired cron schedule entry for each. These queries are then configured to execute as the DB2 instance owner on the host system.
Note that each entry must be exactly 3 characters in length and contain
exclusively uppercase characters. Also, if base
is included in the
components list for an SID at least one backend_database entry must be
provided.
pattern_map
Data type: Hash[String, String]
Hash mapping a given global key such as 'sid_upper' to the corresponding
regexp used to substitute this value in standard strings. See the
mount_point defined type for detail. Note that the values in this hash
will be converted to regular expressions via Regexp($value)
create_mount_points
Data type: Boolean
Indicates whether the standard mount points should be created for the specified instance.
Default value: false
mount_points
Data type: Hash[Sap::SapComponent, Sap::MountPoints]
Defines the mount points and supporting directories which should be created
for each component type. Note that this structure is a deep hash with a --
knockout value.
Default value: {}
router_oss_realm
Data type: Optional[String]
Specify OSS realm for SAP router connection. For example,
'p:CN=hostname.domain.tld, OU=0123456789, OU=SAProuter, O=SAP, C=DE'
Default value: undef
manage_mount_dependencies
Data type: Boolean
When enabled this module will install and configure the puppet-nfs module detailed here: https://forge.puppet.com/derdanne/nfs Note that currently only NFSv4 is supported for clients.
Default value: false
router_rules
Data type: Optional[Array[String]]
Specify array of rules for the SAP router
Default value: undef
distro_text
Data type: Optional[String]
Modify text in /etc/redhat-release
Default value: undef
component_packages
Data type: Hash[Sap::SapComponent, Array[String]]
Hash mapping each component type to an array containing the names of the requried packages on this operating system.
Default value: {}
backenddb_packages
Data type: Hash[Sap::BackendDatabase, Array[String]]
Hash mapping each backend database type to an array containing the names of the requried packages on this operating system.
Default value: {}
message_servers
Data type: Hash[Sap::SID, Sap::MessageServer]
Hash detailing the message server connection definitions for other systems this particular instance will need to communicate with. For entry structure detail See Data Types in the readme.
Default value: {}
bash_source_profile
Data type: Boolean
When enabled the .profile
generated by the SAP installer will be sourced
by the .bash_profile of each sidadm user if that file exists.
Default value: false
manage_firewall
Data type: Boolean
When enabled all relevant firewall rules for the local system will be created and managed via firewalld.
Default value: false
deployed_fonts
Data type: Sap::SourcedFile
Hash with a list of fonts to deploy and their source locations. Each file in
this structure will be installed in
/usr/sap/${SAPSYSTEMNAME}/SYS/global/AdobeDocumentServices/FontManagerService/fonts/customer/
for each local SID with the ADS component enabled.
Default value: {}
deployed_xdc
Data type: Sap::SourcedFile
Hash with a list of xdc files to deploy and their source locations. Each file in
this structure will be installed in
/usr/sap/${sid}/SYS/global/AdobeDocumentServices/lib/XDC/Customer/
for each local SID with the ADS component enabled.
Default value: {}
sap::cluster
Cluster class which configures a PCS/Corosync based ha-environment. Note that it is assumed that the puppet-corosync class is defined and the cluster is configured before this class is configured.
Additionally, the cluster must be an Asymmetrical "Opt-In" cluster. This configuration operates under that assumption and sets cluster level parameters appropriately.
Parameters
The following parameters are available in the sap::cluster
class:
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
resource_stickiness
Data type: Integer
Global configuration setting controlling how much a given resource wants to 'stay' where it is as opposed to moving to a 'home' node.
Default value: 500
enable_fencing
Data type: Boolean
Controls whether the cluster assumes Stonith should be enabled or not.
Default value: false
sid_rules
Data type: Sap::SIDClusterData
A hash mapping each cluster relevant SID to two mandatory components: node_roles: a complete list of PCS nodes mapped to their roles components: cluster elements for this instance with their data
Default value: {}
fence_agents
Data type: Array[Sap::ClusterFence]
An array of Sap::ClusterFence definitions which provide fencing coverage for all nodes defined by this cluster. Note that this parameter becomes mandatory when enable_fencing is true. Additionally, every node referenced within the sid_rules structure must have exactly one corresponding entry in the pcmk_host_map structure of a single agent defined here.
Default value: []
sap::cluster::prepare
Simple class which prepares the config files on this machine for a
high-availability configuration of SAP. There are currently two components to
this process: 1) the profile files in /sapmnt/ corresponding to this
machine are updated replacing entries for RestartProgram with Start_Program.
2) All `.sapenv${HOSTNAME}.(sh|csh)and other similar host-specific profile files are removed so the system will only use the
.sapenv.(sh|csh)` variants.
Configuration is performed entirely based on the values of local 'sap' facts.
Parameters
The following parameters are available in the sap::cluster::prepare
class:
cluster_sid_list
Data type: Array[Sap::Sid]
Cluster configuration steps will be taken for each local instance matching the provided SID list. If multiple SAP instances are located on a given node only those which match this list will be updated.
packages
Data type: Array[String]
Ensures that the resource agents needed for SAP configuration are installed on this system. Note that defaults are provided only for RHEL 7 derivatives.
Default value: []
sap::config
Orchestrates the creation of relevant configuration files needed by SAP
sap::config::common
Overwrites the distro text file to trick SAP into thinking this is RHEL.
sap::config::limits
This class uses data from hiera to generate an etc limits file for each enabled component. Note that some components do not specify limits while others may have SID specific data which will result in a more complicated limit output
sap::config::mount_points
Creates and manages mountpoints relevant to each instance type.
sap::config::router
Class: sap::config::router
This class contain the configuration for SAP Router
Parameters: This module has no parameters
Actions: This module has no actions
Requires: This module has no requirements
Sample Usage: include sap_router::config
sap::config::sysctl
This class configures the sysctl parameters based on the values provided in sap::param::config_sysctl for each enabled component
sap::config::tmpfs
Ensures that the tmpfs partition is configured per SAP recommendations Add swap space check per
sap::install
Packages are installed based on the selections provided to the main sap class using sane defaults configured in hiera.
sap::install::mount_dependencies
When enabled this ensures that all necessary dependencies for mount point management are installed
sap::management
This package manages configuration which is generated during the SAP install. Note that it must not be applied until after the base 'sap' class. Additionally, much of the functionality of this subclass is ignored if the base SAP facts do not seem to indicate that the class has been installed and configured.
sap::management::ads_fonts
Deploys font and XDC files to ADS systems
Parameters
The following parameters are available in the sap::management::ads_fonts
class:
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Sourced directly from the parent system_ids parameter on the SAP class. See that class for further detail.
Default value: $sap::system_ids
deployed_fonts
Data type: Sap::SourcedFile
Hash with a list of fonts to deploy and their source locations. Each file in
this structure will be installed in
/usr/sap/${SAPSYSTEMNAME}/SYS/global/AdobeDocumentServices/FontManagerService/fonts/customer/
for each local SID with the ADS component enabled.
Default value: $sap::deployed_fonts
deployed_xdc
Data type: Sap::SourcedFile
Hash with a list of xdc files to deploy and their source locations. Each file in
this structure will be installed in
/usr/sap/${sid}/SYS/global/AdobeDocumentServices/lib/XDC/Customer/
for each local SID with the ADS component enabled.
Default value: $sap::deployed_xdc
sap::management::db2_queries
Implementation detail - creates sql query scheduling infrastructure
Parameters
The following parameters are available in the sap::management::db2_queries
class:
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Replicated from sap::system_ids primarily to make the test code easier to write. See the parent for further detail.
Default value: $sap::system_ids
sap::management::dotfiles
This is an internal class and should not be called directly. If $bash_source_profile is set to true for the instance as a whole this class will be enabled and will cause the .bash_profile of the sid_adm and db2 users to source their '.profile'.
sap::management::etc_services
This class is an implementation detail and should not be called directly.
Parameters
The following parameters are available in the sap::management::etc_services
class:
message_servers
Data type: Hash[Sap::SID, Sap::MessageServer]
Sourced directly from the parent message_servers parameter on the SAP class. See that for further detail.
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Sourced directly from the parent system_ids parameter on the SAP class. See that for further detail.
sap::management::firewall
This class is an implementation detail and should not be called directly.
Parameters
The following parameters are available in the sap::management::firewall
class:
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Sourced directly from the parent system_ids parameter on the SAP class. See that class for further detail.
service_map
Data type: Hash[Sap::InstClass, Array[Sap::FirewallServices]]
Mapping from instance class types to the corresponding SAP firewall service names. If a given instance class is detected on the server it will present configure the corresponding firewall services.
services
Data type: Hash[Sap::FirewallServices, Sap::FirewallRule]
Hash defining each firewall service entry
sap::management::permissions
Implementation detail - corrects permissions as needed
Parameters
The following parameters are available in the sap::management::permissions
class:
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Replicated from sap::system_ids primarily to make the test code easier to write. See the parent for further detail.
Default value: $sap::system_ids
sap::management::profiles
This class is an implementation detail and should not be called directly. Currently only the DEFAULT.PFL file is managed by this class.
Parameters
The following parameters are available in the sap::management::profiles
class:
system_ids
Data type: Hash[Sap::SID, Sap::SIDConfigEntry]
Sourced directly from the parent system_ids parameter on the SAP class. See that class for further detail.
sap::params
General parameter definitions for the SAP Netweaver environment are defined within this module. Note that OS and Architecture specific variants are actually pulled from defaults in Hiera.
Parameters
The following parameters are available in the sap::params
class:
config_redhat_release_conf
service_uuidd
service_scc
service_saprouter
config_saproutetab
config_saproutetab_template
config_saprouter_sysconfig
config_saprouter_sysconfig_template
config_sysctl
config_limits
config_default_mount_options
config_redhat_release_conf
Data type: String
This should point to the path of the desired redhat release config file.
Default value: undef
service_uuidd
Data type: String
Name of the uuidd service. This is used to enable the daemon after the installation completes.
Default value: undef
service_scc
Data type: String
SAP Cloud Connector service name used for enabling the service.
Default value: undef
service_saprouter
Data type: String
Name of the service corresponding to the SAP router process.
Default value: undef
config_saproutetab
Data type: String
File target for the sap router route-table should it be configure.
Default value: undef
config_saproutetab_template
Data type: String
Path within the module to the appropriate erb template to apply for the saproutetab.
Default value: undef
config_saprouter_sysconfig
Data type: String
Target /etc/sysconfig file for the saprouter service
Default value: undef
config_saprouter_sysconfig_template
Data type: String
Embedded ruby template to be applied to the sysconfig file
Default value: undef
config_sysctl
Data type: Hash[ String, Hash[ String, Variant[ String, Integer, Array[String], Hash[ String, Variant[ Hash[ String, Variant[ String, Integer, Array[ Variant[ String, Hash[ String, Variant[ String, Integer, ] ], ] ] ] ] ] ] ] ] ]
Similar to config_limits this provides a configurable set of directives to include in /etc/sysctl.d/ on a per component basis.
Default value: {}
config_limits
Data type: Hash[ String, Hash[ String, Variant[ String, Boolean, Array[String], Hash[ String, Hash[ String, Hash[ String, Variant[ String, Integer, ] ] ] ] ] ] ]
A deeply nested hash containing the target /etc/security/limits.d/ entries for a given system. This is currently defined for baseline sap instances and db2. The hash has the following structure
'component-name' => {
path => '/etc/security/limits.d', # this should be left alone - limits directory
sequence => '00', # string ID prepended to the limits file. e.g.
# /etc/security/limits.d/00-sap-base.conf
per_sid => true, # Indicates whether the domain has a _sid_
# substring that will need to be substituted with the actual system ID.
header_comment => [ # An array of comment lines which will appear at the
#start of the file
'Comment line 1',
'Comment line 2',
],
entries => { # Hash containing the actual
}
Default value: {}
config_default_mount_options
Data type: Hash[ String, Hash[ String, String, ] ]
Default options to provide to provide for the mount operation in the case that they are not overridden locally. See https://puppet.com/docs/puppet/latest/types/mount.html#mount-attribute-options for details. Note that this is a hash of hashes with an entry for each supported resource type.
Default value: {}
sap::service
Configures OS level services required for SAP Netweaver instances
sap::service::cloudconnector
SAP Cloud Connector service configuration
sap::service::router
Configures the SAP Router service
Defined types
sap::cluster::as
The sap::cluster::as class.
Examples
Asymmetric 4-node cluster defining the AS resource for each app node
sap::cluster::as { 'PR0_As':
sid => 'PR0',
cib_name => 'sap',
nodes => {
'pr0-app00.example.org' => ['app-standard'],
'pr0-app01.example.org' => ['app-standard'],
'pr0-dba.example.org' => ['db-standard'],
'pr0-dbb.example.org' => ['db-standard'],
},
as_instances => [
{
'type' => 'DVEBMGS',
'number' => '00',
'host' => 'pr0-app00',
},
{
'type' => 'D',
'number' => '00',
'host' => 'pr0-app01',
},
],
}
Parameters
The following parameters are available in the sap::cluster::as
defined type:
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
nodes
Data type: Sap::ClusterNodeRoles
Mapping containing each a list of relevant roles for each node in the cluster.
as_instances
Data type: Array[Sap::InstData]
Each entry in this array corresponds to a unique standalone instance which is linked to a home host. Entries must have the following three values:
- `type' - 'Name' of the instance type. For example 'D', 'DVEBMGS', or 'J'
- `number' - two digit code assigned to the instance.
- `host' - short hostname used to install the instance.
db_mode
Data type: Sap::ClusterDbMode
Specifies the type of clustering used for the underlying database. This information is use to construct the start-after relationship on the core database PCS resource.
sid
Data type: Sap::SID
sap::cluster::as_inst
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Definition for an instance on pr0-app01
sap::cluster::as_inst { 'as_inst_PR0_0':
sid => 'PR0',
cib_name => 'sap',
scs_primitive => 'ms_prm_PR0_SCS',
db_mode => 'log_shipping',
profile_dir => '/sapmnt/PR0/profile',
relevant_nodes => ['pr0-app00.example.org', 'pr0-app01.example.org'],
type => 'DVEBMGS',
number => '00',
host => 'pr0-app01',
}
Parameters
The following parameters are available in the sap::cluster::as_inst
defined type:
sid
Data type: Sap::SID
System ID this instance is associated with
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
db_mode
Data type: Sap::ClusterDbMode
Pass-through parameter from the parent sap::cluster::as type. See that description for details.
profile_dir
Data type: Stdlib::AbsolutePath
Location storing the profile files for each instance. Typically this path is
defined as /sapmnt/${SID}/profile
. The full start profile is constructed
using the instance specific data provided in other parameters.
relevant_nodes
Data type: Array[Stdlib::Host]
A filtered list of nodes which are relevant to the AS instance described by
this instance. One entry in this must match the host
parameter defined
below or the declaration will fail.
type
Data type: Sap::InstType
'Name' of the instance type. For example 'D', 'DVEBMGS', or 'J'.
number
Data type: Sap::InstNumber
Two digit code assigned to the instance.
host
Data type: Stdlib::Host
Short hostname used when the instance was installed.
legacy_start_profile
Data type: Boolean
Indicates whether this instance uses the separate START_* profiles as was common on older releases of SAP Netweaver prior to 7.10. More recent builds include the START details within the standard profile. For further detail see https://launchpad.support.sap.com/#/notes/1751381.
Default value: false
sap::cluster::db2
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Asymmetric 4-node cluster with DB2 HADR on two of the nodes
sap::cluster::scsers { 'PR0_Db2':
sid => 'PR0',
cib_name => 'sap',
nodes => {
'pr0-app00.example.org' => ['app-standard'],
'pr0-app01.example.org' => ['app-standard'],
'pr0-dba.example.org' => ['db-standard'],
'pr0-dbb.example.org' => ['db-standard'],
},
db_ip => '10.0.128.15',
mode => 'log_shipping',
}
Parameters
The following parameters are available in the sap::cluster::db2
defined type:
sid
Data type: Sap::SID
System ID this instance is associated with
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
nodes
Data type: Sap::ClusterNodeRoles
Mapping containing each a list of relevant roles for each node in the cluster.
db_ip
Data type: Stdlib::IP::Address::Nosubnet
Service IP address which moves between nodes and represents the 'master' of the cluster. Clients will connect to this instead of the local IPs of the machines.
mode
Data type: Sap::ClusterDbMode
Indicates the type of HA cluster. There are currently two supported modes
log_shipping
- Shared nothing approach which utilizes log shipping to keep one or more replicas synchronized with the current primary.shared_storage
- Approach which moves disks containing the database instance between one or more nodes.
volumes
Data type: Array[Sap::ClusterLvm]
Array containing a series of hashes which describe the LVM cluster resources needed for the primary node of this db2 cluster to function.
filesystems
Data type: Array[Sap::ClusterFilesystem]
Array containing a series of hashes which describe the Filesystem cluster
resources needed on the primary node. The parent LVM volume for each file
system must be included in the volume
resource.
hadr_peer_window
Data type: Integer
Maximum number of seconds the standby nodes can be in an HADR peer topology. This is used to construct 'sane' monitoring intervals for the log-shipping based DB2 model.
Default value: 300
sap::cluster::fence_lpar
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Asymmetric 4-node cluster defining the AS resource for each app node
sap::cluster::as { 'fence_lpar_0':
cib_name => 'sap',
ipaddr => 'hmc0.example.org',
login => 'service-fence',
managed => 'host0',
identity_file => '/root/.ssh/hmc_secret.rsa',
pcmk_delay_max => 15,
pcmk_host_map => {
'pr0-app00.example.org' => 'pr0-app00',
'pr0-app01.example.org' => 'pr0-app01',
'pr0-dba.example.org' => 'pr0-dba',
'pr0-dbb.example.org' => 'pr0-dbb',
},
}
Parameters
The following parameters are available in the sap::cluster::fence_lpar
defined type:
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
ipaddr
Data type: Stdlib::Host
IP address or hostname of the fencing HMC
login
Data type: String
Login username for the HMC
managed
Data type: Stdlib::Host
Name of the CEC or managed system which hosts the target LPAR(s)
identity_file
Data type: Stdlib::AbsolutePath
Private key file used to connect to the HMC
pcmk_delay_max
Data type: Integer
a random maximum delay for stonith actions to prevent double fencing
pcmk_host_map
Data type: Sap::ClusterFenceHostMap
One to one mapping from trusted node host names to the LPAR names in the HMC. An individual stonith resource will be created for each entry in this list and will be allowed to run on any node other than the node it is responsible for fencing.
node_list
Data type: Array[Stdlib::Host]
Full list of nodes in the cluster. This is used to co-locate the resource on any node other than the home node.
sap::cluster::filesystem
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Definition for a shared commvault volume
sap::cluster::as_inst { 'db2pr0_lvm_0':
sid => 'PR0',
cib_name => 'sap',
volume_group => 'db2cv',
logical_volume => 'db2cvarch,
fstype => 'xfs',
directory => '/db2/PR0/commvault/archive',
}
Parameters
The following parameters are available in the sap::cluster::filesystem
defined type:
sid
Data type: Sap::SID
System ID this instance is associated with
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
lvm_primitives
Data type: Array[String]
Array containing the list of lvm primitives managed by the parent type. It must contain an entry which matches the expected primitive described by the volume_group parameter for this filesystem.
volume_group
Data type: Sap::VgLvName
Name of the LVM volume group to be administered. Used to generate the device parameter.
logical_volume
Data type: Sap::VgLvName
Name of the logical volume containing this filesystem. This is used to generate the device parameter.
fstype
Data type: Sap::FsType
Format of the filesystem.
directory
Data type: Stdlib::AbsolutePath
Mountpoint where this filesystem is attached.
device
Data type: Stdlib::AbsolutePath
Path to the underlying block device on which this filesystem resides. Typically this is constructed with the volume group name and the logical volume name.
Default value: "/dev/${volume_group}/${logical_volume}"
sap::cluster::lvm
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Definition for a shared commvault volume
sap::cluster::as_inst { 'db2pr0_lvm_0':
sid => 'PR0',
cib_name => 'sap',
volgrpname => 'db2cv',
exclusive => true,
partial_activation => false,
}
Parameters
The following parameters are available in the sap::cluster::lvm
defined type:
sid
Data type: Sap::SID
System ID this instance is associated with
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
volgrpname
Data type: Sap::VgLvName
Name of the LVM volume group to be administered.
exclusive
Data type: Boolean
When enabled the specified volume group will be exclusively activated.
see pcs resource describe LVM
for details.
Default value: true
partial_activation
Data type: Boolean
When enabled corosync/pcs will attempt to activate the volume even if some disks are missing. This can be extremely useful when LVM mirroring is configured.
Default value: false
sap::cluster::scsers
This defined type should be used by the sap::cluster class and not called directly externally.
Examples
Asymmetric 4-node cluster with two app relevant nodes
sap::cluster::scsers { 'PR0_ScsErs':
sid => 'PR0',
cib_name => 'sap',
nodes => {
'pr0-app00.example.org' => ['app-scs'],
'pr0-app01.example.org' => ['app-scs'],
'pr0-dba.example.org' => ['db-standard'],
'pr0-dbb.example.org' => ['db-standard'],
},
ers_ip => '10.0.0.11'
ers_inst => {
'type' => 'ERS',
'number' => '02',
'host' => 'pr0-ers',
},
scs_ip => '10.0.0.10'
scs_inst => {
'type' => 'ASCS',
'number' => '01',
'host' => 'pr0-cs',
},
}
Parameters
The following parameters are available in the sap::cluster::scsers
defined type:
sid
Data type: Sap::SID
System ID this instance is associated with
cib_name
Data type: String
Name of the temporary Cluster Information Base to use during the building and commiting of the rule changes incorporated in this module.
nodes
Data type: Sap::ClusterNodeRoles
Mapping containing each a list of relevant roles for each node in the cluster.
ers_ip
Data type: Stdlib::IP::Address::Nosubnet
IP address assigned to the ERS virtual host.
ers_inst
Data type: Sap::InstData
Structure providing details for the ERS instance. There are up to four components. Note that the first three are mandatory, however, the fourth is optional.
type
- Type of ERS instance. This should pretty much always be 'ERS'number
- Two digit instance IDhost
- short-name of the ERS virtual host.legacy_start_profile
- Boolean value indicating whether this is a sap instance with 'START_' profiles separate from the instance ala-pre NW 7.10
scs_ip
Data type: Stdlib::IP::Address::Nosubnet
IP address assigned to the SCS virtual host.
scs_inst
Data type: Sap::InstData
Structure providing details for the SCS instance. There are up to four components. Note that the first three are mandatory, however, the fourth is optional.
type
- Type of SCS instance. Could be either SCS or ASCSnumber
- Two digit instance IDhost
- short-name of the SCS virtual host.legacy_start_profile
- Boolean value indicating whether this is a sap instance with 'START_' profiles separate from the instance ala-pre NW 7.10
sap::config::mount_point
This type is an implementation detail and should not be used directly!
Parameters
The following parameters are available in the sap::config::mount_point
defined type:
mount_path
file_params
count
mount_params
required_files
mount_defaults
per_sid
pattern_map
pattern_values
mount_path
Data type: String
The path to the mountpoint. Note that this is a namevar.
Default value: $name
file_params
Data type: Hash[String, String]
Any valid parameter which could be provided to a File resource type can be
included in this hash. Note that ensure is always set to directory
.
count
Data type: Optional[Integer]
Indicates that this path should be created $count times. The path must
contain the string _N_
which will be substituted with the count.
For example /db2/ECP/sapdata_N_
Default value: undef
mount_params
Data type: Hash
TODO - fill out this section
Default value: {}
required_files
Data type: Array[String]
Ordered list of files which this mount point should require.
Default value: []
mount_defaults
Data type: Hash
Hash of hashes containing mount-type specific defaults. Currently this is used exclusively to provide default parameters to the NFSv4 client mounts for SAP related connections.
Default value: {}
per_sid
Data type: Sap::MountPointSIDMode
Controls the validation behavior for the module via three possible states
true
- the path is SID specific and an instance can be created for each
false
- only one occurance of the path can exist on a system
user
- the entry has SID specific attributes but the path is unique
pattern_map
Data type: Hash[String, String]
Hash mapping potential pattern_values
to the regular expression patterns
which they should replace. The value retrieved by the same key in
pattern_values
will be substituted into the mount_path, owner, and group
of the target file wherever the regular expression matches. Note that the
patterns should be provided as strings, however, they will be converted to
regexp for use via Regexp($value)
pattern_values
Data type: Hash[String, String]
Hash mapping substitution targets with their corresponding values for this mountpoint instance. Typically substitutions are SID specific and are specified globally via the `$sap::system_ids['pattern_map'] parameter.
sap::management::db2_query_schedule
Implementation detail - a query file & associate cron schedule
Parameters
The following parameters are available in the sap::management::db2_query_schedule
defined type:
sid
query_file_name
query_content
cron_entry
query_directory
schema
output_target
output_group
monitor_alias
sid
Data type: Sap::SID
System ID for this query
query_file_name
Data type: String[1]
Basename of the file defining this query. Note that this file must be a bash
script which implements the function execute_query
.
query_content
Data type: Sap::SourceURL
URL to the content of the query file which will be deployed.
cron_entry
Data type: Sap::ScheduleEntry
Cron schedule entry defining the frequency at which this query will run
query_directory
Data type: Stdlib::AbsolutePath
Location in which this (and all other) queries will be installed. Note that this is set by the sap::management::db2_queries class
schema
Data type: Optional[Sap::Db2Schema]
In some cases the schema name of a given system does not match the SID. This is typically the case for redirected restores in QA environments. If this field is specified it overrides the standard "SAP${sid}" schema name.
Default value: undef
output_target
Data type: Optional[Stdlib::AbsolutePath]
Specifies the target result file of the scheduled query. Typically this only applies to queries which perform some form of export statement.
Default value: undef
output_group
Data type: Optional[String[1]]
Operating system group which will be set as the owning group of the output_target file after it is generated.
Default value: undef
monitor_alias
Data type: Optional[Stdlib::Host]
IPv4 address or DNS name representing a service IP that may be present on one or more nodes. In the case of an HA/DR cluster execution of this query will be restricted to the node which currently has this address.
Default value: undef
Functions
multiregsubst
Type: Ruby 4.x API
Performs a series of substitutions on the same target string
Examples
Two patterns
$pattern_map = {/_sid_/ => 'scp', /_SID_/ => 'SCP'}
$target = '/db2/_SID_/db2_sid_'
$result = multiregsubst($target, $pattern_map)
# The output string will be equivalent to the following
# $result = '/db2/SCP/db2scp'
multiregsubst(String $target, Hash[Regexp, String] $substmap)
Performs a series of substitutions on the same target string
Returns: String
Returns target after all substitutions
Examples
Two patterns
$pattern_map = {/_sid_/ => 'scp', /_SID_/ => 'SCP'}
$target = '/db2/_SID_/db2_sid_'
$result = multiregsubst($target, $pattern_map)
# The output string will be equivalent to the following
# $result = '/db2/SCP/db2scp'
target
Data type: String
The string to be substituted
substmap
Data type: Hash[Regexp, String]
Hash mapping regexp to target value
sap::cluster::filter_nodes
Type: Puppet Language
Simple function to retrieve only the nodes with a desired role
sap::cluster::filter_nodes(Sap::NodeRole $target_role, Sap::ClusterNodeRoles $node_role_hash)
The sap::cluster::filter_nodes function.
Returns: Array[Stdlib::Fqdn]
Array of node names which have the target_role role.
node_role_hash
Data type: Sap::ClusterNodeRoles
Mapping from node names to a list of roles which that node can perform.
target_role
Data type: Sap::NodeRole
Nodes with this role will be returned in the resulting list
sap::sysctl_calculated_values
Type: Puppet Language
Converts the provided data hash into the corresponding value. This class performs recursive calls to construct a single value when provided with a compound series of values.
sap::sysctl_calculated_values(Array[Hash] $data, Integer $index)
Converts the provided data hash into the corresponding value. This class performs recursive calls to construct a single value when provided with a compound series of values.
Returns: String
The value computed by the calculation process.
data
Data type: Array[Hash]
Array of value hashes. The function will first attempt to call itself for the next entry in the array and then prepend it's own calculation to assemble the resulting string.
index
Data type: Integer
Current position in the provided array. The function will call itself for index + 1 unless the current index is the last element in the array.
sap::sysctl_line
Type: Puppet Language
This function converts a given entry from a module specific hash provided to sap::params::config_sysctl into a line of the form = . There are three supported line types for this component:
value
- Simply sets the value equal to the entry namecalculated
- Computes the value via the following formulabase * multiplier / divisor
compound
- Performs a recursive call converting multiple value/calculated sub entries into a single space separated value.
`sap::sysctl_line(String $param, Hash[
String,
Variant[
String,
Integer,
Array[
Variant[
String,
Hash[
String,
Variant[
Integer,
String,
]
]
]
]
]
] $data)`
This function converts a given entry from a module specific hash provided to sap::params::config_sysctl into a line of the form = . There are three supported line types for this component:
value
- Simply sets the value equal to the entry namecalculated
- Computes the value via the following formulabase * multiplier / divisor
compound
- Performs a recursive call converting multiple value/calculated sub entries into a single space separated value.
Returns: String
A string of the form = . For example:
kernel.sem = 1250 256000 100 8192
param
Data type: String
The name of the kernel parameter this corresponds to. E.g. kernel.sem
is
the parameter for Linux kernel Semaphore parameters.
data
Data type: Hash[ String, Variant[ String, Integer, Array[ Variant[ String, Hash[ String, Variant[ Integer, String, ] ] ] ] ] ]
Detailed structure containing the components needed to produce the value for the given parameter.
Data types
Sap::ABAPLang
The Sap::ABAPLang data type.
Alias of
Pattern[/\A[A-Z]{2}\z/]
Sap::ABAPLoginGroup
The Sap::ABAPLoginGroup data type.
Alias of
Pattern[/\A[A-Z_0-9]{1,20}\z/]
Sap::ABAPPassword
Ideally: type Sap::ABAPPassword = Sensitive[Pattern[/\A[[:graph:]]{1,40}\z/]]
Alias of
Sensitive[String]
Sap::ABAPUser
The Sap::ABAPUser data type.
Alias of
Pattern[/\A[[:upper:][:digit:]_*-]{1,12}\z/]
Sap::AbapClient
The Sap::AbapClient data type.
Alias of
Pattern[/\A[0-9]{3}\z/]
Sap::BackendDatabase
Constrained list of backend databases SAP might connect to
Alias of
Enum['db6', 'liveCache', 'maxdb']
Sap::ClusterAs
Used to model linux high availability rules for one or more application server instances. Note that this does not support the 'primary application server' model.
Alias of
Hash[Enum[
'as_instances', # Instance details for each AS
], Variant[
Array[Sap::InstData],
]]
Sap::ClusterComponent
Higher level model for linux high-availability rules which captures the type and any subcomponents of each component
Alias of
Hash[Variant[Enum['type','data']], Variant[
Sap::ClusterComponentType,
Sap::ClusterScsErs,
Sap::ClusterAs,
Sap::ClusterLvm,
Sap::ClusterDb2,
]]
Sap::ClusterComponentType
Constrains the list of valid resource types
Alias of
Enum['As', 'ScsErs', 'Db2', 'Lvm']
Sap::ClusterDb2
Used to model linux high availability rules for a HADR based DB2 cluster Note that this assumes a single SID per instance. (SAP typically assumes this too!)
Alias of
Hash[Enum[
'db_ip', # Service IP corresponding to the database cluster
'mode', # Type of DB2 cluster to configure.
'hadr_peer_window', # Peer window in seconds used by HADR
'volumes', # Array of LVM volume group resources colocated w/ the master
'filesystems', # Array of filesystem resources colocated w/ the master
], Variant[
Stdlib::IP::Address::Nosubnet,
Sap::ClusterDbMode,
Integer,
Array[Sap::ClusterLvm],
Array[Sap::ClusterFilesystem],
]]
Sap::ClusterDbMode
The Sap::ClusterDbMode data type.
Alias of
Enum['log_shipping', 'shared_storage']
Sap::ClusterFence
The Sap::ClusterFence data type.
Alias of
Hash[Enum[
'type',
'data',
], Variant[
Sap::ClusterFenceType,
Sap::ClusterFenceData,
]]
Sap::ClusterFenceData
The Sap::ClusterFenceData data type.
Alias of
Variant[Sap::ClusterFenceDataLpar]
Sap::ClusterFenceDataLpar
The Sap::ClusterFenceDataLpar data type.
Alias of
Hash[Enum[
'identity_file',
'ipaddr',
'login',
'managed',
'pcmk_delay_max',
'pcmk_host_map',
], Variant[
Stdlib::AbsolutePath,
Stdlib::Host,
String,
Integer,
Sap::ClusterFenceHostMap,
]]
Sap::ClusterFenceHostMap
The Sap::ClusterFenceHostMap data type.
Alias of
Hash[Stdlib::Host, String]
Sap::ClusterFenceType
The Sap::ClusterFenceType data type.
Alias of
Enum['fence_lpar']
Sap::ClusterFilesystem
The Sap::ClusterFilesystem data type.
Alias of
Hash[Enum[
'volume_group', # Name of the LVM volume group backing this fs
'logical_volume', # Name of the LVM logical volume containing this fs
'directory', # Mountpoint for this fs
'fstype', # Filesystem type used at this mount point
], Variant[
Sap::VgLvName,
Stdlib::AbsolutePath,
Sap::FsType,
]]
Sap::ClusterLvm
Parameters for an LVM volume
Alias of
Hash[Enum[
'volgrpname', # Volume group to manage
'exclusive', # If set the volume will be activated on only one node
'partial_activation', # When set, the volume group will activate even if some of the physical devices are missing
], Variant[
Sap::VgLvName,
Boolean,
]]
Sap::ClusterNodeRoles
Mapping from each node to an array listing all of the roles this node fulfills within this cluster. For example { 'pr0-ap00' => [ 'app-standard', 'db-standard'], 'pr0-ap01' => [ 'app-standard', 'db-standard'], }
Alias of
Hash[Stdlib::Fqdn, Array[Sap::NodeRole]]
Sap::ClusterScsErs
Used to model linux high availability rules for an (A)SCS/ERS pair
Alias of
Hash[Enum[
'ers_ip', # Service IP corresponding to the ERS
'ers_inst', # Instance details for the ERS
'scs_ip', # Service IP corresponding to the (A)SCS
'scs_inst', # Instance details for the (A)SCS
], Variant[
Stdlib::IP::Address::Nosubnet,
Sap::InstData,
]]
Sap::Db2QuerySchedule
The Sap::Db2QuerySchedule data type.
Alias of
Hash[Enum[
'query_file_name',
'query_content',
'schema',
'cron_entry',
'output_target',
'output_group',
'monitor_alias',
], Variant[
String,
Sap::SourceURL,
Sap::ScheduleEntry,
Stdlib::AbsolutePath,
Stdlib::Host,
]]
Sap::Db2Schema
The Sap::Db2Schema data type.
Alias of
Pattern[/\ASAP[A-Z0-9]{3}\z/]
Sap::DbHaMode
The Sap::DbHaMode data type.
Alias of
Enum['none', 'hadr']
Sap::FirewallRule
The Sap::FirewallRule data type.
Alias of
Hash[Enum[
'desc',
'ports',
], Variant[
String,
Array[Sap::FirewallRulePort],
]]
Sap::FirewallRulePort
The Sap::FirewallRulePort data type.
Alias of
Hash[Enum[
'port_pattern',
'port',
'protocol',
], Variant[
Enum['tcp', 'udp'],
String,
]]
Sap::FirewallServices
The Sap::FirewallServices data type.
Alias of
Enum['dispatcher', 'enqueue', 'gateway', 'igs', 'java_as', 'livecache', 'message_server', 'sapctrl', 'webdisp', 'web_icm']
Sap::FsType
Supported filesystems
Alias of
Enum['xfs', 'ext4']
Sap::HostRuleEntry
The Sap::HostRuleEntry data type.
Alias of
Variant[Stdlib::IP::Address::V4::Nosubnet, Stdlib::Fqdn, Pattern[/\A[*]\z/], Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){2}(\.[*]){1}\z/], Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){1}(\.[*]){2}\z/], Pattern[/\A([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.[*]){3}\z/], Pattern[/\A[*](\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]))*\z/]]
Sap::InstClass
The Sap::InstClass data type.
Alias of
Variant[Sap::InstClassSap, Sap::InstClassDb, Sap::InstClassAux]
Sap::InstClassAux
The Sap::InstClassAux data type.
Alias of
Enum['scmopt', 'db-livecache-client']
Sap::InstClassDb
The Sap::InstClassDb data type.
Alias of
Enum['db-db2', 'db-livecache']
Sap::InstClassSap
The Sap::InstClassSap data type.
Alias of
Variant[Sap::InstClassSapApp, Sap::InstClassSapCs, Enum[
'webdisp',
'gateway',
'ers',
]]
Sap::InstClassSapApp
The Sap::InstClassSapApp data type.
Alias of
Enum['as-dual', 'as-abap', 'as-java']
Sap::InstClassSapCs
The Sap::InstClassSapCs data type.
Alias of
Enum['cs-abap', 'cs-java']
Sap::InstData
Simple structure containing the type of an instance along with it's instance number and the host name of the server on which it must run. This may be a virtual host for servers that can run on multiple nodes.
See sapnote 1751381 for further details on the START profile formats
Alias of
Hash[Enum[
'type', # Category of SAP instance
'number', # 2 digit SAP instance number
'host', # Hostname or alias for this component
'legacy_start_profile', # If true assume separate START profiles
], Variant[
Sap::InstType,
Sap::InstNumber,
Stdlib::Host,
Boolean,
]]
Sap::InstNumber
The Sap::InstNumber data type.
Alias of
Pattern[/[0-9]{2}/]
Sap::InstType
The Sap::InstType data type.
Alias of
Enum['ASCS', 'SCS', 'ERS', 'D', 'J', 'DVEBMGS', 'G', 'W']
Sap::MessageServer
Describes the message server information needed for an external connection to a given SID.
Alias of
Hash[Enum[
'class', # e.g. cs-abap or cs-java
'number', # e.g. '00'
'port_override', # e.g. '3915', optional and should be used sparingly
], Variant[
Sap::InstClassSapCs,
Sap::InstNumber,
Stdlib::Port,
]]
Sap::MountPointSIDMode
The Sap::MountPointSIDMode data type.
Alias of
Variant[Boolean, Enum[
'user',
]]
Sap::MountPoints
The Sap::MountPoints data type.
Alias of
Hash[Stdlib::AbsolutePath, Hash[
Enum[
'file_params',
'per_sid',
'pattern_map',
'pattern_values',
'count',
'mount_params',
'required_files',
],
Variant[
Hash,
Sap::MountPointSIDMode,
Integer,
Array[Stdlib::AbsolutePath],
],
]]
Sap::NodeRole
The Sap::NodeRole data type.
Alias of
Enum['app-standard', 'app-scs', 'app-apo-opt', 'db-standard', 'db-livecache']
Sap::PuppetUrl
The Sap::PuppetUrl data type.
Alias of
Pattern[/(?i:^puppet?:\/\/)/]
Sap::Reginfo
The Sap::Reginfo data type.
Alias of
Hash[Enum[
'MODE', # mandatory
'TP', # mandatory
'NO',
'HOST',
'ACCESS',
'CANCEL',
], Variant[
Sap::SecRuleMode,
Sap::TargetProgram,
Integer,
Array[Sap::HostRuleEntry],
]]
Sap::SID
Format of an SAP system ID
Examples
Valid data
ECP
PRD
QAS
SCP
EQ0
Alias of
Pattern[/\A[A-Z0-9]{3}\z/]
Sap::SIDClusterData
The Sap::SIDClusterData data type.
Alias of
Hash[Sap::SID, Hash[
Enum['node_roles', 'components'],
Variant[
Sap::ClusterNodeRoles,
Array[Sap::ClusterComponent],
],
]]
Sap::SIDConfigEntry
Configuration entry for a SID
Alias of
Struct[=>]
Parameters
The following parameters are available in the Sap::SIDConfigEntry
data type:
components
backend_databases
manage_profiles
manage_default_profiles
exclude_common_mount_points
pattern_map
pattern_values
instances
databases
primary_backend_db
default_pfl_entries
sec_info_rules
reg_info_rules
db2_query_schedules
components
A list of associated sap applications to enable for this SID (mandatory).
backend_databases
Types of databases to which this system connects (mandatory for SIDs with 'base' enabled)
manage_profiles
Flag indicating whether the instance profiles for this SID should be
managed. When true, instances
, databases
, and primary_backend_db
become mandatory parameters!
manage_default_profiles
Flag indicating whether DEFAULT.PFL for this SID should be managed. When true, it is created, otherwise it is left absent.
exclude_common_mount_points
Flag indicating if this SID should skip SID specific entries for the 'common' mountpoint. Some system types do not have /sapmnt directories (e.g. a DAA instance or liveCache).
pattern_map
A hash mapping pattern lookup keys to regular expressions which are
unique to this SID. Note that if one is added it must have a
corresponding value added in pattern_values
.
pattern_values
Mapping from a pattern lookup key to the value which should be provided wherever the corresponding pattern is found.
instances
Hash detailing the instances which are part of this SID. Entries
are keyed by instance class
and contain the corresponding
Sap::SidInstance detail.
databases
Hash detailing the database parameters for this SID. Entries in
this hash are keyed by instance class
and contain the parameters
described by Sap::SidDatabase.
primary_backend_db
Specifies the primary database backend used by the application servers in this instance. This should map to an entry in `databases'
default_pfl_entries
Hash of profile keys and the desired value which will be appended to the end of the DEFAULT.PFL file for this instance. Currently not validated.
sec_info_rules
Array of Sap::SecInfo entries to be included in the secinfo rule file for this SID
reg_info_rules
Array of Sap::RegInfo entries to be included in the reginfo rule file for this SID.
db2_query_schedules
Array of Sap::Db2QuerySchedule entries to be deployed on each database node of this SID.
Sap::SIDDatabase
The Sap::SIDDatabase data type.
Alias of
Variant[Sap::SIDDatabaseDb2]
Sap::SIDDatabaseDb2
Hash describing an instance which is part of a given SAP SID.
Alias of
Struct[=>]
Parameters
The following parameters are available in the Sap::SIDDatabaseDb2
data type:
ha_mode
Indicates the HA mode used by this database. Valid values are described by Sap::DbHaMode
nodes
An array containing the trusted cert names of each node that is part of this database cluster.
fcm_base_port
The TCP/IP port used as a starting point for configuring this instance.
It will be added to the com_port
to determine the first communication
port for this database.
com_port
The TCP/IP port used to by clients to connect to this database instance.
host
Virtual name used by clients to connect to the HA/DR DB2 cluster. Mandatory when ha_mode is set to 'hadr'.
hadr_base_port
Used in the configuration of DB2 HA settings.
Sap::SIDInstance
Structure detailing the attributes of a given SAP instance class. This is assigned as a component of a specific SID's sidconfigentry.
Note that the 'host' parameter is optional and will be present only in the case that this is a service which can move between nodes.
Alias of
Hash[Enum[
'number', # e.g. '02'
'types', # e.g { 'ASCS' => [ node1.example.com, node2.example.com ] }
'host', # e.g. 'ecd-cs'
'legacy_start_profile', # Boolean
], Variant[
Sap::InstNumber,
Hash[Sap::InstType, Array[Stdlib::Fqdn]],
Stdlib::Host,
Boolean,
]]
Sap::SapComponent
Structure representing each valid component which could be installed on an SAP server. The
ads
- Adobe Document Servicesbase
- Catch-all for Standard SAP instance functionalitybase_extended
- Extra requirements which are shared by several advanced typesbo
- Business Objectscloudconnector
- Cloud Connector relating to HANA somehowcommon
- Underlying requirements shared by all instancesdb2
- Database server node hosting an IBM DB2 instanceexperimental
- special features which are in development- 'hana' - Database node hosting a SAP in-memory HANA instance
- 'maxdb' - Node hosting a maxdb database instance
- 'livecache' - Database node hosting a liveCache instance
- 'router' - Node hosting a SAP-router process
Alias of
Enum['ads', 'base', 'base_extended', 'bo', 'cloudconnector', 'common', 'db2', 'experimental', 'hana', 'maxdb', 'liveCache', 'liveCache_client', 'router', 'edi']
Sap::ScheduleEntry
The Sap::ScheduleEntry data type.
Alias of
Hash[String, Variant[
String,
Integer,
Array,
]]
Sap::SecRuleMode
The Sap::SecRuleMode data type.
Alias of
Enum['P', 'D']
Sap::SecUser
The Sap::SecUser data type.
Alias of
Pattern[/\A[*]\z/, /\A[A-Za-z0-9]{,11}\z/]
Sap::Secinfo
The Sap::Secinfo data type.
Alias of
Hash[Enum[
'MODE', # mandatory
'TP', # mandatory
'USER', # mandatory
'HOST', # mandatory
'USER-HOST',
], Variant[
Sap::SecRuleMode,
Sap::TargetProgram,
Sap::SecUser,
Array[Sap::HostRuleEntry],
]]
Sap::SourceURL
The Sap::SourceURL data type.
Alias of
Variant[Sap::PuppetUrl, Stdlib::Httpurl, Stdlib::Httpsurl]
Sap::SourcedFile
The Sap::SourcedFile data type.
Alias of
Hash[String, Sap::SourceURL]
Sap::TargetProgram
The Sap::TargetProgram data type.
Alias of
Pattern[/\A[A-Za-z0-9_\-\\\/]{,63}([A-Za-z0-9_\-\\\/]{1}|[*])?\Z/]
Sap::VgLvName
This artificially restricts vg names to [a-zA-Z0-9_]{2,} for simplification purposes.
Alias of
Pattern[/[a-zA-Z0-9_]{2,}/]
Changelog
All notable changes to this project will be documented in this file.
3.0.0 (2023-03-06)
Feature (1 change)
Maintenance (3 changes)
- refactor: SIDDatabaseDb2 as Struct
- refactor: sidconfigentry to struct
- refactor: pdk version and fixtures update
2.0.10 (2021-09-01)
Bugfix (1 change)
Maintenance (6 changes)
- maint: pdk version bump (merge request)
- maint: update firewalld to the latest version (merge request)
- maint: supporting module update (merge request)
- maint: replace stub with allow syntax (merge request)
- maint: rubocop fixes (merge request)
- maint: PDK update to latest template (merge request)
Release 2.0.9
Features
- PDK 1.15 support & switch to the latest firewalld module.
Release 2.0.8
Features
- Suppress output of db2 query schedule cron jobs
Release 2.0.7
Features
- Add support for STONITH, currently limited to fence_lpar
Release 2.0.5
Features
- Correct icmbnd.new permissions for SIDs containing AS-ABAP instances.
Bugfixes
- Syntax errors and missing paths are now fixed in db2_execute_query.
Release 2.0.4
Features
- ADS Customer fonts & XDC config
- DB2 cron based scheduled queries
- PDK 1.12 support
- Possible support for puppet 6.x
Release 2.0.3
Features
- New Types: ABAPUser, ABAPLang, ABAPPassword, ABAPLoginGroup, ABAPClient
- Updated for PDK 1.11.1
Release 2.0.2
Features
- Fact Changes:
- Major rewrite to incorporate unit testing.
- Change from
/sapmnt/${SAPSYSTEMNAME}/profile
to/usr/sap/${SAPSYSTEMNAME}/SYS/profile
for profile directories. - Addition of an
inst_classes
component containing a unique list of instance types.
- etc/services entry generation
- DB2 connection ports
- Standard SAP Ports
- Aliases for message servers
- Conflicting standard port entries are commented out
- When enabled, firewall rules for all relevant instances are automatically generated
- 'Mount points' which have the type link
- Creates the 'interface' directory structure needed for our EDI module
- When enabled on a per SID basis, the DEFAULT.PFL file for that SID is automatically generated.
- handles J2EE, ABAP, and 'gateway only' specific parameters
- allows additional parameters to be included via an array on a per-SID basis
- Also creates baseline secinfo and reginfo files for each node
Release 2.0.1
Features
- Restructured the SID argument such that component types are specified on a per SID basis
- Added support for liveCache and liveCache_client components
- Introduced flexible global and SID specific pattern mappings for use in mount point definitions
- Added support for mount-points which are SID specific but only in their user/group settings. As such they must be system level unique.
- Introduced a number of helper functions to simplify implementation of the mount point changes
Release 1.0.1
Features
- Manage /usr/sap/sapservices for cluster nodes
- Updated profile path for facts
Release 1.0.0
Features
- Major rework to use hiera data far more heavily than static config
- Removal of legacy 3.x syntax (e.g.
::sap
- Refactor to support other architectures, ppc64 in particular
- Addition of dynamically calculated limits and sysctl entries
- Updated to match the latest RHEL 7 guidelines from SAP
- Added notify check for swap partition size
- Added validation and update of /dev/shm size
- Added test to ensure an SID is specified
- Added management of default mount point creation for 'base' and 'db2' components
- Added a top-level configuration of SID string replacement patterns
- Added support for managing NFS mounts
- Includes required packages for db2 10.5
- Updated the sap facts to be a structure which includes the following detail
sid_hash
- Local SIDs in a hash containing entries for each instance with the number as the keytype
- the kind of instance (ERS, ASCS, etc)profiles
- an array of all profile files located in/sapmnt/SID/profile/
which belong to this instance
- Correctly tests ppc64 and x86_64 architectures
- Added support for pacemaker/corosync cluster configuration automation
Bugfixes
- Expanded the yum groups to actual package names to avoid constant service restarts
- Corrected the root cause of the restarts by specifying the uuidd.socket service instead of just uuidd.service. This is due to systemctl shenanigans as described in PUP-6759
Release 0.9.1
- Some changes ?
Release 0.9.0
- Initial release
Dependencies
- puppetlabs-stdlib (>= 6.6.0 < 9.0.0)
- derdanne-nfs (>= 2.0.10 < 3.0.0)
- puppet-corosync (>= 7.0.0 < 9.0.0)
- ccin2p3/etc_services (>= 2.0.3 < 3.0.0)
- puppet-firewalld (>= 4.1.1 < 5.0.0)
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.