diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/_examples/coredns.tf b/_examples/coredns.tf old mode 100644 new mode 100755 diff --git a/_examples/grafana.tf b/_examples/grafana.tf old mode 100644 new mode 100755 diff --git a/_examples/influxdb.tf b/_examples/influxdb.tf old mode 100644 new mode 100755 diff --git a/_examples/mongodb.tf b/_examples/mongodb.tf old mode 100644 new mode 100755 diff --git a/_examples/mosquitto.tf b/_examples/mosquitto.tf old mode 100644 new mode 100755 diff --git a/_examples/nginx-default.conf b/_examples/nginx-default.conf old mode 100644 new mode 100755 diff --git a/_examples/nginx.tf b/_examples/nginx.tf old mode 100644 new mode 100755 diff --git a/_examples/openldap.tf b/_examples/openldap.tf old mode 100644 new mode 100755 index e6044ed..2ed5574 --- a/_examples/openldap.tf +++ b/_examples/openldap.tf @@ -1,5 +1,5 @@ -// Example LDAP server, using the bitnami/openldap docker image +// Example LDAP server module "openldap" { source = "github.com/mutablelogic/tf-nomad//openldap" @@ -19,3 +19,26 @@ module "openldap" { replication_hosts = ["ldap://server1:389/", "ldap://server2:389/"] // LDAP urls for replication data = "/var/lib/ldap" // Directory for data persistence } + +// Example LDAP admin +module "openldap-admin" { + source = "github.com/mutablelogic/tf-nomad//openldap-admin" + + // Required parameters + dc = var.dc + hosts = ["server1", "server2"] // Host constraint for the job + organization = "My Organization" // Distinquished name for the LDAP server + domain = "example.com" // Domain for the LDAP server + admin_password = local.LDAP_ADMIN_PASSWORD // Password for the LDAP 'admin' user + + // Other parameters + enabled = true + namespace = var.namespace + docker_tag = "latest" // Pull the latest version of the docker image every job restart + port = 5000 // plaintext port to expose + + // LDAP details + service_dns = ["192.168.86.11", "192.168.86.12"] + url = "ldap://openldap-ldap.default.nomad/" + basedn = "dc=mutablelogic,dc=com" +} diff --git a/_examples/postgresql.tf b/_examples/postgresql.tf old mode 100644 new mode 100755 diff --git a/_examples/seaweedfs.tf b/_examples/seaweedfs.tf old mode 100644 new mode 100755 diff --git a/_examples/telegraf.tf b/_examples/telegraf.tf old mode 100644 new mode 100755 diff --git a/coredns/config/Corefile b/coredns/config/Corefile old mode 100644 new mode 100755 diff --git a/coredns/input.tf b/coredns/input.tf old mode 100644 new mode 100755 diff --git a/coredns/locals.tf b/coredns/locals.tf old mode 100644 new mode 100755 diff --git a/coredns/main.tf b/coredns/main.tf old mode 100644 new mode 100755 diff --git a/coredns/nomad/coredns.hcl b/coredns/nomad/coredns.hcl old mode 100644 new mode 100755 diff --git a/coredns/providers.tf b/coredns/providers.tf old mode 100644 new mode 100755 diff --git a/github-action-runner/input.tf b/github-action-runner/input.tf new file mode 100755 index 0000000..8b3a154 --- /dev/null +++ b/github-action-runner/input.tf @@ -0,0 +1,52 @@ + +variable "dc" { + type = string + description = "Data center name" +} + +variable "namespace" { + type = string + description = "Nomad namespace" + default = "default" +} + +variable "enabled" { + type = bool + description = "If false, then no job is deployed" + default = true +} + +variable "docker_tag" { + type = string + description = "Version of the docker image to use, defaults to latest" + default = "latest" +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "hosts" { + type = list(string) + description = "List of hosts to deploy on. If empty, one allocation will be created" + default = [] +} + +variable "access_token" { + description = "Github access token" + type = string + sensitive = true +} + +variable "organization" { + description = "Github organization" + type = string +} diff --git a/github-action-runner/locals.tf b/github-action-runner/locals.tf new file mode 100755 index 0000000..6a46746 --- /dev/null +++ b/github-action-runner/locals.tf @@ -0,0 +1,5 @@ + +locals { + docker_image = "ghcr.io/actions/actions-runner:${var.docker_tag}" + docker_always_pull = var.docker_tag == "latest" ? true : false +} diff --git a/github-action-runner/main.tf b/github-action-runner/main.tf new file mode 100755 index 0000000..b6785dc --- /dev/null +++ b/github-action-runner/main.tf @@ -0,0 +1,20 @@ + +resource "nomad_job" "github-action-runner" { + count = var.enabled ? 1 : 0 + jobspec = file("${path.module}/nomad/github-action-runner.hcl") + + hcl2 { + vars = { + dc = jsonencode([var.dc]) + namespace = var.namespace + hosts = jsonencode(var.hosts) + docker_image = local.docker_image + docker_always_pull = jsonencode(local.docker_always_pull) + service_dns = jsonencode(var.service_dns) + service_type = var.service_type + + access_token = var.access_token + organization = var.organization + } + } +} diff --git a/github-action-runner/nomad/github-action-runner.hcl b/github-action-runner/nomad/github-action-runner.hcl new file mode 100755 index 0000000..6ef2012 --- /dev/null +++ b/github-action-runner/nomad/github-action-runner.hcl @@ -0,0 +1,113 @@ + +// github action runner +// Docker Image: ghcr.io/actions/actions-runner + +/////////////////////////////////////////////////////////////////////////////// +// VARIABLES + +variable "dc" { + description = "data centers that the job is eligible to run in" + type = list(string) +} + +variable "namespace" { + description = "namespace that the job runs in" + type = string + default = "default" +} + +variable "hosts" { + description = "host constraint for the job, defaults to one host" + type = list(string) + default = [] +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "docker_image" { + description = "Docker image" + type = string +} + +variable "docker_always_pull" { + description = "Pull docker image on every job restart" + type = bool + default = false +} + +/////////////////////////////////////////////////////////////////////////////// + +variable "access_token" { + description = "Github access token" + type = string +} + +variable "organization" { + description = "Github organization" + type = string +} + +/////////////////////////////////////////////////////////////////////////////// +// JOB + +job "github-action-runner" { + type = var.service_type + datacenters = var.dc + namespace = var.namespace + + update { + min_healthy_time = "10s" + healthy_deadline = "5m" + health_check = "task_states" + } + + ///////////////////////////////////////////////////////////////////////////////// + + group "github-action-runner" { + count = (length(var.hosts) == 0 || var.service_type == "system") ? 1 : length(var.hosts) + + dynamic "constraint" { + for_each = length(var.hosts) == 0 ? [] : [join(",", var.hosts)] + content { + attribute = node.unique.name + operator = "set_contains_any" + value = constraint.value + } + } + + // token task runs to obtain a runner token + task "token" { + driver = "docker" + + lifecycle { + hook = "prestart" + sidecar = false + } + + env { + ACCESS_TOKEN = var.access_token + ORGANIZATION = var.organization + } + + config { + image = "curlimages/curl" + dns_servers = var.service_dns + args = [ + "sh", + "-c", + "curl -s -X \"POST\" -H \"Authorization: token ${ACCESS_TOKEN}\" https://api.github.com/orgs/${ORGANIZATION}/actions/runners/registration-token" + ] + } + } // task "token" + } // group "grafana" +} // job "grafana" diff --git a/grafana/input.tf b/grafana/input.tf old mode 100644 new mode 100755 diff --git a/grafana/locals.tf b/grafana/locals.tf old mode 100644 new mode 100755 diff --git a/grafana/main.tf b/grafana/main.tf old mode 100644 new mode 100755 diff --git a/grafana/nomad/grafana.hcl b/grafana/nomad/grafana.hcl old mode 100644 new mode 100755 diff --git a/influxdb/input.tf b/influxdb/input.tf old mode 100644 new mode 100755 diff --git a/influxdb/locals.tf b/influxdb/locals.tf old mode 100644 new mode 100755 diff --git a/influxdb/main.tf b/influxdb/main.tf old mode 100644 new mode 100755 diff --git a/influxdb/nomad/influxdb.hcl b/influxdb/nomad/influxdb.hcl old mode 100644 new mode 100755 diff --git a/influxdb/providers.tf b/influxdb/providers.tf old mode 100644 new mode 100755 diff --git a/mongodb/input.tf b/mongodb/input.tf old mode 100644 new mode 100755 diff --git a/mongodb/locals.tf b/mongodb/locals.tf old mode 100644 new mode 100755 diff --git a/mongodb/main.tf b/mongodb/main.tf old mode 100644 new mode 100755 diff --git a/mongodb/nomad/mongodb.hcl b/mongodb/nomad/mongodb.hcl old mode 100644 new mode 100755 diff --git a/mongodb/providers.tf b/mongodb/providers.tf old mode 100644 new mode 100755 diff --git a/mosquitto/input.tf b/mosquitto/input.tf old mode 100644 new mode 100755 diff --git a/mosquitto/locals.tf b/mosquitto/locals.tf old mode 100644 new mode 100755 diff --git a/mosquitto/main.tf b/mosquitto/main.tf old mode 100644 new mode 100755 diff --git a/mosquitto/nomad/mosquitto.hcl b/mosquitto/nomad/mosquitto.hcl old mode 100644 new mode 100755 diff --git a/mosquitto/providers.tf b/mosquitto/providers.tf old mode 100644 new mode 100755 diff --git a/nginx/config/fastcgi.conf b/nginx/config/fastcgi.conf old mode 100644 new mode 100755 diff --git a/nginx/config/mimetypes.conf b/nginx/config/mimetypes.conf old mode 100644 new mode 100755 diff --git a/nginx/config/nginx.conf b/nginx/config/nginx.conf old mode 100644 new mode 100755 diff --git a/nginx/input.tf b/nginx/input.tf old mode 100644 new mode 100755 diff --git a/nginx/locals.tf b/nginx/locals.tf old mode 100644 new mode 100755 diff --git a/nginx/main.tf b/nginx/main.tf old mode 100644 new mode 100755 diff --git a/nginx/nomad/nginx.hcl b/nginx/nomad/nginx.hcl old mode 100644 new mode 100755 diff --git a/nginx/providers.tf b/nginx/providers.tf old mode 100644 new mode 100755 diff --git a/openldap-admin/input.tf b/openldap-admin/input.tf new file mode 100755 index 0000000..87ec7da --- /dev/null +++ b/openldap-admin/input.tf @@ -0,0 +1,85 @@ + +variable "dc" { + type = string + description = "Data center name" +} + +variable "namespace" { + type = string + description = "Nomad namespace" + default = "default" +} + +variable "enabled" { + type = bool + description = "If false, then no job is deployed" + default = true +} + +variable "docker_tag" { + type = string + description = "Version of the docker image to use, defaults to latest" + default = "latest" +} + +variable "service_provider" { + description = "Service provider, either consul or nomad" + type = string + default = "nomad" +} + +variable "service_name" { + description = "Service name" + type = string + default = "openldap-admin" +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "hosts" { + type = list(string) + description = "List of hosts to deploy on. If empty, one allocation will be created" + default = [] +} + +variable "port" { + type = number + description = "Port to expose plaintext service" + default = 5000 +} + +variable "url" { + description = "LDAP server url" + type = string +} + +variable "basedn" { + description = "LDAP base distinguished name" + type = string +} + +variable "admin_password" { + description = "LDAP admin password" + type = string + sensitive = true +} + +variable "organization" { + description = "Organization name" + type = string +} + +variable "domain" { + description = "Organization domain" + type = string +} diff --git a/openldap-admin/locals.tf b/openldap-admin/locals.tf new file mode 100755 index 0000000..a25590c --- /dev/null +++ b/openldap-admin/locals.tf @@ -0,0 +1,5 @@ + +locals { + docker_image = "wheelybird/ldap-user-manager:${var.docker_tag}" + docker_always_pull = var.docker_tag == "latest" ? true : false +} diff --git a/openldap-admin/main.tf b/openldap-admin/main.tf new file mode 100755 index 0000000..37630b5 --- /dev/null +++ b/openldap-admin/main.tf @@ -0,0 +1,27 @@ + +resource "nomad_job" "openldap" { + count = var.enabled ? 1 : 0 + jobspec = file("${path.module}/nomad/openldap-admin.hcl") + + hcl2 { + allow_fs = true + vars = { + dc = jsonencode([var.dc]) + namespace = var.namespace + hosts = jsonencode(var.hosts) + docker_image = local.docker_image + docker_always_pull = jsonencode(local.docker_always_pull) + service_provider = var.service_provider + service_name = var.service_name + service_dns = jsonencode(var.service_dns) + service_type = var.service_type + + port = var.port + url = var.url + basedn = var.basedn + admin_password = var.admin_password + organization = var.organization + domain = var.domain + } + } +} diff --git a/openldap-admin/nomad/openldap-admin.hcl b/openldap-admin/nomad/openldap-admin.hcl new file mode 100755 index 0000000..0b29f97 --- /dev/null +++ b/openldap-admin/nomad/openldap-admin.hcl @@ -0,0 +1,177 @@ + +// OpenLDAP user adminstrator +// Docker Image: https://github.com/wheelybird/ldap-user-manager + +/////////////////////////////////////////////////////////////////////////////// +// VARIABLES + +variable "dc" { + description = "data centers that the job is eligible to run in" + type = list(string) +} + +variable "namespace" { + description = "namespace that the job runs in" + type = string + default = "default" +} + +variable "hosts" { + description = "host constraint for the job, defaults to one host" + type = list(string) + default = [] +} + +variable "service_provider" { + description = "Service provider, either consul or nomad" + type = string + default = "nomad" +} + +variable "service_name" { + description = "Service name" + type = string + default = "openldap-admin" +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "docker_image" { + description = "Docker image" + type = string +} + +variable "docker_always_pull" { + description = "Pull docker image on every job restart" + type = bool + default = false +} + +variable "debug" { + description = "Debug output" + type = bool + default = false +} + +/////////////////////////////////////////////////////////////////////////////// + +variable "port" { + description = "Port for plaintext connections" + type = number + default = 5000 +} + +variable "url" { + description = "LDAP server url" + type = string +} + +variable "basedn" { + description = "LDAP base distinguished name" + type = string +} + +variable "admin_password" { + description = "LDAP admin password" + type = string +} + +variable "admin_group" { + description = "LDAP admins group" + type = string + default = "admin" +} + +variable "organization" { + description = "Organization name" + type = string +} + +variable "domain" { + description = "Organization domain" + type = string +} + +/////////////////////////////////////////////////////////////////////////////// +// JOB + +job "openldap-admin" { + type = var.service_type + datacenters = var.dc + namespace = var.namespace + + update { + min_healthy_time = "10s" + healthy_deadline = "5m" + health_check = "task_states" + } + + ///////////////////////////////////////////////////////////////////////////////// + + group "openldap-admin" { + count = (length(var.hosts) == 0 || var.service_type == "system") ? 1 : length(var.hosts) + + dynamic "constraint" { + for_each = length(var.hosts) == 0 ? [] : [join(",", var.hosts)] + content { + attribute = node.unique.name + operator = "set_contains_any" + value = constraint.value + } + } + + network { + port "http" { + static = var.port + to = 5000 + } + } + + service { + tags = ["openldap-admin", "http"] + name = var.service_name + port = "http" + provider = var.service_provider + } + + task "daemon" { + driver = "docker" + + env { + LDAP_URI = var.url + LDAP_BASE_DN = var.basedn + LDAP_ADMIN_BIND_DN = format("cn=admin,%s", var.basedn) + LDAP_ADMIN_BIND_PWD = var.admin_password + LDAP_ADMINS_GROUP = var.admin_group + LDAP_USER_OU = "users" + LDAP_GROUP_OU = "groups" + NO_HTTPS = "true" + SERVER_PORT = "5000" + ORGANISATION_NAME = var.organization + SITE_NAME = var.organization + EMAIL_DOMAIN = var.domain + LDAP_DEBUG = var.debug ? "true" : "false" + USERNAME_REGEX = "^[a-z][a-zA-Z0-9._-]{2,32}$" + ACCEPT_WEAK_PASSWORDS = "true" + } + + config { + image = var.docker_image + force_pull = var.docker_always_pull + ports = ["http"] + dns_servers = var.service_dns + } + + } // task "daemon" + } // group "openldap-admin" +} // job "openldap-admin" diff --git a/openldap-admin/providers.tf b/openldap-admin/providers.tf new file mode 100755 index 0000000..30b081b --- /dev/null +++ b/openldap-admin/providers.tf @@ -0,0 +1,9 @@ + +terraform { + required_providers { + nomad = { + source = "hashicorp/nomad" + version = "~> 2.0.0" + } + } +} diff --git a/openldap/input.tf b/openldap/input.tf old mode 100644 new mode 100755 diff --git a/openldap/ldif/group.ldif b/openldap/ldif/group.ldif old mode 100644 new mode 100755 diff --git a/openldap/ldif/root.ldif b/openldap/ldif/root.ldif old mode 100644 new mode 100755 diff --git a/openldap/locals.tf b/openldap/locals.tf old mode 100644 new mode 100755 diff --git a/openldap/main.tf b/openldap/main.tf old mode 100644 new mode 100755 diff --git a/openldap/nomad/openldap.hcl b/openldap/nomad/openldap.hcl old mode 100644 new mode 100755 diff --git a/openldap/providers.tf b/openldap/providers.tf old mode 100644 new mode 100755 diff --git a/openldap/schema/memberOf.ldif b/openldap/schema/memberOf.ldif old mode 100644 new mode 100755 diff --git a/openldap/schema/rfc2307bis.ldif b/openldap/schema/rfc2307bis.ldif old mode 100644 new mode 100755 diff --git a/postgresql/input.tf b/postgresql/input.tf old mode 100644 new mode 100755 diff --git a/postgresql/locals.tf b/postgresql/locals.tf old mode 100644 new mode 100755 diff --git a/postgresql/main.tf b/postgresql/main.tf old mode 100644 new mode 100755 diff --git a/postgresql/nomad/postgresql.hcl b/postgresql/nomad/postgresql.hcl old mode 100644 new mode 100755 diff --git a/postgresql/providers.tf b/postgresql/providers.tf old mode 100644 new mode 100755 diff --git a/prometheus/input.tf b/prometheus/input.tf new file mode 100755 index 0000000..382f8aa --- /dev/null +++ b/prometheus/input.tf @@ -0,0 +1,59 @@ + +variable "dc" { + type = string + description = "Data center name" +} + +variable "namespace" { + type = string + description = "Nomad namespace" + default = "default" +} + +variable "enabled" { + type = bool + description = "If false, then no job is deployed" + default = true +} + +variable "docker_tag" { + type = string + description = "Version of the docker image to use, defaults to latest" + default = "latest" +} + +variable "service_provider" { + description = "Service provider, either consul or nomad" + type = string + default = "nomad" +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "hosts" { + type = list(string) + description = "List of hosts to deploy on. If empty, one allocation will be created" + default = [] +} + +variable "port" { + description = "Port for connections" + type = number + default = 9090 +} + +variable "data" { + description = "Data persistence directory" + type = string + default = "" +} diff --git a/prometheus/locals.tf b/prometheus/locals.tf new file mode 100755 index 0000000..002004d --- /dev/null +++ b/prometheus/locals.tf @@ -0,0 +1,5 @@ + +locals { + docker_image = "prom/prometheus:${var.docker_tag}" + docker_always_pull = var.docker_tag == "latest" ? true : false +} diff --git a/prometheus/main.tf b/prometheus/main.tf new file mode 100755 index 0000000..b2411b1 --- /dev/null +++ b/prometheus/main.tf @@ -0,0 +1,23 @@ + +resource "nomad_job" "nginx" { + count = var.enabled ? 1 : 0 + jobspec = file("${path.module}/nomad/prometheus.hcl") + + hcl2 { + allow_fs = true + vars = { + dc = jsonencode([var.dc]) + namespace = var.namespace + hosts = jsonencode(var.hosts) + docker_image = local.docker_image + docker_always_pull = jsonencode(local.docker_always_pull) + service_provider = var.service_provider + service_dns = jsonencode(var.service_dns) + service_type = var.service_type + + hosts = jsonencode(var.hosts) + port = var.port + data = var.data + } + } +} diff --git a/prometheus/nomad/prometheus.hcl b/prometheus/nomad/prometheus.hcl new file mode 100755 index 0000000..e88b9b4 --- /dev/null +++ b/prometheus/nomad/prometheus.hcl @@ -0,0 +1,144 @@ + +// OpenLDAP server +// Docker Image: https://hub.docker.com/r/prom/prometheus/ + +/////////////////////////////////////////////////////////////////////////////// +// VARIABLES + +variable "dc" { + description = "data centers that the job is eligible to run in" + type = list(string) +} + +variable "namespace" { + description = "namespace that the job runs in" + type = string + default = "default" +} + +variable "hosts" { + description = "host constraint for the job, defaults to one host" + type = list(string) + default = [] +} + +variable "service_provider" { + description = "Service provider, either consul or nomad" + type = string + default = "nomad" +} + +variable "service_name" { + description = "Service name" + type = string + default = "prometheus" +} + +variable "service_dns" { + description = "Service discovery DNS" + type = list(string) + default = [] +} + +variable "service_type" { + description = "Run as a service or system" + type = string + default = "service" +} + +variable "docker_image" { + description = "Docker image" + type = string +} + +variable "docker_always_pull" { + description = "Pull docker image on every job restart" + type = bool + default = false +} + +variable "debug" { + description = "Debug output" + type = bool + default = false +} + +/////////////////////////////////////////////////////////////////////////////// + +variable "port" { + description = "Port for connections" + type = number + default = 9090 +} + +variable "data" { + description = "Data persistence directory" + type = string + default = "" +} + +/////////////////////////////////////////////////////////////////////////////// +// LOCALS + +locals { + config_path = format("%s/config", NOMAD_TASK_DIR) +} + +/////////////////////////////////////////////////////////////////////////////// +// JOB + +job "prometheus" { + type = var.service_type + datacenters = var.dc + namespace = var.namespace + + update { + min_healthy_time = "10s" + healthy_deadline = "5m" + health_check = "task_states" + } + + ///////////////////////////////////////////////////////////////////////////////// + + group "prometheus" { + count = (length(var.hosts) == 0 || var.service_type == "system") ? 1 : length(var.hosts) + + dynamic "constraint" { + for_each = length(var.hosts) == 0 ? [] : [join(",", var.hosts)] + content { + attribute = node.unique.name + operator = "set_contains_any" + value = constraint.value + } + } + + network { + port "prometheus" { + static = var.port + to = 9090 + } + } + + service { + tags = ["prometheus"] + name = var.service_name + port = "prometheus" + provider = var.service_provider + } + + task "daemon" { + driver = "docker" + + config { + image = var.docker_image + force_pull = var.docker_always_pull + ports = ["prometheus"] + dns_servers = var.service_dns + volumes = compact([ + var.data == "" ? "" : format("%s:/prometheus", var.data) + ]) + } + + } // task "daemon" + } // group "prometheus" +} // job "prometheus" diff --git a/prometheus/providers.tf b/prometheus/providers.tf new file mode 100755 index 0000000..30b081b --- /dev/null +++ b/prometheus/providers.tf @@ -0,0 +1,9 @@ + +terraform { + required_providers { + nomad = { + source = "hashicorp/nomad" + version = "~> 2.0.0" + } + } +} diff --git a/prometheus/yaml/prometheus.yml b/prometheus/yaml/prometheus.yml new file mode 100755 index 0000000..3f75343 --- /dev/null +++ b/prometheus/yaml/prometheus.yml @@ -0,0 +1,30 @@ +global: + # Set the scrape interval to every 15 seconds. Default is every 1 minute. + scrape_interval: 15s + + # Evaluate rules every 15 seconds. The default is every 1 minute. + evaluation_interval: 15s + + # scrape_timeout is set to the global default (10s). + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: + # - alertmanager:9093 + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: + # - "first_rules.yml" + # - "second_rules.yml" + +# A scrape configuration containing exactly one endpoint to scrape: +# Here it's Prometheus itself. +scrape_configs: + # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: "prometheus" + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + static_configs: + - targets: ["localhost:9090"] diff --git a/seaweedfs/input.tf b/seaweedfs/input.tf old mode 100644 new mode 100755 diff --git a/seaweedfs/locals.tf b/seaweedfs/locals.tf old mode 100644 new mode 100755 diff --git a/seaweedfs/main.tf b/seaweedfs/main.tf old mode 100644 new mode 100755 diff --git a/seaweedfs/nomad/seaweedfs.hcl b/seaweedfs/nomad/seaweedfs.hcl old mode 100644 new mode 100755 diff --git a/seaweedfs/output.tf b/seaweedfs/output.tf old mode 100644 new mode 100755 diff --git a/seaweedfs/providers.tf b/seaweedfs/providers.tf old mode 100644 new mode 100755 diff --git a/semaphore/input.tf b/semaphore/input.tf old mode 100644 new mode 100755 diff --git a/semaphore/locals.tf b/semaphore/locals.tf old mode 100644 new mode 100755 diff --git a/semaphore/main.tf b/semaphore/main.tf old mode 100644 new mode 100755 diff --git a/semaphore/nomad/semaphore.hcl b/semaphore/nomad/semaphore.hcl old mode 100644 new mode 100755 diff --git a/semaphore/providers.tf b/semaphore/providers.tf old mode 100644 new mode 100755 diff --git a/telegraf/input.tf b/telegraf/input.tf old mode 100644 new mode 100755 diff --git a/telegraf/locals.tf b/telegraf/locals.tf old mode 100644 new mode 100755 diff --git a/telegraf/main.tf b/telegraf/main.tf old mode 100644 new mode 100755 diff --git a/telegraf/nomad/telegraf.hcl b/telegraf/nomad/telegraf.hcl old mode 100644 new mode 100755 diff --git a/telegraf/providers.tf b/telegraf/providers.tf old mode 100644 new mode 100755