Skip to content

Commit

Permalink
ncm-openstack: gather metrics from os services
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosimon committed Jul 9, 2019
1 parent cb24be2 commit 45669bb
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ncm-openstack/src/main/pan/components/openstack/common.pan
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ type openstack_oslo_concurrency = {
'lock_path' : absolute_file_path
};

@documentation{
The configuration options in 'oslo_messaging_notifications' Section.
}
type openstack_oslo_messaging_notifications = {
@{The drivers to handle sending notifications}
'driver' : choice('messaging', 'messagingv2', 'routing', 'log', 'test', 'noop') = 'messagingv2'
};

@documentation{
The configuration options in the DEFAULTS Section
}
Expand Down
21 changes: 21 additions & 0 deletions ncm-openstack/src/main/pan/components/openstack/compute/nova.pan
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ type openstack_nova_DEFAULTS = {
NOTE: As of the 16.0.0 Pike release, this configuration option is ignored
for the ironic.IronicDriver compute driver and is hardcoded to 1.0}
"ram_allocation_ratio" ? double(0..)
@{This option enables periodic compute.instance.exists notifications. Each
compute node must be configured to generate system usage data. These
notifications are consumed by OpenStack Telemetry service}
"instance_usage_audit" ? boolean
@{Time period to generate instance usages for}
"instance_usage_audit_period" ? choice('hour', 'day', 'month', 'year')
@{If set, send compute.instance.update notifications on
instance state changes.
Please refer to:
https://docs.openstack.org/nova/latest/reference/notifications.html for
additional information on notifications.
* None - no notifications
* "vm_state" - notifications are sent with VM state transition information in
the ``old_state`` and ``state`` fields. The ``old_task_state`` and
``new_task_state`` fields will be set to the current task_state of the
instance.
* "vm_and_task_state" - notifications are sent with VM and task state
transition information}
"notify_on_state_change" ? choice('None', 'vm_state', 'vm_and_task_state')

};

@documentation{
Expand All @@ -288,6 +308,7 @@ type openstack_nova_common = {
'placement' : openstack_nova_placement
'cinder' ? openstack_nova_cinder
'neutron' ? openstack_nova_neutron
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_nova = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ type openstack_glance_service_config = {
'paste_deploy' : openstack_keystone_paste_deploy
'glance_store' ? openstack_glance_store
'cors' ? openstack_cors
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_glance = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,5 @@ type openstack_quattor_ceilometer = openstack_quattor;
type openstack_ceilometer_config = {
'service' ? openstack_ceilometer_service_config
'gnocchi' ? openstack_ceilometer_gnocchi_config
# pipeline in yaml format
#'pipeline' ? openstack_ceilometer_pipeline_config
# default empty dict for pure hypervisor
'quattor' : openstack_quattor_ceilometer = dict()
};
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ type openstack_neutron_service_config = {
'database' ? openstack_database
@{nova section has the same options than "keystone_authtoken" but with the nova user and passwod}
'nova' ? openstack_neutron_nova
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
};

type openstack_quattor_neutron = openstack_quattor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ type openstack_heat_config = {
'trustee' : openstack_domains_common
'clients_keystone' : openstack_heat_clients_keystone
'clients' : openstack_heat_clients
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
'quattor' : openstack_quattor_heat
};
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type openstack_cinder_config = {
'database' : openstack_database
'keystone_authtoken' : openstack_keystone_authtoken
'oslo_concurrency' : openstack_oslo_concurrency
'oslo_messaging_notifications' ? openstack_oslo_messaging_notifications
'lvm' ? openstack_cinder_lvm
'ceph' ? openstack_cinder_ceph
# default empty dict for pure hypervisor
Expand Down
6 changes: 6 additions & 0 deletions ncm-openstack/src/test/resources/common_resources.pan
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ prefix "/software/components/openstack/compute/nova";
"transport_url", format("rabbit://openstack:rabbit_pass@%s", OPENSTACK_HOST_SERVER),
"my_ip", MY_IP,
"rootwrap_config", "/etc/nova/rootwrap.conf",
"instance_usage_audit", true,
"instance_usage_audit_period", "hour",
"notify_on_state_change", "vm_and_task_state",
);
"keystone_authtoken" = dict(
"auth_uri", format('http://%s:5000', OPENSTACK_HOST_SERVER),
Expand All @@ -46,6 +49,9 @@ prefix "/software/components/openstack/compute/nova";
"oslo_concurrency" = dict(
"lock_path", "/var/lib/nova/tmp",
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);
"placement" = dict(
"auth_url", format('http://%s:35357/v3', OPENSTACK_HOST_SERVER),
"username", "placement",
Expand Down
21 changes: 21 additions & 0 deletions ncm-openstack/src/test/resources/os_resources.pan
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ prefix "client/endpoint/glanceone";
include 'components/openstack/identity/gather/image/glance';

prefix "/software/components/openstack/image/glance/service";
"DEFAULT" = dict(
"transport_url", format("rabbit://openstack:rabbit_pass@%s", OPENSTACK_HOST_SERVER),
);
"database" = dict(
"connection", format("mysql+pymysql://glance:glance_db_pass@%s/glance", OPENSTACK_HOST_SERVER),
);
Expand All @@ -88,11 +91,17 @@ prefix "/software/components/openstack/image/glance/service";
"glance_store" = dict(
"default_store", "file",
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);


# Glance/registry section

prefix "/software/components/openstack/image/glance/registry";
"DEFAULT" = dict(
"transport_url", format("rabbit://openstack:rabbit_pass@%s", OPENSTACK_HOST_SERVER),
);
"database" = dict(
"connection", format("mysql+pymysql://glance:glance_db_pass@%s/glance", OPENSTACK_HOST_SERVER),
);
Expand All @@ -103,6 +112,9 @@ prefix "/software/components/openstack/image/glance/registry";
"password", "glance_good_password",
"memcached_servers", list('controller.mysite.com:11211'),
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);


# Horizon section
Expand Down Expand Up @@ -139,6 +151,9 @@ prefix "/software/components/openstack/network/neutron/service";
"username", "nova",
"password", "nova_good_password",
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);


# Neutron/DHCP section
Expand Down Expand Up @@ -213,6 +228,9 @@ prefix "/software/components/openstack/volume/cinder";
"rbd_user", "volumes",
"rbd_secret_uuid", "a5d0dd94-57c4-ae55-ffe0-7e3732a24455",
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);



Expand Down Expand Up @@ -308,6 +326,9 @@ prefix "/software/components/openstack/orchestration/heat";
"clients_keystone" = dict(
"auth_uri", AUTH_URI,
);
"oslo_messaging_notifications" = dict(
"driver", "messagingv2",
);

# Murano section

Expand Down

0 comments on commit 45669bb

Please sign in to comment.