This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 427
Extend Functionality of Grafana Package #2098
Open
cbakersdl
wants to merge
17
commits into
d2iq-archive:version-3.x
Choose a base branch
from
cbakersdl:version-3.x
base: version-3.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
db0fbd0
Extending functionality of Grafana package.
cnbaker 22a8f5f
pare-down config.json base64 configuration files. move svc.yml.
cbakersdl 7a0540c
add PATH type to volume options
cbakersdl 0a41e89
Make root default user so volume can be created
cbakersdl b120ecc
Fix minDcosReleaseVersion, remove unnecessary env var.
cbakersdl 48185a1
Merge branch 'version-3.x' of https://github.com/mesosphere/universe …
cbakersdl ebc4281
Fix broken screenshot url.
cbakersdl c6c8081
changes requested by @vishnu2kmohan for pull/2098
cbakersdl be031ea
Merge branch 'version-3.x' of https://github.com/mesosphere/universe …
cbakersdl e1502d2
Merge branch 'version-3.x' of https://github.com/mesosphere/universe …
cbakersdl c54fc44
Added env variables for Graphite
6c12085
Merge branch 'version-3.x' of github.com:cbakersdl/universe into vers…
cbakersdl 50bc937
Upgrade Grafana to 6.4.1
cbakersdl 5ecdc56
Revert "Upgrade Grafana to 6.4.1"
cbakersdl 6666f4c
Revert "Merge branch 'version-3.x' of github.com:cbakersdl/universe i…
cbakersdl 43e8231
Revert "Revert "Merge branch 'version-3.x' of github.com:cbakersdl/un…
cbakersdl 2a1c9f5
Revert "Revert "Upgrade Grafana to 6.4.1""
cbakersdl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,142 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"service": { | ||
"type": "object", | ||
"description": "DC/OS service configuration properties", | ||
"properties": { | ||
"name": { | ||
"description": "The name of the service instance", | ||
"type": "string", | ||
"default": "grafana", | ||
"title": "Service name" | ||
}, | ||
"user": { | ||
"description": "The user that the service will run as.", | ||
"type": "string", | ||
"default": "root", | ||
"title": "User" | ||
}, | ||
"service_account": { | ||
"description": "The service account for DC/OS service authentication. This is typically left empty to use the default unless service authentication is needed. The value given here is passed as the principal of Mesos framework.", | ||
"type": "string", | ||
"default": "" | ||
}, | ||
"service_account_secret": { | ||
"description": "Name of the Secret Store credentials to use for DC/OS service authentication. This should be left empty unless service authentication is needed.", | ||
"type": "string", | ||
"default": "", | ||
"title": "Credential secret name (optional)" | ||
}, | ||
"mesos_api_version": { | ||
"description": "Configures the Mesos API version to use. Possible values: V0 (non-HTTP), V1 (HTTP)", | ||
"type": "string", | ||
"enum": [ | ||
"V0", | ||
"V1" | ||
], | ||
"default": "V1" | ||
}, | ||
"log_level": { | ||
"description": "The log level for the DC/OS service.", | ||
"type": "string", | ||
"enum": [ | ||
"OFF", | ||
"FATAL", | ||
"ERROR", | ||
"WARN", | ||
"INFO", | ||
"DEBUG", | ||
"TRACE", | ||
"ALL" | ||
], | ||
"default": "INFO" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"user" | ||
] | ||
}, | ||
"grafana": { | ||
"description": "grafana pod configuration properties", | ||
"type": "object", | ||
"properties": { | ||
"cpus": { | ||
"description": "Grafana pod CPU requirements", | ||
"type": "number", | ||
"default": 0.2 | ||
}, | ||
"mem": { | ||
"description": "Grafana pod mem requirements (in MB)", | ||
"type": "integer", | ||
"default": 2048 | ||
}, | ||
"volume": { | ||
"description": "Grafana volume requirements", | ||
"type": "object", | ||
"properties": { | ||
"path": { | ||
"description": "Location of persistent volume to store data", | ||
"type": "string", | ||
"default": "grafana-data" | ||
}, | ||
"type": { | ||
"description": "The type of persistent volume to use, one of ROOT or MOUNT", | ||
"type": "string", | ||
"default": "ROOT", | ||
"enum": [ | ||
"ROOT", | ||
"MOUNT", | ||
"PATH" | ||
] | ||
}, | ||
"size": { | ||
"description": "The size of the persistent volume in MB", | ||
"type": "integer", | ||
"default": 512, | ||
"minimum": 512 | ||
} | ||
} | ||
}, | ||
"ini": { | ||
"description": "Base64 encoded conf/grafana.ini", | ||
"type": "string", | ||
"media": { | ||
"binaryEncoding": "base64", | ||
"type": "application/x-yaml" | ||
}, | ||
"default": "YXBwX21vZGUgPSBwcm9kdWN0aW9uCmluc3RhbmNlX25hbWUgPSAke0hPU1ROQU1FfQpbcGF0aHNdCmRhdGEgPSAvZ3JhZmFuYS1kYXRhCjt0ZW1wX2RhdGFfbGlmZXRpbWUgPSAyNGgKbG9ncyA9IC9ncmFmYW5hLWRhdGEKcGx1Z2lucyA9IC9ncmFmYW5hLWRhdGEvcGx1Z2lucwpwcm92aXNpb25pbmcgPSBjb25mL3Byb3Zpc2lvbmluZwoK" | ||
}, | ||
"provisioning": { | ||
"description": "Provisioning properties to be used", | ||
"type": "object", | ||
"properties": { | ||
"datasources": { | ||
"description": "Base64 encoded conf/provisioning/datasources/datasources.yml", | ||
"type": "string", | ||
"media": { | ||
"binaryEncoding": "base64", | ||
"type": "application/x-yaml" | ||
}, | ||
"default": "YXBpVmVyc2lvbjogMQoKI2RlbGV0ZURhdGFzb3VyY2VzOgojICAtIG5hbWU6IFByb21ldGhldXMKIyAgICBvcmdJZDogMQoKI2RhdGFzb3VyY2VzOgojICAtIG5hbWU6IFByb21ldGhldXMKIyAgICB0eXBlOiBwcm9tZXRoZXVzCiMgICAgYWNjZXNzOiBwcm94eQojICAgIG9yZ0lkOiAxCiMgICAgdXJsOiBodHRwOi8vcHJvbWV0aGV1cy5wcm9tZXRoZXVzLmw0bGIudGhpc2Rjb3MuZGlyZWN0b3J5OjkwOTAKIyAgICBpc0RlZmF1bHQ6IHRydWUKIyAgICBqc29uRGF0YTogeyAidGltZUludGVydmFsIjogIjMwcyIgfQo" | ||
}, | ||
"dashboards": { | ||
"description": "Base64 encoded conf/provisioning/dashboards/dashboards.yml config", | ||
"type": "string", | ||
"media": { | ||
"binaryEncoding": "base64", | ||
"type": "application/x-yaml" | ||
}, | ||
"default": "YXBpVmVyc2lvbjogMQoK" | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"cpus", | ||
"mem" | ||
] | ||
} | ||
} | ||
} |
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,104 @@ | ||
|
||
{ | ||
"id": "{{service.name}}", | ||
"cpus": 1.0, | ||
"mem": 1024, | ||
"instances": 1, | ||
"user": "{{service.user}}", | ||
"cmd": "export LD_LIBRARY_PATH=$MESOS_SANDBOX/libmesos-bundle/lib:$LD_LIBRARY_PATH; export MESOS_NATIVE_JAVA_LIBRARY=$(ls $MESOS_SANDBOX/libmesos-bundle/lib/libmesos-*.so); export JAVA_HOME=$(ls -d $MESOS_SANDBOX/jdk*/jre/); export JAVA_HOME=${JAVA_HOME%/}; export PATH=$(ls -d $JAVA_HOME/bin):$PATH && export JAVA_OPTS=\"-Xms256M -Xmx512M -XX:-HeapDumpOnOutOfMemoryError\" && ./bootstrap -resolve=false -template=false && ./operator-scheduler/bin/operator svc.yml", | ||
"labels": { | ||
"DCOS_COMMONS_API_VERSION": "v1", | ||
"DCOS_COMMONS_UNINSTALL": "true", | ||
"DCOS_PACKAGE_FRAMEWORK_NAME": "{{service.name}}", | ||
"MARATHON_SINGLE_INSTANCE_APP": "true", | ||
"DCOS_SERVICE_NAME": "{{service.name}}", | ||
"DCOS_SERVICE_PORT_INDEX": "0", | ||
"DCOS_SERVICE_SCHEME": "http" | ||
}, | ||
{{#security.secret-name}} | ||
"container": { | ||
"type": "MESOS", | ||
"volumes":[ | ||
{ | ||
"containerPath": "secrets/service-account.json", | ||
"secret": "serviceCredential" | ||
} | ||
] | ||
}, | ||
"secrets": { | ||
"serviceCredential": { | ||
"source": "{{security.secret-name}}" | ||
} | ||
}, | ||
{{/security.secret-name}} | ||
"env": { | ||
"PACKAGE_NAME": "{{package-name}}", | ||
"PACKAGE_VERSION": "{{package-version}}", | ||
"PACKAGE_BUILD_TIME_EPOCH_MS": "1531343768523", | ||
"PACKAGE_BUILD_TIME_STR": "2018-07-11T21:16:08.523025", | ||
"FRAMEWORK_NAME": "{{service.name}}", | ||
"FRAMEWORK_USER": "{{service.user}}", | ||
"FRAMEWORK_PRINCIPAL": "{{service.service_account}}", | ||
"FRAMEWORK_LOG_LEVEL": "{{service.log_level}}", | ||
"MESOS_API_VERSION": "{{service.mesos_api_version}}", | ||
|
||
"GRAFANA_CPUS": "{{grafana.cpus}}", | ||
"GRAFANA_MEM": "{{grafana.mem}}", | ||
"GRAFANA_VOLUME": "{{grafana.volume.path}}", | ||
"GRAFANA_VOLUME_TYPE": "{{grafana.volume.type}}", | ||
"GRAFANA_VOLUME_SIZE": "{{grafana.volume.size}}", | ||
"GRAFANA_INI": "{{grafana.ini}}", | ||
"GRAFANA_DSP": "{{grafana.provisioning.datasources}}", | ||
"GRAFANA_DBP": "{{grafana.provisioning.dashboards}}", | ||
|
||
"NODE_COUNT": "{{node.count}}", | ||
"NODE_PLACEMENT": "{{{node.placement_constraint}}}", | ||
|
||
"NODE_CPUS": "{{node.cpus}}", | ||
"NODE_MEM": "{{node.mem}}", | ||
"NODE_DISK": "{{node.disk}}", | ||
"NODE_DISK_TYPE": "{{node.disk_type}}", | ||
|
||
"JAVA_URI": "{{resource.assets.uris.jre-tar-gz}}", | ||
"EXECUTOR_URI": "{{resource.assets.uris.executor-zip}}", | ||
"BOOTSTRAP_URI": "{{resource.assets.uris.bootstrap-zip}}", | ||
"GRAFANA_URI": "{{resource.assets.uris.grafana-tar-gz}}", | ||
{{#security.secret-name}} | ||
"DCOS_SERVICE_ACCOUNT_CREDENTIAL": "secrets/service-account.json", | ||
"MESOS_MODULES": "{\"libraries\":[{\"file\":\"libmesos-bundle\/lib\/mesos\/libdcos_security.so\",\"modules\":[{\"name\": \"com_mesosphere_dcos_ClassicRPCAuthenticatee\"},{\"name\":\"com_mesosphere_dcos_http_Authenticatee\",\"parameters\":[{\"key\":\"jwt_exp_timeout\",\"value\":\"5mins\"},{\"key\":\"preemptive_refresh_duration\",\"value\":\"30mins\"}]}]}]}", | ||
"MESOS_AUTHENTICATEE": "com_mesosphere_dcos_ClassicRPCAuthenticatee", | ||
"MESOS_HTTP_AUTHENTICATEE": "com_mesosphere_dcos_http_Authenticatee", | ||
{{/security.secret-name}} | ||
"LIBMESOS_URI": "{{resource.assets.uris.libmesos-bundle-tar-gz}}" | ||
}, | ||
"uris": [ | ||
"{{resource.assets.uris.bootstrap-zip}}", | ||
"{{resource.assets.uris.jre-tar-gz}}", | ||
"{{resource.assets.uris.scheduler-zip}}", | ||
"{{resource.assets.uris.libmesos-bundle-tar-gz}}", | ||
"{{resource.assets.uris.svc}}" | ||
], | ||
"upgradeStrategy":{ | ||
"minimumHealthCapacity": 0, | ||
"maximumOverCapacity": 0 | ||
}, | ||
"healthChecks": [ | ||
{ | ||
"protocol": "MESOS_HTTP", | ||
"path": "/v1/health", | ||
"gracePeriodSeconds": 900, | ||
"intervalSeconds": 30, | ||
"portIndex": 0, | ||
"timeoutSeconds": 30, | ||
"maxConsecutiveFailures": 0 | ||
} | ||
], | ||
"portDefinitions": [ | ||
{ | ||
"port": 0, | ||
"protocol": "tcp", | ||
"name": "api", | ||
"labels": { "VIP_0": "/api.{{service.name}}:80" } | ||
} | ||
] | ||
} |
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,23 @@ | ||
{ | ||
"packagingVersion": "4.0", | ||
"upgradesFrom": [ | ||
"*" | ||
], | ||
"downgradesTo": [ | ||
"*" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be the previous package version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just copied this from 6/package.json. Should I change it to 3.0? |
||
], | ||
"minDcosReleaseVersion": "1.11", | ||
"name": "grafana", | ||
"version": "5.5.0-5.3.4", | ||
"maintainer": "https://dcos.io/community", | ||
"description": "Grafana on DC/OS", | ||
"selected": false, | ||
"framework": true, | ||
"tags": [ | ||
"grafana", | ||
"monitoring", | ||
"visualization" | ||
], | ||
"postInstallNotes": "DC/OS Grafana is being installed!", | ||
"postUninstallNotes": "DC/OS Grafana is being uninstalled." | ||
} |
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,62 @@ | ||
{ | ||
"assets": { | ||
"uris": { | ||
"jre-tar-gz": "https://downloads.mesosphere.com/java/server-jre-8u192-linux-x64.tar.gz", | ||
"libmesos-bundle-tar-gz": "https://downloads.mesosphere.com/libmesos-bundle/libmesos-bundle-1.12.0.tar.gz", | ||
"bootstrap-zip": "http://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/bootstrap.zip", | ||
"executor-zip": "http://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/executor.zip", | ||
"scheduler-zip": "https://s3-us-west-1.amazonaws.com/mbgl-bucket/sdk/0.42.1/operator-scheduler.zip", | ||
"svc": "https://s3-us-west-2.amazonaws.com/dcos-objects/grafana/7/svc.yml", | ||
"grafana-tar-gz": "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.3.4.linux-amd64.tar.gz" | ||
} | ||
}, | ||
"images": { | ||
"icon-small": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-small.png", | ||
"icon-medium": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-medium.png", | ||
"icon-large": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-large.png", | ||
"screenshots": [ | ||
"https://prometheus.io/assets/grafana_prometheus.png", | ||
"https://grafana.com/blog/img/docs/v45/query_inspector.png" | ||
] | ||
}, | ||
"cli": { | ||
"binaries": { | ||
"darwin": { | ||
"x86-64": { | ||
"contentHash": [ | ||
{ | ||
"algo": "sha256", | ||
"value": "c459d2109b31fc0b423f8cacd49df855ef898e63609f7050957f4a0e044d5432" | ||
} | ||
], | ||
"kind": "executable", | ||
"url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli-darwin" | ||
} | ||
}, | ||
"linux": { | ||
"x86-64": { | ||
"contentHash": [ | ||
{ | ||
"algo": "sha256", | ||
"value": "e580ee8b71c0c26b1a1a605ca09cbd3528a2c031a8de11519024ccbbce862339" | ||
} | ||
], | ||
"kind": "executable", | ||
"url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli-linux" | ||
} | ||
}, | ||
"windows": { | ||
"x86-64": { | ||
"contentHash": [ | ||
{ | ||
"algo": "sha256", | ||
"value": "9135f9456a40cd53e27e73e44fc94c1d4cbf27d9b59f2b47d82bad3ae0f8c714" | ||
} | ||
], | ||
"kind": "executable", | ||
"url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli.exe" | ||
} | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be the previous package version?