/sap-maxdb-cookbook

Primary LanguageRubyApache License 2.0Apache-2.0

maxdb Cookbook

This cookbook provides recipes for installing SAP MAXDB Server Tested with Vagrant & AWS Provider For more information, other SAP Cookbooks, questions and feedback please go to: http://sapcc.github.io/sap-cookbook-docs/

This cookbook

  • creates a volume for the data
  • installs the MaxDB binaries
  • creates a default database instance
  • starts the MaxDB including x-server

Requirements

Installation binary

The installation bin is taken from service market of sap, you should login and take it from there link: https://support.sap.com/software/databases.html

Platform

  • AWS Image - Suse SLES 11 SP3 (checked on this AMI: ami-f1f5acc1 from region: us-west-2)
  • approx. 80GB in the rootfs directory
  • AWS EC2 Instance Type: m4.large (Minimum requirements - tested on this type)

Dependencies (recepies)

Please ensure that you have accessibility to the following:

  • ark
  • lvm

Attributes

All attributes have sane default values (See attributes/default.rb). You can install any supported component in this cookbook, without overriding any attributes. In case you need to override an attribute(s), use either a role or a wrapper cookbook. See examples in the examples section.

maxdb::default

Key Type Description Default
['maxdb']['tmpDir'] String tmp dir to put zip files and setup scripts /tmp
['maxdb']['sapdbDir'] String base directory for installation /sapdb
['maxdb']['programDir'] String global programs directory /sapdb/programs
['maxdb']['SID'] String instance id SID
['maxdb']['volDataDir'] String path to the data volume /sapdb/['maxdb']['SID']/sapdata1
['maxdb']['volLogDir'] String path to the log volume /sapdb/['maxdb']['SID']/saplog1

maxdb::installdb

Key Type Description Default
['maxdb']['repoUrl'] String Repository url pointing to the maxdb installation files http://example-server.org:8080/location-of-binary/
['maxdb']['version'] String MaxDB version 7.8
['maxdb']['globalDataDir'] String global data directory /sapdb/data
['maxdb']['instDbDir'] String instance data directory /sapdb//db
['maxdb']['zipFile'] String Name of the installation zip file filename.tgz

maxdb::dbsettings

Key Type Description Default
['maxdb']['scriptName'] String Name of the MaxDB setup script to be found in the templates createdb
['maxdb']['dbName'] String Name of the Database to be created DEFAULT
['maxdb']['dbmOperator']['name'] String name of the DBM operator dbm
['maxdb']['dbmOperator']['password'] String password of the DBM operator dbm
['maxdb']['dbUser']['name'] String name of the DB User DBADMIN
['maxdb']['dbUser']['password'] String password of the DB User admin
['maxdb']['dbUser']['xuser'] String key of the DB User in the XUSERS list (of root) dba
['maxdb']['db']['parameter']['sessionTimeout'] String DB parameter sessionTimeout 0 (unlimited Sessions)
['maxdb']['db']['parameter']['CacheMemorySize'] String DB parameter CacheMemorySize 1000
['maxdb']['db']['parameter']['MaxDataVolumes'] String DB parameter MaxDataVolumes 64
['maxdb']['db']['parameter']['MaxUserTasks'] String DB parameter MaxUserTasks 120
['maxdb']['db']['parameter']['DefaultCodePage'] String DB parameter DefaultCodePage UNICODE
['maxdb']['db']['parameter']['autoUpdateStatistics'] String DB parameter autoUpdateStatistics ON
['maxdb']['db']['parameter']['autoExtend'] String DB parameter autoExtend ON
['maxdb']['db']['parameter']['autoExtendPercentage'] String DB parameter autoExtend on percentage 90
['maxdb']['db']['parameter']['logOverwrite'] String DB parameter logOverwrite ON
['maxdb']['db']['parameter']['maxSQLLocks'] String DB parameter MaxSQLLocks 900000
['maxdb']['db']['parameter']['maxServerTasks'] String DB parameter MaxServerTasks 4096
['maxdb']['db']['parameter']['joinTableBufferSize'] String DB parameter JoinTableBufferSize 16384
['maxdb']['db']['parameter']['joinSearchLevel'] String DB parameter JoinSearchLevel 4
['maxdb']['db']['parameter']['maxTransactions'] String DB parameter MaxTransactions 32767
['maxdb']['db']['parameter']['maxCPUs'] String DB parameter MaxCPUs 3
['maxdb']['db']['parameter']['maxLogVolumes'] String DB parameter MaxLogVolumes 4
['maxdb']['db']['parameter']['autoRecreateBadIndex'] String DB parameter AutoRecreateBadIndex. Can be ALL, UNIQUE or OFF ALL
['maxdb']['db']['parameter']['autoLogBackup'] String DB parameter AutoLogBackup. Can be on or off (must be lower case). Do not turn on, when ['maxdb']['db']['parameter']['logOverwrite'] is activated. off

maxdb::createdb

Key Type Description Default
['maxdb']['scriptName'] String Name of the MaxDB setup script to be found in the templates createdb
['maxdb']['dbName'] String Name of the Database to be created DEFAULT
['maxdb']['dbmOperator']['name'] String name of the DBM operator dbm
['maxdb']['dbmOperator']['password'] String password of the DBM operator dbm
['maxdb']['dbUser']['name'] String name of the DB User DBADMIN
['maxdb']['dbUser']['password'] String password of the DB User admin
['maxdb']['dbUser']['xuser'] String key of the DB User in the XUSERS list (of root) dba

Usage

maxdb::default

All-in-one to get a running DB.

First, create four volumes with device path '/dev/sapdb_pv_data, /dev/sapdb_pv_log, /dev/sapdb_pv_global, /dev/sapdb_pv_instance' and attach it to your node. Then include maxdb in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[maxdb]"
  ]
}

and set at least the following attributes:

[maxdb][SID] [maxdb][dbName] [maxdb][dbmOperator][password] [maxdb][dbUser][password]

maxdb::lvm

creates several ext3 lvm volume groups 'sapdb_vg_instance', 'sapdb_vg_global', 'sapdb_vg_data', 'sapdb_vg_log' and corresponding volumes from devices '/dev/sapdb_pv_instance', '/dev/sapdb_pv_global', '/dev/sapdb_pv_data', '/dev/sapdb_pv_log' and mounts it to '[maxdb][volDataDir]' (and subsequent)

maxdb::installdb

Downloads the installation zip file (tgz) from moo-repo and runs 'sdbinst' with the specified parameters.

maxdb::createdb

Processes the 'createdb' template and puts it to '/tmp'. Then it runs 'dbmcli -i /tmp/createdb' to setup a database named [:maxdb][:dbName].

maxdb::dbsettings

Processes the 'dbsettings' template and puts it to '/tmp'. Then it runs 'dbmcli -i /tmp/dbsettings' to configure the database named [:maxdb][:dbName].

maxdb::startdb

Starts the x_server and the database

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

License: SAP AG Authors: Stefan Weidemüller-Schmidt (stefan.weidemueller-schmidt@sap.com), Haggai Philip Zaggury, Dirk Lehmann (dirk.lehmann@sap.com)