Merge "Add system reclass for gnocchi"
diff --git a/apache/server/site/gnocchi.yml b/apache/server/site/gnocchi.yml
new file mode 100644
index 0000000..f9f6cc8
--- /dev/null
+++ b/apache/server/site/gnocchi.yml
@@ -0,0 +1,34 @@
+parameters:
+ _param:
+ gnocchi_api_workers: 2
+ apache_gnocchi_ssl:
+ enabled: false
+ apache_gnocchi_api_host: ${linux:network:fqdn}
+ apache_gnocchi_api_address: ${_param:single_address}
+ apache_gnocchi_api_port: 8041
+ apache:
+ server:
+ site:
+ gnocchi:
+ enabled: false
+ available: true
+ type: wsgi
+ name: gnocchi
+ host:
+ name: ${_param:apache_gnocchi_api_host}
+ address: ${_param:apache_gnocchi_api_address}
+ port: ${_param:apache_gnocchi_api_port}
+ log:
+ custom:
+ format: >-
+ %v:%p %{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %D %O \"%{Referer}i\" \"%{User-Agent}i\"
+ wsgi:
+ daemon_process: gnocchi-api
+ processes: ${_param:gnocchi_api_workers}
+ threads: 10
+ user: gnocchi
+ group: gnocchi
+ display_name: '%{GROUP}'
+ script_alias: '/ /usr/bin/gnocchi-api'
+ application_group: '%{GLOBAL}'
+ authorization: 'On'
diff --git a/galera/server/database/gnocchi.yml b/galera/server/database/gnocchi.yml
new file mode 100644
index 0000000..1ee36da
--- /dev/null
+++ b/galera/server/database/gnocchi.yml
@@ -0,0 +1,19 @@
+parameters:
+ _param:
+ mysql_gnocchi_ssl_option: []
+ mysql:
+ server:
+ database:
+ gnocchi:
+ encoding: utf8
+ users:
+ - name: gnocchi
+ password: ${_param:mysql_gnocchi_password}
+ host: '%'
+ rights: all
+ ssl_option: ${_param:mysql_gnocchi_ssl_option}
+ - name: gnocchi
+ password: ${_param:mysql_gnocchi_password}
+ host: ${_param:cluster_local_address}
+ rights: all
+ ssl_option: ${_param:mysql_gnocchi_ssl_option}
diff --git a/gnocchi/common/coordination/redis.yml b/gnocchi/common/coordination/redis.yml
new file mode 100644
index 0000000..673d9bd
--- /dev/null
+++ b/gnocchi/common/coordination/redis.yml
@@ -0,0 +1,7 @@
+parameters:
+ _param:
+ gnocchi_coordination_url: redis://${_param:single_address}:6379
+ gnocchi:
+ common:
+ coordination_backend:
+ url: ${_param:gnocchi_coordination_url}
diff --git a/gnocchi/common/storage/file.yml b/gnocchi/common/storage/file.yml
new file mode 100644
index 0000000..c035723
--- /dev/null
+++ b/gnocchi/common/storage/file.yml
@@ -0,0 +1,9 @@
+parameters:
+ _param:
+ gnocchi_storage_file_basepath: /var/lib/gnocchi
+ gnocchi_storage_driver: file
+ gnocchi:
+ common:
+ storage:
+ driver: ${_param:gnocchi_storage_driver}
+ file_basepath: ${_param:gnocchi_storage_file_basepath}
diff --git a/gnocchi/common/storage/incoming/file.yml b/gnocchi/common/storage/incoming/file.yml
new file mode 100644
index 0000000..52d57f7
--- /dev/null
+++ b/gnocchi/common/storage/incoming/file.yml
@@ -0,0 +1,10 @@
+parameters:
+ _param:
+ gnocchi_storage_incoming_file_basepath: /var/lib/gnocchi
+ gnocchi_storage_incoming_driver: file
+ gnocchi:
+ common:
+ storage:
+ incoming:
+ driver: ${_param:gnocchi_storage_incoming_driver}
+ file_basepath: ${_param:gnocchi_storage_incoming_file_basepath}
diff --git a/gnocchi/common/storage/incoming/redis.yml b/gnocchi/common/storage/incoming/redis.yml
new file mode 100644
index 0000000..d0f04d7
--- /dev/null
+++ b/gnocchi/common/storage/incoming/redis.yml
@@ -0,0 +1,10 @@
+parameters:
+ _param:
+ gnocchi_storage_incoming_redis_url: redis://${_param:single_address}:6379
+ gnocchi_storage_incoming_driver: redis
+ gnocchi:
+ common:
+ storage:
+ incoming:
+ driver: ${_param:gnocchi_storage_incoming_driver}
+ redis_url: ${_param:gnocchi_storage_incoming_redis_url}
\ No newline at end of file
diff --git a/gnocchi/common/storage/redis.yml b/gnocchi/common/storage/redis.yml
new file mode 100644
index 0000000..d71fcf0
--- /dev/null
+++ b/gnocchi/common/storage/redis.yml
@@ -0,0 +1,9 @@
+parameters:
+ _param:
+ gnocchi_storage_redis_url: redis://${_param:single_address}:6379
+ gnocchi_storage_driver: redis
+ gnocchi:
+ common:
+ storage:
+ driver: ${_param:gnocchi_storage_driver}
+ redis_url: ${_param:gnocchi_storage_redis_url}
\ No newline at end of file
diff --git a/gnocchi/server/cluster.yml b/gnocchi/server/cluster.yml
new file mode 100644
index 0000000..e5a4650
--- /dev/null
+++ b/gnocchi/server/cluster.yml
@@ -0,0 +1,6 @@
+classes:
+- service.gnocchi.server.cluster
+- service.haproxy.proxy.single
+- system.apache.server.site.gnocchi
+- system.haproxy.proxy.listen.openstack.gnocchi
+- system.keepalived.cluster.instance.openstack_telemetry_vip
diff --git a/gnocchi/server/single.yml b/gnocchi/server/single.yml
new file mode 100644
index 0000000..035491e
--- /dev/null
+++ b/gnocchi/server/single.yml
@@ -0,0 +1,2 @@
+classes:
+- service.gnocchi.server.single
diff --git a/gnocchi/statsd/single.yml b/gnocchi/statsd/single.yml
new file mode 100644
index 0000000..4be519f
--- /dev/null
+++ b/gnocchi/statsd/single.yml
@@ -0,0 +1,2 @@
+classes:
+- service.gnocchi.statsd.single
\ No newline at end of file
diff --git a/haproxy/proxy/listen/openstack/gnocchi.yml b/haproxy/proxy/listen/openstack/gnocchi.yml
new file mode 100644
index 0000000..ec2bb20
--- /dev/null
+++ b/haproxy/proxy/listen/openstack/gnocchi.yml
@@ -0,0 +1,23 @@
+parameters:
+ haproxy:
+ proxy:
+ listen:
+ gnocchi_api:
+ type: openstack-service
+ service_name: gnocchi
+ binds:
+ - address: ${_param:cluster_vip_address}
+ port: 8041
+ servers:
+ - name: ${_param:cluster_node01_hostname}
+ host: ${_param:cluster_node01_address}
+ port: 8041
+ params: check
+ - name: ${_param:cluster_node02_hostname}
+ host: ${_param:cluster_node02_address}
+ port: 8041
+ params: check
+ - name: ${_param:cluster_node03_hostname}
+ host: ${_param:cluster_node03_address}
+ port: 8041
+ params: check
\ No newline at end of file
diff --git a/keystone/client/service/gnocchi.yml b/keystone/client/service/gnocchi.yml
new file mode 100644
index 0000000..dec6b83
--- /dev/null
+++ b/keystone/client/service/gnocchi.yml
@@ -0,0 +1,33 @@
+parameters:
+ _param:
+ cluster_public_protocol: https
+ gnocchi_service_protocol: http
+ keystone:
+ client:
+ server:
+ identity:
+ project:
+ service:
+ user:
+ gnocchi:
+ is_admin: true
+ password: ${_param:keystone_gnocchi_password}
+ email: ${_param:admin_email}
+ service:
+ gnocchi:
+ type: metric
+ description: OpenStack Metric Service
+ endpoints:
+ - region: ${_param:openstack_region}
+ public_address: ${_param:cluster_public_host}
+ public_protocol: ${_param:cluster_public_protocol}
+ public_port: 8041
+ public_path: '/'
+ internal_address: ${_param:gnocchi_service_host}
+ internal_port: 8041
+ internal_path: '/'
+ internal_protocol: ${_param:gnocchi_service_protocol}
+ admin_protocol: ${_param:gnocchi_service_protocol}
+ admin_address: ${_param:gnocchi_service_host}
+ admin_port: 8041
+ admin_path: '/'