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.9KB

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