Puppet module for Subunit2sql
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.

init.pp 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
  2. # Copyright 2013 OpenStack Foundation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  5. # not use this file except in compliance with the License. You may obtain
  6. # a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. # License for the specific language governing permissions and limitations
  14. # under the License.
  15. # == Class: subunit2sql
  16. #
  17. class subunit2sql (
  18. ) {
  19. include ::pip
  20. package {'python-mysqldb':
  21. ensure => present,
  22. }
  23. package {'python-psycopg2':
  24. ensure => present,
  25. }
  26. package {'python-netifaces':
  27. ensure => present,
  28. }
  29. package { 'python-subunit':
  30. ensure => latest,
  31. provider => openstack_pip,
  32. require => Class['pip'],
  33. }
  34. package { 'subunit2sql':
  35. ensure => latest,
  36. provider => openstack_pip,
  37. require => [
  38. Class['pip'],
  39. Package['python-mysqldb'],
  40. Package['python-psycopg2'],
  41. Package['python-netifaces']
  42. ],
  43. }
  44. package { 'os-performance-tools':
  45. ensure => latest,
  46. provider => openstack_pip,
  47. require => [
  48. Class['pip']
  49. ],
  50. }
  51. package { 'testtools':
  52. ensure => latest,
  53. provider => openstack_pip,
  54. require => Class['pip'],
  55. }
  56. if ! defined(Package['python-daemon']) {
  57. package { 'python-daemon':
  58. ensure => present,
  59. }
  60. }
  61. if ! defined(Package['python-zmq']) {
  62. package { 'python-zmq':
  63. ensure => present,
  64. }
  65. }
  66. if ! defined(Package['python-yaml']) {
  67. package { 'python-yaml':
  68. ensure => present,
  69. }
  70. }
  71. if ! defined(Package['gear']) {
  72. package { 'gear':
  73. ensure => latest,
  74. provider => openstack_pip,
  75. require => Class['pip'],
  76. }
  77. }
  78. if ! defined(Package['statsd']) {
  79. package { 'statsd':
  80. ensure => latest,
  81. provider => openstack_pip,
  82. require => Class['pip']
  83. }
  84. }
  85. file { '/usr/local/bin/subunit-gearman-worker.py':
  86. ensure => present,
  87. owner => 'root',
  88. group => 'root',
  89. mode => '0755',
  90. source => 'puppet:///modules/subunit2sql/subunit-gearman-worker.py',
  91. require => [
  92. Package['python-daemon'],
  93. Package['python-zmq'],
  94. Package['python-yaml'],
  95. Package['gear'],
  96. Package['subunit2sql'],
  97. Package['python-subunit'],
  98. Package['testtools']
  99. ],
  100. }
  101. }