Send Nomad job alerts to Rocket.Chat: 10MB
309
https://github.com/multipathmaster/nomadrcm
#QUICK OVERVIEW: DEPLOYMENT RECENTLY RAN AGAINST CONSUL 1.0.0 and NOMAD 0.7.0 - WORKS - YES the deployment assumes you already have hashi-ui running or some other fork/clone. docker-entrypoint.sh is the entrypoint. It calls upon dead_man_switch.sh. dead_man_switch.sh starts the nmd_evnt_mntr.sh instances, as well a providing other options. nmd_evnt_mntr.sh is a collection of event monitors that call upon rocketc_alert.sh once a condition is met. rocketc_alert.sh is the alerting mechanism.
STEPS FOR SOLO DEPLOYMENT:
docker run -it -e NOMAD_JOB_IPHN='http://NOMAD_SERVER_IP:4646/v1/jobs' -e NOMAD_SRV_JOB_PATH='http://NOMAD_SERVER_IP:3000/nomad/REGION/jobs' -e RC_SRV_PRT='http://Rocket.Chat.SERVER:3000' -e RC_AUTH='username=BOTNAME&password=BOTPASSWD' multipathmaster/nomadrcmdocker ps #FIND CONTAINERdocker exec -it "CONTAINER" bashSTEPS FOR DEPLOYING ON THE HASHICORP STACK: (CONSUL/NOMAD):
job "nomadrcm" {
region = "YOUR_REGION"
datacenters = ["YOUR_DC"]
type = "service"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
update {
stagger = "15s"
max_parallel = 1
}
group "nomadrcm" {
count = 1
constraint {
operator = "distinct_hosts"
value = "true"
}
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
ephemeral_disk {
size = 128
}
task "nomadrcm" {
driver = "docker"
config {
image = "multipathmaster/nomadrcm:latest"
network_mode = "host"
port_map = {
}
#volumes = [ "" ]
}
env {
NOMAD_JOB_IPHN="http://NOMAD_SERVER_IP:4646/v1/jobs"
NOMAD_SRV_JOB_PATH="http://NOMAD_SERVER_IP:3000/nomad/REGION/jobs"
RC_SRV_PRT="http://Rocket.Chat.SERVER:3000"
RC_AUTH="username=BOTNAME&password=BOTPASSWD"
}
resources {
cpu = 32
memory = 64
network {
mbits = 10
}
}
service {
name = "nomadrcm"
tags = ["nomadrcm"]
#port = "nomadrcm"
#check {
# name = "alive"
# type = "tcp"
# interval = "15s"
# timeout = "3s"
#}
}
}
}
}
nomad plan nomadrcm.nomadnomad run nomadrcm.nomadContent type
Image
Digest
Size
4.2 MB
Last updated
about 9 years ago
docker pull multipathmaster/nomadrcm