Ottomata has submitted this change and it was merged.
Change subject: Use hiera to configure hive and oozie server hostnames
......................................................................
Use hiera to configure hive and oozie server hostnames
This will allow a test move of the hive and oozie servers in labs before doing
so in prod.
Bug: T110090
Change-Id: Ic066d4537407129fce5e9b12b805ffa3ce5b1674
---
M hieradata/eqiad.yaml
M manifests/role/analytics/hive.pp
M manifests/role/analytics/oozie.pp
3 files changed, 28 insertions(+), 9 deletions(-)
Approvals:
Ottomata: Looks good to me, approved
jenkins-bot: Verified
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index a035d70..e110b1a 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -129,3 +129,10 @@
labs_baremetal_servers:
- '10.64.20.12'
+
+# Used in role::analytics::hive::config
+hive_server_host: analytics1027.eqiad.wmnet
+hive_metastore_host: analytics1027.eqiad.wmnet
+
+# Used in role::analytics::oozie::config
+oozie_host: analytics1027.eqiad.wmnet
diff --git a/manifests/role/analytics/hive.pp b/manifests/role/analytics/hive.pp
index f78712e..eb01399 100644
--- a/manifests/role/analytics/hive.pp
+++ b/manifests/role/analytics/hive.pp
@@ -20,7 +20,7 @@
include role::analytics::hadoop::config
# Set this pretty high, to avoid limiting the number
- # of substitutionvariables a Hive script can use.
+ # of substitution variables a Hive script can use.
$variable_substitute_depth = 10000
# The WMF webrequest table uses HCatalog's JSON Serde.
@@ -48,15 +48,20 @@
if $::realm == 'production' {
include passwords::analytics
- $server_host = 'analytics1027.eqiad.wmnet'
- $metastore_host = 'analytics1027.eqiad.wmnet'
$jdbc_password = $passwords::analytics::hive_jdbc_password
+ # Must set hive_server_host and hive_metastore_host in hiera
+ # in production.
+ $default_hive_host = undef
}
elsif $::realm == 'labs' {
- $server_host = $role::analytics::hadoop::config::namenode_hosts[0]
- $metastore_host = $role::analytics::hadoop::config::namenode_hosts[0]
$jdbc_password = 'hive'
+ # Default to hosting hive-server and hive-metastore on
+ # primary namenode in labs.
+ $default_hive_host =
$role::analytics::hadoop::config::namenode_hosts[0]
}
+
+ $server_host = hiera('hive_server_host', $default_hive_host)
+ $metastore_host = hiera('hive_metastore_host', $default_hive_host)
}
diff --git a/manifests/role/analytics/oozie.pp
b/manifests/role/analytics/oozie.pp
index 212e794..5637ab5 100644
--- a/manifests/role/analytics/oozie.pp
+++ b/manifests/role/analytics/oozie.pp
@@ -13,13 +13,20 @@
include role::analytics::hadoop::config
if $::realm == 'production' {
- $oozie_host = 'analytics1027.eqiad.wmnet'
- $jdbc_password = $passwords::analytics::oozie_jdbc_password
+ include passwords::analytics
+
+ $jdbc_password = $passwords::analytics::oozie_jdbc_password
+ # Must set oozie_host in hiera in production.
+ $default_oozie_host = undef
+
}
elsif $::realm == 'labs' {
- $oozie_host = $role::analytics::hadoop::config::namenode_hosts[0]
- $jdbc_password = 'oozie'
+ $jdbc_password = 'oozie'
+ # Default to running oozie server on primary namenode in labs.
+ $default_oozie_host =
$role::analytics::hadoop::config::namenode_hosts[0]
}
+
+ $oozie_host = hiera('oozie_host', $default_oozie_host)
}
--
To view, visit https://gerrit.wikimedia.org/r/264742
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic066d4537407129fce5e9b12b805ffa3ce5b1674
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits