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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. ],
  42. }
  43. package { 'os-performance-tools':
  44. ensure => latest,
  45. provider => openstack_pip,
  46. require => [
  47. Class['pip']
  48. ],
  49. }
  50. package { 'testtools':
  51. ensure => latest,
  52. provider => openstack_pip,
  53. require => Class['pip'],
  54. }
  55. if ! defined(Package['python-daemon']) {
  56. package { 'python-daemon':
  57. ensure => present,
  58. }
  59. }
  60. if ! defined(Package['python-zmq']) {
  61. package { 'python-zmq':
  62. ensure => present,
  63. }
  64. }
  65. if ! defined(Package['python-yaml']) {
  66. package { 'python-yaml':
  67. ensure => present,
  68. }
  69. }
  70. if ! defined(Package['gear']) {
  71. package { 'gear':
  72. ensure => latest,
  73. provider => openstack_pip,
  74. require => Class['pip'],
  75. }
  76. }
  77. if ! defined(Package['statsd']) {
  78. package { 'statsd':
  79. ensure => latest,
  80. provider => openstack_pip,
  81. require => Class['pip']
  82. }
  83. }
  84. file { '/usr/local/bin/subunit-gearman-worker.py':
  85. ensure => present,
  86. owner => 'root',
  87. group => 'root',
  88. mode => '0755',
  89. source => 'puppet:///modules/subunit2sql/subunit-gearman-worker.py',
  90. require => [
  91. Package['python-daemon'],
  92. Package['python-zmq'],
  93. Package['python-yaml'],
  94. Package['gear'],
  95. Package['subunit2sql'],
  96. Package['python-subunit'],
  97. Package['testtools']
  98. ],
  99. }
  100. }