github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/jobspec/test-fixtures/bad-ports.hcl (about)

     1  job "binstore-storagelocker" {
     2    region       = "global"
     3    type         = "service"
     4    priority     = 50
     5    all_at_once  = true
     6    datacenters  = ["us2", "eu1"]
     7    consul_token = "abc"
     8    vault_token  = "foo"
     9  
    10    meta {
    11      foo = "bar"
    12    }
    13  
    14    constraint {
    15      attribute = "kernel.os"
    16      value     = "windows"
    17    }
    18  
    19    update {
    20      stagger      = "60s"
    21      max_parallel = 2
    22    }
    23  
    24    task "outside" {
    25      driver = "java"
    26  
    27      config {
    28        jar_path = "s3://my-cool-store/foo.jar"
    29      }
    30  
    31      meta {
    32        my-cool-key = "foobar"
    33      }
    34    }
    35  
    36    group "binsl" {
    37      count = 5
    38  
    39      task "binstore" {
    40        driver = "docker"
    41  
    42        config {
    43          image = "hashicorp/binstore"
    44        }
    45  
    46        resources {
    47          cpu    = 500
    48          memory = 128
    49  
    50          network {
    51            mbits = "100"
    52  
    53            port "one" {
    54              static = 1
    55            }
    56  
    57            port "two" {
    58              static = 2
    59            }
    60  
    61            port "three" {
    62              static = 3
    63            }
    64  
    65            port "this_is_aport" {}
    66  
    67            port "" {}
    68          }
    69        }
    70      }
    71  
    72      task "storagelocker" {
    73        driver = "docker"
    74  
    75        config {
    76          image = "hashicorp/storagelocker"
    77        }
    78  
    79        resources {
    80          cpu    = 500
    81          memory = 128
    82        }
    83  
    84        constraint {
    85          attribute = "kernel.arch"
    86          value     = "amd64"
    87        }
    88      }
    89  
    90      constraint {
    91        attribute = "kernel.os"
    92        value     = "linux"
    93      }
    94  
    95      meta {
    96        elb_mode     = "tcp"
    97        elb_interval = 10
    98        elb_checks   = 3
    99      }
   100    }
   101  }