From 473bf459647d8688b44c3245e29884358b73c6d9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 11 Dec 2020 22:33:52 +0100 Subject: [PATCH 1/6] Fix linter warning --- README.md | 8 +++----- check_process | 4 ---- issue_template.md | 4 ++-- scripts/backup | 23 ----------------------- scripts/install | 10 ++++------ scripts/remove | 4 ---- scripts/restore | 4 ++-- scripts/upgrade | 17 +++++------------ 8 files changed, 16 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index 267f015..29bf163 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Grafana app for YunoHost +# Grafana for YunoHost [![Integration level](https://dash.yunohost.org/integration/grafana.svg)](https://dash.yunohost.org/appci/app/grafana) ![](https://ci-apps.yunohost.org/ci/badges/grafana.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/grafana.maintain.svg) [![Install grafana with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=grafana) @@ -56,7 +56,7 @@ LDAP and HTTP auth are supported. #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/grafana%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/grafana/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/grafana%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/grafana/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/grafana%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/grafana/) ## Limitations @@ -79,10 +79,8 @@ None. --- -Developers info ----------------- +## Developers info -**Only if you want to use a testing branch for coding, instead of merging directly into master.** Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/grafana_ynh/tree/testing). To try the testing branch, please proceed like that. diff --git a/check_process b/check_process index b86d33e..35d5307 100644 --- a/check_process +++ b/check_process @@ -17,11 +17,8 @@ upgrade=1 from_commit=a6403c448199ec31430a3fd88c8318965e9583c4 backup_restore=1 multi_instance=0 - incorrect_path=1 port_already_use=1 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none @@ -29,4 +26,3 @@ Notification=none ; commit=a6403c448199ec31430a3fd88c8318965e9583c4 name=Fix backup/restore manifest_arg=domain=DOMAIN&path=PATH&admin=USER&admin_password=secret&language=en&is_public=1& - diff --git a/issue_template.md b/issue_template.md index c9a0368..378db3c 100644 --- a/issue_template.md +++ b/issue_template.md @@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a **How to post a meaningful bug report** 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - *Otherwise, the issue may be due to Grafana or InfluxDB themselves. Refer to its documentation or repository for help.* - *If you have a doubt, post here, we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* @@ -20,7 +20,7 @@ about: Create a report to help us debug, it would be nice to fill the template a - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* -- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* - If yes, please explain: - Using, or trying to install package version/branch: - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* diff --git a/scripts/backup b/scripts/backup index 93fdb82..8fda6ca 100644 --- a/scripts/backup +++ b/scripts/backup @@ -34,25 +34,11 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # STANDARD BACKUP STEPS #================================================= - ynh_print_info --message="Declaring files to be backed up..." -# N.B.: the following 'ynh_backup' calls are only a *declaration* of what needs -# to be backuped and not an actual copy of any file. The actual backup that -# creates and fill the archive with the files happens in the core after this -# script is called. Hence ynh_backups calls takes basically 0 seconds to run. - -#================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_print_info --message="Stopping a systemd service..." - -ynh_systemd_action --service_name="grafana-server" --action="stop" --log_path="/var/log/grafana/grafana.log" - #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info --message="Backing up configuration directories..." ynh_backup --src_path="/etc/influxdb" ynh_backup --src_path="/etc/grafana" @@ -61,7 +47,6 @@ ynh_backup --src_path="/var/lib/grafana/plugins" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -77,7 +62,6 @@ ynh_mysql_dump_db --database="$db_name" > db.sql #================================================= # SPECIFIC BACKUP #================================================= - ynh_print_info --message="Backing up the InfluxDB database..." # Backup InfluxDB data # Source: http://stackoverflow.com/questions/39501416/how-to-restore-data-base-using-influxd @@ -101,13 +85,6 @@ if [ -d "/var/lib/influxdb/data/opentsdb" ]; then fi fi -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_print_info --message="Starting a systemd service..." - -ynh_systemd_action --service_name="grafana-server" --action="start" --log_path="/var/log/grafana/grafana.log" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index e8fb2b1..c553c53 100644 --- a/scripts/install +++ b/scripts/install @@ -205,19 +205,17 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name <<< ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name <<< "INSERT INTO dashboard_version (id, dashboard_id, parent_version, restored_from, version, created, created_by, message, data) VALUES (99999, 99999, 0, 0, 1, '2020-05-16 14:36:50', 1, 'YunoHost installer', \"$escaped_dashboard\");" # Enable the systemd service so that InfluxDB and Grafana start at boot -systemctl enable influxdb.service -systemctl enable grafana-server.service +systemctl enable influxdb.service --quiet +systemctl enable grafana-server.service --quiet #================================================= # GENERIC FINALIZATION -#================================================= - #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= -yunohost service add influxdb --description "open source time series database" --log "/var/log/grafana/grafana.log" -yunohost service add grafana-server --description "open source analytics and monitoring solution" --log "/var/log/grafana/grafana.log" +yunohost service add influxdb --description="open source time series database" --log="/var/log/grafana/grafana.log" +yunohost service add grafana-server --description="open source analytics and monitoring solution" --log="/var/log/grafana/grafana.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index 12c2398..a5bed51 100644 --- a/scripts/remove +++ b/scripts/remove @@ -76,10 +76,6 @@ fi ynh_secure_remove --file="/etc/grafana/grafana.ini" -#================================================= -# GENERIC FINALIZATION -#================================================= - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index be96d42..fb4bfed 100644 --- a/scripts/restore +++ b/scripts/restore @@ -97,8 +97,8 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ # INTEGRATE SERVICE IN YUNOHOST #================================================= -yunohost service add influxdb --description "open source time series database" --log "/var/log/grafana/grafana.log" -yunohost service add grafana-server --description "open source analytics and monitoring solution" --log "/var/log/grafana/grafana.log" --timeout=600 +yunohost service add influxdb --description="open source time series database" --log="/var/log/grafana/grafana.log" +yunohost service add grafana-server --description="open source analytics and monitoring solution" --log="/var/log/grafana/grafana.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 679217b..d283cd4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,17 +65,8 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS -#================================================= - #================================================= # NGINX CONFIGURATION #================================================= @@ -150,8 +141,6 @@ EOF ynh_systemd_action --service_name=netdata --action="restart" fi - - # Update default dashboard for NetData (source: https://grafana.com/grafana/dashboards/2701) # Remove new lines tr -d '\n' < ../conf/netdata_dashboard.json > dashboard.json @@ -168,6 +157,11 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name <<< #================================================= # GENERIC FINALIZATION #================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= + +yunohost service add influxdb --description="open source time series database" --log="/var/log/grafana/grafana.log" +yunohost service add grafana-server --description="open source analytics and monitoring solution" --log="/var/log/grafana/grafana.log" #================================================= # SETUP SSOWAT @@ -188,7 +182,6 @@ ynh_script_progression --message="Restarting a systemd service..." --weight=2 ynh_systemd_action --service_name=grafana-server --action="restart" --log_path="/var/log/grafana/grafana.log" --line_match="HTTP Server Listen" --timeout=600 - #================================================= # RELOAD NGINX #================================================= From 1559fba67a09b851cbf85fdbbd4e8250c84b9bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 18 Dec 2020 12:52:22 +0100 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 29bf163..7f42f6b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Grafana for YunoHost [![Integration level](https://dash.yunohost.org/integration/grafana.svg)](https://dash.yunohost.org/appci/app/grafana) ![](https://ci-apps.yunohost.org/ci/badges/grafana.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/grafana.maintain.svg) -[![Install grafana with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=grafana) +[![Install grafana with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grafana) > *This package allows you to install grafana quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* From 4efe4e918a2d93a97a9ab3ff0350552ae176874b Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Fri, 5 Feb 2021 22:00:38 +0100 Subject: [PATCH 3/6] Upgrade to upstream version 7.4.0 --- CHANGELOG.md | 5 +++++ README.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45004a6..b4a3456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Changelog ## Unreleased - Nothing for now... +## [7.4.0~ynh1](https://github.com/YunoHost-Apps/grafana_ynh/pull/23) - 2021-02-05 + +#### Changed +* Upgrade to upstream version 7.4.0 + ## [7.3.3~ynh1](https://github.com/YunoHost-Apps/grafana_ynh/pull/22) - 2020-11-15 #### Changed diff --git a/README.md b/README.md index 7f42f6b..1589d78 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ NetData only collects, displays and sets alarms based on data from the last hour Note: You can use it without NetData, but you'll have to install a collection application (e.g. collectd) to gather data. -**Shipped version:** 7.3.3 +**Shipped version:** 7.4.0 ## Screenshots diff --git a/manifest.json b/manifest.json index 2b7be84..d5324bf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Beautiful metric & analytic dashboards for monitoring", "fr": "Tableaux de bords de supervision" }, - "version": "7.3.3~ynh1", + "version": "7.4.0~ynh1", "license": "Apache-2.0", "url": "http://grafana.org/", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 061be08..1bffec6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Debian package version for Grafana -GRAFANA_VERSION="7.3.3" +GRAFANA_VERSION="7.4.0" # dependencies used by the app pkg_dependencies="influxdb" From 01d824c45f8c6035d1b36b3888f8f0aeed6de0fa Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 7 Feb 2021 18:03:49 +0100 Subject: [PATCH 4/6] Update upgrade reference --- check_process | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 35d5307..8252236 100644 --- a/check_process +++ b/check_process @@ -14,7 +14,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=a6403c448199ec31430a3fd88c8318965e9583c4 + upgrade=1 from_commit=893b873f00c2f9793369b7cd5d034b06605aaa8a backup_restore=1 multi_instance=0 port_already_use=1 @@ -23,6 +23,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=a6403c448199ec31430a3fd88c8318965e9583c4 - name=Fix backup/restore + ; commit=893b873f00c2f9793369b7cd5d034b06605aaa8a + name=Upgrade to upstream version 7.0.0 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&admin_password=secret&language=en&is_public=1& From 0465c510558d83e225d71276738165e4cd0ba259 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 13 Feb 2021 14:08:04 +0100 Subject: [PATCH 5/6] Upgrade to upstream version 7.4.1 --- README.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1589d78..9eb4e01 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ NetData only collects, displays and sets alarms based on data from the last hour Note: You can use it without NetData, but you'll have to install a collection application (e.g. collectd) to gather data. -**Shipped version:** 7.4.0 +**Shipped version:** 7.4.1 ## Screenshots diff --git a/manifest.json b/manifest.json index d5324bf..3913136 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Beautiful metric & analytic dashboards for monitoring", "fr": "Tableaux de bords de supervision" }, - "version": "7.4.0~ynh1", + "version": "7.4.1~ynh1", "license": "Apache-2.0", "url": "http://grafana.org/", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 1bffec6..e67f973 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Debian package version for Grafana -GRAFANA_VERSION="7.4.0" +GRAFANA_VERSION="7.4.1" # dependencies used by the app pkg_dependencies="influxdb" From 43b4d8f77f997dd4c3c604e6bf037bb3ef6bd1a8 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Fri, 30 Apr 2021 18:33:16 +0200 Subject: [PATCH 6/6] Upgrade to upstream version 7.5.5 --- README.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9eb4e01..1543466 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ NetData only collects, displays and sets alarms based on data from the last hour Note: You can use it without NetData, but you'll have to install a collection application (e.g. collectd) to gather data. -**Shipped version:** 7.4.1 +**Shipped version:** 7.5.5 ## Screenshots diff --git a/manifest.json b/manifest.json index 3913136..22e8b6a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Beautiful metric & analytic dashboards for monitoring", "fr": "Tableaux de bords de supervision" }, - "version": "7.4.1~ynh1", + "version": "7.5.5~ynh1", "license": "Apache-2.0", "url": "http://grafana.org/", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index e67f973..475ee41 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # Debian package version for Grafana -GRAFANA_VERSION="7.4.1" +GRAFANA_VERSION="7.5.5" # dependencies used by the app pkg_dependencies="influxdb"