Page MenuHomePhabricator

Refactor puppet code for the Hadoop Analytics cluster to roles/profiles
Closed, ResolvedPublic21 Estimated Story Points

Description

While working on https://gerrit.wikimedia.org/r/#/c/354449 several comments were made to improve the hiera lookup logic in the Puppet Hadoop codebase.

This task should focus on:

  1. remove indirect hiera lookups, namely the ones happening not directly in a role but in another one that it is included. There are several FIXME comments in puppet after https://gerrit.wikimedia.org/r/#/c/354449, really easy to spot examples.
  1. move to profiles/roles, and possibly strive for having a single role for each host in site.pp.

Details

SubjectRepoBranchLines +/-
operations/puppetproduction+209 -164
operations/puppetproduction+73 -57
operations/puppetproduction+1 -1
operations/puppetproduction+21 -60
operations/puppetproduction+34 -30
operations/puppetproduction+47 -40
operations/puppetproduction+1 -1
operations/puppetproduction+1 -5
operations/puppetproduction+244 -224
operations/puppetproduction+28 -14
operations/puppetproduction+1 -1
operations/puppetproduction+3 -3
operations/puppetproduction+14 -8
operations/puppetproduction+113 -107
operations/puppetproduction+5 -2
operations/puppetproduction+1 -1
operations/puppetproduction+82 -64
operations/puppetproduction+7 -3
operations/puppetproduction+84 -72
operations/puppetproduction+289 -120
operations/puppetproduction+14 -78
operations/puppetproduction+56 -52
operations/puppetproduction+9 -12
operations/puppetproduction+7 -1
operations/puppet/cdhmaster+3 -16
operations/puppetproduction+52 -53
operations/puppetproduction+677 -496
operations/puppetproduction+15 -10
operations/puppetproduction+64 -53
operations/puppetproduction+0 -13
operations/puppetproduction+1 -1
operations/puppetproduction+130 -117
operations/puppetproduction+27 -20
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Thanks for working on this!

  1. move to profiles/roles, and possibly strive for having a single role in site.pp.

I assume you mean a single role per host. That's the end goal after the adoption of the profile/role model for ops as well. It does maximize code re-use and easy configuration at the cost of an increased number of roles. But roles in the profile/role paradigm are so small and self-contained that that's fine.

Nuria lowered the priority of this task from Medium to Low.Jun 15 2017, 3:53 PM
Nuria moved this task from Incoming to Backlog (Later) on the Analytics board.

Change 370187 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::an_cluster::hadoop::client: moving to profiles (first part)

https://gerrit.wikimedia.org/r/370187

elukey moved this task from Stalled to In Progress on the User-Elukey board.

Change 370187 merged by Elukey:
[operations/puppet@production] role::an_cluster::hadoop::client: moving to profiles (first part)

https://gerrit.wikimedia.org/r/370187

Change 370798 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::hadoop::client: move to profiles (p2)

https://gerrit.wikimedia.org/r/370798

Change 370798 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::hadoop::client: move to profiles (p2)

https://gerrit.wikimedia.org/r/370798

Change 372122 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::druid::common: fix merge druid::properties

https://gerrit.wikimedia.org/r/372122

Change 372122 merged by Elukey:
[operations/puppet@production] profile::druid::common: fix merge druid::properties

https://gerrit.wikimedia.org/r/372122

Change 372129 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::monitoring::disk: remove unused role

https://gerrit.wikimedia.org/r/372129

Change 372129 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::monitoring::disk: remove unused role

https://gerrit.wikimedia.org/r/372129

Change 372131 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Introduce role::analytics_cluster::coordinator

https://gerrit.wikimedia.org/r/372131

Change 372131 merged by Elukey:
[operations/puppet@production] Introduce role::analytics_cluster::coordinator

https://gerrit.wikimedia.org/r/372131

Change 392658 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::hadoop::worker: move to role/profiles

https://gerrit.wikimedia.org/r/392658

Change 392658 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::hadoop: move worker and masters to role/profiles

