Skip to content
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

👽 Use OpenShift Grafana image; use v3.11 OCP tag #82

Merged
merged 5 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ ICAgICAgIAo="
COPY playbooks /opt/apb/actions
COPY roles /opt/ansible/roles
COPY vars /opt/ansible/vars
RUN yum install epel-release -y && yum install jq -y
RUN chmod -R g=u /opt/{ansible,apb}
USER apb
6 changes: 3 additions & 3 deletions roles/bind-metrics-apb/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Annotate the mobile client
- name: Get metrics service instance name
shell: oc get serviceinstances -n {{ namespace }} -o json | jq '.items[] | select(.spec.externalID=="{{ _apb_service_instance_id }}") | .metadata.name' | cut -f2 -d'"'
shell: oc get serviceinstances -n {{ namespace }} -o jsonpath='{.items[?(@.spec.externalID=="{{ _apb_service_instance_id }}")].metadata.name}'
register: metrics_si_name

- set_fact:
Expand All @@ -32,7 +32,7 @@
- set_fact:
metricsEndpointAnnotation: "org.aerogear.binding.{{ metricsInstanceName }}/metrics_endpoint"
grafanaUrlAnnotation: "org.aerogear.binding.{{ metricsInstanceName }}/grafana_url"

- name: Annotate client {{ CLIENT_ID }}
shell: 'oc annotate mobileclient {{ CLIENT_ID }} {{ item }} --overwrite=true -n {{ namespace }}'
ignore_errors: yes
Expand All @@ -54,4 +54,4 @@
- { name: clientId, value: '{{ CLIENT_ID }}' }
- { name: metricsInstanceName, value: '{{ metricsInstanceName }}' }
when: not encode_asb_binding
no_log: yes
no_log: yes
10 changes: 5 additions & 5 deletions roles/provision-metrics-apb/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Prometheus Values
prometheus_image: "registry.access.redhat.com/openshift3/prometheus"
prometheus_version: "v3.9"
prometheus_version: "v3.11"
prometheus_port: 9090
prometheus_proxy_port: 4180

# Grafana values
grafana_image: "docker.io/aerogear/grafana"
grafana_version: "v5.0.0-pre1"
grafana_image: "registry.access.redhat.com/openshift3/grafana"
grafana_version: "v3.11"
grafana_port: 3000
grafana_proxy_port: 4181
grafana_log_level: debug
Expand All @@ -26,5 +26,5 @@ postgres_password: "{{ POSTGRES_PASSWORD | default(lookup('password', '/tmp/pass
postgres_database: "aerogear_mobile_metrics"

# OAuth Proxy values
proxy_image: "docker.io/openshift/oauth-proxy"
proxy_version: "v1.1.0"
proxy_image: "registry.access.redhat.com/openshift3/oauth-proxy"
proxy_version: "v3.11"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
node_modules
npm-debug.log
coverage/
.aws-config.json
awsconfig
/emails/dist
/public_gen
/tmp
vendor/phantomjs/phantomjs

docs/AWS_S3_BUCKET
docs/GIT_BRANCH
docs/VERSION
docs/GITCOMMIT
docs/changed-files
docs/changed-files

# locally required config files
public/css/*.min.css

# Editor junk
*.sublime-workspace
*.swp
.idea/
*.iml

/data/*
/bin/*

conf/custom.ini
fig.yml
profile.cov
grafana
.notouch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module.exports = function(grunt) {

require('load-grunt-tasks')(grunt);

grunt.loadNpmTasks('grunt-execute');
grunt.loadNpmTasks('grunt-contrib-clean');

grunt.initConfig({

clean: ["dist"],

copy: {
src_to_dist: {
cwd: 'src',
expand: true,
src: ['**/*', '**/*.js', '!**/*.scss'],
dest: 'dist'
},
img_to_dist: {
cwd: 'src',
expand: true,
src: ['img/*'],
dest: 'dist/src/'
},
pluginDef: {
expand: true,
src: [ 'plugin.json', 'README.md' ],
dest: 'dist',
}
},

watch: {
rebuild_all: {
files: ['src/**/*', 'plugin.json'],
tasks: ['default'],
options: {spawn: false}
},
},

babel: {
options: {
sourceMap: true,
presets: ["es2015"],
plugins: ['transform-es2015-modules-systemjs', "transform-es2015-for-of"],
},
dist: {
files: [{
cwd: 'src',
expand: true,
src: ['*.js'],
dest: 'dist',
ext:'.js'
}]
},
},

});

grunt.registerTask('default', ['clean', 'copy:src_to_dist', 'copy:img_to_dist', 'copy:pluginDef', 'babel']);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Grafana

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Use the new grafana-cli tool to install piechart-panel from the commandline:

```
grafana-cli plugins install grafana-piechart-panel
```

The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins if you installed the grafana package.

