69 Commits

Author SHA1 Message Date
Kien Nguyen
043943117d Use <project>_install_type instead of kolla_install_type
Use <project>_install_type instead of kolla_install_type
to set python_path. For example, general kolla_install_type
is 'binary', but user wants to deploy Horizon from 'source'.
Horizon templates still use python_path=/usr/share/openstack-dashboard,
it is wrong.

Change-Id: Ide6a24e17b1f8ab6506aa5e53f70693706830418
2019-01-04 14:33:46 +07:00
Bartosz Zurkowski
10d33f82bb Find Monasca agent plugins locally
Find module searches paths on managed server. Since role path and custom
Kolla config is located on deployment node and deployment node is not
considered to be a managed server, Monasca plugin files cannot be found.
After the deployment container running Monasca agent collector stucks in
restart mode due to missing plugin files.

The problem does not occur if deployment was started from a managed
server (eg. OSC). The problem occurs if the deployment was started from
a separate deployment server - a common case.

This change enforces running find module locally on deployment node.

Change-Id: Ia25daafe2f82f5744646fd2eda2d255ccead814e
Signed-off-by: Bartosz Zurkowski <b.zurkowski@samsung.com>
2018-12-16 16:51:54 +01:00
Bartosz Zurkowski
c5d1e1d5f2 Call Grafana APIs only once
In multinode deployments creating default Grafana organization failed,
because Ansible attempted to call Grafana API in the context of each
host in the inventory. After creating organization via the first host,
subsequent attempts via the remaining hosts failed due to already
existing organization. This change enforces creating default
organization only once.

Other tasks using Grafana API have been enforced to be ran only once as
well.

Change-Id: I3a93a719b3c9b4e55ab226d3b22d571d9a0f489d
Signed-off-by: Bartosz Zurkowski <b.zurkowski@samsung.com>
2018-12-16 16:30:58 +01:00
Eduardo Gonzalez
1a682fab28 Support stop specific containers
With this change, an operator may be able to stop a
service container without stopping all services in a host.
This change is the starting point to start
fast-forward upgrades support.
In next changes new flags will be introducced to disable
stop dataplane services during upgrades.

Change-Id: Ifde7a39d7d8596ef0d7405ecf1ac1d49a459d9ef
Implements: blueprint support-stop-containers
2018-11-26 08:07:01 +00:00
Zuul
445e4f7640 Merge "Support custom monasca-notification templates" 2018-11-20 09:41:21 +00:00
Zuul
42ab513ec9 Merge "Automatically configure Monasca Grafana datasource" 2018-11-13 15:18:40 +00:00
Zuul
8bbe9011e2 Merge "Don't set recurse on config folders" 2018-11-12 13:50:24 +00:00
Doug Szumski
75d095b64e Automatically configure Monasca Grafana datasource
In Kolla, an OpenStack project is created to store logs and metrics
harvested from the control plane by Monasca. This commit enables
the Monasca Datasource in the Grafana organisation which maps to
this OpenStack control plane project. What this means in practice
is that if a user logs into Monasca Grafana, and has access to the
the control plane project, they will immediately be able to create
dashboards using data from Monasca which has been gathered from the
control plane.

Support to enable creation of this datasource for other OpenStack
projects can be added in a separate commit.

Partially-Implements: blueprint monasca-grafana
Change-Id: I03e741ddb1c582b7280c64637ed3e3683df6419b
2018-11-07 20:24:41 +00:00
Doug Szumski
cfc86645c9 Collect StatsD metrics from Monasca services
Some Monasca services support sending StatsD metrics to
allow monitoring those services. This commit connects
these services to the StatsD service provided by the
Monasca Agent.

Partially-Implements: blueprint monasca-roles
Change-Id: I1da376384a31b89fea1b8a6f907aea35282909a4
2018-11-07 20:24:19 +00:00
Doug Szumski
712c89760c Add support for deploying Monasca Grafana
The Monasca Grafana fork allows users to log into Grafana with their
OpenStack user credentials and see metrics associated with their
OpenStack project. The long term goal is to enable Keystone support
in upstream Grafana, but this work seems to have stalled.

