Puppet Class: hanaexpress

Defined in:
manifests/init.pp

Summary

Setup SAP HANA Express hosting

Overview

Sets up basic things needed for SAP HANA Express hosting based on the SAP HANA Tutorial for Docker.

Examples:

class {
  "hanaexpress":
      store_username => "my-docker-user",
      store_password => "verysecret"
}

Parameters:

  • store_username (String)

    Username for the Docker store

  • store_password (Optional[String]) (defaults to: undef)

    Password for the Docker store

  • hana_data_path (String) (defaults to: "/data")

    Host path for persisting hana data

  • store_pass_hash (Optional[String]) (defaults to: undef)


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'manifests/init.pp', line 16

class hanaexpress (
  String $store_username,
  Optional[String] $store_password = undef,
  Optional[String] $store_pass_hash = undef,
  String $hana_data_path = "/data"
) {

  # Set Sysctl host settings (based on Step 5 of https://www.sap.com/developer/tutorials/hxe-ua-install-using-docker.html)

  sysctl {
    "fs.file-max":
      value => "20000000"
  }

  sysctl {
    "fs.aio-max-nr":
      value => "262144"
  }

  sysctl {
    "vm.memory_failure_early_kill":
      value => "1"
  }

  sysctl {
    "vm.max_map_count":
      value => "135217728"
  }

  sysctl {
    "net.ipv4.ip_local_port_range":
      value => "40000 60999"
  }

  # Login to the Docker store to pull SAP Hana images

  if ($store_password) {
    docker::registry {
      "https://index.docker.io/v1/":
        username => $store_username,
        password => $store_password
    }
  } else {
    docker::registry {
      "https://index.docker.io/v1/":
        username => $store_username,
        pass_hash => $store_pass_hash
    }
  }


  # Create the data persistence path

  file {
    $hana_data_path:
      ensure => "directory"
  }

  # Support Hiera

  $dbs = lookup({
    name => "hanaexpress-databases",
    merge => "hash",
    default_value => undef
  })

  if $dbs {
    create_resources("hanaexpress::database", $dbs)
  }

}