File: allow-using-uwsgi.patch

package info (click to toggle)
puppet-module-cloudkitty 6.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 592 kB
  • sloc: ruby: 1,686; python: 37; sh: 15; makefile: 10
file content (68 lines) | stat: -rw-r--r-- 2,595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Description: Allow using uwsgi
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2018-12-30

Index: puppet-module-cloudkitty/manifests/api.pp
===================================================================
--- puppet-module-cloudkitty.orig/manifests/api.pp
+++ puppet-module-cloudkitty/manifests/api.pp
@@ -48,7 +48,7 @@ class cloudkitty::api (
   $port           = $::os_service_default,
   $pecan_debug    = $::os_service_default,
   $sync_db        = true,
-  $service_name   = 'httpd',
+  $service_name   = $::cloudkitty::params::api_service_name,
 ) {
 
   include cloudkitty
@@ -94,6 +94,14 @@ class cloudkitty::api (
 
     # we need to make sure cloudkitty-api/eventlet is stopped before trying to start apache
     Service['cloudkitty-api'] -> Service[$service_name]
+  } elsif $service_name == 'cloudkitty-api' {
+    service { 'cloudkitty-api':
+      enable     => $enabled,
+      name       => 'cloudkitty-api',
+      hasstatus  => true,
+      hasrestart => true,
+      tag        => 'cloudkitty-service',
+    }
   } else {
     fail('Invalid service_name. Only httpd for being run by a httpd server')
   }
Index: puppet-module-cloudkitty/manifests/params.pp
===================================================================
--- puppet-module-cloudkitty.orig/manifests/params.pp
+++ puppet-module-cloudkitty/manifests/params.pp
@@ -7,7 +7,6 @@ class cloudkitty::params {
   $pyvers = $::openstacklib::defaults::pyvers
 
   $client_package_name    = "python${pyvers}-cloudkittyclient"
-  $api_service_name       = 'cloudkitty-api'
   $processor_service_name = 'cloudkitty-processor'
   $group                  = 'cloudkitty'
 
@@ -15,6 +14,7 @@ class cloudkitty::params {
     'RedHat': {
     # package names
     $api_package_name              = 'openstack-cloudkitty-api'
+    $api_service_name              = 'cloudkitty-api'
     $processor_package_name        = 'openstack-cloudkitty-processor'
     $ui_package_name               = 'openstack-cloudkitty-ui'
     $common_package_name           = 'openstack-cloudkitty-common'
@@ -24,6 +24,14 @@ class cloudkitty::params {
     'Debian': {
     # package names
     $api_package_name              = 'cloudkitty-api'
+    case $::os_package_type {
+      'debian': {
+        $api_service_name              = 'cloudkitty-api'
+      }
+      default: {
+        $api_service_name              = 'httpd'
+      }
+    }
     $processor_package_name        = 'cloudkitty-processor'
     $ui_package_name               = 'cloudkitty-dashboard'
     $common_package_name           = 'cloudkitty-common'