More instructions on the cli tool can be found [here](http://docs.grafana.org/v3.0/plugins/installation/).

You need the lastest grafana build for Grafana 3.0 to enable plugin support. You can get it here : http://grafana.org/download/builds.html

## Alternative installation method

It is also possible to clone this repo directly into your plugins directory.

Afterwards restart grafana-server and the plugin should be automatically detected and used.

```
git clone https://github.com/grafana/piechart-panel.git
sudo service grafana-server restart
```


## Clone into a directory of your choice

If the plugin is cloned to a directory that is not the default plugins directory then you need to edit your grafana.ini config file (Default location is at /etc/grafana/grafana.ini) and add this:

```ini
[plugin.piechart]
path = /home/your/clone/dir/piechart-panel
```

Note that if you clone it into the grafana plugins directory you do not need to add the above config option. That is only
if you want to place the plugin in a directory outside the standard plugins directory. Be aware that grafana-server
needs read access to the directory.

# Changelog

## 1.3.3

* Fix legend sorting: [#145](https://github.com/grafana/piechart-panel/issues/145)

## 1.3.2

* Automatically set legend width if Internet Explorer 11 and positioned to the right: [#148](https://github.com/grafana/piechart-panel/issues/148)

## 1.3.1

* Fix scrolling and legend issues in Internet Explorer 11: [#143](https://github.com/grafana/piechart-panel/issues/143)

## 1.3.0

* Fixes for legend and piechart rendering and sorting: [#138](https://github.com/grafana/piechart-panel/pull/138), [#136](https://github.com/grafana/piechart-panel/pull/136)
* Fix for decimal field for percentages [#108](https://github.com/grafana/piechart-panel/pull/108)

## 1.1.5

* Fix for color picker in legend
* Fix for - [Values in legend are displayed raw, not with the correct unit](https://github.com/grafana/piechart-panel/issues/51). Thanks, [@conet](https://github.com/conet)
* Fix for - [Legend overlaps with graphs](https://github.com/grafana/piechart-panel/issues/34). Thanks, [@smalik03](https://github.com/smalik03)

## 1.1.4
* Add support for combining small slices (https://github.com/grafana/piechart-panel/pull/43)
* Add option to show percentage in legend https://github.com/grafana/piechart-panel/pull/41

## 1.0.2

* Add piechart piece divider setting
* Remove Unused code
* Adds fontsize option for labels on graph
* Only show the displaied piechart value in legend
* Add possibility to pick stat to use for piechart

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Use the new grafana-cli tool to install piechart-panel from the commandline:

```
grafana-cli plugins install grafana-piechart-panel
```

The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins if you installed the grafana package.

More instructions on the cli tool can be found [here](http://docs.grafana.org/v3.0/plugins/installation/).

You need the lastest grafana build for Grafana 3.0 to enable plugin support. You can get it here : http://grafana.org/download/builds.html

## Alternative installation method

It is also possible to clone this repo directly into your plugins directory.

Afterwards restart grafana-server and the plugin should be automatically detected and used.

```
git clone https://github.com/grafana/piechart-panel.git
sudo service grafana-server restart
```


## Clone into a directory of your choice

If the plugin is cloned to a directory that is not the default plugins directory then you need to edit your grafana.ini config file (Default location is at /etc/grafana/grafana.ini) and add this:

```ini
[plugin.piechart]
path = /home/your/clone/dir/piechart-panel
```

Note that if you clone it into the grafana plugins directory you do not need to add the above config option. That is only
if you want to place the plugin in a directory outside the standard plugins directory. Be aware that grafana-server
needs read access to the directory.

# Changelog

## 1.3.3

* Fix legend sorting: [#145](https://github.com/grafana/piechart-panel/issues/145)

## 1.3.2

* Automatically set legend width if Internet Explorer 11 and positioned to the right: [#148](https://github.com/grafana/piechart-panel/issues/148)

## 1.3.1

* Fix scrolling and legend issues in Internet Explorer 11: [#143](https://github.com/grafana/piechart-panel/issues/143)

## 1.3.0

* Fixes for legend and piechart rendering and sorting: [#138](https://github.com/grafana/piechart-panel/pull/138), [#136](https://github.com/grafana/piechart-panel/pull/136)
* Fix for decimal field for percentages [#108](https://github.com/grafana/piechart-panel/pull/108)

## 1.1.5

* Fix for color picker in legend
* Fix for - [Values in legend are displayed raw, not with the correct unit](https://github.com/grafana/piechart-panel/issues/51). Thanks, [@conet](https://github.com/conet)
* Fix for - [Legend overlaps with graphs](https://github.com/grafana/piechart-panel/issues/34). Thanks, [@smalik03](https://github.com/smalik03)

## 1.1.4
* Add support for combining small slices (https://github.com/grafana/piechart-panel/pull/43)
* Add option to show percentage in legend https://github.com/grafana/piechart-panel/pull/41

## 1.0.2

* Add piechart piece divider setting
* Remove Unused code
* Adds fontsize option for labels on graph
* Only show the displaied piechart value in legend
* Add possibility to pick stat to use for piechart

Loading