Partially-Implements: blueprint monasca-grafana
Change-Id: Icc04613b2571c094ae23b66d0bcc38b58c0ee4e1
2018-11-02 13:35:35 +00:00
Doug Szumski
6cbb5cbdb4 Support using external DBs in Monasca
This changes allows the user to configure a Monasca database
which may be different from the default database.

Partially-Implements: blueprint monasca-roles
Change-Id: Ia905190b8037ecb1782a758c0b65581fe9024bf6
2018-11-02 13:04:06 +00:00
Doug Szumski
843b7a3a9c Add missing project name for Monasca
Before this change the HAProxy configuration for Monasca printed:
  "Copying over haproxy haproxy config".
This change fixes the message.

TrivialFix
Change-Id: I2823775f6fa5b0be919b567f311c671f1469d19f
2018-11-02 13:04:06 +00:00
Doug Szumski
ab901a6d6d Support external Keystone in Monasca
Make it easy to override the Keystone endpoints to support deploying
stand-alone Monasca which can integrate with an externally provided
Keystone instance.

Partially-Implements: blueprint monasca-roles
Change-Id: I9ae3b243c792ef88075702b47b62f164a1705c2e
2018-11-02 13:04:05 +00:00
Doug Szumski
8cd2a793b4 Add initial documentation for Monasca
Partially-Implements: blueprint monasca-roles
Change-Id: I19db9396bb53b6db77cf97d7969ca24a55d8db0e
2018-11-02 13:04:05 +00:00
Doug Szumski
b7b45effed Support deploying the Monasca Agent
The Monasca Agent collects metrics and in this change is deployed
across the control plane. These metrics are collected into an OpenStack
project. It supports configuring a small number of plugins, which can
be extended in later commits. It also makes the Monasca Agent credentials
available to other roles, such as the common role to allow forwarding
logs to Monasca.

Partially-Implements: blueprint monasca-roles
Change-Id: I76b34fc5e1c76407a45fcf272268d5798b473ca2
2018-11-02 13:04:05 +00:00
Doug Szumski
4896031757 Don't set recurse on config folders
A small number of services set the recurse flag when they create
their config directory. This can change permission of files within
the directory, which are later set back to the original state. The
side effect is that the service is then restarted, even though the
net change to the config files amounts to nothing. The expected
behaviour is that a service only restarts if the config *has*
changed. This patch fixes this issue.

Change-Id: Ib6f1ca7b416247f8d455fb25892f4a3b27de03ba
Closes-Bug: 1800480
2018-10-29 15:35:32 +00:00
Zuul
8045b3fbd0 Merge "Update log metrics config for Logstash downgrade" 2018-10-09 19:36:46 +00:00
Zuul
5a719217e4 Merge "Support using binary Logstash image" 2018-10-09 19:34:35 +00:00
Zuul
a7cf4434d0 Merge "Update Monasca Log Transformer config" 2018-10-09 19:34:33 +00:00
Zuul
50bb4048f9 Merge "Update Monasca Log Persister config" 2018-10-09 19:34:31 +00:00
Zuul
ff51332763 Merge "Increase maximum payload size for Monasca Log API" 2018-10-09 19:31:47 +00:00
Zuul
3e3af0df2c Merge "Prevent Monasca Notification using YAML mode" 2018-10-09 19:29:02 +00:00
Doug Szumski
47136af545 Update log metrics config for Logstash downgrade
The format for the Logstash Kafka output plugin worker count is
integer in Logstash 2 and string in Logstash 5. Since we have downgraded
Logstash we need to switch formats here.

Change-Id: I98113dda05bbb44410916c27d7d3bcd59a034a98
Partially-Implements: blueprint monasca-roles
2018-10-09 16:04:51 +01:00
Doug Szumski
0992c6b55a Support using binary Logstash image
To build the Monasca images, they need to be built from source, however,
this doesn't include Logstash. Logstash does not differentiate between
binary or source install types, so we can just use the default.

