-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc32c3b
commit e5d196a
Showing
10 changed files
with
4,833 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -8,3 +8,9 @@ dist/ | |
dist-image/ | ||
out/ | ||
sysdig/ | ||
|
||
# Local data | ||
grafana-data-*/ | ||
|
||
# IDE settings | ||
.idea/ |
This file contains 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 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
0.10 | ||
0.11 | ||
|
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
7.0.0 | ||
8.5.5 |
This file contains 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,50 @@ | ||
#!/bin/bash | ||
|
||
setup_env() { | ||
echo "Prepare environment..." | ||
|
||
GRAFANA_VERSION=`cat VERSION_GRAFANA` | ||
|
||
DIST_PATH="dist" | ||
|
||
PLUGIN_DIR="grafana-data-${GRAFANA_VERSION}/plugins" | ||
|
||
USER_ID=$(id -u) | ||
|
||
# Disabling interactive progress bar, and spinners gains 2x performances | ||
# as stated on https://twitter.com/gavinjoyce/status/691773956144119808 | ||
npm config set progress false | ||
npm config set spin false | ||
} | ||
|
||
start() { | ||
echo "Cleaning up..." | ||
|
||
rm -rf ${PLUGIN_DIR} | ||
docker stop grafana-dev > /dev/null || true | ||
docker rm grafana-dev > /dev/null || true | ||
|
||
echo "Building..." | ||
|
||
npm run build | ||
|
||
mkdir -p ${PLUGIN_DIR}/sysdig | ||
|
||
cp -R ${DIST_PATH}/. ${PLUGIN_DIR}/sysdig | ||
rm -rf ${PLUGIN_DIR}/sysdig/test | ||
|
||
echo "Build complete." | ||
|
||
echo "Starting Grafana ${GRAFANA_VERSION} docker container with Sysdig plugin..." | ||
|
||
mkdir -p grafana-data-${GRAFANA_VERSION} | ||
|
||
docker run -p 3000:3000 --user $USER_ID -v "${PWD}/grafana-data-${GRAFANA_VERSION}:/var/lib/grafana" \ | ||
-e GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=sysdig \ | ||
--rm grafana/grafana:${GRAFANA_VERSION} | ||
|
||
} | ||
|
||
set -ex | ||
setup_env | ||
start |
This file contains 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 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 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 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.