Puppet Class: tungsten

Inherits:
tungsten::params
Defined in:
manifests/init.pp

Overview

Parameters:

  • nodeHostName (Any) (defaults to: $fqdn)
  • installMysqlj (Any) (defaults to: true)
  • mysqljLocation (Any) (defaults to: false)
  • installJava (Any) (defaults to: true)
  • installNTP (Any) (defaults to: $tungsten::params::installNTP)
  • disableFirewall (Any) (defaults to: true)
  • disableSELinux (Any) (defaults to: true)
  • docker (Any) (defaults to: false)
  • vmSwappiness (Any) (defaults to: 10)
  • replicatorRepo (Any) (defaults to: false)
  • installSSHKeys (Any) (defaults to: false)
  • sshPublicKey (Any) (defaults to: $tungsten::params::defaultSSHPublicKey)
  • sshPrivateCert (Any) (defaults to: $tungsten::params::defaultSSHPrivateCert)
  • installMysql (Any) (defaults to: false)
  • overrideOptionsMysqld (Any) (defaults to: {})
  • overrideOptionsClient (Any) (defaults to: {})
  • overrideOptionsMysqldSafe (Any) (defaults to: {})
  • mySQLBuild (Any) (defaults to: 'mysql')
  • mySQLVersion (Any) (defaults to: '5.6')
  • mySQLSetAutoIncrement (Any) (defaults to: false)
  • installXtrabackup (Any) (defaults to: true)
  • xtraBackupPackage (Any) (defaults to: 'auto')
  • installHadoop (Any) (defaults to: false)
  • installVertica (Any) (defaults to: false)
  • verticaDatabaseName (Any) (defaults to: false)
  • installOracle (Any) (defaults to: false)
  • oracleVersion (Any) (defaults to: 12)
  • oracleBinaries (Any) (defaults to: '/vagrant/downloads')
  • oracleTungstenTS (Any) (defaults to: 'tungsten_test')
  • oracleCreateTS (Any) (defaults to: true)
  • oracleTStoReplicate (Any) (defaults to: 'tungsten')
  • writeTungstenDefaults (Any) (defaults to: false)
  • installReplicatorSoftware (Any) (defaults to: false)
  • replicationUser (Any) (defaults to: tungsten)
  • replicationPassword (Any) (defaults to: secret)
  • replicationLogDirectory (Any) (defaults to: false)
  • installClusterSoftware (Any) (defaults to: false)
  • clusterData (Any) (defaults to: false)
  • appUser (Any) (defaults to: app_user)
  • appPassword (Any) (defaults to: secret)
  • applicationPort (Any) (defaults to: 3306)
  • installRedoReaderSoftware (Any) (defaults to: false)
  • redoReaderUser (Any) (defaults to: tungsten)
  • redoReaderPassword (Any) (defaults to: secret)
  • oracleSysPassword (Any) (defaults to: password)
  • oracleSystemPassword (Any) (defaults to: password)
  • oracleSID (Any) (defaults to: 'orcl')
  • redoReaderTopology (Any) (defaults to: false)
  • redoReaderMaster (Any) (defaults to: db1)
  • redoReaderSlave (Any) (defaults to: db2)
  • provisionNode (Any) (defaults to: false)
  • provisionDonor (Any) (defaults to: "autodetect")
  • skipHostConfig (Any) (defaults to: false)
  • installGems (Any) (defaults to: true)
  • localGemLocation (Any) (defaults to: false)


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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'manifests/init.pp', line 17

