Uncommited changes

This commit is contained in:
Greyscale 2024-06-29 20:38:30 +02:00
parent 78c0bf2a6b
commit 53ad8e250d
4 changed files with 123 additions and 7 deletions

View file

@ -23,7 +23,10 @@ variable "monitored_services" {
label = string
endpoints = list(string)
http_method = optional(string, null)
http_status_healthy_below = optional(number, 400)
http_status_healthy_above = optional(number, 200)
})))
}
variable "page_title" {
type = string

View file

@ -11,6 +11,12 @@ reveal_replica_name = true
%{ if service.http_method != null ~}
http_method = "${service.http_method}"
%{ endif ~}
%{ if service.http_status_healthy_above != null ~}
poll_http_status_healthy_above = ${service.http_status_healthy_above}
%{ endif ~}
%{ if service.http_status_healthy_below != null ~}
poll_http_status_healthy_below = ${service.http_status_healthy_below}
%{ endif ~}
replicas = [
%{ for endpoint in service.endpoints ~}
"${endpoint}",

View file

@ -14,20 +14,22 @@ resource "docker_volume" "ender5plus" {
}
resource "docker_container" "ender5plus" {
image = "${docker_image.octoprint.name}:latest"
image = "${docker_image.octoprint.name}:latest"
provider = docker.printi
name = "ender5plus"
name = "ender5plus"
env = [
"ENABLE_MJPG_STREAMER=false"
]
restart = "always"
network_mode = "bridge"
restart = "always"
ports {
internal = 80
external = 3000
}
devices {
host_path = "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A602AFFK-if00-port0"
host_path = "/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A602AFFK-if00-port0"
container_path = "/dev/ttyACM0"
permissions = "rwm"
}
volumes {
container_path = "/octoprint"

111
vigil.tf
View file

@ -48,7 +48,49 @@ module "vigil" {
"icmp://california.ti",
"tcp://california.ti:22",
]
}
},
{
id = "backup"
label = "Backup Server"
endpoints = [
"icmp://backup.ti",
"tcp://backup.ti:22",
"http://backup.ti",
]
},
]
"Wifi" = [
{
id = "unifi-controller"
label = "Unifi Controller"
endpoints = [
"icmp://unifi.ti",
"tcp://unifi.ti:22",
"http://unifi.ti",
]
},
{
id = "unifi-ap-mainspace"
label = "Unifi AP Mainspace"
endpoints = [
"icmp://mainspace-ap.ti",
]
},
{
id = "unifi-ap-auxspace"
label = "Unifi AP Auxspace"
endpoints = [
"icmp://auxspace-ap.ti",
]
},
#{
# id = "unifi-ap-hallway"
# label = "Unifi AP Hallway"
# endpoints = [
# "icmp://hallway-ap.ti",
# ]
#},
]
"Printers" = [
{
@ -57,6 +99,11 @@ module "vigil" {
endpoints = [
"icmp://prin.ti",
"tcp://prin.ti:22",
]
}, {
id = "ender5plus"
label = "Ender 5 Plus"
endpoints = [
"http://prin.ti:3000",
]
}, {
@ -65,11 +112,11 @@ module "vigil" {
endpoints = [
"icmp://v400.prin.ti",
"tcp://v400.prin.ti:22",
"http://v400.prin.ti:80",
"http://v400.prin.ti",
]
}
],
"Members Services" = [
"Space Services" = [
{
id = "sso"
label = "SSO (auth.techinc.nl)"
@ -85,6 +132,64 @@ module "vigil" {
]
http_method = "GET"
}, {
id = "ansible"
label = "TechInc Ansible Server"
endpoints = [
"icmp://ansible.ti",
"tcp://ansible.ti:22",
"http://ansible.ti"
]
http_method = "GET"
},
{
id = "jukebox"
label = "Indicio (Jukebox)"
endpoints = [
"icmp://indicio.ti",
"tcp://indicio.ti:22",
]
http_method = "GET"
},
{
id = "shardik"
label = "Shardik (Bot)"
endpoints = [
#"icmp://shardik.ti", # Doesn't work?
"tcp://shardik.ti:22",
"http://shardik.ti"
]
http_method = "GET"
},
{
id = "sip"
label = "SIP"
endpoints = [
"icmp://sip.ti",
"http://sip.ti"
]
http_method = "GET"
},
{
id = "wheel"
label = "TI Wheel"
endpoints = [
"icmp://wheel.ti",
#"http://wheel.ti" # requires basic auth
]
http_method = "GET"
},
{
id = "arrow"
label = "TI Arrow"
endpoints = [
"icmp://arrow.ti",
#"http://arrow.ti" # requires basic auth
]
http_method = "GET"
}
],
"Members Services" = [
{
id = "s3"
label = "S3 (s3.california.ti)"
endpoints = [