diff --git a/manifests/role/labstools.pp b/manifests/role/labstools.pp index 96e4b2f8f2..63804b520c 100644 --- a/manifests/role/labstools.pp +++ b/manifests/role/labstools.pp @@ -1,125 +1,120 @@ class role::labs::tools { class common { $gridmaster = "${::instanceproject}-master.${::site}.wmflabs" class { 'gridengine': gridmaster => $gridmaster } } class bastion inherits role::labs::tools::common { include toollabs::bastion system::role { 'role::labs::tools::bastion': description => 'Tool Labs bastion' } } class compute inherits role::labs::tools::common { include toollabs::compute system::role { 'role::labs::tools::compute': description => 'Tool Labs compute node' } } class master inherits role::labs::tools::common { include toollabs::master system::role { 'role::labs::tools::master': description => 'Tool Labs gridengine master' } } class shadow inherits role::labs::tools::common { system::role { 'role::labs::tools::shadow': description => 'Tool Labs gridengine shadow (backup) master' } class { 'toollabs::shadow': gridmaster => $role::labs::tools::common::gridmaster, } } class services( $active_host = 'tools-services-01.eqiad.wmflabs', ) inherits role::labs::tools::common { system::role { 'role::labs::tools::services': description => 'Tool Labs manifest based services', } class { 'toollabs::services': active => ($::fqdn == $active_host), } } class submit inherits role::labs::tools::common { include toollabs::submit system::role { 'role::labs::tools::submit': description => 'Tool Labs job submit (cron) host' } } class proxy inherits role::labs::tools::common { include toollabs::proxy system::role { 'role::labs::tools::proxy': description => 'Tool labs generic web proxy' } } class static inherits role::labs::tools::common { include toollabs::static system::role { 'role::labs::tools::static': description => 'Tool Labs static http server', } } class mailrelay inherits role::labs::tools::common { system::role { 'role::labs::tools::mailrelay': description => 'Tool Labs mail relay' } $maildomain_project = $::instanceproject ? { 'toolsbeta' => 'tools-beta.wmflabs.org', default => 'tools.wmflabs.org', } class { 'toollabs::mailrelay': maildomain => $maildomain_project } } class redis inherits role::labs::tools::common { system::role { 'role::labs::tools::redis': description => 'Server that hosts shared Redis instance' } include toollabs::redis } class redis::slave( $master = 'tools-redis', ) inherits role::labs::tools::common { system::role { 'role::labs::tools::redis::slave': description => 'Server that hosts shared Redis instance' } class { 'toollabs::redis': replicate_from => $master, } } class toolwatcher inherits role::labs::tools::common { system::role { 'role::labs::tools::toolwatcher': description => 'Tool Labs directory structure creator for new tools', } include toollabs::toolwatcher } ## ## NOTE: Those roles are transitional, and should be removed ## from Wikitech entirely in favor of role::labs::tools::compute ## followed by explicit toollabs::node::* ## class execnode inherits role::labs::tools::compute { include toollabs::node::compute::general } class webnode inherits role::labs::tools::compute { include toollabs::node::web::lighttpd } - - class tomcatnode inherits role::labs::tools::compute { - include toollabs::node::web::tomcat - } - } # class role::labs::tools diff --git a/modules/toollabs/manifests/master.pp b/modules/toollabs/manifests/master.pp index 4db2a8c115..9628023718 100644 --- a/modules/toollabs/manifests/master.pp +++ b/modules/toollabs/manifests/master.pp @@ -1,76 +1,71 @@ # Class: toollabs::master # # This role sets up the grid master in the Tool Labs model. # # Parameters: # # Actions: # # Requires: # # Sample Usage: # class toollabs::master inherits toollabs { include gridengine::master, toollabs::infrastructure, toollabs::exec_environ, toollabs::queue::task, toollabs::queue::continuous file { "${toollabs::collectors}/hostgroups": ensure => directory, owner => 'root', group => 'root', mode => '0755', } file { "${toollabs::collectors}/queues": ensure => directory, owner => 'root', group => 'root', mode => '0755', } gridengine::collectors::hostgroups { '@general': store => "${toollabs::collectors}/hostgroups", } gridengine::collectors::queues { 'webgrid-lighttpd': store => "${toollabs::collectors}/queues", config => 'toollabs/gridengine/queue-webgrid.erb', } - gridengine::collectors::queues { 'webgrid-tomcat': - store => "${toollabs::collectors}/queues", - config => 'toollabs/gridengine/queue-webgrid.erb', - } - gridengine::collectors::queues { 'webgrid-generic': store => "${toollabs::collectors}/queues", config => 'toollabs/gridengine/queue-webgrid.erb', } # # These things are done on toollabs::master because they # need to be done exactly once per project (they live on the # shared filesystem), and there can only be exactly one # gridmaster in this setup. They could have been done on # any singleton instance. # # TODO: Remove after migration. file { "${toollabs::repo}/update-repo.sh": ensure => absent, } exec { 'Move Tools all packages to new structure': command => "/bin/mv -i ${toollabs::repo}/all/*.deb ${toollabs::repo}/ && /bin/rm -f ${toollabs::repo}/all/Packages && /bin/rmdir ${toollabs::repo}/all", onlyif => "/usr/bin/test -d ${toollabs::repo}/all", notify => Exec["Turn ${toollabs::repo} into deb repo"], } exec { 'Move Tools amd64 packages to new structure': command => "/bin/mv -i ${toollabs::repo}/amd64/*.deb ${toollabs::repo}/ && /bin/rm -f ${toollabs::repo}/amd64/Packages && /bin/rmdir ${toollabs::repo}/amd64", onlyif => "/usr/bin/test -d ${toollabs::repo}/amd64", notify => Exec["Turn ${toollabs::repo} into deb repo"], } } diff --git a/modules/toollabs/manifests/node/web/tomcat.pp b/modules/toollabs/manifests/node/web/tomcat.pp deleted file mode 100644 index d8dc596fe8..0000000000 --- a/modules/toollabs/manifests/node/web/tomcat.pp +++ /dev/null @@ -1,41 +0,0 @@ -# Class: toollabs::node::web::lighttpd -# -# This configures the compute node as a tomcat web server -# -# Parameters: -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class toollabs::node::web::tomcat inherits toollabs::node::web { - - package { [ 'tomcat7-user', 'xmlstarlet' ]: - ensure => latest, - } - - # For now, the tomcat nodes double as the generic webserver nodes - class { 'toollabs::queues': - queues => [ 'webgrid-tomcat', 'webgrid-generic' ] - } - - file { '/usr/local/bin/tool-tomcat': - ensure => file, - owner => 'root', - group => 'root', - mode => '0555', - source => 'puppet:///modules/toollabs/tool-tomcat', - } - - file { '/usr/local/bin/tomcat-starter': - ensure => file, - owner => 'root', - group => 'root', - mode => '0555', - source => 'puppet:///modules/toollabs/tomcat-starter', - require => Package['xmlstarlet'], - } - -}