class tungsten (
		$nodeHostName										= $fqdn,
		$installMysqlj									= true,
      $mysqljLocation               = false,
		$installJava										= true,
		$installNTP											= $tungsten::params::installNTP,
		$disableFirewall							  = true,

		$disableSELinux                 = true,

		#Some kernel parameters can't be altered in docker
		$docker													= false,

		#Tungsten needs swappiness set to 10 but can be overridden
		$vmSwappiness										= 10,

		# This may be set to 'nightly', 'stable' or 'true
		# If set to 'true', the stable repository will be used
		$replicatorRepo									= false,

		#Setting this to true should only be used to support
		#testing as it's not secure unless you specify a custom private key
		$installSSHKeys									= false,
		  $sshPublicKey                 = $tungsten::params::defaultSSHPublicKey,
  	  $sshPrivateCert               = $tungsten::params::defaultSSHPrivateCert,

		$installMysql										= false,
      $overrideOptionsMysqld         = {},
      $overrideOptionsClient         = {},
      $overrideOptionsMysqldSafe     = {},
			#Which Repo to install percona,mysql or mariadb
			$mySQLBuild									   = 'mysql',
			#Version to install based on repo 5.5, 5.6, 5.7, 10.0
			$mySQLVersion									 = '5.6',
			#Set the my.cnf autoinc and autoinc offset based on clusterData
			$mySQLSetAutoIncrement				= false,
			$installXtrabackup						 = true,
			#If wanted the source will be autodetected either from a repo or rpm/deb
			#download. if set to a valid location it will be installed from there
			$xtraBackupPackage 						= 'auto',

		$installHadoop                  = false,

  	$installVertica                 = false,
  	$verticaDatabaseName            = false,

		$installOracle								= false,
		   $oracleVersion 						= 12,
			 $oracleBinaries						= '/vagrant/downloads',
			 $oracleTungstenTS					= 'tungsten_test',
			 $oracleCreateTS						= true,
			 $oracleTStoReplicate				= 'tungsten',

		# Set this to true if you are not passing $clusterData
	  # and want the /etc/tungsten/defaults.tungsten.ini file
	  # to be created
	  $writeTungstenDefaults                  = false,

		# Set this to 'true' or the path of a tungsten-replicator package
		# If set to 'true', the 'tungsten-replicator' will be installed from
		# configured repositories.
		$installReplicatorSoftware			= false,
			$replicationUser							= tungsten,
			$replicationPassword					= secret,
			$replicationLogDirectory		= false,


		# Set this to 'true' or the path of a continuent-tungsten package
		# If set to 'true', the 'continuent-tungsten' will be installed from
		# configured repositories.
		$installClusterSoftware					= false,
			$clusterData									= false,
			$appUser											= app_user,
			$appPassword									= secret,
			$applicationPort							= 3306,

		# Set this to 'true' or the path of a redo-reader package

		$installRedoReaderSoftware			= false,
			$redoReaderUser 							= tungsten,
			$redoReaderPassword	   				= secret,
			$oracleSysPassword						= password,
			$oracleSystemPassword					= password,
			$oracleSID										= 'orcl',
			$redoReaderTopology						= false,
			$redoReaderMaster							= db1,
			$redoReaderSlave							= db2,


		# Run the `tungsten_provision_slave` script after installing Tungsten
		$provisionNode									= false,
			$provisionDonor								= "autodetect",

    #If this is set to true no setting of hostname will be done
    $skipHostConfig                 = false,

		#Takes 3 options
		#       true   = install via usual gem route
		#       false  = dont install any gems
		#       local  = install from local gem location ($localGemLocation)
		$installGems										= true,
		$localGemLocation								= false

) inherits tungsten::params {


	if $::puppetversion < '3.2.7' {
			fail "This module is not supported on Puppet $::puppetversion - Please install at least 3.2.7"
	}

  class { 'tungsten::prereq::tungstenselinux': disableSELinux=>$disableSELinux }

  class { "tungsten::tungstenmysql":
      overrideOptionsMysqld 		=> $overrideOptionsMysqld,
      overrideOptionsClient 		=> $overrideOptionsClient,
      overrideOptionsMysqldSafe => $overrideOptionsMysqldSafe,
      installMysql 							=> $installMysql,
			mySQLBuild				 				=> $mySQLBuild,
			mySQLVersion				   		=> $mySQLVersion,
			clusterData 							=> $clusterData,
			mySQLSetAutoIncrement			=> $mySQLSetAutoIncrement,
			installXtrabackup				  => $installXtrabackup,
			xtraBackupPackage 				=> $xtraBackupPackage
	} ->
  class{ "tungsten::prereq":
    nodeHostName                => $nodeHostName,
    replicatorRepo              => $replicatorRepo,
    installMysqlj               => $installMysqlj,
    mysqljLocation              => $mysqljLocation,
    installSSHKeys              => $installSSHKeys,
    sshPublicKey                => $sshPublicKey,
    sshPrivateCert              => $sshPrivateCert,
    installJava                 => $installJava,
    installNTP                  => $installNTP,
    disableFirewall             => $disableFirewall,
    skipHostConfig              => $skipHostConfig,
		vmSwappiness								=> $vmSwappiness,
		docker											=> docker,
		installGems									=> $installGems,
		localGemLocation						=> $localGemLocation
  } ->
  anchor{ "tungsten::prereq": }

  anchor{ "tungsten::db": }

  if $installHadoop != false {
    Anchor["tungsten::prereq"] ->
    class { "tungsten::tungstenhadoop":
      distribution                => $installHadoop
    } ->
    Anchor["tungsten::db"]
  }

  if $installVertica != false {
    class { "tungsten::tungstenvertica":
      package                     => $installVertica,
      databaseName                => $verticaDatabaseName,
      password                    => $replicationPassword,
    } ->
    Anchor["tungsten::db"]
  }

	if $installOracle != false {
		class { "tungsten::tungstenoracle":
			oracleVersion               => $oracleVersion,
			oracleBinaries							=> $oracleBinaries
		} ->
		Anchor["tungsten::db"]
	}

  Anchor["tungsten::db"] ->
	class { "tungsten::tungsten":
		writeTungstenDefaults				=> $writeTungstenDefaults,
		installReplicatorSoftware 	=> $installReplicatorSoftware,
			repUser 									=> $replicationUser,
			repPassword 							=> $replicationPassword,
			replicationLogDirectory						=> $replicationLogDirectory,
		installClusterSoftware 			=> $installClusterSoftware,
			clusterData 							=> $clusterData,
			appUser 									=> $appUser,
			appPassword 							=> $appPassword,
			applicationPort 					=> $applicationPort,
		installRedoReaderSoftware		=> $installRedoReaderSoftware,
			redoReaderUser 						=> $redoReaderUser,
			redoReaderPassword	   		=> $redoReaderPassword,
			oracleSysPassword					=> $oracleSysPassword,
			oracleSystemPassword			=> $oracleSystemPassword,
			oracleSID									=> $oracleSID,
			redoReaderTopology				=> $redoReaderTopology,
			redoReaderMaster					=> $redoReaderMaster,
			readReaderSlave						=> $redoReaderSlave,
		provision 									=> $provisionNode,
			provisionDonor 						=> $provisionDonor,
		installOracle								=> $installOracle,
	}
}