Telemetry: enable publishing of events for core OpenStack Components

This PS enables publishing of events for core OpenStack Components

Change-Id: I846bfa86ae522c103e741b46e189695d45ca7710
This commit is contained in:
Pete Birley 2017-09-28 13:06:51 -05:00
parent e6fff4b625
commit 16a250509a
8 changed files with 139 additions and 4 deletions

View File

@ -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 cinder-volume-usage-audit --send_actions

View File

@ -47,6 +47,8 @@ data:
{{ tuple "bin/_cinder-volume.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_cinder-volume.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
ceph-keyring.sh: |+ ceph-keyring.sh: |+
{{ tuple "bin/_ceph-keyring.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_ceph-keyring.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
volume-usage-audit.sh: |+
{{ tuple "bin/_volume-usage-audit.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- if .Values.bootstrap.enabled }} {{- if .Values.bootstrap.enabled }}
bootstrap.sh: |+ bootstrap.sh: |+
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}

View File

@ -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.cron_volume_usage_audit }}
{{- if .Capabilities.APIVersions.Has "batch/v2alpha1" }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.volume_usage_audit }}
{{- $mounts_cinder_volume_usage_audit := .Values.pod.mounts.cinder_volume_usage_audit.cinder_volume_usage_audit }}
{{- $mounts_cinder_volume_usage_audit_init := .Values.pod.mounts.cinder_volume_usage_audit.init_container }}
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: cinder-volume-usage-audit
spec:
schedule: {{ .Values.jobs.volume_usage_audit.cron | quote }}
concurrencyPolicy: Forbid
jobTemplate:
metadata:
labels:
{{ tuple $envAll "cinder" "volume-usage-audit" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
template:
spec:
initContainers:
{{ tuple $envAll $dependencies $mounts_cinder_volume_usage_audit_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: cinder-volume-usage-audit
image: {{ .Values.images.volume_usage_audit }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.volume_usage_audit | include "helm-toolkit.snippets.kubernetes_resources" | indent 14 }}
command:
- /tmp/volume-usage-audit.sh
volumeMounts:
- name: etccinder
mountPath: /etc/cinder
- name: cinder-etc
mountPath: /etc/cinder/cinder.conf
subPath: cinder.conf
readOnly: true
- name: cinder-bin
mountPath: /tmp/volume-usage-audit.sh
subPath: volume-usage-audit.sh
readOnly: true
{{ if $mounts_cinder_volume_usage_audit.volumeMounts }}{{ toYaml $mounts_cinder_volume_usage_audit.volumeMounts | indent 14 }}{{ end }}
volumes:
- name: etccinder
emptyDir: {}
- name: cinder-etc
configMap:
name: cinder-etc
defaultMode: 0444
- name: cinder-bin
configMap:
name: cinder-bin
defaultMode: 0555
{{ if $mounts_cinder_volume_usage_audit.volumes }}{{ toYaml $mounts_cinder_volume_usage_audit.volumes | indent 10 }}{{ end }}
{{- end }}
{{- end }}

View File

@ -37,10 +37,15 @@ images:
bootstrap: docker.io/kolla/ubuntu-source-heat-engine:3.0.3 bootstrap: docker.io/kolla/ubuntu-source-heat-engine:3.0.3
scheduler: docker.io/kolla/ubuntu-source-cinder-scheduler:3.0.3 scheduler: docker.io/kolla/ubuntu-source-cinder-scheduler:3.0.3
volume: docker.io/kolla/ubuntu-source-cinder-volume:3.0.3 volume: docker.io/kolla/ubuntu-source-cinder-volume:3.0.3
volume_usage_audit: docker.io/kolla/ubuntu-source-cinder-volume:3.0.3
backup: docker.io/kolla/ubuntu-source-cinder-backup:3.0.3 backup: docker.io/kolla/ubuntu-source-cinder-backup:3.0.3
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0 dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
jobs:
volume_usage_audit:
cron: "*/5 * * * *"
pod: pod:
user: user:
cinder: cinder:
@ -61,6 +66,9 @@ pod:
cinder_volume: cinder_volume:
init_container: null init_container: null
cinder_volume: cinder_volume:
cinder_volume_usage_audit:
init_container: null
cinder_volume_usage_audit:
cinder_backup: cinder_backup:
init_container: null init_container: null
cinder_backup: cinder_backup:
@ -110,6 +118,13 @@ pod:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
jobs: jobs:
volume_usage_audit:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
bootstrap: bootstrap:
requests: requests:
memory: "128Mi" memory: "128Mi"
@ -390,6 +405,8 @@ conf:
memcache_security_strategy: ENCRYPT memcache_security_strategy: ENCRYPT
oslo_concurrency: oslo_concurrency:
lock_path: "/var/lib/cinder/tmp" lock_path: "/var/lib/cinder/tmp"
oslo_messaging_notifications:
driver: messagingv2
backends: backends:
# Those options will be written to backends.conf as-is. # Those options will be written to backends.conf as-is.
rbd1: rbd1:
@ -462,6 +479,16 @@ dependencies:
endpoint: internal endpoint: internal
- service: volume - service: volume
endpoint: internal endpoint: internal
volume_usage_audit:
jobs:
- cinder-db-sync
- cinder-ks-user
- cinder-ks-endpoints
services:
- service: identity
endpoint: internal
- service: volume
endpoint: internal
scheduler: scheduler:
jobs: jobs:
- cinder-db-sync - cinder-db-sync
@ -656,6 +683,7 @@ endpoints:
manifests: manifests:
configmap_bin: true configmap_bin: true
configmap_etc: true configmap_etc: true
cron_volume_usage_audit: true
deployment_api: true deployment_api: true
deployment_backup: true deployment_backup: true
deployment_scheduler: true deployment_scheduler: true

View File

@ -199,7 +199,9 @@ conf:
paste_deploy: paste_deploy:
flavor: keystone flavor: keystone
database: database:
connection: null max_retries: -1
oslo_messaging_notifications:
driver: messagingv2
paste_registry: paste_registry:
pipeline:glance-registry: pipeline:glance-registry:
pipeline: healthcheck osprofiler unauthenticated-context registryapp pipeline: healthcheck osprofiler unauthenticated-context registryapp
@ -233,7 +235,9 @@ conf:
paste_deploy: paste_deploy:
flavor: keystone flavor: keystone
database: database:
connection: null max_retries: -1
oslo_messaging_notifications:
driver: messagingv2
swift_store: swift_store:
override: override:
append: append:

View File

@ -213,6 +213,8 @@ conf:
endpoint_type: internalURL endpoint_type: internalURL
clients_keystone: clients_keystone:
endpoint_type: internalURL endpoint_type: internalURL
oslo_messaging_notifications:
driver: messagingv2
network: network:
api: api:

View File

@ -675,8 +675,7 @@ conf:
agent: agent:
root_helper: sudo /var/lib/kolla/venv/bin/neutron-rootwrap /etc/neutron/rootwrap.conf root_helper: sudo /var/lib/kolla/venv/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
oslo_messaging_notifications: oslo_messaging_notifications:
driver: driver: messagingv2
- noop
nova: nova:
auth_type: password auth_type: password
auth_version: v3 auth_version: v3

View File

@ -619,6 +619,9 @@ conf:
allow_resize_to_same_host: true allow_resize_to_same_host: true
compute_driver: libvirt.LibvirtDriver compute_driver: libvirt.LibvirtDriver
my_ip: 0.0.0.0 my_ip: 0.0.0.0
instance_usage_audit: True
instance_usage_audit_period: hour
notify_on_state_change: vm_and_task_state
vnc: vnc:
novncproxy_host: 0.0.0.0 novncproxy_host: 0.0.0.0
novncproxy_port: 6080 novncproxy_port: 6080
@ -668,6 +671,8 @@ conf:
backend: oslo_cache.memcache_pool backend: oslo_cache.memcache_pool
wsgi: wsgi:
api_paste_config: /etc/nova/api-paste.ini api_paste_config: /etc/nova/api-paste.ini
oslo_messaging_notifications:
driver: messagingv2
# Names of secrets used by bootstrap and environmental checks # Names of secrets used by bootstrap and environmental checks
secrets: secrets: