|
|
@@ -23,41 +23,36 @@ requiresJsonnet() {
|
|
|
}
|
|
|
|
|
|
defaultDashboards() {
|
|
|
- requiresJsonnet
|
|
|
-
|
|
|
- ln -s -f -r ./dashboards/dev-dashboards/dev-dashboards.yaml ../conf/provisioning/dashboards/custom.yaml
|
|
|
+ ln -s -f ../../../devenv/dashboards.yaml ../conf/provisioning/dashboards/dev.yaml
|
|
|
}
|
|
|
|
|
|
defaultDatasources() {
|
|
|
echo "setting up all default datasources using provisioning"
|
|
|
|
|
|
- ln -s -f -r ./datasources/default/default.yaml ../conf/provisioning/datasources/custom.yaml
|
|
|
+ ln -s -f ../../../devenv/datasources.yaml ../conf/provisioning/datasources/dev.yaml
|
|
|
}
|
|
|
|
|
|
usage() {
|
|
|
- echo -e "install.sh\n\tThis script installs my basic setup for a debian laptop\n"
|
|
|
+ echo -e "install.sh\n\tThis script setups dev provision for datasources and dashboards"
|
|
|
echo "Usage:"
|
|
|
echo " bulk-dashboards - create and provisioning 400 dashboards"
|
|
|
- echo " default-datasources - provisiong all core datasources"
|
|
|
+ echo " no args - provisiong core datasources and dev dashboards"
|
|
|
}
|
|
|
|
|
|
main() {
|
|
|
local cmd=$1
|
|
|
|
|
|
- if [[ -z "$cmd" ]]; then
|
|
|
- usage
|
|
|
- exit 1
|
|
|
- fi
|
|
|
-
|
|
|
if [[ $cmd == "bulk-dashboards" ]]; then
|
|
|
bulkDashboard
|
|
|
- elif [[ $cmd == "default-datasources" ]]; then
|
|
|
- defaultDatasources
|
|
|
- elif [[ $cmd == "default-dashboards" ]]; then
|
|
|
- defaultDashboards
|
|
|
else
|
|
|
+ defaultDashboards
|
|
|
+ defaultDatasources
|
|
|
+ fi
|
|
|
+
|
|
|
+ if [[ -z "$cmd" ]]; then
|
|
|
usage
|
|
|
fi
|
|
|
+
|
|
|
}
|
|
|
|
|
|
main "$@"
|