Skip to content

Commit

Permalink
update: add timescale datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Oct 11, 2024
1 parent d7ca92d commit 482eccf
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions imageroot/update-module.d/10allocate_ports
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,23 @@ with open('db.env', 'w') as db_fp:
db_fp.write(f"POSTGRES_PORT={db_port}\n")
db_fp.write(f"POSTGRES_PASSWORD={db_secret}\n")
db_fp.write(f"GRAFANA_POSTGRES_PASSWORD={grafana_postgres_password}\n")
db_fp.write(f"REPORT_DB_URI=postgres://report:{db_secret}@127.0.0.1:{db_port}/report")
db_fp.write(f"TS_TUNE_MAX_BG_WORKERS=100")
db_fp.write(f"REPORT_DB_URI=postgres://report:{db_secret}@127.0.0.1:{db_port}/report\n")
db_fp.write(f"TS_TUNE_MAX_BG_WORKERS=100")

with open('grafana.yml', 'a') as fp:
fp.write(' - name: Local Timescale\n')
fp.write(' type: postgres\n')
fp.write(' uid: timescale\n')
fp.write(f' url: 127.0.0.1:{db_port}\n')
fp.write(f' user: grafana\n')
fp.write(' secureJsonData:\n')
fp.write(f' password: {grafana_postgres_password}\n')
fp.write(' jsonData:\n')
fp.write(' database: report\n')
fp.write(' sslmode: disable\n')
fp.write(' maxOpenConns: 100\n')
fp.write(' maxIdleConns: 100\n')
fp.write(' maxIdleConnsAuto: true\n')
fp.write(' connMaxLifetime: 14400\n')
fp.write(' postgresVersion: 1500\n')
fp.write(' timescaledb: true\n')

0 comments on commit 482eccf

Please sign in to comment.