diff --git a/ceilometer/Chart.yaml b/ceilometer/Chart.yaml new file mode 100644 index 0000000000..cf9d14de47 --- /dev/null +++ b/ceilometer/Chart.yaml @@ -0,0 +1,24 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +description: OpenStack-Helm Ceilometer +name: ceilometer +version: 0.1.0 +home: https://docs.openstack.org/developer/ceilometer +sources: + - https://git.openstack.org/cgit/openstack/ceilometer + - https://git.openstack.org/cgit/openstack/openstack-helm +maintainers: + - name: OpenStack-Helm Authors diff --git a/ceilometer/requirements.yaml b/ceilometer/requirements.yaml new file mode 100644 index 0000000000..53782e69b2 --- /dev/null +++ b/ceilometer/requirements.yaml @@ -0,0 +1,18 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - name: helm-toolkit + repository: http://localhost:8879/charts + version: 0.1.0 diff --git a/ceilometer/templates/bin/_ceilometer-api.sh.tpl b/ceilometer/templates/bin/_ceilometer-api.sh.tpl new file mode 100644 index 0000000000..cdb02f798e --- /dev/null +++ b/ceilometer/templates/bin/_ceilometer-api.sh.tpl @@ -0,0 +1,36 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex +COMMAND="${@:-start}" + +function start () { + if [ -f /etc/apache2/envvars ]; then + # Loading Apache2 ENV variables + source /etc/apache2/envvars + fi + + # Start Apache2 + exec apache2 -DFOREGROUND +} + +function stop () { + apachectl -k graceful-stop +} + +$COMMAND diff --git a/ceilometer/templates/bin/_ceilometer-central.sh.tpl b/ceilometer/templates/bin/_ceilometer-central.sh.tpl new file mode 100644 index 0000000000..bee56e2ff5 --- /dev/null +++ b/ceilometer/templates/bin/_ceilometer-central.sh.tpl @@ -0,0 +1,23 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +exec ceilometer-polling \ + --polling-namespaces central \ + --config-file /etc/ceilometer/ceilometer.conf diff --git a/ceilometer/templates/bin/_ceilometer-collector.sh.tpl b/ceilometer/templates/bin/_ceilometer-collector.sh.tpl new file mode 100644 index 0000000000..43adf66304 --- /dev/null +++ b/ceilometer/templates/bin/_ceilometer-collector.sh.tpl @@ -0,0 +1,22 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +exec ceilometer-collector \ + --config-file /etc/ceilometer/ceilometer.conf diff --git a/ceilometer/templates/bin/_ceilometer-compute.sh.tpl b/ceilometer/templates/bin/_ceilometer-compute.sh.tpl new file mode 100644 index 0000000000..08cd16f251 --- /dev/null +++ b/ceilometer/templates/bin/_ceilometer-compute.sh.tpl @@ -0,0 +1,23 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +exec ceilometer-polling \ + --polling-namespaces compute \ + --config-file /etc/ceilometer/ceilometer.conf diff --git a/ceilometer/templates/bin/_ceilometer-notification.sh.tpl b/ceilometer/templates/bin/_ceilometer-notification.sh.tpl new file mode 100644 index 0000000000..12f2ae906f --- /dev/null +++ b/ceilometer/templates/bin/_ceilometer-notification.sh.tpl @@ -0,0 +1,22 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +exec ceilometer-agent-notification \ + --config-file /etc/ceilometer/ceilometer.conf diff --git a/ceilometer/templates/bin/_db-init-mongodb.sh.tpl b/ceilometer/templates/bin/_db-init-mongodb.sh.tpl new file mode 100644 index 0000000000..986211570e --- /dev/null +++ b/ceilometer/templates/bin/_db-init-mongodb.sh.tpl @@ -0,0 +1,49 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +MONGO_URL=$(echo $ROOT_DB_CONNECTION | awk -F '@' '{ print $NF }' | awk -F '/' '{ print $1 }') +MONGO_HOST=$(echo $MONGO_URL | awk -F ':' '{ print $1 }') +MONGO_PORT=$(echo $MONGO_URL | awk -F ':' '{ print $2 }') + +MONGO_ADMIN_CREDS=$(echo $ROOT_DB_CONNECTION | awk -F '@' '{ print $1 }') +MONGO_ADMIN_USER=$(echo ${MONGO_ADMIN_CREDS#mongodb://} | awk -F ':' '{ print $1 }') +MONGO_ADMIN_PASS=$(echo ${MONGO_ADMIN_CREDS#mongodb://} | awk -F ':' '{ print $NF }') + +MONGO_USER_CREDS=$(echo $USER_DB_CONNECTION | awk -F '@' '{ print $1 }') +MONGO_USER_USER=$(echo ${MONGO_USER_CREDS#mongodb://} | awk -F ':' '{ print $1 }') +MONGO_USER_PASS=$(echo ${MONGO_USER_CREDS#mongodb://} | awk -F ':' '{ print $NF }') +MONGO_USER_DB=$(echo $USER_DB_CONNECTION | awk -F '/' '{ print $NF }') + +mongo admin \ + --host "${MONGO_HOST}" \ + --port "${MONGO_PORT}" \ + --username "${MONGO_ADMIN_USER}" \ + --password "${MONGO_ADMIN_PASS}" \ + --eval "db = db.getSiblingDB(\"${MONGO_USER_DB}\"); \ + db.changeUserPassword(\"${MONGO_USER_USER}\", \"${MONGO_USER_PASS}\")" || \ + mongo admin \ + --host "${MONGO_HOST}" \ + --port "${MONGO_PORT}" \ + --username "${MONGO_ADMIN_USER}" \ + --password "${MONGO_ADMIN_PASS}" \ + --eval "db = db.getSiblingDB(\"${MONGO_USER_DB}\"); + db.createUser({user: \"${MONGO_USER_USER}\", + pwd: \"${MONGO_USER_PASS}\", + roles: [ \"readWrite\", \"dbAdmin\" ]})" diff --git a/ceilometer/templates/bin/_db-sync.sh.tpl b/ceilometer/templates/bin/_db-sync.sh.tpl new file mode 100644 index 0000000000..02f6f5d46b --- /dev/null +++ b/ceilometer/templates/bin/_db-sync.sh.tpl @@ -0,0 +1,21 @@ +#!/bin/bash + +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +set -ex + +exec ceilometer-dbsync diff --git a/ceilometer/templates/configmap-bin.yaml b/ceilometer/templates/configmap-bin.yaml new file mode 100644 index 0000000000..66f2a86808 --- /dev/null +++ b/ceilometer/templates/configmap-bin.yaml @@ -0,0 +1,50 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.configmap_bin }} +{{- $envAll := . }} +{{- $rallyTests := .Values.conf.rally_tests }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: ceilometer-bin +data: + rally-test.sh: | +{{ tuple $rallyTests | include "helm-toolkit.scripts.rally_test" | indent 4 }} + db-init-mongodb.sh: | +{{ tuple "bin/_db-init-mongodb.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + db-init.py: | +{{- include "helm-toolkit.scripts.db_init" . | indent 4 }} + db-sync.sh: | +{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + ks-service.sh: |+ +{{- include "helm-toolkit.scripts.keystone_service" . | indent 4 }} + ks-endpoints.sh: |+ +{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }} + ks-user.sh: |+ +{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }} + ceilometer-api.sh: |+ +{{ tuple "bin/_ceilometer-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + ceilometer-central.sh: |+ +{{ tuple "bin/_ceilometer-central.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + ceilometer-collector.sh: |+ +{{ tuple "bin/_ceilometer-collector.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + ceilometer-compute.sh: |+ +{{ tuple "bin/_ceilometer-compute.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} + ceilometer-notification.sh: |+ +{{ tuple "bin/_ceilometer-notification.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{- end }} diff --git a/ceilometer/templates/configmap-etc.yaml b/ceilometer/templates/configmap-etc.yaml new file mode 100644 index 0000000000..0359b315e8 --- /dev/null +++ b/ceilometer/templates/configmap-etc.yaml @@ -0,0 +1,129 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.configmap_etc }} +{{- $envAll := . }} + +{{- if empty .Values.conf.ceilometer.keystone_authtoken.auth_uri -}} +{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.keystone_authtoken "auth_uri" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.keystone_authtoken.auth_url -}} +{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.keystone_authtoken "auth_url" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.keystone_authtoken.memcached_servers -}} +{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.ceilometer.keystone_authtoken "memcached_servers" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.database.connection -}} +{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "connection" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.database.event_connection -}} +{{- tuple "mongodb" "internal" "user" "mongodb" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "event_connection" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.database.metering_connection -}} +{{- tuple "mongodb" "internal" "user" "mongodb" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.ceilometer.database "metering_connection" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.DEFAULT.transport_url -}} +{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.DEFAULT "transport_url" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.oslo_messaging_notifications.transport_url -}} +{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.oslo_messaging_notifications "transport_url" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.notification.messaging_urls -}} +{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.ceilometer.notification "messaging_urls" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.keystone_authtoken.region_name -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.keystone_authtoken.project_name -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.keystone_authtoken.project_domain_name -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.keystone_authtoken.user_domain_name -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.keystone_authtoken.username -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.keystone_authtoken.password -}} +{{- set .Values.conf.ceilometer.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.service_credentials.auth_url -}} +{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.service_credentials "auth_url" | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.region_name -}} +{{- set .Values.conf.ceilometer.service_credentials "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.project_name -}} +{{- set .Values.conf.ceilometer.service_credentials "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.project_domain_name -}} +{{- set .Values.conf.ceilometer.service_credentials "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.user_domain_name -}} +{{- set .Values.conf.ceilometer.service_credentials "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.username -}} +{{- set .Values.conf.ceilometer.service_credentials "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}} +{{- end -}} +{{- if empty .Values.conf.ceilometer.service_credentials.password -}} +{{- set .Values.conf.ceilometer.service_credentials "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.dispatcher_gnocchi.url -}} +{{- tuple "metric" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.dispatcher_gnocchi "url" | quote | trunc 0 -}} +{{- end -}} + +{{- if empty .Values.conf.ceilometer.api.aodh_url -}} +{{- tuple "alarming" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.ceilometer.api "aodh_url" | quote | trunc 0 -}} +{{- end -}} + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: ceilometer-etc +data: + rally_tests.yaml: |+ +{{- tuple .Values.conf.rally_tests "etc/_rally_tests.yaml.tpl" . | include "helm-toolkit.utils.configmap_templater" }} + ceilometer.conf: |+ +{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.ceilometer | indent 4 }} + api_paste.ini: |+ +{{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | indent 4 }} + policy.json: |+ +{{ toJson .Values.conf.policy | indent 4 }} + event_pipeline.yaml: |+ +{{ toYaml .Values.conf.event_pipeline | indent 4 }} + pipeline.yaml: |+ +{{ toYaml .Values.conf.pipeline | indent 4 }} + event_definitions.yaml: |+ +{{ toYaml .Values.conf.event_definitions | indent 4 }} + gnocchi_resources.yaml: |+ +{{ toYaml .Values.conf.gnocchi_resources | indent 4 }} + wsgi-ceilometer.conf: |+ +{{- tuple .Values.conf.wsgi_ceilometer "etc/_wsgi-ceilometer.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }} +{{- end }} diff --git a/ceilometer/templates/deployment-api.yaml b/ceilometer/templates/deployment-api.yaml new file mode 100644 index 0000000000..acf3aee4a3 --- /dev/null +++ b/ceilometer/templates/deployment-api.yaml @@ -0,0 +1,117 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_api }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.api }} +{{- $mounts_ceilometer_api := .Values.pod.mounts.ceilometer_api.ceilometer_api }} +{{- $mounts_ceilometer_api_init := .Values.pod.mounts.ceilometer_api.init_container }} +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: ceilometer-api +spec: + replicas: {{ .Values.pod.replicas.api }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + affinity: +{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} + nodeSelector: + {{ .Values.labels.api.node_selector_key }}: {{ .Values.labels.api.node_selector_value }} + terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.api.timeout | default "30" }} + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-api + image: {{ .Values.images.api }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ceilometer-api.sh + - start + lifecycle: + preStop: + exec: + command: + - /tmp/ceilometer-api.sh + - stop + ports: + - name: ce-api + containerPort: {{ .Values.network.api.port }} + readinessProbe: + tcpSocket: + port: {{ .Values.network.api.port }} + volumeMounts: + - name: pod-etc-ceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/api_paste.ini + subPath: api_paste.ini + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/policy.json + subPath: policy.json + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_definitions.yaml + subPath: event_definitions.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_pipeline.yaml + subPath: event_pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/pipeline.yaml + subPath: pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/gnocchi_resources.yaml + subPath: gnocchi_resources.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/apache2/conf-enabled/000-default.conf + subPath: wsgi-ceilometer.conf + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/ceilometer-api.sh + subPath: ceilometer-api.sh + readOnly: true +{{ if $mounts_ceilometer_api.volumeMounts }}{{ toYaml $mounts_ceilometer_api.volumeMounts | indent 12 }}{{ end }} + volumes: + - name: pod-etc-ceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{ if $mounts_ceilometer_api.volumes }}{{ toYaml $mounts_ceilometer_api.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/deployment-central.yaml b/ceilometer/templates/deployment-central.yaml new file mode 100644 index 0000000000..6412152fb1 --- /dev/null +++ b/ceilometer/templates/deployment-central.yaml @@ -0,0 +1,99 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_central }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.central }} +{{- $mounts_ceilometer_central := .Values.pod.mounts.ceilometer_central.ceilometer_central }} +{{- $mounts_ceilometer_central_init := .Values.pod.mounts.ceilometer_central.init_container }} +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: ceilometer-central +spec: + replicas: {{ .Values.pod.replicas.central }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "ceilometer" "central" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + affinity: +{{ tuple $envAll "ceilometer" "central" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} + nodeSelector: + {{ .Values.labels.central.node_selector_key }}: {{ .Values.labels.central.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_central_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-central + image: {{ .Values.images.central }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.central | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ceilometer-central.sh + volumeMounts: + - name: pod-etc-ceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/api_paste.ini + subPath: api_paste.ini + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/policy.json + subPath: policy.json + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_definitions.yaml + subPath: event_definitions.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_pipeline.yaml + subPath: event_pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/pipeline.yaml + subPath: pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/gnocchi_resources.yaml + subPath: gnocchi_resources.yaml + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/ceilometer-central.sh + subPath: ceilometer-central.sh + readOnly: true +{{ if $mounts_ceilometer_central.volumeMounts }}{{ toYaml $mounts_ceilometer_central.volumeMounts | indent 12 }}{{ end }} + volumes: + - name: pod-etc-ceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{ if $mounts_ceilometer_central.volumes }}{{ toYaml $mounts_ceilometer_central.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/deployment-collector.yaml b/ceilometer/templates/deployment-collector.yaml new file mode 100644 index 0000000000..43aaccfda2 --- /dev/null +++ b/ceilometer/templates/deployment-collector.yaml @@ -0,0 +1,99 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_collector }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.collector }} +{{- $mounts_ceilometer_collector := .Values.pod.mounts.ceilometer_collector.ceilometer_collector }} +{{- $mounts_ceilometer_collector_init := .Values.pod.mounts.ceilometer_collector.init_container }} +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: ceilometer-collector +spec: + replicas: {{ .Values.pod.replicas.collector }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "ceilometer" "collector" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + affinity: +{{ tuple $envAll "ceilometer" "collector" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} + nodeSelector: + {{ .Values.labels.collector.node_selector_key }}: {{ .Values.labels.collector.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_collector_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-collector + image: {{ .Values.images.collector }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.collector | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ceilometer-collector.sh + volumeMounts: + - name: pod-etc-ceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/api_paste.ini + subPath: api_paste.ini + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/policy.json + subPath: policy.json + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_definitions.yaml + subPath: event_definitions.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_pipeline.yaml + subPath: event_pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/pipeline.yaml + subPath: pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/gnocchi_resources.yaml + subPath: gnocchi_resources.yaml + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/ceilometer-collector.sh + subPath: ceilometer-collector.sh + readOnly: true +{{ if $mounts_ceilometer_collector.volumeMounts }}{{ toYaml $mounts_ceilometer_collector.volumeMounts | indent 12 }}{{ end }} + volumes: + - name: pod-etc-ceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{ if $mounts_ceilometer_collector.volumes }}{{ toYaml $mounts_ceilometer_collector.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/deployment-compute.yaml b/ceilometer/templates/deployment-compute.yaml new file mode 100644 index 0000000000..cd5aeca960 --- /dev/null +++ b/ceilometer/templates/deployment-compute.yaml @@ -0,0 +1,128 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_compute }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.compute }} +{{- $mounts_ceilometer_compute := .Values.pod.mounts.ceilometer_compute.ceilometer_compute }} +{{- $mounts_ceilometer_compute_init := .Values.pod.mounts.ceilometer_compute.init_container }} +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: ceilometer-compute +spec: + replicas: {{ .Values.pod.replicas.compute }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "ceilometer" "compute" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + affinity: +{{ tuple $envAll "ceilometer" "compute" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} + hostNetwork: true + hostPID: true + dnsPolicy: ClusterFirstWithHostNet + nodeSelector: + {{ .Values.labels.compute.node_selector_key }}: {{ .Values.labels.compute.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_compute_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-compute + image: {{ .Values.images.compute }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.compute | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ceilometer-compute.sh + volumeMounts: + - name: pod-etc-ceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/api_paste.ini + subPath: api_paste.ini + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/policy.json + subPath: policy.json + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_definitions.yaml + subPath: event_definitions.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_pipeline.yaml + subPath: event_pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/pipeline.yaml + subPath: pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/gnocchi_resources.yaml + subPath: gnocchi_resources.yaml + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/ceilometer-compute.sh + subPath: ceilometer-compute.sh + readOnly: true + - name: varlibnova + mountPath: /var/lib/nova + - name: varliblibvirt + mountPath: /var/lib/libvirt + - name: run + mountPath: /run + - name: cgroup + mountPath: /sys/fs/cgroup + - name: machine-id + mountPath: /etc/machine-id + readOnly: true +{{ if $mounts_ceilometer_compute.volumeMounts }}{{ toYaml $mounts_ceilometer_compute.volumeMounts | indent 12 }}{{ end }} + volumes: + - name: pod-etc-ceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 + - name: varlibnova + hostPath: + path: /var/lib/nova + - name: varliblibvirt + hostPath: + path: /var/lib/libvirt + - name: run + hostPath: + path: /run + - name: cgroup + hostPath: + path: /sys/fs/cgroup + - name: machine-id + hostPath: + path: /etc/machine-id +{{ if $mounts_ceilometer_compute.volumes }}{{ toYaml $mounts_ceilometer_compute.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/deployment-notification.yaml b/ceilometer/templates/deployment-notification.yaml new file mode 100644 index 0000000000..a8240b8f45 --- /dev/null +++ b/ceilometer/templates/deployment-notification.yaml @@ -0,0 +1,99 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.deployment_notification }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.notification }} +{{- $mounts_ceilometer_notification := .Values.pod.mounts.ceilometer_notification.ceilometer_notification }} +{{- $mounts_ceilometer_notification_init := .Values.pod.mounts.ceilometer_notification.init_container }} +--- +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: ceilometer-notification +spec: + replicas: {{ .Values.pod.replicas.notification }} +{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} + template: + metadata: + labels: +{{ tuple $envAll "ceilometer" "notification" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} + annotations: + configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} + configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} + spec: + affinity: +{{ tuple $envAll "ceilometer" "notification" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} + nodeSelector: + {{ .Values.labels.notification.node_selector_key }}: {{ .Values.labels.notification.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_notification_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-notification + image: {{ .Values.images.notification }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.notification | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ceilometer-notification.sh + volumeMounts: + - name: pod-etc-ceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/api_paste.ini + subPath: api_paste.ini + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/policy.json + subPath: policy.json + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_definitions.yaml + subPath: event_definitions.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/event_pipeline.yaml + subPath: event_pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/pipeline.yaml + subPath: pipeline.yaml + readOnly: true + - name: ceilometer-etc + mountPath: /etc/ceilometer/gnocchi_resources.yaml + subPath: gnocchi_resources.yaml + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/ceilometer-notification.sh + subPath: ceilometer-notification.sh + readOnly: true +{{ if $mounts_ceilometer_notification.volumeMounts }}{{ toYaml $mounts_ceilometer_notification.volumeMounts | indent 12 }}{{ end }} + volumes: + - name: pod-etc-ceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{ if $mounts_ceilometer_notification.volumes }}{{ toYaml $mounts_ceilometer_notification.volumes | indent 8 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/etc/_rally_tests.yaml.tpl b/ceilometer/templates/etc/_rally_tests.yaml.tpl new file mode 100644 index 0000000000..9662521a0b --- /dev/null +++ b/ceilometer/templates/etc/_rally_tests.yaml.tpl @@ -0,0 +1,76 @@ +--- + CeilometerStats.create_meter_and_get_stats: + - + args: + user_id: "user-id" + resource_id: "resource-id" + counter_volume: 1.0 + counter_unit: "" + counter_type: "cumulative" + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + failure_rate: + max: 0 + CeilometerMeters.list_meters: + - + runner: + type: constant + times: 1 + concurrency: 1 + sla: + failure_rate: + max: 0 + context: + users: + tenants: 1 + users_per_tenant: 1 + ceilometer: + counter_name: "benchmark_meter" + counter_type: "gauge" + counter_unit: "%" + counter_volume: 1 + resources_per_tenant: 1 + samples_per_resource: 1 + timestamp_interval: 10 + metadata_list: + - + status: "active" + name: "rally benchmark on" + deleted: "false" + - + status: "terminated" + name: "rally benchmark off" + deleted: "true" + args: + limit: 5 + metadata_query: + status: "terminated" + CeilometerQueries.create_and_query_samples: + - + args: + filter: {"=": {"counter_unit": "instance"}} + orderby: !!null + limit: 10 + counter_name: "cpu_util" + counter_type: "gauge" + counter_unit: "instance" + counter_volume: 1.0 + resource_id: "resource_id" + runner: + type: "constant" + times: 1 + concurrency: 1 + context: + users: + tenants: 1 + users_per_tenant: 1 + sla: + failure_rate: + max: 0 diff --git a/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl b/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl new file mode 100644 index 0000000000..3f42035b8d --- /dev/null +++ b/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl @@ -0,0 +1,42 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +Listen 0.0.0.0:{{ .Values.network.api.port }} + +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + + + LogLevel info + WSGIDaemonProcess ceilometer-api processes=2 threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python2.7/site-packages + WSGIProcessGroup ceilometer-api + + WSGIScriptReloading On + WSGIScriptAlias / /var/lib/kolla/venv/lib/python2.7/site-packages/ceilometer/api/app.wsgi + + WSGIApplicationGroup %{GLOBAL} + + + = 2.4> + Require all granted + + + Order allow,deny + Allow from all + + + ErrorLog /dev/stdout + CustomLog /dev/stdout combined + diff --git a/ceilometer/templates/ingress-api.yaml b/ceilometer/templates/ingress-api.yaml new file mode 100644 index 0000000000..f5194d39a9 --- /dev/null +++ b/ceilometer/templates/ingress-api.yaml @@ -0,0 +1,60 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.ingress_api }} +{{- $envAll := . }} +{{- if .Values.network.api.ingress.public }} +{{- $backendServiceType := "metering" }} +{{- $backendPort := "ce-api" }} +{{- $ingressName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostName := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +{{- $hostNameNamespaced := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }} +{{- $hostNameFull := tuple $backendServiceType "public" $envAll | include "helm-toolkit.endpoints.hostname_fqdn_endpoint_lookup" }} +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $ingressName }} + annotations: + kubernetes.io/ingress.class: "nginx" + ingress.kubernetes.io/rewrite-target: / + ingress.kubernetes.io/proxy-body-size: {{ .Values.network.api.ingress.proxy_body_size }} +spec: + rules: +{{ if ne $hostNameNamespaced $hostNameFull }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced $hostNameFull }} + - host: {{ $vHost }} + http: + paths: + - path: / + backend: + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- else }} +{{- range $key1, $vHost := tuple $hostName $hostNameNamespaced }} + - host: {{ $vHost }} + http: + paths: + - path: / + backend: + serviceName: {{ $backendName }} + servicePort: {{ $backendPort }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} diff --git a/ceilometer/templates/job-db-init-mongodb.yaml b/ceilometer/templates/job-db-init-mongodb.yaml new file mode 100644 index 0000000000..9f662f2635 --- /dev/null +++ b/ceilometer/templates/job-db-init-mongodb.yaml @@ -0,0 +1,61 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_db_init_mongodb }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.db_init_mongodb }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-db-init-mongodb +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-db-init-mongodb + image: {{ .Values.images.db_init_mongodb | quote }} + imagePullPolicy: {{ .Values.images.pull_policy | quote }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init_mongodb | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + env: + - name: ROOT_DB_CONNECTION + valueFrom: + secretKeyRef: + name: {{ .Values.secrets.mongodb.admin }} + key: DB_CONNECTION + - name: USER_DB_CONNECTION + valueFrom: + secretKeyRef: + name: {{ .Values.secrets.mongodb.user }} + key: DB_CONNECTION + command: + - /tmp/db-init-mongodb.sh + volumeMounts: + - name: ceilometer-bin + mountPath: /tmp/db-init-mongodb.sh + subPath: db-init-mongodb.sh + readOnly: true + volumes: + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/job-db-init.yaml b/ceilometer/templates/job-db-init.yaml new file mode 100644 index 0000000000..1bdd36e3b5 --- /dev/null +++ b/ceilometer/templates/job-db-init.yaml @@ -0,0 +1,74 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_db_init }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.db_init }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-db-init +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-db-init + image: {{ .Values.images.db_init | quote }} + imagePullPolicy: {{ .Values.images.pull_policy | quote }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + env: + - name: ROOT_DB_CONNECTION + valueFrom: + secretKeyRef: + name: {{ .Values.secrets.oslo_db.admin }} + key: DB_CONNECTION + - name: OPENSTACK_CONFIG_FILE + value: /etc/ceilometer/ceilometer.conf + - name: OPENSTACK_CONFIG_DB_SECTION + value: database + - name: OPENSTACK_CONFIG_DB_KEY + value: connection + command: + - /tmp/db-init.py + volumeMounts: + - name: ceilometer-bin + mountPath: /tmp/db-init.py + subPath: db-init.py + readOnly: true + - name: etcceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + volumes: + - name: etcceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/job-db-sync.yaml b/ceilometer/templates/job-db-sync.yaml new file mode 100644 index 0000000000..152f904131 --- /dev/null +++ b/ceilometer/templates/job-db-sync.yaml @@ -0,0 +1,62 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_db_sync }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.db_sync }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-db-sync +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-db-sync + image: {{ .Values.images.db_sync }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/db-sync.sh + volumeMounts: + - name: ceilometer-bin + mountPath: /tmp/db-sync.sh + subPath: db-sync.sh + readOnly: true + - name: etcceilometer + mountPath: /etc/ceilometer + - name: ceilometer-etc + mountPath: /etc/ceilometer/ceilometer.conf + subPath: ceilometer.conf + readOnly: true + volumes: + - name: etcceilometer + emptyDir: {} + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/job-ks-endpoints.yaml b/ceilometer/templates/job-ks-endpoints.yaml new file mode 100644 index 0000000000..e4057074d3 --- /dev/null +++ b/ceilometer/templates/job-ks-endpoints.yaml @@ -0,0 +1,66 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_ks_endpoints }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.ks_endpoints }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-ks-endpoints +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: +{{- range $key1, $osServiceType := tuple "metering" }} +{{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }} + - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} + image: {{ $envAll.Values.images.ks_endpoints }} + imagePullPolicy: {{ $envAll.Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ks-endpoints.sh + volumeMounts: + - name: ks-endpoints-sh + mountPath: /tmp/ks-endpoints.sh + subPath: ks-endpoints.sh + readOnly: true + env: +{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }} +{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} +{{- end }} + - name: OS_SVC_ENDPOINT + value: {{ $osServiceEndPoint }} + - name: OS_SERVICE_NAME + value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }} + - name: OS_SERVICE_TYPE + value: {{ $osServiceType }} + - name: OS_SERVICE_ENDPOINT + value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} +{{- end }} +{{- end }} + volumes: + - name: ks-endpoints-sh + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/job-ks-service.yaml b/ceilometer/templates/job-ks-service.yaml new file mode 100644 index 0000000000..946111aecb --- /dev/null +++ b/ceilometer/templates/job-ks-service.yaml @@ -0,0 +1,60 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_ks_service }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.ks_service }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-ks-service +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: +{{- range $key1, $osServiceType := tuple "metering" }} + - name: {{ $osServiceType }}-ks-service-registration + image: {{ $envAll.Values.images.ks_service }} + imagePullPolicy: {{ $envAll.Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ks-service.sh + volumeMounts: + - name: ks-service-sh + mountPath: /tmp/ks-service.sh + subPath: ks-service.sh + readOnly: true + env: +{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }} +{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} +{{- end }} + - name: OS_SERVICE_NAME + value: {{ tuple $osServiceType $envAll | include "helm-toolkit.endpoints.keystone_endpoint_name_lookup" }} + - name: OS_SERVICE_TYPE + value: {{ $osServiceType }} +{{- end }} + volumes: + - name: ks-service-sh + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/job-ks-user.yaml b/ceilometer/templates/job-ks-user.yaml new file mode 100644 index 0000000000..f1da0a7423 --- /dev/null +++ b/ceilometer/templates/job-ks-user.yaml @@ -0,0 +1,61 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.job_ks_user }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.ks_user }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: ceilometer-ks-user +spec: + template: + spec: + restartPolicy: OnFailure + nodeSelector: + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + initContainers: +{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: ceilometer-ks-user + image: {{ .Values.images.ks_user }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + command: + - /tmp/ks-user.sh + volumeMounts: + - name: ks-user-sh + mountPath: /tmp/ks-user.sh + subPath: ks-user.sh + readOnly: true + env: +{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }} +{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} +{{- end }} + - name: SERVICE_OS_SERVICE_NAME + value: "ceilometer" +{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.user }} +{{- include "helm-toolkit.snippets.keystone_user_create_env_vars" $env | indent 12 }} +{{- end }} + - name: SERVICE_OS_ROLE + value: {{ .Values.endpoints.identity.auth.user.role | quote }} + volumes: + - name: ks-user-sh + configMap: + name: ceilometer-bin + defaultMode: 0555 +{{- end }} diff --git a/ceilometer/templates/pdb-api.yaml b/ceilometer/templates/pdb-api.yaml new file mode 100644 index 0000000000..8342fdb125 --- /dev/null +++ b/ceilometer/templates/pdb-api.yaml @@ -0,0 +1,29 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.pdb_api }} +{{- $envAll := . }} +--- +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: ceilometer-api +spec: + minAvailable: {{ .Values.pod.lifecycle.disruption_budget.api.min_available }} + selector: + matchLabels: + app: ceilometer-api +{{- end }} diff --git a/ceilometer/templates/pod-rally-test.yaml b/ceilometer/templates/pod-rally-test.yaml new file mode 100644 index 0000000000..789649d4a6 --- /dev/null +++ b/ceilometer/templates/pod-rally-test.yaml @@ -0,0 +1,70 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.pod_rally_test }} +{{- $envAll := . }} +{{- $dependencies := .Values.dependencies.tests }} +{{- $mounts_ceilometer_tests := .Values.pod.mounts.ceilometer_tests.ceilometer_tests }} +{{- $mounts_ceilometer_tests_init := .Values.pod.mounts.ceilometer_tests.init_container }} +--- +apiVersion: v1 +kind: Pod +metadata: + name: "{{.Release.Name}}-rally-test" + annotations: + "helm.sh/hook": test-success +spec: + restartPolicy: Never + initContainers: +{{ tuple $envAll $dependencies $mounts_ceilometer_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} + containers: + - name: {{.Release.Name}}-token-issue-test + image: {{ .Values.images.test }} + imagePullPolicy: {{ .Values.images.pull_policy }} +{{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }} + env: +{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.admin }} +{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }} +{{- end }} + - name: RALLY_ENV_NAME + value: {{.Release.Name}} + command: + - /tmp/rally-test.sh + volumeMounts: + - name: ceilometer-etc + mountPath: /etc/rally/rally_tests.yaml + subPath: rally_tests.yaml + readOnly: true + - name: ceilometer-bin + mountPath: /tmp/rally-test.sh + subPath: rally-test.sh + readOnly: true + - name: rally-db + mountPath: /var/lib/rally +{{ if $mounts_ceilometer_tests.volumeMounts }}{{ toYaml $mounts_ceilometer_tests.volumeMounts | indent 8 }}{{ end }} + volumes: + - name: ceilometer-etc + configMap: + name: ceilometer-etc + defaultMode: 0444 + - name: ceilometer-bin + configMap: + name: ceilometer-bin + defaultMode: 0555 + - name: rally-db + emptyDir: {} +{{ if $mounts_ceilometer_tests.volumes }}{{ toYaml $mounts_ceilometer_tests.volumes | indent 4 }}{{ end }} +{{- end }} diff --git a/ceilometer/templates/secret-db.yaml b/ceilometer/templates/secret-db.yaml new file mode 100644 index 0000000000..45d8802f13 --- /dev/null +++ b/ceilometer/templates/secret-db.yaml @@ -0,0 +1,30 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.secret_db }} +{{- $envAll := . }} +{{- range $key1, $userClass := tuple "admin" "user" }} +{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} +type: Opaque +data: + DB_CONNECTION: {{ tuple "oslo_db" "internal" $userClass "mysql" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc -}} +{{- end }} +{{- end }} diff --git a/ceilometer/templates/secret-keystone.yaml b/ceilometer/templates/secret-keystone.yaml new file mode 100644 index 0000000000..2f159e2981 --- /dev/null +++ b/ceilometer/templates/secret-keystone.yaml @@ -0,0 +1,30 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.secret_keystone }} +{{- $envAll := . }} +{{- range $key1, $userClass := tuple "admin" "user" }} +{{- $secretName := index $envAll.Values.secrets.identity $userClass }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} +type: Opaque +data: +{{- tuple $userClass "internal" $envAll | include "helm-toolkit.snippets.keystone_secret_openrc" | indent 2 -}} +{{- end }} +{{- end }} diff --git a/ceilometer/templates/secret-mongodb.yaml b/ceilometer/templates/secret-mongodb.yaml new file mode 100644 index 0000000000..fe33207703 --- /dev/null +++ b/ceilometer/templates/secret-mongodb.yaml @@ -0,0 +1,30 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.secret_mongodb }} +{{- $envAll := . }} +{{- range $key1, $userClass := tuple "admin" "user" }} +{{- $secretName := index $envAll.Values.secrets.mongodb $userClass }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ $secretName }} +type: Opaque +data: + DB_CONNECTION: {{ tuple "mongodb" "internal" $userClass "mongodb" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc -}} +{{- end }} +{{- end }} diff --git a/ceilometer/templates/service-api.yaml b/ceilometer/templates/service-api.yaml new file mode 100644 index 0000000000..47737e4af3 --- /dev/null +++ b/ceilometer/templates/service-api.yaml @@ -0,0 +1,36 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.service_api }} +{{- $envAll := . }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ tuple "metering" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +spec: + ports: + - name: ce-api + port: {{ .Values.network.api.port }} + {{ if .Values.network.api.node_port.enabled }} + nodePort: {{ .Values.network.api.node_port.port }} + {{ end }} + selector: +{{ tuple $envAll "ceilometer" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} + {{ if .Values.network.api.node_port.enabled }} + type: NodePort + {{ end }} +{{- end }} diff --git a/ceilometer/templates/service-ingress-api.yaml b/ceilometer/templates/service-ingress-api.yaml new file mode 100644 index 0000000000..03f99f18a0 --- /dev/null +++ b/ceilometer/templates/service-ingress-api.yaml @@ -0,0 +1,32 @@ +{{/* +Copyright 2017 The Openstack-Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/}} + +{{- if .Values.manifests.service_ingress_api }} +{{- $envAll := . }} +{{- if .Values.network.api.ingress.public }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ tuple "metering" "public" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} +spec: + ports: + - name: http + port: 80 + selector: + app: ingress-api +{{- end }} +{{- end }} diff --git a/ceilometer/values.yaml b/ceilometer/values.yaml new file mode 100644 index 0000000000..d989404456 --- /dev/null +++ b/ceilometer/values.yaml @@ -0,0 +1,1919 @@ +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Default values for keystone. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name: value + +labels: + api: + node_selector_key: openstack-control-plane + node_selector_value: enabled + compute: + node_selector_key: openstack-compute-node + node_selector_value: enabled + central: + node_selector_key: openstack-control-plane + node_selector_value: enabled + collector: + node_selector_key: openstack-control-plane + node_selector_value: enabled + notification: + node_selector_key: openstack-control-plane + node_selector_value: enabled + job: + node_selector_key: openstack-control-plane + node_selector_value: enabled + +images: + test: docker.io/kolla/ubuntu-binary-rally:4.0.0 + db_init_mongodb: docker.io/mongo:3.4.9-jessie + db_init: docker.io/kolla/ubuntu-source-ceilometer-api:3.0.3 + db_sync: docker.io/kolla/ubuntu-source-ceilometer-api:3.0.3 + ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 + ks_service: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 + ks_endpoints: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3 + api: quay.io/larryrensing/ubuntu-source-ceilometer-api:3.0.3 + central: quay.io/larryrensing/ubuntu-source-ceilometer-central:3.0.3 + collector: quay.io/larryrensing/ubuntu-source-ceilometer-collector:3.0.3 + compute: quay.io/larryrensing/ubuntu-source-ceilometer-compute:3.0.3 + notification: quay.io/larryrensing/ubuntu-source-ceilometer-notification:3.0.3 + dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0 + pull_policy: "IfNotPresent" + +network: + api: + ingress: + public: true + port: 8777 + node_port: + enabled: false + port: 38777 + +conf: + ceilometer: + DEFAULT: + event_dispatchers: + type: multistring + values: + - database + meter_dispatchers: + type: multistring + values: + - database + - gnocchi + api: + aodh_is_enabled: "False" +# NOTE(pordirect): the following option will turn off the ability to retrieve +# metrics via the ceilometer API: +# gnocchi_is_enabled: "True" + dispatcher_gnocchi: + filter_service_activity: False + archive_policy: low + resources_definition_file: /etc/ceilometer/gnocchi_resources.yaml + database: + max_retries: -1 + dispatcher: + archive_policy: low + filter_project: service + keystone_authtoken: + auth_type: password + auth_version: v3 + service_credentials: + auth_type: password + interface: internal + notification: + messaging_urls: null + oslo_messaging_notifications: + driver: messagingv2 + topics: + - notifications + - profiler + event_definitions: + - event_type: compute.instance.* + traits: + deleted_at: + fields: payload.deleted_at + type: datetime + disk_gb: + fields: payload.disk_gb + type: int + ephemeral_gb: + fields: payload.ephemeral_gb + type: int + host: + fields: 'publisher_id.`split(., 1, 1)`' + instance_id: + fields: payload.instance_id + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + type: int + launched_at: + fields: payload.launched_at + type: datetime + memory_mb: + fields: payload.memory_mb + type: int + os_architecture: + fields: payload.image_meta.'org.openstack__1__architecture' + os_distro: + fields: payload.image_meta.'org.openstack__1__os_distro' + os_version: + fields: payload.image_meta.'org.openstack__1__os_version' + root_gb: + fields: payload.root_gb + type: int + service: + fields: 'publisher_id.`split(., 0, -1)`' + state: + fields: payload.state + tenant_id: + fields: payload.tenant_id + user_id: + fields: payload.user_id + vcpus: + fields: payload.vcpus + type: int + - event_type: compute.instance.exists + traits: + audit_period_beginning: + fields: payload.audit_period_beginning + type: datetime + audit_period_ending: + fields: payload.audit_period_ending + type: datetime + deleted_at: + fields: payload.deleted_at + type: datetime + disk_gb: + fields: payload.disk_gb + type: int + ephemeral_gb: + fields: payload.ephemeral_gb + type: int + host: + fields: 'publisher_id.`split(., 1, 1)`' + instance_id: + fields: payload.instance_id + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + type: int + launched_at: + fields: payload.launched_at + type: datetime + memory_mb: + fields: payload.memory_mb + type: int + os_architecture: + fields: payload.image_meta.'org.openstack__1__architecture' + os_distro: + fields: payload.image_meta.'org.openstack__1__os_distro' + os_version: + fields: payload.image_meta.'org.openstack__1__os_version' + root_gb: + fields: payload.root_gb + type: int + service: + fields: 'publisher_id.`split(., 0, -1)`' + state: + fields: payload.state + tenant_id: + fields: payload.tenant_id + user_id: + fields: payload.user_id + vcpus: + fields: payload.vcpus + type: int + - event_type: + - volume.exists + - volume.create.* + - volume.delete.* + - volume.resize.* + - volume.attach.* + - volume.detach.* + - volume.update.* + - snapshot.exists + - snapshot.create.* + - snapshot.delete.* + - snapshot.update.* + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + display_name: + fields: payload.display_name + project_id: + fields: payload.tenant_id + replication_status: + fields: payload.replication_status + status: + fields: payload.status + user_id: + fields: payload.user_id + - event_type: + - volume.exists + - volume.create.* + - volume.delete.* + - volume.resize.* + - volume.attach.* + - volume.detach.* + - volume.update.* + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + display_name: + fields: payload.display_name + host: + fields: payload.host + project_id: + fields: payload.tenant_id + replication_status: + fields: payload.replication_status + resource_id: + fields: payload.volume_id + size: + fields: payload.size + status: + fields: payload.status + type: + fields: payload.volume_type + user_id: + fields: payload.user_id + - event_type: + - snapshot.exists + - snapshot.create.* + - snapshot.delete.* + - snapshot.update.* + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + display_name: + fields: payload.display_name + project_id: + fields: payload.tenant_id + replication_status: + fields: payload.replication_status + resource_id: + fields: payload.snapshot_id + status: + fields: payload.status + user_id: + fields: payload.user_id + volume_id: + fields: payload.volume_id + - event_type: + - image_volume_cache.* + traits: + host: + fields: payload.host + image_id: + fields: payload.image_id + - event_type: + - image.create + - image.update + - image.upload + - image.delete + traits: + created_at: + fields: payload.created_at + deleted_at: + fields: payload.deleted_at + name: + fields: payload.name + project_id: + fields: payload.owner + resource_id: + fields: payload.id + size: + fields: payload.size + status: + fields: payload.status + user_id: + fields: payload.owner + - event_type: image.send + traits: + bytes_sent: + fields: payload.bytes_sent + type: int + destination_ip: + fields: payload.destination_ip + image_id: + fields: payload.image_id + receiver_project: + fields: payload.receiver_tenant_id + receiver_user: + fields: payload.receiver_user_id + user_id: + fields: payload.owner_id + - event_type: orchestration.stack.* + traits: + project_id: + fields: payload.tenant_id + resource_id: + fields: payload.stack_identity + user_id: + fields: + - _context_trustor_user_id + - _context_user_id + - event_type: sahara.cluster.* + traits: + project_id: + fields: payload.project_id + resource_id: + fields: payload.cluster_id + user_id: + fields: _context_user_id + - event_type: sahara.cluster.health + traits: + created_at: + fields: payload.created_at + type: datetime + health_check_description: + fields: payload.health_check_description + health_check_name: + fields: payload.health_check_name + health_check_status: + fields: payload.health_check_status + project_id: + fields: payload.project_id + resource_id: + fields: payload.cluster_id + updated_at: + fields: payload.updated_at + type: datetime + user_id: + fields: _context_user_id + verification_id: + fields: payload.verification_id + - event_type: + - identity.user.* + - identity.project.* + - identity.group.* + - identity.role.* + - 'identity.OS-TRUST:trust.*' + - identity.region.* + - identity.service.* + - identity.endpoint.* + - identity.policy.* + traits: + domain_id: + fields: payload.initiator.domain_id + initiator_id: + fields: payload.initiator.id + project_id: + fields: payload.initiator.project_id + resource_id: + fields: payload.resource_info + - event_type: identity.role_assignment.* + traits: + domain: + fields: payload.domain + group: + fields: payload.group + project: + fields: payload.project + role: + fields: payload.role + user: + fields: payload.user + - event_type: identity.authenticate + traits: + action: + fields: payload.action + eventTime: + fields: payload.eventTime + eventType: + fields: payload.eventType + id: + fields: payload.id + initiator_host_addr: + fields: payload.initiator.host.address + initiator_host_agent: + fields: payload.initiator.host.agent + initiator_id: + fields: payload.initiator.id + initiator_name: + fields: payload.initiator.name + initiator_typeURI: + fields: payload.initiator.typeURI + observer_id: + fields: payload.observer.id + observer_typeURI: + fields: payload.observer.typeURI + outcome: + fields: payload.outcome + target_id: + fields: payload.target.id + target_typeURI: + fields: payload.target.typeURI + typeURI: + fields: payload.typeURI + - event_type: objectstore.http.request + traits: + action: + fields: payload.action + eventTime: + fields: payload.eventTime + eventType: + fields: payload.eventType + id: + fields: payload.id + initiator_id: + fields: payload.initiator.id + initiator_project_id: + fields: payload.initiator.project_id + initiator_typeURI: + fields: payload.initiator.typeURI + observer_id: + fields: payload.observer.id + outcome: + fields: payload.outcome + target_action: + fields: payload.target.action + target_id: + fields: payload.target.id + target_metadata_container: + fields: payload.target.metadata.container + target_metadata_object: + fields: payload.target.metadata.object + target_metadata_path: + fields: payload.target.metadata.path + target_metadata_version: + fields: payload.target.metadata.version + target_typeURI: + fields: payload.target.typeURI + typeURI: + fields: payload.typeURI + - event_type: + - network.* + - subnet.* + - port.* + - router.* + - floatingip.* + - pool.* + - vip.* + - member.* + - health_monitor.* + - healthmonitor.* + - listener.* + - loadbalancer.* + - firewall.* + - firewall_policy.* + - firewall_rule.* + - vpnservice.* + - ipsecpolicy.* + - ikepolicy.* + - ipsec_site_connection.* + traits: + project_id: + fields: _context_tenant_id + user_id: + fields: _context_user_id + - event_type: network.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.network.id + - payload.id + user_id: + fields: _context_user_id + - event_type: subnet.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.subnet.id + - payload.id + user_id: + fields: _context_user_id + - event_type: port.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.port.id + - payload.id + user_id: + fields: _context_user_id + - event_type: router.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.router.id + - payload.id + user_id: + fields: _context_user_id + - event_type: floatingip.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.floatingip.id + - payload.id + user_id: + fields: _context_user_id + - event_type: pool.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.pool.id + - payload.id + user_id: + fields: _context_user_id + - event_type: vip.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.vip.id + - payload.id + user_id: + fields: _context_user_id + - event_type: member.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.member.id + - payload.id + user_id: + fields: _context_user_id + - event_type: health_monitor.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.health_monitor.id + - payload.id + user_id: + fields: _context_user_id + - event_type: healthmonitor.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.healthmonitor.id + - payload.id + user_id: + fields: _context_user_id + - event_type: listener.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.listener.id + - payload.id + user_id: + fields: _context_user_id + - event_type: loadbalancer.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.loadbalancer.id + - payload.id + user_id: + fields: _context_user_id + - event_type: firewall.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.firewall.id + - payload.id + user_id: + fields: _context_user_id + - event_type: firewall_policy.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.firewall_policy.id + - payload.id + user_id: + fields: _context_user_id + - event_type: firewall_rule.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.firewall_rule.id + - payload.id + user_id: + fields: _context_user_id + - event_type: vpnservice.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.vpnservice.id + - payload.id + user_id: + fields: _context_user_id + - event_type: ipsecpolicy.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.ipsecpolicy.id + - payload.id + user_id: + fields: _context_user_id + - event_type: ikepolicy.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.ikepolicy.id + - payload.id + user_id: + fields: _context_user_id + - event_type: ipsec_site_connection.* + traits: + project_id: + fields: _context_tenant_id + resource_id: + fields: + - payload.ipsec_site_connection.id + - payload.id + user_id: + fields: _context_user_id + - event_type: '*http.*' + traits: + action: + fields: payload.action + eventTime: + fields: payload.eventTime + eventType: + fields: payload.eventType + id: + fields: payload.id + initiator_host_address: + fields: payload.initiator.host.address + initiator_id: + fields: payload.initiator.id + initiator_name: + fields: payload.initiator.name + initiator_typeURI: + fields: payload.initiator.typeURI + observer_id: + fields: payload.observer.id + outcome: + fields: payload.outcome + project_id: + fields: payload.initiator.project_id + requestPath: + fields: payload.requestPath + target_id: + fields: payload.target.id + target_name: + fields: payload.target.name + target_typeURI: + fields: payload.target.typeURI + typeURI: + fields: payload.typeURI + user_id: + fields: payload.initiator.id + - event_type: '*http.response' + traits: + action: + fields: payload.action + eventTime: + fields: payload.eventTime + eventType: + fields: payload.eventType + id: + fields: payload.id + initiator_host_address: + fields: payload.initiator.host.address + initiator_id: + fields: payload.initiator.id + initiator_name: + fields: payload.initiator.name + initiator_typeURI: + fields: payload.initiator.typeURI + observer_id: + fields: payload.observer.id + outcome: + fields: payload.outcome + project_id: + fields: payload.initiator.project_id + reason_code: + fields: payload.reason.reasonCode + requestPath: + fields: payload.requestPath + target_id: + fields: payload.target.id + target_name: + fields: payload.target.name + target_typeURI: + fields: payload.target.typeURI + typeURI: + fields: payload.typeURI + user_id: + fields: payload.initiator.id + - event_type: + - dns.domain.create + - dns.domain.update + - dns.domain.delete + traits: + action: + fields: payload.action + created_at: + fields: payload.created_at + description: + fields: payload.description + email: + fields: payload.email + expire: + fields: payload.expire + name: + fields: payload.name + parent_domain_id: + fields: parent_domain_id + resource_id: + fields: payload.id + retry: + fields: payload.retry + serial: + fields: payload.serial + status: + fields: payload.status + ttl: + fields: payload.ttl + updated_at: + fields: payload.updated_at + version: + fields: payload.version + - event_type: dns.domain.exists + traits: + action: + fields: payload.action + audit_period_beginning: + fields: payload.audit_period_beginning + type: datetime + audit_period_ending: + fields: payload.audit_period_ending + type: datetime + created_at: + fields: payload.created_at + description: + fields: payload.description + email: + fields: payload.email + expire: + fields: payload.expire + name: + fields: payload.name + parent_domain_id: + fields: parent_domain_id + resource_id: + fields: payload.id + retry: + fields: payload.retry + serial: + fields: payload.serial + status: + fields: payload.status + ttl: + fields: payload.ttl + updated_at: + fields: payload.updated_at + version: + fields: payload.version + - event_type: trove.* + traits: + created_at: + fields: payload.created_at + type: datetime + instance_name: + fields: payload.instance_name + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + nova_instance_id: + fields: payload.nova_instance_id + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + - event_type: + - trove.instance.create + - trove.instance.modify_volume + - trove.instance.modify_flavor + - trove.instance.delete + traits: + availability_zone: + fields: payload.availability_zone + instance_size: + fields: payload.instance_size + type: int + name: + fields: payload.name + nova_volume_id: + fields: payload.nova_volume_id + volume_size: + fields: payload.volume_size + type: int + - event_type: trove.instance.create + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + type: datetime + instance_name: + fields: payload.instance_name + instance_size: + fields: payload.instance_size + type: int + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + name: + fields: payload.name + nova_instance_id: + fields: payload.nova_instance_id + nova_volume_id: + fields: payload.nova_volume_id + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + volume_size: + fields: payload.volume_size + type: int + - event_type: trove.instance.modify_volume + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + type: datetime + instance_name: + fields: payload.instance_name + instance_size: + fields: payload.instance_size + type: int + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + modify_at: + fields: payload.modify_at + type: datetime + name: + fields: payload.name + nova_instance_id: + fields: payload.nova_instance_id + nova_volume_id: + fields: payload.nova_volume_id + old_volume_size: + fields: payload.old_volume_size + type: int + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + volume_size: + fields: payload.volume_size + type: int + - event_type: trove.instance.modify_flavor + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + type: datetime + instance_name: + fields: payload.instance_name + instance_size: + fields: payload.instance_size + type: int + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + modify_at: + fields: payload.modify_at + type: datetime + name: + fields: payload.name + nova_instance_id: + fields: payload.nova_instance_id + nova_volume_id: + fields: payload.nova_volume_id + old_instance_size: + fields: payload.old_instance_size + type: int + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + volume_size: + fields: payload.volume_size + type: int + - event_type: trove.instance.delete + traits: + availability_zone: + fields: payload.availability_zone + created_at: + fields: payload.created_at + type: datetime + deleted_at: + fields: payload.deleted_at + type: datetime + instance_name: + fields: payload.instance_name + instance_size: + fields: payload.instance_size + type: int + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + name: + fields: payload.name + nova_instance_id: + fields: payload.nova_instance_id + nova_volume_id: + fields: payload.nova_volume_id + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + volume_size: + fields: payload.volume_size + type: int + - event_type: trove.instance.exists + traits: + audit_period_beginning: + fields: payload.audit_period_beginning + type: datetime + audit_period_ending: + fields: payload.audit_period_ending + type: datetime + created_at: + fields: payload.created_at + type: datetime + display_name: + fields: payload.display_name + instance_name: + fields: payload.instance_name + instance_type: + fields: payload.instance_type + instance_type_id: + fields: payload.instance_type_id + launched_at: + fields: payload.launched_at + type: datetime + nova_instance_id: + fields: payload.nova_instance_id + region: + fields: payload.region + resource_id: + fields: payload.instance_id + service_id: + fields: payload.service_id + state: + fields: payload.state + user_id: + fields: payload.user_id + - event_type: profiler.* + traits: + base_id: + fields: payload.base_id + db.params: + fields: payload.info.db.params + db.statement: + fields: payload.info.db.statement + host: + fields: payload.info.host + method: + fields: payload.info.request.method + name: + fields: payload.name + parent_id: + fields: payload.parent_id + path: + fields: payload.info.request.path + project: + fields: payload.project + query: + fields: payload.info.request.query + scheme: + fields: payload.info.request.scheme + service: + fields: payload.service + timestamp: + fields: payload.timestamp + trace_id: + fields: payload.trace_id + - event_type: magnum.bay.* + traits: + action: + fields: payload.action + eventTime: + fields: payload.eventTime + eventType: + fields: payload.eventType + id: + fields: payload.id + initiator_host_address: + fields: payload.initiator.host.address + initiator_host_agent: + fields: payload.initiator.host.agent + initiator_id: + fields: payload.initiator.id + initiator_name: + fields: payload.initiator.name + initiator_typeURI: + fields: payload.initiator.typeURI + observer_id: + fields: payload.observer.id + observer_typeURI: + fields: payload.observer.typeURI + outcome: + fields: payload.outcome + target_id: + fields: payload.target.id + target_typeURI: + fields: payload.target.typeURI + typeURI: + fields: payload.typeURI + event_pipeline: + sinks: + - name: event_sink + publishers: + - 'notifier://' + transformers: null + sources: + - events: + - '*' + name: event_source + sinks: + - event_sink + gnocchi_resources: + resources: + - archive_policy: low + metrics: + - identity.authenticate.success + - identity.authenticate.pending + - identity.authenticate.failure + - identity.user.created + - identity.user.deleted + - identity.user.updated + - identity.group.created + - identity.group.deleted + - identity.group.updated + - identity.role.created + - identity.role.deleted + - identity.role.updated + - identity.project.created + - identity.project.deleted + - identity.project.updated + - identity.trust.created + - identity.trust.deleted + - identity.role_assignment.created + - identity.role_assignment.deleted + resource_type: identity + - metrics: + - radosgw.objects + - radosgw.objects.size + - radosgw.objects.containers + - radosgw.api.request + - radosgw.containers.objects + - radosgw.containers.objects.size + resource_type: ceph_account + - attributes: + display_name: resource_metadata.display_name + flavor_id: resource_metadata.(instance_flavor_id|(flavor.id)) + host: resource_metadata.host + image_ref: resource_metadata.image_ref + server_group: resource_metadata.user_metadata.server_group + event_associated_resources: + instance_disk: '{"=": {"instance_id": "%s"}}' + instance_network_interface: '{"=": {"instance_id": "%s"}}' + event_attributes: + id: instance_id + event_delete: compute.instance.delete.start + metrics: + - instance + - memory + - memory.usage + - memory.resident + - vcpus + - cpu + - cpu.delta + - cpu_util + - disk.root.size + - disk.ephemeral.size + - disk.read.requests + - disk.read.requests.rate + - disk.write.requests + - disk.write.requests.rate + - disk.read.bytes + - disk.read.bytes.rate + - disk.write.bytes + - disk.write.bytes.rate + - disk.latency + - disk.iops + - disk.capacity + - disk.allocation + - disk.usage + resource_type: instance + - attributes: + instance_id: resource_metadata.instance_id + name: resource_metadata.vnic_name + metrics: + - network.outgoing.packets.rate + - network.incoming.packets.rate + - network.outgoing.packets + - network.incoming.packets + - network.outgoing.bytes.rate + - network.incoming.bytes.rate + - network.outgoing.bytes + - network.incoming.bytes + resource_type: instance_network_interface + - attributes: + instance_id: resource_metadata.instance_id + name: resource_metadata.disk_name + metrics: + - disk.device.read.requests + - disk.device.read.requests.rate + - disk.device.write.requests + - disk.device.write.requests.rate + - disk.device.read.bytes + - disk.device.read.bytes.rate + - disk.device.write.bytes + - disk.device.write.bytes.rate + - disk.device.latency + - disk.device.iops + - disk.device.capacity + - disk.device.allocation + - disk.device.usage + resource_type: instance_disk + - attributes: + container_format: resource_metadata.container_format + disk_format: resource_metadata.disk_format + name: resource_metadata.name + event_attributes: + id: resource_id + event_delete: image.delete + metrics: + - image + - image.size + - image.download + - image.serve + resource_type: image + - metrics: + - hardware.ipmi.node.power + - hardware.ipmi.node.temperature + - hardware.ipmi.node.inlet_temperature + - hardware.ipmi.node.outlet_temperature + - hardware.ipmi.node.fan + - hardware.ipmi.node.current + - hardware.ipmi.node.voltage + - hardware.ipmi.node.airflow + - hardware.ipmi.node.cups + - hardware.ipmi.node.cpu_util + - hardware.ipmi.node.mem_util + - hardware.ipmi.node.io_util + resource_type: ipmi + - metrics: + - bandwidth + - network + - network.create + - network.update + - subnet + - subnet.create + - subnet.update + - port + - port.create + - port.update + - router + - router.create + - router.update + - ip.floating + - ip.floating.create + - ip.floating.update + resource_type: network + - metrics: + - stack.create + - stack.update + - stack.delete + - stack.resume + - stack.suspend + resource_type: stack + - metrics: + - storage.objects.incoming.bytes + - storage.objects.outgoing.bytes + - storage.api.request + - storage.objects.size + - storage.objects + - storage.objects.containers + - storage.containers.objects + - storage.containers.objects.size + resource_type: swift_account + - attributes: + display_name: resource_metadata.display_name + metrics: + - volume + - volume.size + - volume.create + - volume.delete + - volume.update + - volume.resize + - volume.attach + - volume.detach + resource_type: volume + - attributes: + host_name: resource_metadata.resource_url + metrics: + - hardware.cpu.load.1min + - hardware.cpu.load.5min + - hardware.cpu.load.15min + - hardware.cpu.util + - hardware.memory.total + - hardware.memory.used + - hardware.memory.swap.total + - hardware.memory.swap.avail + - hardware.memory.buffer + - hardware.memory.cached + - hardware.network.ip.outgoing.datagrams + - hardware.network.ip.incoming.datagrams + - hardware.system_stats.cpu.idle + - hardware.system_stats.io.outgoing.blocks + - hardware.system_stats.io.incoming.blocks + resource_type: host + - attributes: + device_name: resource_metadata.device + host_name: resource_metadata.resource_url + metrics: + - hardware.disk.size.total + - hardware.disk.size.used + resource_type: host_disk + - attributes: + device_name: resource_metadata.name + host_name: resource_metadata.resource_url + metrics: + - hardware.network.incoming.bytes + - hardware.network.outgoing.bytes + - hardware.network.outgoing.errors + resource_type: host_network_interface + paste: + 'app:api-server': + paste.app_factory: 'ceilometer.api.app:app_factory' + 'filter:authtoken': + paste.filter_factory: 'keystonemiddleware.auth_token:filter_factory' + 'filter:cors': + oslo_config_project: ceilometer + paste.filter_factory: 'oslo_middleware.cors:filter_factory' + 'filter:http_proxy_to_wsgi': + oslo_config_project: ceilometer + paste.filter_factory: 'oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory' + 'filter:request_id': + paste.filter_factory: 'oslo_middleware:RequestId.factory' + 'pipeline:main': + pipeline: cors http_proxy_to_wsgi request_id authtoken api-server + pipeline: + sinks: + - name: meter_sink + publishers: + - 'notifier://' + transformers: null + - name: cpu_sink + publishers: + - 'notifier://' + transformers: + - name: rate_of_change + parameters: + target: + name: cpu_util + scale: 100.0 / (10**9 * (resource_metadata.cpu_number or 1)) + type: gauge + unit: '%' + - name: cpu_delta_sink + publishers: + - 'notifier://' + transformers: + - name: delta + parameters: + growth_only: true + target: + name: cpu.delta + - name: disk_sink + publishers: + - 'notifier://' + transformers: + - name: rate_of_change + parameters: + source: + map_from: + name: (disk\.device|disk)\.(read|write)\.(bytes|requests) + unit: (B|request) + target: + map_to: + name: \1.\2.\3.rate + unit: \1/s + type: gauge + - name: network_sink + publishers: + - 'notifier://' + transformers: + - name: rate_of_change + parameters: + source: + map_from: + name: network\.(incoming|outgoing)\.(bytes|packets) + unit: (B|packet) + target: + map_to: + name: network.\1.\2.rate + unit: \1/s + type: gauge + sources: + - interval: 600 + meters: + - '*' + name: meter_source + sinks: + - meter_sink + - interval: 600 + meters: + - cpu + name: cpu_source + sinks: + - cpu_sink + - cpu_delta_sink + - interval: 600 + meters: + - disk.read.bytes + - disk.read.requests + - disk.write.bytes + - disk.write.requests + - disk.device.read.bytes + - disk.device.read.requests + - disk.device.write.bytes + - disk.device.write.requests + name: disk_source + sinks: + - disk_sink + - interval: 600 + meters: + - network.incoming.bytes + - network.incoming.packets + - network.outgoing.bytes + - network.outgoing.packets + name: network_source + sinks: + - network_sink + policy: + context_is_admin: 'role:admin' + segregation: 'rule:context_is_admin' + 'telemetry:compute_statistics': '' + 'telemetry:create_samples': '' + 'telemetry:events:index': '' + 'telemetry:events:show': '' + 'telemetry:get_meters': '' + 'telemetry:get_resource': '' + 'telemetry:get_resources': '' + 'telemetry:get_sample': '' + 'telemetry:get_samples': '' + 'telemetry:query_sample': '' + rally_tests: + append: null + metering: + meter_name: ram_util + statistic: avg + threshold: 10 + type: threshold + override: null + +dependencies: + db_init: + services: + - service: oslo_db + endpoint: internal + db_init_mongodb: + services: + - service: mongodb + endpoint: internal + db_sync: + jobs: + - ceilometer-db-init + services: + - service: oslo_db + endpoint: internal + ks_user: + services: + - service: identity + endpoint: internal + ks_service: + services: + - service: identity + endpoint: internal + ks_endpoints: + jobs: + - ceilometer-ks-service + services: + - service: identity + endpoint: internal + api: + jobs: + - ceilometer-db-init-mongodb + - ceilometer-db-sync + - ceilometer-ks-user + - ceilometer-ks-endpoints + services: + - service: identity + endpoint: internal + - service: oslo_db + endpoint: internal + - service: mongodb + endpoint: internal + - service: metric + endpoint: internal + compute: + jobs: + - ceilometer-db-init-mongodb + - ceilometer-db-sync + - ceilometer-ks-user + - ceilometer-ks-endpoints + services: + - service: identity + endpoint: internal + - service: oslo_db + endpoint: internal + - service: mongodb + endpoint: internal + - service: metric + endpoint: internal + collector: + jobs: + - ceilometer-db-init-mongodb + - ceilometer-db-sync + - ceilometer-ks-user + - ceilometer-ks-endpoints + services: + - service: identity + endpoint: internal + - service: oslo_db + endpoint: internal + - service: mongodb + endpoint: internal + - service: metric + endpoint: internal + central: + jobs: + - ceilometer-db-init-mongodb + - ceilometer-db-sync + - ceilometer-ks-user + - ceilometer-ks-endpoints + services: + - service: identity + endpoint: internal + - service: oslo_db + endpoint: internal + - service: mongodb + endpoint: internal + - service: metric + endpoint: internal + notification: + jobs: + - ceilometer-db-init-mongodb + - ceilometer-db-sync + - ceilometer-ks-user + - ceilometer-ks-endpoints + services: + - service: identity + endpoint: internal + - service: oslo_db + endpoint: internal + - service: mongodb + endpoint: internal + - service: metric + endpoint: internal + tests: + services: + - service: identity + endpoint: internal + - service: metering + endpoint: internal + - service: metric + endpoint: internal + +# Names of secrets used by bootstrap and environmental checks +secrets: + identity: + admin: ceilometer-keystone-admin + user: ceilometer-keystone-user + oslo_db: + admin: ceilometer-db-admin + user: ceilometer-db-user + mongodb: + admin: ceilometer-mongodb-admin + user: ceilometer-mongodb-user + +# typically overriden by environmental +# values, but should include all endpoints +# required by this chart +endpoints: + cluster_domain_suffix: cluster.local + identity: + name: keystone + auth: + admin: + region_name: RegionOne + username: admin + password: password + project_name: admin + user_domain_name: default + project_domain_name: default + user: + role: admin + region_name: RegionOne + username: ceilometer + password: password + project_name: service + user_domain_name: default + project_domain_name: default + hosts: + default: keystone-api + public: keystone + host_fqdn_override: + default: null + path: + default: /v3 + scheme: + default: 'http' + port: + admin: + default: 35357 + api: + default: 80 + metering: + name: ceilometer + hosts: + default: ceilometer-api + public: ceilometer + host_fqdn_override: + default: null + path: + default: null + scheme: + default: 'http' + port: + api: + default: 8777 + public: 80 + metric: + name: gnocchi + hosts: + default: gnocchi-api + public: gnocchi + host_fqdn_override: + default: null + path: + default: null + scheme: + default: 'http' + port: + api: + default: 8041 + public: 80 + alarming: + name: aodh + hosts: + default: aodh-api + public: aodh + host_fqdn_override: + default: null + path: + default: null + scheme: + default: 'http' + port: + api: + default: 8042 + public: 80 + event: + name: panko + hosts: + default: panko-api + public: panko + host_fqdn_override: + default: null + path: + default: null + scheme: + default: 'http' + port: + api: + default: 8777 + public: 80 + oslo_db: + auth: + admin: + username: root + password: password + user: + username: ceilometer + password: password + hosts: + default: mariadb + host_fqdn_override: + default: null + path: /ceilometer + scheme: mysql+pymysql + port: + mysql: + default: 3306 + mongodb: + auth: + admin: + username: root + password: password + user: + username: ceilometer + password: password + hosts: + default: mongodb + host_fqdn_override: + default: null + path: /ceilometer + scheme: mongodb + port: + mongodb: + default: 27017 + oslo_cache: + hosts: + default: memcache + host_fqdn_override: + default: null + port: + memcache: + default: 11211 + oslo_messaging: + auth: + admin: + username: admin + password: password + user: + username: rabbitmq + password: password + hosts: + default: rabbitmq + host_fqdn_override: + default: null + path: / + scheme: rabbit + port: + amqp: + default: 5672 + +pod: + affinity: + anti: + type: + default: preferredDuringSchedulingIgnoredDuringExecution + topologyKey: + default: kubernetes.io/hostname + mounts: + ceilometer_tests: + init_container: null + ceilometer_tests: + ceilometer_api: + init_container: null + ceilometer_api: + ceilometer_compute: + init_container: null + ceilometer_compute: + ceilometer_central: + init_container: null + ceilometer_central: + ceilometer_collector: + init_container: null + ceilometer_collector: + ceilometer_notification: + init_container: null + ceilometer_notification: + replicas: + api: 1 + central: 1 + collector: 1 + compute: 1 + notification: 1 + lifecycle: + upgrades: + deployments: + revision_history: 3 + pod_replacement_strategy: RollingUpdate + rolling_update: + max_unavailable: 1 + max_surge: 3 + disruption_budget: + api: + min_available: 0 + termination_grace_period: + api: + timeout: 600 + resources: + enabled: true + api: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + compute: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + collector: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + notification: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + central: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + jobs: + db_init: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + db_init_mongodb: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + db_sync: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + ks_endpoints: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + ks_service: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + ks_user: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + tests: + requests: + memory: "124Mi" + cpu: "100m" + limits: + memory: "1024Mi" + cpu: "2000m" + +manifests: + configmap_bin: true + configmap_etc: true + deployment_api: true + deployment_central: true + deployment_collector: true + deployment_compute: true + deployment_notification: true + ingress_api: true + job_db_init: true + job_db_init_mongodb: true + job_db_sync: true + job_ks_endpoints: true + job_ks_service: true + job_ks_user: true + pdb_api: true + pod_rally_test: true + secret_db: true + secret_keystone: true + secret_mongodb: true + service_api: true + service_ingress_api: true diff --git a/tools/gate/launch-osh/basic.sh b/tools/gate/launch-osh/basic.sh index c933c499ed..917af7f81e 100755 --- a/tools/gate/launch-osh/basic.sh +++ b/tools/gate/launch-osh/basic.sh @@ -130,6 +130,7 @@ if [ "x$INTEGRATION" == "xmulti" ]; then helm install --namespace=openstack ${WORK_DIR}/postgresql --name=postgresql helm install --namespace=openstack ${WORK_DIR}/gnocchi --name=gnocchi helm install --namespace=openstack ${WORK_DIR}/mongodb --name=mongodb + helm install --namespace=openstack ${WORK_DIR}/ceilometer --name=ceilometer fi kube_wait_for_pods openstack ${POD_START_TIMEOUT_OPENSTACK} fi @@ -205,6 +206,7 @@ if [ "x$INTEGRATION" == "xmulti" ]; then helm_test_deployment keystone ${SERVICE_TEST_TIMEOUT} helm_test_deployment gnocchi ${SERVICE_TEST_TIMEOUT} + helm_test_deployment ceilometer ${SERVICE_TEST_TIMEOUT} helm_test_deployment glance ${SERVICE_TEST_TIMEOUT} helm_test_deployment cinder ${SERVICE_TEST_TIMEOUT} helm_test_deployment neutron ${SERVICE_TEST_TIMEOUT}