Add Sahara services to ControllerServices list
authorSteven Hardy <shardy@redhat.com>
Thu, 30 Jun 2016 16:50:28 +0000 (17:50 +0100)
committerCarlos Camacho <ccamacho@redhat.com>
Sat, 6 Aug 2016 08:45:31 +0000 (10:45 +0200)
https://review.openstack.org/#/c/318840/ decomposed the Sahara services
but they weren't added to the ControllerServices list, thus are now disabled.

Since we shipped mitaka with sahara enabled by default, we should probably add
them so the behavior is consistent when folks upgrade.

This also fixes a couple of issues we missed when landing the initial service
templates (partly because CI didn't test them).

In order for each service to operate independently when used with Pacemaker,
the roles needed to be separated. This commit also does this.

Depends-On: Id61eb15b1e2366f5b73c6e7d47941651e40651b1
Change-Id: I0846b328e9d938275e373d58f0b99219b19b326c
Closes-Bug: #1592284
Co-Authored-By: Brad P. Crochet <brad@redhat.com>
environments/puppet-pacemaker.yaml
overcloud.yaml
puppet/controller.yaml
puppet/services/pacemaker/sahara-api.yaml
puppet/services/pacemaker/sahara-engine.yaml
puppet/services/sahara-api.yaml
puppet/services/sahara-base.yaml
puppet/services/sahara-engine.yaml

index 1643029..74b9110 100644 (file)
@@ -18,3 +18,5 @@ resource_registry:
   OS::TripleO::Services::MySQL: ../puppet/services/pacemaker/database/mysql.yaml
   # Services that are disabled by default (use relevant environment files):
   OS::Tripleo::Services::ManilaShare: OS::Heat::None
+  OS::TripleO::Services::SaharaApi: ../puppet/services/pacemaker/sahara-api.yaml
+  OS::TripleO::Services::SaharaEngine: ../puppet/services/pacemaker/sahara-engine.yaml
index 67baf24..f738cfa 100644 (file)
@@ -288,6 +288,8 @@ parameters:
       - OS::TripleO::Services::AodhEvaluator
       - OS::TripleO::Services::AodhNotifier
       - OS::TripleO::Services::AodhListener
+      - OS::TripleO::Services::SaharaApi
+      - OS::TripleO::Services::SaharaEngine
     description: A list of service resources (configured in the Heat
                  resource_registry) which represent nested stacks
                  for each service that should get installed on the Controllers.
index 52d80e5..93ba476 100644 (file)
@@ -785,6 +785,9 @@ resources:
                 horizon::bind_address: {get_input: horizon_network}
                 horizon::keystone_url: {get_input: keystone_auth_uri}
 
+                # Sahara
+                sahara::host: {get_input: sahara_api_network}
+
                 # RabbitMQ
                 rabbitmq::node_ip_address: {get_input: rabbitmq_network}
                 rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
index ac05a01..a06afb2 100644 (file)
@@ -28,4 +28,4 @@ outputs:
           - sahara::service::api::manage_service: false
             sahara::service::api::enabled: false
       step_config: |
-        include ::tripleo::profile::pacemaker::sahara
+        include ::tripleo::profile::pacemaker::sahara::api
index f6bd8f6..a1191f8 100644 (file)
@@ -27,7 +27,5 @@ outputs:
           - get_attr: [SaharaEngineBase, role_data, config_settings]
           - sahara::service::engine::manage_service: false
             sahara::service::engine::enabled: false
-      # No puppet manifests since sahara-engine is included in
-      # ::tripleo::profile::pacemaker::sahara which is maintained alongside of
-      # pacemaker/sahara-api.yaml.
-      step_config:
+      step_config: |
+        include ::tripleo::profile::pacemaker::sahara::engine
index 7ca9bbd..8532431 100644 (file)
@@ -10,7 +10,6 @@ parameters:
                  via parameter_defaults in the resource registry.
     type: json
   SaharaPassword:
-    default: unset
     description: The password for the sahara service account, used by sahara-api.
     type: string
     hidden: true
@@ -18,9 +17,6 @@ parameters:
     default: 0
     description: The number of workers for the sahara-api.
     type: number
-  SaharaApiVirtualIP:
-    type: string
-    default: ''
   KeystoneRegion:
     type: string
     default: 'regionOne'
@@ -29,6 +25,8 @@ parameters:
 resources:
   SaharaBase:
     type: ./sahara-base.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
 
 outputs:
   role_data:
@@ -38,12 +36,8 @@ outputs:
       config_settings:
         map_merge:
           - get_attr: [SaharaBase, role_data, config_settings]
-          - sahara::host: {get_param: SaharaApiVirtualIP}
-            sahara::port: {get_param: [EndpointMap, SaharaInternal, port]}
-            sahara::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
-            sahara::identity_uri: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
-            sahara::admin_password: {get_param: SaharaPassword}
-            sahara::service::api::api_workers: {get_param: SaharaApiWorkers}
+          - sahara::port: {get_param: [EndpointMap, SaharaInternal, port]}
+            sahara::service::api::api_workers: {get_param: SaharaWorkers}
             sahara::keystone::auth::public_url: {get_param: [EndpointMap, SaharaPublic, uri]}
             sahara::keystone::auth::internal_url: {get_param: [EndpointMap, SaharaInternal, uri]}
             sahara::keystone::auth::admin_url: {get_param: [EndpointMap, SaharaAdmin, uri]}
index 2f8cd91..7ec44a4 100644 (file)
@@ -4,6 +4,11 @@ description: >
   OpenStack Sahara base service. Shared for all Sahara services.
 
 parameters:
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
   RabbitPassword:
     description: The password for RabbitMQ
     type: string
@@ -22,6 +27,10 @@ parameters:
     default: 5672
     description: Set rabbit subscriber port, change this if using SSL
     type: number
+  SaharaPassword:
+    description: The password for the sahara service account, used by sahara-api.
+    type: string
+    hidden: true
   Debug:
     type: string
     default: ''
@@ -33,11 +42,30 @@ outputs:
     value:
       service_name: sahara_base
       config_settings:
+        sahara::database_connection:
+          list_join:
+            - ''
+            - - {get_param: [EndpointMap, MysqlInternal, protocol]}
+              - '://sahara:'
+              - {get_param: SaharaPassword}
+              - '@'
+              - {get_param: [EndpointMap, MysqlInternal, host]}
+              - '/sahara'
+        sahara::db::mysql::password: {get_param: SaharaPassword}
+        sahara::db::mysql::user: sahara
+        sahara::db::mysql::host: {get_param: [EndpointMap, MysqlNoBracketsInternal, host]}
+        sahara::db::mysql::dbname: sahara
+        sahara::db::mysql::allowed_hosts:
+          - '%'
+          - "%{hiera('mysql_bind_host')}"
         sahara::rabbit_password: {get_param: RabbitPassword}
         sahara::rabbit_user: {get_param: RabbitUserName}
         sahara::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
         sahara::rabbit_port: {get_param: RabbitClientPort}
         sahara::debug: {get_param: Debug}
+        sahara::admin_password: {get_param: SaharaPassword}
+        sahara::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
+        sahara::identity_uri: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
         sahara::use_neutron: true
         sahara::plugins:
           - cdh
index 074f83c..de2ac7e 100644 (file)
@@ -9,15 +9,12 @@ parameters:
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
     type: json
-  SaharaPassword:
-    default: unset
-    description: The password for the sahara service account, used by sahara-api.
-    type: string
-    hidden: true
 
 resources:
   SaharaBase:
     type: ./sahara-base.yaml
+    properties:
+      EndpointMap: {get_param: EndpointMap}
 
 outputs:
   role_data:
@@ -27,22 +24,5 @@ outputs:
       config_settings:
         map_merge:
           - get_attr: [SaharaBase, role_data, config_settings]
-          - sahara_dsn: &sahara_dsn
-              list_join:
-                - ''
-                - - {get_param: [EndpointMap, MysqlInternal, protocol]}
-                  - '://sahara:'
-                  - {get_param: SaharaPassword}
-                  - '@'
-                  - {get_param: [EndpointMap, MysqlInternal, host]}
-                  - '/sahara'
-            sahara::database_connection: *sahara_dsn
-            sahara::db::mysql::password: {get_param: SaharaPassword}
-            sahara::db::mysql::user: sahara
-            sahara::db::mysql::host: {get_param: [EndpointMap, MysqlNoBracketsInternal, host]}
-            sahara::db::mysql::dbname: sahara
-            sahara::db::mysql::allowed_hosts:
-              - '%'
-              - "%{hiera('mysql_bind_host')}"
       step_config: |
         include ::tripleo::profile::base::sahara::engine