Puppet Class: wls_profile::basic_domain::wls_domain
- Inherits:
- wls_profile
- Defined in:
- manifests/basic_domain/wls_domain.pp
Summary
This class is the default implementation for defining a domain on your system.Overview
wls_profile::basic_domain::wls_domain
Using hiera, you can customize some of the aspects of this process.
When these customizations aren’t enough, you can replace the class with your own class. See [wls_profile::basic_domain](./basic_domain.html) for an explanation on how to do this.
See the file “LICENSE” for the full license governing this code.
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 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'manifests/basic_domain/wls_domain.pp', line 165
class wls_profile::basic_domain::wls_domain (
Optional[Integer] $administration_port,
Boolean $administration_port_enabled,
String[1] $adminserver_address,
Hash $adminserver_settings,
Optional[Integer] $adminserver_ssl_port,
Boolean $b2b_enabled,
Boolean $bam_enabled,
Boolean $custom_identity,
Optional[String[1]] $custom_identity_alias,
Optional[String[1]] $custom_identity_keystore_filename,
Boolean $custom_trust,
Boolean $development_mode,
String[1] $domain_name,
Stdlib::Absolutepath
$domains_dir,
Boolean $ess_enabled,
Array $extra_properties,
Stdlib::Absolutepath
$jdk_home,
Boolean $jsse_enabled,
Stdlib::Absolutepath
$log_dir,
Stdlib::Absolutepath
$middleware_home,
String[1] $nodemanager_address,
Hash $nodemanager_properties,
Integer $nodemanager_wait,
String[1] $os_group,
String[1] $os_user,
Enum[
'standard',
'forms',
'ohs_standalone',
'adf_restricted',
'osb',
'osb_soa',
'osb_soa_bpm',
'soa',
'soa_bpm',
'bam',
'adf',
'oim',
'oud',
'wc',
'wc_wcc_bpm']
$template_name,
Optional[String[1]] $trust_keystore_file,
Stdlib::Absolutepath
$weblogic_home,
Easy_type::Password $weblogic_password,
String[1] $weblogic_user,
Integer $adminserver_port = $wls_profile::adminserver_port,
Optional[Easy_type::Password]
$custom_identity_keystore_passphrase = undef,
Optional[Easy_type::Password]
$custom_identity_privatekey_passphrase = undef,
String[1] $domain_alias = $domain_name,
Optional[String[1]] $java_update_window = undef,
Integer $nodemanager_port = $wls_profile::nodemanager_port,
Optional[String[1]] $rcu_database_url = undef,
Optional[String[1]] $repository_database_url = undef,
Optional[
Enum[
'SMALL',
'MED',
'LARGE',
]
] $rcu_soa_profile = undef,
Optional[Easy_type::Password]
$repository_password = undef,
Optional[String[1]] $repository_prefix = undef,
Optional[String[1]] $repository_sys_user = undef,
Optional[Easy_type::Password]
$repository_sys_password = undef,
Optional[Easy_type::Password]
$trust_keystore_passphrase = undef,
Wls_install::Versions
$version = $wls_profile::weblogic_version,
Optional[Array] $wlst_args = undef,
) inherits wls_profile {
echo { "WebLogic domain for domain ${domain_name} using template for ${template_name}":
withpath => false,
}
if $java_update_window != undef {
echo { "Ensuring Java updates only run in update window: ${java_update_window}":
withpath => false,
}
#
# Ensure the java update window exists
#
schedule { 'java_update_window':
range => $java_update_window,
}
$java_update_schedule = 'java_update_window'
} else {
$java_update_schedule = undef
echo { 'Any java updates are run immediately':
withpath => false,
}
}
if $template_name in ['forms','ohs_standalone','osb','osb_soa','osb_soa_bpm','soa','soa_bpm','bam','oim','oud','wc','wc_wcc_bpm', 'adf'] {
$optional_settings = {
repository_database_url => $repository_database_url,
rcu_database_url => $rcu_database_url,
repository_prefix => $repository_prefix,
repository_sys_password => $repository_sys_password,
repository_sys_user => $repository_sys_user,
}
} else {
$optional_settings = {}
}
#
# Depending on the options we specify we need to connect to a different URL for management
# of the domain.
#
$connect_url = if $administration_port_enabled == true {
"t3s://${adminserver_address}:${administration_port}"
} elsif $administration_port_enabled == false and $adminserver_ssl_port != undef {
"t3s://${adminserver_address}:${adminserver_ssl_port}"
} else {
"t3://${adminserver_address}:${adminserver_port}"
}
#
# Here you create your domain. The domain is the first thing a WebLogic installation needs. Here
# you also decide what kind of domain you need. A bare WebLogic
#
wls_install::domain { $domain_name:
version => $version,
wls_domains_dir => $domains_dir,
wls_apps_dir => "${domains_dir}/applications",
weblogic_home_dir => $weblogic_home,
middleware_home_dir => $middleware_home,
log_dir => $log_dir,
jdk_home_dir => $jdk_home,
domain_name => $domain_name,
domain_template => $template_name,
bam_enabled => $bam_enabled,
b2b_enabled => $b2b_enabled,
ess_enabled => $ess_enabled,
development_mode => $development_mode,
weblogic_user => $weblogic_user,
weblogic_password => $weblogic_password,
repository_password => $repository_password,
os_user => $os_user,
os_group => $os_group,
nodemanager_address => $nodemanager_address,
nodemanager_port => $nodemanager_port,
adminserver_address => $adminserver_address,
adminserver_port => $adminserver_port,
adminserver_ssl_port => $adminserver_ssl_port,
administration_port => $administration_port,
administration_port_enabled => $administration_port_enabled,
download_dir => $wls_profile::download_dir,
java_update_window => $java_update_schedule,
jsse_enabled => $jsse_enabled,
custom_trust => $custom_trust,
trust_keystore_file => $trust_keystore_file,
trust_keystore_passphrase => $trust_keystore_passphrase,
custom_identity => $custom_identity,
custom_identity_keystore_filename => $custom_identity_keystore_filename,
custom_identity_keystore_passphrase => $custom_identity_keystore_passphrase,
custom_identity_alias => $custom_identity_alias,
custom_identity_privatekey_passphrase => $custom_identity_privatekey_passphrase,
rcu_soa_profile => $rcu_soa_profile,
* => $optional_settings,
}
#
# Over here you define the nodemanager. Here you can specify the address
# the nodemanager is running on and the listen address. When you create multiple domains
# with multiple nodemanagers, you have to specify different addresses and/or ports.
#
-> wls_install::nodemanager { "nodemanager for ${domain_name}":
wls_domains_dir => $domains_dir,
weblogic_home_dir => $weblogic_home,
middleware_home_dir => $middleware_home,
jdk_home_dir => $jdk_home,
download_dir => $wls_profile::download_dir,
domain_name => $domain_name,
version => $version,
log_dir => $log_dir,
nodemanager_address => $nodemanager_address,
os_user => $os_user,
os_group => $os_group,
properties => $nodemanager_properties,
java_update_window => $java_update_schedule,
jsse_enabled => $jsse_enabled,
custom_trust => $custom_trust,
trust_keystore_file => $trust_keystore_file,
trust_keystore_passphrase => $trust_keystore_passphrase,
custom_identity => $custom_identity,
custom_identity_keystore_filename => $custom_identity_keystore_filename,
custom_identity_keystore_passphrase => $custom_identity_keystore_passphrase,
custom_identity_alias => $custom_identity_alias,
custom_identity_privatekey_passphrase => $custom_identity_privatekey_passphrase,
sleep => $nodemanager_wait,
}
#
# Before you can manage any WebLogic objects, you'll need to have a running admin server.
# This code mages sure the admin server is started. Just like with the nodemanager, you'll need
# to specify unique addresses and ports.
#
-> wls_install::control { "start_adminserver_${domain_name}":
wls_domains_dir => $domains_dir,
action => 'start',
weblogic_home_dir => $weblogic_home,
middleware_home_dir => $middleware_home,
download_dir => $wls_profile::download_dir,
jdk_home_dir => $jdk_home,
os_user => $os_user,
os_group => $os_group,
domain_name => $domain_name,
weblogic_user => $weblogic_user,
weblogic_password => $weblogic_password,
adminserver_address => $adminserver_address,
adminserver_port => $adminserver_port,
jsse_enabled => $jsse_enabled,
custom_trust => $custom_trust,
trust_keystore_file => $trust_keystore_file,
trust_keystore_passphrase => $trust_keystore_passphrase,
}
#
# wls_setting is used to store the credentials and connect URL of a domain. The Puppet
# types need this to connect to the admin server and change settings.
#
->wls_setting { $domain_alias:
user => $os_user,
weblogic_user => $weblogic_user,
weblogic_password => $weblogic_password,
connect_url => $connect_url,
weblogic_home_dir => $weblogic_home,
extra_properties => $extra_properties,
custom_trust => $custom_trust,
trust_keystore_file => $trust_keystore_file,
trust_keystore_passphrase => if $trust_keystore_passphrase == undef { undef } else { $trust_keystore_passphrase.unwrap },
wlst_args => $wlst_args,
}
#
# You can use this wls_server definition to change any settings for your
# Admin server. because the AdminServer is restarted by wls_adminserver{'soa/AdminServer':}
# These settings are immediately applied
#
->wls_server { "${domain_alias}/AdminServer":
ensure => 'present',
listenaddress => $adminserver_address,
listenport => $adminserver_port,
logfilename => "${log_dir}/AdminServer/AdminServer_${domain_name}.log",
log_datasource_filename => "${log_dir}/AdminServer/datasource.log",
log_http_filename => "${log_dir}/AdminServer/access.log",
* => $adminserver_settings,
}
#
# This definition restarts the Admin server. It is a refresh-only, so it is only done
# when the statement before actually changed something.
#
~>wls_adminserver { "${domain_alias}/AdminServer":
ensure => running,
refreshonly => true,
server_name => 'AdminServer',
domain_name => $domain_name,
domain_path => "${domains_dir}/${domain_name}",
os_user => $os_user,
nodemanager_address => $nodemanager_address,
nodemanager_port => $nodemanager_port,
weblogic_user => $weblogic_user,
weblogic_password => unwrap($weblogic_password),
weblogic_home_dir => $weblogic_home,
subscribe => Wls_install::Domain[$domain_name],
jsse_enabled => $jsse_enabled,
custom_trust => $custom_trust,
trust_keystore_file => $trust_keystore_file,
trust_keystore_passphrase => if $trust_keystore_passphrase == undef { undef } else { $trust_keystore_passphrase.unwrap },
}
}
|