Skip to content

Commit

Permalink
update to use influx
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Dec 3, 2024
1 parent d73224e commit 00bdf3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 8 additions & 16 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# @summary Configure Ledger DB instance
#
# @param datadir sets where the data is persisted
# @param hostname sets the hostname for influxdb
# @param aws_access_key_id sets the AWS key to use for Route53 challenge
# @param aws_secret_access_key sets the AWS secret key to use for the Route53 challenge
# @param email sets the contact address for the certificate
# @param influx_url sets the InfluxDB hostname
# @param influx_org sets the InfluxDB Organization
# @param influx_token sets the credential to use for metric submission
# @param influx_bucket sets the InfluxDB bucket
# @param ledger_repo is the git repo for ledger data
# @param ledger_ssh_key is the ssh key to use to update the repo
# @param ledger_file is the main ledger file to load, relative to the repo root
Expand All @@ -14,10 +14,10 @@
# @param frequency sets how often to run updates
class ledgerdb (
String $datadir,
String $hostname,
String $aws_access_key_id,
String $aws_secret_access_key,
String $email,
String $influx_url,
String $influx_org,
String $influx_token,
String $influx_bucket,
String $ledger_repo,
String $ledger_ssh_key,
String $ledger_file = 'core.ldg',
Expand Down Expand Up @@ -100,12 +100,4 @@
ensure => running,
enable => true,
}

class { 'influxdb':
hostname => $hostname,
datadir => "${datadir}/influxdb",
aws_access_key_id => $aws_access_key_id,
aws_secret_access_key => $aws_secret_access_key,
email => $email,
}
}
4 changes: 4 additions & 0 deletions templates/config.yaml.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
data_dir: <%= @datadir %>/data
data_file: <%= @ledger_file %>
influx_url: <%= @influx_url %>
influx_org: <%= @influx_org %>
influx_token: <%= @influx_token %>
influx_bucket: <%= @influx_bucket %>

0 comments on commit 00bdf3d

Please sign in to comment.