https://gerrit.wikimedia.org/r/392658

Change 393041 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::hadoop::standby: restore namenode bacula backup

https://gerrit.wikimedia.org/r/393041

Change 393041 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::hadoop::standby: restore namenode bacula backup

https://gerrit.wikimedia.org/r/393041

Change 393257 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::database::meta::backup*: move to profiles

https://gerrit.wikimedia.org/r/393257

Change 393257 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::database::meta::backup*: move to profiles

https://gerrit.wikimedia.org/r/393257

Change 393563 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::client: move to profiles

https://gerrit.wikimedia.org/r/393563

Change 393611 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet/cdh@master] Move journalnode's config from cdh::hadoop to cdh::hadoop:worker

https://gerrit.wikimedia.org/r/393611

Change 393611 merged by Elukey:
[operations/puppet/cdh@master] Remove journalnode's config auto-inclusion from cdh::hadoop

https://gerrit.wikimedia.org/r/393611

Change 393636 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop::worker: include the journalnode when needed

https://gerrit.wikimedia.org/r/393636

Change 393636 merged by Elukey:
[operations/puppet@production] profile::hadoop::worker: include the journalnode when needed

https://gerrit.wikimedia.org/r/393636

Change 393733 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop::client: move alarms definition to the worker profile

https://gerrit.wikimedia.org/r/393733

Change 393733 merged by Elukey:
[operations/puppet@production] profile::hadoop::client: move alarms definition to the worker profile

https://gerrit.wikimedia.org/r/393733

Change 393738 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Rename ::profile::hadoop::client to commons and move some features out

https://gerrit.wikimedia.org/r/393738

Change 393741 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Move Hadoop common profile hiera settings to common.yaml

https://gerrit.wikimedia.org/r/393741

Change 393756 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop::common: import hiera config from cdh::hadoop

https://gerrit.wikimedia.org/r/393756

Change 393738 merged by Elukey:
[operations/puppet@production] Rename ::profile::hadoop::client to commons and move some features out

https://gerrit.wikimedia.org/r/393738

Change 393741 merged by Elukey:
[operations/puppet@production] profile::hadoop::common,profile::hive::client: move hiera config in one place

https://gerrit.wikimedia.org/r/393741

Change 393756 merged by Elukey:
[operations/puppet@production] profile::hadoop::common: import hiera config from cdh::hadoop

https://gerrit.wikimedia.org/r/393756

Change 395527 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::hive/oozie: move to profiles

https://gerrit.wikimedia.org/r/395527

Change 395527 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::hive/oozie: move to profiles

https://gerrit.wikimedia.org/r/395527

Change 395710 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::[hadoop::standby|hue]: fix hiera config

https://gerrit.wikimedia.org/r/395710

Change 395710 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::[hadoop::standby|hue]: fix hiera config

https://gerrit.wikimedia.org/r/395710

Change 393563 abandoned by Elukey:
role::analytics_cluster::client: move to profiles

https://gerrit.wikimedia.org/r/393563

Change 401904 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop::master: remove the last hadoop cdh auto-lookup

https://gerrit.wikimedia.org/r/401904

Change 401907 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::coordinator: fix system::role

https://gerrit.wikimedia.org/r/401907

Change 401907 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::coordinator: fix system::role

https://gerrit.wikimedia.org/r/401907

Change 401927 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Refactor thorium's roles in one

https://gerrit.wikimedia.org/r/401927

Change 402050 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop: set hiera defaults to ease labs deployments

https://gerrit.wikimedia.org/r/402050

Change 401904 merged by Elukey:
[operations/puppet@production] profile::hadoop::master: remove the last hadoop cdh auto-lookup

https://gerrit.wikimedia.org/r/401904

Change 401927 merged by Elukey:
[operations/puppet@production] Refactor thorium's roles in one

https://gerrit.wikimedia.org/r/401927

Change 402050 merged by Elukey:
[operations/puppet@production] profile::hadoop: set hiera defaults to ease labs deployments

https://gerrit.wikimedia.org/r/402050

