System configuration for OpenStack Infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

status.pp 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. # == Class: openstack_project::status
  2. #
  3. class openstack_project::status (
  4. $gerrit_host,
  5. $gerrit_ssh_host_key,
  6. $reviewday_ssh_public_key = '',
  7. $reviewday_ssh_private_key = '',
  8. $recheck_ssh_public_key,
  9. $recheck_ssh_private_key,
  10. $recheck_bot_passwd,
  11. $recheck_bot_nick,
  12. $status_base_url = 'http://status.openstack.org/',
  13. $status_title = 'OpenStack',
  14. $graphite_render_url = 'http://graphite.openstack.org/render/',
  15. $jenkins_gitfullname = 'OpenStack Jenkins',
  16. $jenkins_gitemail = 'jenkins@openstack.org',
  17. $openstack_health_api_endpoint = 'http://health.openstack.org',
  18. ) {
  19. include openstack_project
  20. class { 'jenkins::jenkinsuser':
  21. ssh_key => $openstack_project::jenkins_ssh_key,
  22. gitfullname => $jenkins_gitfullname,
  23. gitemail => $jenkins_gitemail,
  24. }
  25. include ::httpd
  26. httpd_mod { 'rewrite':
  27. ensure => present,
  28. }
  29. httpd_mod { 'proxy':
  30. ensure => present,
  31. }
  32. httpd_mod { 'proxy_http':
  33. ensure => present,
  34. }
  35. file { '/srv/static':
  36. ensure => directory,
  37. }
  38. ###########################################################
  39. # Status - Index
  40. ::httpd::vhost { 'status.openstack.org':
  41. port => 80,
  42. priority => '50',
  43. docroot => '/srv/static/status',
  44. template => 'openstack_project/status.vhost.erb',
  45. require => File['/srv/static/status'],
  46. }
  47. file { '/srv/static/status':
  48. ensure => directory,
  49. }
  50. package { 'libjs-jquery':
  51. ensure => present,
  52. }
  53. package { 'yui-compressor':
  54. ensure => present,
  55. }
  56. file { '/srv/static/status/index.html':
  57. ensure => present,
  58. source => 'puppet:///modules/openstack_project/status/index.html',
  59. require => File['/srv/static/status'],
  60. }
  61. file { '/srv/static/status/favicon.ico':
  62. ensure => present,
  63. source => 'puppet:///modules/openstack_project/status/favicon.ico',
  64. require => File['/srv/static/status'],
  65. }
  66. file { '/srv/static/status/common.js':
  67. ensure => present,
  68. content => template('openstack_project/status/common.js.erb'),
  69. require => File['/srv/static/status'],
  70. replace => true,
  71. }
  72. file { '/srv/static/status/jquery.min.js':
  73. ensure => link,
  74. target => '/usr/share/javascript/jquery/jquery.min.js',
  75. require => [File['/srv/static/status'],
  76. Package['libjs-jquery']],
  77. }
  78. vcsrepo { '/opt/jquery-visibility':
  79. ensure => latest,
  80. provider => git,
  81. revision => 'master',
  82. source => 'https://github.com/mathiasbynens/jquery-visibility.git',
  83. }
  84. exec { 'install_jquery-visibility' :
  85. command => 'yui-compressor -o /srv/static/status/jquery-visibility.min.js /opt/jquery-visibility/jquery-visibility.js',
  86. path => '/bin:/usr/bin',
  87. refreshonly => true,
  88. subscribe => Vcsrepo['/opt/jquery-visibility'],
  89. require => [File['/srv/static/status'],
  90. Vcsrepo['/opt/jquery-visibility']],
  91. }
  92. vcsrepo { '/opt/jquery-graphite':
  93. ensure => latest,
  94. provider => git,
  95. revision => 'master',
  96. source => 'https://github.com/prestontimmons/graphitejs.git',
  97. }
  98. file { '/srv/static/status/jquery-graphite.js':
  99. ensure => link,
  100. target => '/opt/jquery-graphite/jquery.graphite.js',
  101. require => [File['/srv/static/status'],
  102. Vcsrepo['/opt/jquery-graphite']],
  103. }
  104. vcsrepo { '/opt/flot':
  105. ensure => latest,
  106. provider => git,
  107. revision => 'master',
  108. source => 'https://github.com/flot/flot.git',
  109. }
  110. exec { 'install_flot' :
  111. command => 'yui-compressor -o \'.js$:.min.js\' /opt/flot/jquery.flot*.js; mv /opt/flot/jquery.flot*.min.js /srv/static/status',
  112. path => '/bin:/usr/bin',
  113. refreshonly => true,
  114. subscribe => Vcsrepo['/opt/flot'],
  115. require => [File['/srv/static/status'],
  116. Vcsrepo['/opt/flot']],
  117. }
  118. ###########################################################
  119. # Status - elastic-recheck
  120. include elastic_recheck
  121. class { 'elastic_recheck::bot':
  122. gerrit_host => $gerrit_host,
  123. gerrit_ssh_host_key => $gerrit_ssh_host_key,
  124. recheck_ssh_public_key => $recheck_ssh_public_key,
  125. recheck_ssh_private_key => $recheck_ssh_private_key,
  126. recheck_bot_passwd => $recheck_bot_passwd,
  127. recheck_bot_nick => $recheck_bot_nick,
  128. }
  129. # sets up the cron update scripts for static pages
  130. include elastic_recheck::cron
  131. ###########################################################
  132. # Status - zuul
  133. file { '/srv/static/status/zuul':
  134. ensure => directory,
  135. }
  136. file { '/srv/static/status/zuul/index.html':
  137. ensure => present,
  138. content => template('openstack_project/zuul/status.html.erb'),
  139. require => File['/srv/static/status/zuul'],
  140. }
  141. file { '/srv/static/status/zuul/status.js':
  142. ensure => present,
  143. content => template('openstack_project/zuul/status.js.erb'),
  144. require => File['/srv/static/status/zuul'],
  145. }
  146. file { '/srv/static/status/zuul/green.png':
  147. ensure => present,
  148. source => 'puppet:///modules/openstack_project/zuul/green.png',
  149. require => File['/srv/static/status/zuul'],
  150. }
  151. file { '/srv/static/status/zuul/red.png':
  152. ensure => present,
  153. source => 'puppet:///modules/openstack_project/zuul/red.png',
  154. require => File['/srv/static/status/zuul'],
  155. }
  156. file { '/srv/static/status/zuul/black.png':
  157. ensure => present,
  158. source => 'puppet:///modules/openstack_project/zuul/black.png',
  159. require => File['/srv/static/status/zuul'],
  160. }
  161. file { '/srv/static/status/zuul/grey.png':
  162. ensure => present,
  163. source => 'puppet:///modules/openstack_project/zuul/grey.png',
  164. require => File['/srv/static/status/zuul'],
  165. }
  166. file { '/srv/static/status/zuul/line-angle.png':
  167. ensure => present,
  168. source => 'puppet:///modules/openstack_project/zuul/line-angle.png',
  169. require => File['/srv/static/status/zuul'],
  170. }
  171. file { '/srv/static/status/zuul/line-t.png':
  172. ensure => present,
  173. source => 'puppet:///modules/openstack_project/zuul/line-t.png',
  174. require => File['/srv/static/status/zuul'],
  175. }
  176. file { '/srv/static/status/zuul/line.png':
  177. ensure => present,
  178. source => 'puppet:///modules/openstack_project/zuul/line.png',
  179. require => File['/srv/static/status/zuul'],
  180. }
  181. ###########################################################
  182. # Status - reviewday
  183. include reviewday
  184. reviewday::site { 'reviewday':
  185. git_url => 'git://git.openstack.org/openstack-infra/reviewday',
  186. serveradmin => 'webmaster@openstack.org',
  187. httproot => '/srv/static/reviewday',
  188. gerrit_url => 'review.openstack.org',
  189. gerrit_port => '29418',
  190. gerrit_user => 'reviewday',
  191. reviewday_gerrit_ssh_key => $gerrit_ssh_host_key,
  192. reviewday_rsa_pubkey_contents => $reviewday_ssh_public_key,
  193. reviewday_rsa_key_contents => $reviewday_ssh_private_key,
  194. }
  195. ###########################################################
  196. # Status - releasestatus (removed)
  197. file { '/srv/static/release':
  198. ensure => absent,
  199. force => yes,
  200. }
  201. file { '/var/lib/releasestatus':
  202. ensure => absent,
  203. force => yes,
  204. }
  205. user { 'releasestatus':
  206. ensure => absent,
  207. }
  208. group { 'releasestatus':
  209. ensure => absent,
  210. }
  211. ###########################################################
  212. # Status - bugdaystats
  213. include bugdaystats
  214. bugdaystats::site { 'bugdaystats':
  215. git_url => 'git://git.openstack.org/openstack-infra/bugdaystats',
  216. serveradmin => 'webmaster@openstack.org',
  217. httproot => '/srv/static/bugdaystats',
  218. configfile => '/var/lib/bugdaystats/config.js',
  219. }
  220. ###########################################################
  221. # Status - openstack-health
  222. include 'openstack_health'
  223. openstack_health::site { 'openstack-health':
  224. httproot => '/srv/static/openstack-health',
  225. api_endpoint => $openstack_health_api_endpoint
  226. }
  227. }