params.pp 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # == Class: nova::params
  2. #
  3. # These parameters need to be accessed from several locations and
  4. # should be considered to be constant
  5. class nova::params {
  6. include ::openstacklib::defaults
  7. case $::osfamily {
  8. 'RedHat': {
  9. # package names
  10. $api_package_name = 'openstack-nova-api'
  11. $placement_package_name = 'openstack-nova-placement-api'
  12. $cells_package_name = 'openstack-nova-cells'
  13. $cert_package_name = 'openstack-nova-cert'
  14. $common_package_name = 'openstack-nova-common'
  15. $compute_package_name = 'openstack-nova-compute'
  16. $conductor_package_name = 'openstack-nova-conductor'
  17. $consoleauth_package_name = 'openstack-nova-console'
  18. $doc_package_name = 'openstack-nova-doc'
  19. $libvirt_package_name = 'libvirt'
  20. $libvirt_daemon_package_prefix = 'libvirt-daemon-'
  21. $libvirt_nwfilter_package_name = 'libvirt-daemon-config-nwfilter'
  22. $network_package_name = 'openstack-nova-network'
  23. $objectstore_package_name = 'openstack-nova-objectstore'
  24. $scheduler_package_name = 'openstack-nova-scheduler'
  25. $tgt_package_name = 'scsi-target-utils'
  26. $vncproxy_package_name = 'openstack-nova-novncproxy'
  27. $serialproxy_package_name = 'openstack-nova-serialproxy'
  28. $spicehtml5proxy_package_name = 'openstack-nova-console'
  29. $ceph_client_package_name = 'ceph-common'
  30. $genisoimage_package_name = 'genisoimage'
  31. # service names
  32. $api_service_name = 'openstack-nova-api'
  33. $cells_service_name = 'openstack-nova-cells'
  34. $cert_service_name = 'openstack-nova-cert'
  35. $compute_service_name = 'openstack-nova-compute'
  36. $conductor_service_name = 'openstack-nova-conductor'
  37. $consoleauth_service_name = 'openstack-nova-consoleauth'
  38. $libvirt_service_name = 'libvirtd'
  39. $virtlock_service_name = 'virtlockd'
  40. $virtlog_service_name = undef
  41. $network_service_name = 'openstack-nova-network'
  42. $objectstore_service_name = 'openstack-nova-objectstore'
  43. $scheduler_service_name = 'openstack-nova-scheduler'
  44. $tgt_service_name = 'tgtd'
  45. $vncproxy_service_name = 'openstack-nova-novncproxy'
  46. $serialproxy_service_name = 'openstack-nova-serialproxy'
  47. $spicehtml5proxy_service_name = 'openstack-nova-spicehtml5proxy'
  48. # redhat specific config defaults
  49. $root_helper = 'sudo nova-rootwrap'
  50. $lock_path = '/var/lib/nova/tmp'
  51. $nova_log_group = 'nova'
  52. $nova_wsgi_script_path = '/var/www/cgi-bin/nova'
  53. $nova_api_wsgi_script_source = '/usr/lib/python2.7/site-packages/nova/wsgi/nova-api.py'
  54. $placement_wsgi_script_source = '/usr/bin/nova-placement-api'
  55. case $::operatingsystem {
  56. 'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
  57. if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
  58. $messagebus_service_name = 'messagebus'
  59. $special_service_provider = undef
  60. } else {
  61. if (versioncmp($::puppetversion, '4.5') < 0) {
  62. $special_service_provider = 'redhat'
  63. } else {
  64. $special_service_provider = undef
  65. }
  66. $messagebus_service_name = 'dbus'
  67. }
  68. }
  69. default: {
  70. # not required on Fedora
  71. $special_service_provider = undef
  72. $messagebus_service_name = undef
  73. }
  74. }
  75. }
  76. 'Debian': {
  77. # package names
  78. $api_package_name = 'nova-api'
  79. $placement_package_name = 'nova-placement-api'
  80. $cells_package_name = 'nova-cells'
  81. $cert_package_name = 'nova-cert'
  82. $common_package_name = 'nova-common'
  83. $compute_package_name = 'nova-compute'
  84. $conductor_package_name = 'nova-conductor'
  85. $consoleauth_package_name = 'nova-consoleauth'
  86. $doc_package_name = 'nova-doc'
  87. $libvirt_package_name = 'libvirt-bin'
  88. $network_package_name = 'nova-network'
  89. $objectstore_package_name = 'nova-objectstore'
  90. $scheduler_package_name = 'nova-scheduler'
  91. $tgt_package_name = 'tgt'
  92. $serialproxy_package_name = 'nova-serialproxy'
  93. $ceph_client_package_name = 'ceph'
  94. $genisoimage_package_name = 'genisoimage'
  95. # service names
  96. $api_service_name = 'nova-api'
  97. $cells_service_name = 'nova-cells'
  98. $cert_service_name = 'nova-cert'
  99. $compute_service_name = 'nova-compute'
  100. $conductor_service_name = 'nova-conductor'
  101. $consoleauth_service_name = 'nova-consoleauth'
  102. $network_service_name = 'nova-network'
  103. $objectstore_service_name = 'nova-objectstore'
  104. $scheduler_service_name = 'nova-scheduler'
  105. $vncproxy_service_name = 'nova-novncproxy'
  106. $serialproxy_service_name = 'nova-serialproxy'
  107. $tgt_service_name = 'tgt'
  108. $nova_log_group = 'adm'
  109. $nova_wsgi_script_path = '/usr/lib/cgi-bin/nova'
  110. $nova_api_wsgi_script_source = '/usr/lib/python2.7/dist-packages/nova/wsgi/nova-api.py'
  111. $placement_wsgi_script_source = '/usr/bin/nova-placement-api'
  112. # debian specific nova config
  113. $root_helper = 'sudo nova-rootwrap'
  114. $lock_path = '/var/lock/nova'
  115. case $::os_package_type {
  116. 'debian': {
  117. $spicehtml5proxy_package_name = 'nova-consoleproxy'
  118. $spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
  119. $vncproxy_package_name = 'nova-consoleproxy'
  120. # Use default provider on Debian
  121. $special_service_provider = undef
  122. $virtlock_service_name = undef
  123. $virtlog_service_name = undef
  124. }
  125. default: {
  126. $spicehtml5proxy_package_name = 'nova-spiceproxy'
  127. $spicehtml5proxy_service_name = 'nova-spiceproxy'
  128. $vncproxy_package_name = 'nova-novncproxy'
  129. # Use default provider on Debian
  130. $special_service_provider = undef
  131. $virtlock_service_name = 'virtlockd'
  132. $virtlog_service_name = 'virtlogd'
  133. }
  134. }
  135. $libvirt_service_name = 'libvirtd'
  136. }
  137. default: {
  138. fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
  139. module ${module_name} only support osfamily RedHat and Debian")
  140. }
  141. }
  142. }