Change 402084 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster: avoid to expicitly instance the standard class

https://gerrit.wikimedia.org/r/402084

Change 402084 merged by Elukey:
[operations/puppet@production] role::analytics_cluster: avoid to expicitly instance the standard class

https://gerrit.wikimedia.org/r/402084

Change 402316 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::hadoop::master: fix order in profile inclusion

https://gerrit.wikimedia.org/r/402316

Change 402316 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::hadoop::master: fix order in profile inclusion

https://gerrit.wikimedia.org/r/402316

Change 402323 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop::*: include labs firewall use case

https://gerrit.wikimedia.org/r/402323

Change 402323 abandoned by Elukey:
profile::hadoop::*: include labs firewall use case

https://gerrit.wikimedia.org/r/402323

Change 402843 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Move role refinery::job::* to profiles

https://gerrit.wikimedia.org/r/402843

Change 402843 merged by Ottomata:
[operations/puppet@production] Move role refinery::job::* to profiles

https://gerrit.wikimedia.org/r/402843

Change 402853 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Move refinery::job::data_check from stat1005 to analytics1003

https://gerrit.wikimedia.org/r/402853

Change 402853 merged by Ottomata:
[operations/puppet@production] Move refinery::job::data_check from stat1005 to analytics1003

https://gerrit.wikimedia.org/r/402853

Change 402857 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Render role's analytics refinery logrotate from profile

https://gerrit.wikimedia.org/r/402857

Change 402857 merged by Ottomata:
[operations/puppet@production] Render role's analytics refinery logrotate from profile

https://gerrit.wikimedia.org/r/402857

Change 420301 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] role::analytics_cluster::client: move config to a separate profile

https://gerrit.wikimedia.org/r/420301

Change 420301 merged by Elukey:
[operations/puppet@production] role::analytics_cluster::client: move config to a separate profile

https://gerrit.wikimedia.org/r/420301

Change 420383 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Refactor stat1005's roles into role/profiles

https://gerrit.wikimedia.org/r/420383

Change 420383 merged by Elukey:
[operations/puppet@production] Refactor stat1005's roles into role/profiles

https://gerrit.wikimedia.org/r/420383

Change 420646 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Refactor the last bits of the Analytics code not following role/profile

https://gerrit.wikimedia.org/r/420646

After the last puppet patch we should be in a good position regarding role/profiles. The last bit to discuss/review/refactor is profile::hadoop::common, since it takes its hiera values from a profile namespace, and overriding those values is not that easy (those ones are supposed to be global, so a new place in hiera might be better).

Change 420646 merged by Elukey:
[operations/puppet@production] Refactor the last bits of the Analytics code not following role/profile

https://gerrit.wikimedia.org/r/420646

Change 421020 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] profile::hadoop:balancer: fix logrotate source

https://gerrit.wikimedia.org/r/421020

Change 421020 merged by Elukey:
[operations/puppet@production] profile::hadoop:balancer: fix logrotate source

https://gerrit.wikimedia.org/r/421020

Change 423000 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] Refactor hadoop/hive monitoring profiles to a simpler structure

https://gerrit.wikimedia.org/r/423000

Change 423000 merged by Elukey:
[operations/puppet@production] Refactor hadoop/hive monitoring profiles to a simpler structure

https://gerrit.wikimedia.org/r/423000

Change 447813 had a related patch set uploaded (by Elukey; owner: Elukey):
[operations/puppet@production] [WIP] Refactor Hadoop code to allow more than one cluster in Prod

https://gerrit.wikimedia.org/r/447813

Change 447813 merged by Elukey:
[operations/puppet@production] Refactor Hadoop code to allow more than one cluster in Prod

https://gerrit.wikimedia.org/r/447813

The last patch ends the journey of this big refactoring, since we are now able to have multiple hadoop clusters defined in puppet (production). There might still be things here and there that needs to be ported to role/profile, but the bulk of the work is definitely done.

elukey set the point value for this task to 21.
elukey moved this task from Paused to Done on the Analytics-Kanban board.