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 label = string
endpoints = list(string) endpoints = list(string)
http_method = optional(string, null) http_method = optional(string, null)
http_status_healthy_below = optional(number, 400)
http_status_healthy_above = optional(number, 200)
}))) })))
} }
variable "page_title" { variable "page_title" {
type = string type = string

View file

@ -11,6 +11,12 @@ reveal_replica_name = true
%{ if service.http_method != null ~} %{ if service.http_method != null ~}
http_method = "${service.http_method}" http_method = "${service.http_method}"
%{ endif ~} %{ 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 = [ replicas = [
%{ for endpoint in service.endpoints ~} %{ for endpoint in service.endpoints ~}
"${endpoint}", "${endpoint}",

View file

@ -20,6 +20,7 @@ resource "docker_container" "ender5plus" {
env = [ env = [
"ENABLE_MJPG_STREAMER=false" "ENABLE_MJPG_STREAMER=false"
] ]
network_mode = "bridge"
restart = "always" restart = "always"
ports { ports {
internal = 80 internal = 80
@ -28,6 +29,7 @@ resource "docker_container" "ender5plus" {
devices { 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" container_path = "/dev/ttyACM0"
permissions = "rwm"
} }
volumes { volumes {
container_path = "/octoprint" container_path = "/octoprint"

111
vigil.tf
View file

@ -48,7 +48,49 @@ module "vigil" {
"icmp://california.ti", "icmp://california.ti",
"tcp://california.ti:22", "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" = [ "Printers" = [
{ {
@ -57,6 +99,11 @@ module "vigil" {
endpoints = [ endpoints = [
"icmp://prin.ti", "icmp://prin.ti",
"tcp://prin.ti:22", "tcp://prin.ti:22",
]
}, {
id = "ender5plus"
label = "Ender 5 Plus"
endpoints = [
"http://prin.ti:3000", "http://prin.ti:3000",
] ]
}, { }, {
@ -65,11 +112,11 @@ module "vigil" {
endpoints = [ endpoints = [
"icmp://v400.prin.ti", "icmp://v400.prin.ti",
"tcp://v400.prin.ti:22", "tcp://v400.prin.ti:22",
"http://v400.prin.ti:80", "http://v400.prin.ti",
] ]
} }
], ],
"Members Services" = [ "Space Services" = [
{ {
id = "sso" id = "sso"
label = "SSO (auth.techinc.nl)" label = "SSO (auth.techinc.nl)"
@ -85,6 +132,64 @@ module "vigil" {
] ]
http_method = "GET" 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" id = "s3"
label = "S3 (s3.california.ti)" label = "S3 (s3.california.ti)"
endpoints = [ endpoints = [