Partially-Implements: blueprint monasca-roles
Change-Id: I7eb355f25864f2b993780cd2b000c8bcd13f78e8
2018-10-09 16:04:51 +01:00
Doug Szumski
063518d072 Update Monasca Log Transformer config
* Convert all log levels to lowercase
* Make number of threads configurable
* Improve naming
* Update path and log options for Logstash 2.4
* Change worker count from string to integer for the Kafka output plugin supplied
  with Logstash 2.4.

Partially-Implements: blueprint monasca-roles
Change-Id: I9379969ee639dff0b525d7a1a03df59bcf18b98b
2018-10-09 16:04:51 +01:00
Doug Szumski
380418f351 Update Monasca Log Persister config
* Make number of threads configurable
* Improve naming
* Update path and log options for Logstash 2.4
* Use the correct logs directory

Partially-Implements: blueprint monasca-roles
Change-Id: I09388de4d31740f2786393c957201bd037572226
2018-10-09 16:04:51 +01:00
Doug Szumski
b1dee2d85b Increase maximum payload size for Monasca Log API
Increase the maximum payload size so that it slightly exceeds the default
maximum chunk size (8MB) in Fluentd. This prevents the Monasca Log API
dropping logs when under heavy load.

Partially-Implements: blueprint monasca-roles
Change-Id: I13020abde7de1c92acc07352466b814b4a6ce5bc
2018-10-09 16:04:51 +01:00
Doug Szumski
0cae7d9b34 Prevent Monasca Notification using YAML mode
If the config option is not specified Monasca Notification defaults
to YAML config parsing and fails to load.

Partially-Implements: blueprint monasca-roles
Change-Id: Id85d9765df525b34d43a77a9e4045e0de19aef99
2018-10-09 16:02:47 +01:00
Doug Szumski
1feb6b6aaa Support custom monasca-notification templates
Jira, Slack and possiblly other plugins allow custom templates
for defining the format of notifications. This change lets you
provide these in a templates folder which is copied into the
monasca-notification container.

Partially-Implements: blueprint monasca-roles
Change-Id: Ibc5ba3944d51f6c8ffc8bdc9ed60f43dd91ca7e0
2018-10-09 15:16:17 +01:00
Zuul
867fe4c6b3 Merge "Improve registration of Monasca InfluxDB database" 2018-10-05 08:14:43 +00:00
Zuul
476bf15c1c Merge "Add region to Monasca Log API" 2018-10-03 14:22:39 +00:00
Zuul
77d7ab20c2 Merge "Support configuring Monasca Persister performance" 2018-10-03 14:20:06 +00:00
Zuul
180ab50653 Merge "Add missing Monasca persister and notification dimensions" 2018-10-03 14:19:52 +00:00
Zuul
9355f17f2d Merge "Support deploying Monasca Persister" 2018-10-03 14:19:50 +00:00
Zuul
31a64d3543 Merge "Add some missing parameters for Monasca Notification" 2018-10-03 14:10:23 +00:00
Zuul
5d2d270eee Merge "Support deploying Monasca Notification engine" 2018-10-03 14:07:40 +00:00
Zuul
c969dac19d Merge "Support deploying Monasca Thresh" 2018-10-03 14:07:39 +00:00
Doug Szumski
2af1d1d95e Improve registration of Monasca InfluxDB database
Monasca is not yet compatible with InfluxDB > 1.1.10, which means
that the official Ansible modules for managing InfluxDB don't work [1].
We therefore fall back to manual commands to register the database
and a default retention policy.

[1] https://github.com/influxdata/influxdb-python
    #influxdb-pre-v110-users

