forked from percona/grafana-dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 899 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export IMPORT_DASH_HOST = http://127.0.0.1:3000
export IMPORT_DASH_USERNAME = admin
export IMPORT_DASH_PASSWORD = admin
all: build pack disable install enable
tput bel
build:
cd pmm-app && npm run build && cd ..
pack:
tar czf pmm-app.tar.gz pmm-app
install:
docker exec pmm-server supervisorctl stop grafana
docker exec pmm-server bash -c 'rm -rf /var/lib/grafana/plugins/pmm-*'
docker cp pmm-app.tar.gz pmm-server:/var/lib/grafana/plugins/
docker exec pmm-server bash -c 'cd /var/lib/grafana/plugins/ && tar xzf pmm-app.tar.gz'
docker exec pmm-server supervisorctl start grafana
disable:
curl -X POST 'http://admin:admin@localhost/graph/api/plugins/pmm-app/settings' -d 'enabled=false'
enable:
curl -X POST --retry-delay 5 --retry 5 'http://admin:admin@localhost/graph/api/plugins/pmm-app/settings' -d 'enabled=true'
test: pack disable install enable
clean:
rm -r pmm-app/dist/