forked from crowbar/crowbar-openstack
-
Notifications
You must be signed in to change notification settings - Fork 2
Add ha to monasca barclamp #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
samirjorina
wants to merge
52
commits into
FujitsuEnablingSoftwareTechnologyGmbH:monasca
Choose a base branch
from
samirjorina:monasca_ha
base: monasca
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
215d473
Removed monasca-api role.
jgrassler aee8cc8
Added up-to-date WSGI plumbing.
jgrassler 0a93eaf
Addressed Hound comments.
jgrassler 8259246
Fix barbican schema template
samirjorina 5cc52d8
Install monasca-ui horizon plugin
samirjorina 64aa8db
Initial commit for the log-agent
f55cf0c
Use dedicated users for monasca-log-agent (#11)
kornicameister 0d1e839
Configure monasca-ui plugin (#6)
samirjorina e6f98fd
Add monitoring dashboards to Grafana
samirjorina aa7e75a
Provide Ansible integration
samirjorina 627c85e
Add missing end keyword (#16)
samirjorina 212f93f
Fix json indentation (#17)
matrixik f3fc36e
Update monasca-agent cookbook and barclamp (#2)
matrixik ab4155d
Disable systemd service file creation (#19)
fd69cc7
Fix invalid files location
samirjorina 94318dc
Get proper log-api url for monasca-log-agent (#18)
matrixik 8df9f37
Finish integration of Ansible installer (#15)
samirjorina f261fe7
Use sudo for running monasca-reconfigure (#21)
matrixik 4c74e9c
Remove default grafana config file (#22)
samirjorina eff582f
Fix monasca-log-agent rpm name (#24)
matrixik 6db37e5
Fix suse (#23)
samirjorina fd75ed6
Remove unused group (#27)
artur-ba 42226be
Disable deprecation_warnings for Ansible (#34)
matrixik ff3039e
Agent log dir (#33)
samirjorina f6d3d86
Configure agent service name for monasca setup (#32)
samirjorina 1b22220
Address review comments (#35)
samirjorina 4ce3587
Fix agent config (#31)
samirjorina 2a7c7bb
Remove offline resources (#36)
artur-ba 3aad3a2
Run monasca-reconfigure only when the file changes (#38)
matrixik 01f59d9
Replace all cmm occurrences with monasca (#37)
matrixik b6190bd
Use node_search_with_cache method (#39)
artur-ba 90525b8
Log agent config (#40)
samirjorina e30910e
Start and enable agents after installation
samirjorina e86104e
Add ha to monasca barclamp
samirjorina 86db54b
Update HA for monasca barclamp with all services
matrixik c25f22e
Uncomment code for cluster validation
matrixik a3ab6a1
Address Hound comments
matrixik b5152f5
Add influxdb relay config
matrixik e924c71
Address hound comments
matrixik 5f1ba3a
Add frontend for InfluxDB
matrixik 730fc30
Fix getting port for api and log-api servers
matrixik df30921
Fix loadbalancer for influx parts
matrixik a4debf5
Remove including HA from role_monasca_master
matrixik df0b813
Add more config options for HAProxy
matrixik d5bf677
Remove unnecessary configuration
matrixik 5410607
Update hosts-cluster with proper virtual IP
matrixik f54d467
Use only admin and public networks
matrixik 67dae9e
Use different ports for services running behind HAProxy
matrixik 6a9528e
Use proper influxdb ports in cluster
matrixik daed0a3
Remove haproxy and keepalived hosts from hosts-cluster
matrixik 0d68a01
Add more helpers
matrixik 1c56481
Fix setting proper ports in cluster
matrixik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4,751 changes: 4,751 additions & 0 deletions
4,751
chef/cookbooks/horizon/files/default/grafana-monasca.json
Large diffs are not rendered by default.
Oops, something went wrong.
847 changes: 847 additions & 0 deletions
847
chef/cookbooks/horizon/files/default/grafana-openstack.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright 2016 SUSE Linux GmbH | ||
| # | ||
| # 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. | ||
|
|
||
| module MonascaUiHelper | ||
| def self.monasca_public_host(node) | ||
| ha_enabled = node[:monasca][:ha][:enabled] | ||
| ssl_enabled = node[:monasca][:api][:ssl] | ||
| CrowbarHelper.get_host_for_public_url(node, ssl_enabled, ha_enabled) | ||
| end | ||
|
|
||
| def self.api_public_url(node) | ||
| host = monasca_public_host(node) | ||
| # SSL is not supported at this moment | ||
| # protocol = node[:monasca][:api][:ssl] ? "https" : "http" | ||
| protocol = "http" | ||
| port = node[:monasca][:api][:bind_port] | ||
| "#{protocol}://#{host}:#{port}/v2.0" | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Copyright 2016 SUSE Linux GmbH | ||
| # | ||
| # 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. | ||
|
|
||
| monasca_server = node_search_with_cache("roles:monasca-server").first | ||
| if monasca_server.nil? | ||
| Chef::Log.warn("No monasca-server found.") | ||
| return | ||
| end | ||
|
|
||
| template "/srv/www/openstack-dashboard/openstack_dashboard/"\ | ||
| "local/local_settings.d/_80_monasca_ui_settings.py" do | ||
| source "_80_monasca_ui_settings.py.erb" | ||
| variables( | ||
| kibana_enabled: true, | ||
| kibana_host: MonascaUiHelper.monasca_public_host(monasca_server) | ||
| ) | ||
| owner "root" | ||
| group "root" | ||
| mode "0644" | ||
| notifies :reload, resources(service: "apache2") | ||
| end | ||
|
|
||
| package "grafana-apache" do | ||
| action :install | ||
| notifies :reload, resources(service: "apache2") | ||
| end | ||
|
|
||
| file "/etc/apache2/vhosts.d/grafana.conf" do | ||
| action :delete | ||
| notifies :reload, resources(service: "apache2") | ||
| end | ||
|
|
||
| template "/srv/www/grafana/config.js" do | ||
| source "grafana-config.js" | ||
| variables( | ||
| api_url: MonascaUiHelper.api_public_url(monasca_server) | ||
| ) | ||
| owner "root" | ||
| group "www" | ||
| mode "0644" | ||
| notifies :reload, resources(service: "apache2") | ||
| end | ||
|
|
||
| cookbook_file "/srv/www/grafana/app/dashboards/openstack.json" do | ||
| source "grafana-openstack.json" | ||
| owner "root" | ||
| group "root" | ||
| mode "0644" | ||
| notifies :reload, resources(service: "apache2") | ||
| end | ||
|
|
||
| cookbook_file "/srv/www/grafana/app/dashboards/monasca.json" do | ||
| source "grafana-monasca.json" | ||
| owner "root" | ||
| group "root" | ||
| mode "0644" | ||
| notifies :reload, resources(service: "apache2") | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
chef/cookbooks/horizon/templates/default/_80_monasca_ui_settings.py.erb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Copyright 2016 SUSE Linux GmbH | ||
| # | ||
| # 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. | ||
|
|
||
| from django.conf import settings | ||
| from django.utils.translation import ugettext_lazy as _ | ||
|
|
||
| # Services being monitored | ||
| MONITORING_SERVICES = getattr( | ||
| settings, | ||
| 'MONITORING_SERVICES', | ||
| [ | ||
| {'name': _('OpenStack Services'), | ||
| 'groupBy': 'service'}, | ||
| {'name': _('Servers'), | ||
| 'groupBy': 'hostname'}, | ||
| {'name': _('Log Paths'), | ||
| 'groupBy': 'path'} | ||
| ] | ||
| ) | ||
|
|
||
| MONITORING_SERVICE_TYPE = getattr( | ||
| settings, 'MONITORING_SERVICE_TYPE', 'monitoring' | ||
| ) | ||
|
|
||
|
|
||
| # Grafana button titles/file names (global across all projects): | ||
| GRAFANA_LINKS = [ | ||
| {'title': 'Dashboard', 'fileName': 'openstack.json'}, | ||
| {'title': 'Monasca Health', 'fileName': 'monasca.json'} | ||
| ] | ||
|
|
||
| DEFAULT_LINKS = GRAFANA_LINKS | ||
| DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS) | ||
|
|
||
| # | ||
| # Per project grafana button titles/file names. If in this form, | ||
| # '*' will be applied to all projects not explicitly listed. | ||
| # | ||
| # Note the above form (flat) is supported for backward compatibility. | ||
| # | ||
| #GRAFANA_LINKS = [ | ||
| # {'admin': [ | ||
| # {'title': 'Dashboard', 'fileName': 'openstack.json'}, | ||
| # {'title': 'RabbitMQ', 'fileName': 'rabbit.json'}, | ||
| # {'title': 'Project Utilization', 'fileName': 'libvirt.json'}]}, | ||
| # {'*': [ | ||
| # {'title': 'OpenStack Dashboard', 'fileName': 'project.json'}, | ||
| # {'title': 'Add New Dashboard', 'fileName': 'empty.json'}]} | ||
| #] | ||
|
|
||
| ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', <%= @kibana_enabled ? "True" : "False" %>) | ||
| # TODO: this needs to be fixed for clustered deployment | ||
| KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://<%= @kibana_host %>:5601/') | ||
|
|
||
| OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False) | ||
| OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None) | ||
| OPENSTACK_ENDPOINT_TYPE="publicURL" |
48 changes: 48 additions & 0 deletions
48
chef/cookbooks/horizon/templates/default/grafana-config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| define(['settings'], | ||
| function (Settings) { | ||
| "use strict"; | ||
|
|
||
| return new Settings({ | ||
|
|
||
| datasources: { | ||
| mon: { | ||
| type: 'mon', | ||
| url: "<%= @api_url %>", | ||
| default: true, | ||
| grafanaDB: true | ||
| } | ||
| }, | ||
|
|
||
| /* Global configuration options | ||
| * ======================================================== | ||
| */ | ||
|
|
||
| // specify the limit for dashboard search results | ||
| search: { | ||
| max_results: 20 | ||
| }, | ||
|
|
||
| // default start dashboard | ||
| default_route: '/file/default.json', | ||
|
|
||
| // set to false to disable unsaved changes warning | ||
| unsaved_changes_warning: true, | ||
|
|
||
| // set the default timespan for the playlist feature | ||
| // Example: "1m", "1h" | ||
| playlist_timespan: "1m", | ||
|
|
||
| // If you want to specify password before saving, please specify it bellow | ||
| // The purpose of this password is not security, but to stop some users from accidentally changing dashboards | ||
| admin: { | ||
| password: '' | ||
| }, | ||
|
|
||
| // Add your own custom pannels | ||
| plugins: { | ||
| panels: [] | ||
| } | ||
|
|
||
| }); | ||
| }); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember in the future to change this port to InfluxDB Relay port
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added InfluxDB Relay port but need to learn how to use
frontendandbackendHAProxy configuration with barclamps. For now addedFIXMEcomments in code.