2023-02-27 16:20:30 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2019-11-29 23:58:03 +00:00
|
|
|
job "example" {
|
|
|
|
datacenters = ["dc1"]
|
2023-06-30 17:08:08 +00:00
|
|
|
type = "service"
|
2019-11-29 23:58:03 +00:00
|
|
|
|
|
|
|
group "example" {
|
2023-06-30 17:08:08 +00:00
|
|
|
network {
|
|
|
|
# mode = "driver"
|
|
|
|
port "http" {
|
|
|
|
to = 8080
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-11-29 23:58:03 +00:00
|
|
|
task "hello-world" {
|
|
|
|
driver = "hello-world-example"
|
|
|
|
|
|
|
|
config {
|
2023-06-30 17:08:08 +00:00
|
|
|
unikernel = "/tmp/hello-key.hvt"
|
|
|
|
# network "device1" {
|
|
|
|
# ports = ["http", ...]
|
|
|
|
# ip_arg = "--monitoring"
|
|
|
|
# gateway_arg = "--xxx"
|
|
|
|
# }
|
|
|
|
# args = [...]
|
2019-11-29 23:58:03 +00:00
|
|
|
}
|
|
|
|
}
|
2023-06-30 17:08:08 +00:00
|
|
|
|
|
|
|
service {
|
|
|
|
port = "http"
|
|
|
|
name = "hello-service"
|
|
|
|
}
|
2019-11-29 23:58:03 +00:00
|
|
|
}
|
|
|
|
}
|