Grafana upgrade, adds timemachine

This commit is contained in:
Nemo 2018-03-15 13:57:12 +05:30
parent 176c5f6d70
commit 078891a0a9
6 changed files with 47 additions and 3 deletions

View File

@ -25,6 +25,11 @@ module "docker" {
domain = "bb8.fun"
}
module "timemachine" {
source = "timemachine"
ips = "${var.ips}"
}
module "gitea" {
source = "gitea"
domain = "git.captnemo.in"

View File

@ -45,7 +45,7 @@ resource "docker_container" "airsonic" {
"PUID=1004",
"PGID=1003",
"TZ=Asia/Kolkata",
"JAVA_OPTS=-Xmx512m -Xms512m",
"JAVA_OPTS=-Xmx512m",
]
links = ["${var.links-mariadb}"]
}

View File

@ -1,5 +1,5 @@
data "docker_registry_image" "grafana" {
name = "grafana/grafana:5.0.1"
name = "grafana/grafana:latest"
}
data "docker_registry_image" "prometheus" {

View File

@ -16,8 +16,10 @@ resource docker_container "grafana" {
links = ["${docker_container.prometheus.name}"]
env = [
"GF_SECURITY_ADMIN_PASSWORD=${var.gf-security-admin-password}",
# Keep this disabled unless bringing up a new grafana instance
# "GF_SECURITY_ADMIN_PASSWORD=${var.gf-security-admin-password}",
"GF_SERVER_ROOT_URL=https://grafana.${var.domain}",
"GF_AUTH_ANONYMOUS_ENABLED=true",
"GF_AUTH_ANONYMOUS_ORG_NAME=Tatooine",
]

34
timemachine/main.tf Normal file
View File

@ -0,0 +1,34 @@
data "docker_registry_image" "timemachine" {
name = "odarriba/timemachine:latest"
}
resource "docker_image" "timemachine" {
name = "${data.docker_registry_image.timemachine.name}"
pull_triggers = ["${data.docker_registry_image.timemachine.sha256_digest}"]
}
resource docker_container "timemachine" {
name = "timemachine"
image = "${docker_image.timemachine.latest}"
volumes {
host_path = "/mnt/xwing/data/timemachine"
container_path = "/timemachine"
}
ports {
internal = 548
external = 548
ip = "${var.ips["eth0"]}"
}
ports {
internal = 636
external = 636
ip = "${var.ips["eth0"]}"
}
restart = "unless-stopped"
destroy_grace_seconds = 10
must_run = true
}

3
timemachine/variables.tf Normal file
View File

@ -0,0 +1,3 @@
variable "ips" {
type = "map"
}