Partially-Implements: blueprint monasca-roles
Change-Id: I59ceda1e7a6e945b13872089011045db04548b94
2018-09-26 10:54:43 +00:00
Doug Szumski
645853bce9 Add region to Monasca Log API
This is required for upcoming log query support and it also
causes an error in the Keystone middleware if it's missing.

Partially-Implements: blueprint monasca-roles
Change-Id: I2bcb32bc0c079c799d2b0e45a97b454d38896986
2018-09-26 10:54:43 +00:00
Doug Szumski
9c2e0b81d5 Support configuring Monasca Persister performance
On a single node deployment, the Monasca persister can
limit the rate at which Monasca can persist metrics to
InfluxDB. Increasing the thread count can remove this
bottle neck.

Partially-Implements: blueprint monasca-roles
Change-Id: I763a5ae6aa8c8ab3bf766ab5b58c386da74a188b
2018-09-26 10:54:43 +00:00
Doug Szumski
6b4cd657ad Add missing Monasca persister and notification dimensions
Partially-Implements: blueprint monasca-roles
Change-Id: I2fb43387bd1bc3b70f5c23d5268a7a7154ec31f0
2018-09-26 10:54:43 +00:00
Doug Szumski
fddbbbbdc4 Support deploying Monasca Persister
The Monasca Persister reads metrics from Kafka and stores them
in a configurable time series database.

Change-Id: I8166b32bfb1583098ab8318a5f38d25bddb81e89
Partially-Implements: blueprint monasca-roles
2018-09-26 10:54:43 +00:00
Doug Szumski
c502e0b17a Add some missing parameters for Monasca Notification
Partially-Implements: blueprint monasca-roles
Change-Id: I21de7748156f8d3689ebfc29f2fc4dc5f7f36ddf
2018-09-26 10:54:42 +00:00
Doug Szumski
da1fa3f578 Support deploying Monasca Notification engine
The Monasca Notification engine generates alerts such as Slack
notifications from alerts.

Change-Id: I84861d5feefe6b6f38acc4dd71e94c386d40b562
Partially-Implements: blueprint monasca-roles
2018-09-26 10:54:42 +00:00
Doug Szumski
b6cce3e3f3 Support deploying Monasca Thresh
Monasca Thresh is a Storm topology which generates alerts from
metric streams according to alarms defined via the Monasca API.

This change runs the thresholder in local mode, which means that
the log output for the topology is directed to stdout and the
topology is restarted if the container is restarted. A future
change will improve the log collection and introduce a better
way of the checking the topology is running for multi-node
clusters.

Change-Id: I063dca5eead15f3cec009df62f0fc5d857dd4bb0
Partially-Implements: blueprint monasca-roles
2018-09-26 10:54:37 +00:00
Adam Harwell
f1c8136556 Refactor haproxy config (split by service) V2.0
Having all services in one giant haproxy file makes altering
configuration for a service both painful and dangerous. Each service
should be configured with a simple set of variables and rendered with a
single unified template.

Available are two new templates:

* haproxy_single_service_listen.cfg.j2: close to the original style, but
only one service per file
* haproxy_single_service_split.cfg.j2: using the newer haproxy syntax
for separated frontend and backend

For now the default will be the single listen block, for ease of
transition.

Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
2018-09-26 03:30:38 -07:00
Zuul
921a6d8762 Merge "Support deploying Monasca Log Metrics" 2018-09-26 01:07:34 +00:00
Zuul
fdc6152508 Merge "Support configuring Monasca log pipeline performance" 2018-09-26 01:07:33 +00:00
Zuul
6a9f050025 Merge "Remove Kafka partitions config option" 2018-09-26 01:07:27 +00:00
Doug Szumski
1ae10375f7 Support deploying Monasca Log Metrics
The log metrics service generates metrics from log messages
which allows further analysis and alerting to be performed
on them. Basic configuration is provided so that metrics
are generated for high level warning logs such as error, or
warning.

Change-Id: I45cc17817c716296451f620f304c0b1108162a56
Partially-Implements: blueprint monasca-roles
2018-09-25 16:36:14 +00:00