bundles/grafana: introduce, add to htz-cloud.influxdb
This commit is contained in:
parent
1a1ea721d9
commit
c548a88ee7
14 changed files with 1631 additions and 1 deletions
48
bundles/grafana/metadata.py
Normal file
48
bundles/grafana/metadata.py
Normal file
|
@ -0,0 +1,48 @@
|
|||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'grafana': {},
|
||||
},
|
||||
'repos': {
|
||||
'grafana': {
|
||||
'items': {
|
||||
'deb https://packages.grafana.com/oss/deb stable main',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'grafana': {
|
||||
'allow_anonymous': False,
|
||||
'allow_embedding': False,
|
||||
'allow_sign_up': False,
|
||||
'anonymous_org': 'public',
|
||||
'enable_smtp': True,
|
||||
'login_max_duration': '24h',
|
||||
'secret_key': repo.vault.random_bytes_as_base64_for(f'{node.name} grafana secret_key'),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nginx/vhosts/grafana',
|
||||
)
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'grafana': {
|
||||
'domain': metadata.get('grafana/domain'),
|
||||
'proxy': {
|
||||
'/': {
|
||||
'target': 'http://127.0.0.1:21010',
|
||||
},
|
||||
},
|
||||
'website_check_path': '/login',
|
||||
'website_check_string': 'Grafana',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue