Remove the hello world services initially added for testing
This commit is contained in:
@@ -2,13 +2,8 @@ resource "nomad_job" "glance" {
|
|||||||
jobspec = file("glance.nomad.hcl")
|
jobspec = file("glance.nomad.hcl")
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "hello_world" {
|
resource "nomad_job" "transfer" {
|
||||||
jobspec = file("hello-world.nomad.hcl")
|
jobspec = file("transfer.nomad.hcl")
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
resource "nomad_job" "webapp" {
|
|
||||||
jobspec = file("webapp.nomad.hcl")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_csi_volume_registration" "unraid_transfer" {
|
resource "nomad_csi_volume_registration" "unraid_transfer" {
|
||||||
@@ -36,9 +31,6 @@ resource "nomad_csi_volume_registration" "unraid_transfer" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "nomad_job" "transfer" {
|
|
||||||
jobspec = file("transfer.nomad.hcl")
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "nomad_csi_volume_registration" "unraid_appdata_transferfilebrowser" {
|
resource "nomad_csi_volume_registration" "unraid_appdata_transferfilebrowser" {
|
||||||
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
#Note: Before chaning the definition of this volume you need to stop the jobs that are using it
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
job "hello-world" {
|
|
||||||
group "servers" {
|
|
||||||
network {
|
|
||||||
port "www" {
|
|
||||||
to = -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
service {
|
|
||||||
name = "hello-world"
|
|
||||||
port = "www"
|
|
||||||
|
|
||||||
tags = [
|
|
||||||
"traefik.enable=true",
|
|
||||||
"traefik.http.routers.hello-world.middlewares=auth@file",
|
|
||||||
]
|
|
||||||
|
|
||||||
check {
|
|
||||||
name = "alive"
|
|
||||||
type = "tcp"
|
|
||||||
port = "www"
|
|
||||||
interval = "10s"
|
|
||||||
timeout = "2s"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Tasks are individual units of work that are run by Nomad.
|
|
||||||
task "web" {
|
|
||||||
# This particular task starts a simple web server within a Docker container
|
|
||||||
driver = "docker"
|
|
||||||
|
|
||||||
config {
|
|
||||||
image = "busybox:1"
|
|
||||||
command = "httpd"
|
|
||||||
args = ["-v", "-f", "-p", "${NOMAD_PORT_www}", "-h", "/local"]
|
|
||||||
ports = ["www"]
|
|
||||||
}
|
|
||||||
|
|
||||||
template {
|
|
||||||
data = <<-EOF
|
|
||||||
<h1>Hello, Nomad!</h1>
|
|
||||||
<ul>
|
|
||||||
<li>Task: {{env "NOMAD_TASK_NAME"}}</li>
|
|
||||||
<li>Group: {{env "NOMAD_GROUP_NAME"}}</li>
|
|
||||||
<li>Job: {{env "NOMAD_JOB_NAME"}}</li>
|
|
||||||
<li>Metadata value for foo: {{env "NOMAD_META_foo"}}</li>
|
|
||||||
<li>Currently running on port: {{env "NOMAD_PORT_www"}}</li>
|
|
||||||
</ul>
|
|
||||||
EOF
|
|
||||||
destination = "local/index.html"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Specify the maximum resources required to run the task
|
|
||||||
resources {
|
|
||||||
cpu = 50
|
|
||||||
memory = 64
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
job "demo-webapp" {
|
|
||||||
group "demo" {
|
|
||||||
count = 3
|
|
||||||
|
|
||||||
network {
|
|
||||||
port "http" {
|
|
||||||
to = -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
service {
|
|
||||||
name = "demo-webapp"
|
|
||||||
port = "http"
|
|
||||||
|
|
||||||
tags = [
|
|
||||||
"traefik.enable=true",
|
|
||||||
"traefik.http.routers.demo-webapp.middlewares=auth@file",
|
|
||||||
]
|
|
||||||
|
|
||||||
check {
|
|
||||||
type = "http"
|
|
||||||
path = "/"
|
|
||||||
interval = "2s"
|
|
||||||
timeout = "2s"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task "server" {
|
|
||||||
env {
|
|
||||||
PORT = NOMAD_PORT_http
|
|
||||||
NODE_IP = NOMAD_IP_http
|
|
||||||
}
|
|
||||||
|
|
||||||
driver = "docker"
|
|
||||||
|
|
||||||
config {
|
|
||||||
image = "hashicorp/demo-webapp-lb-guide"
|
|
||||||
ports = ["http"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user