github.com/ranjib/nomad@v0.1.1-0.20160225204057-97751b02f70b/jobspec/test-fixtures/basic.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  
     8      meta {
     9          foo = "bar"
    10      }
    11  
    12      constraint {
    13          attribute = "kernel.os"
    14          value = "windows"
    15      }
    16  
    17      update {
    18          stagger = "60s"
    19          max_parallel = 2
    20      }
    21  
    22      task "outside" {
    23          driver = "java"
    24          config {
    25             jar = "s3://my-cool-store/foo.jar"
    26          }
    27          meta {
    28             my-cool-key = "foobar"
    29          }
    30      }
    31  
    32      group "binsl" {
    33          count = 5
    34          restart {
    35              attempts = 5
    36              interval = "10m"
    37              delay = "15s"
    38              mode = "delay"
    39          }
    40          task "binstore" {
    41              driver = "docker"
    42              config {
    43                  image = "hashicorp/binstore"
    44              }
    45              logs {
    46                  max_files = 10
    47                  max_file_size = 100
    48              }
    49              env {
    50                HELLO = "world"
    51                LOREM = "ipsum"
    52              }
    53              service {
    54                  tags = ["foo", "bar"]
    55                  port = "http"
    56                  check {
    57                      name = "check-name"
    58                      type = "tcp"
    59                      interval = "10s"
    60                      timeout = "2s"
    61                  }
    62              }
    63              resources {
    64                  cpu = 500
    65                  memory = 128
    66  
    67                  network {
    68                      mbits = "100"
    69                      port "one" {
    70                          static = 1
    71                      }
    72                      port "two" {
    73                          static = 2
    74                      }
    75                      port "three" {
    76                          static = 3
    77                      }
    78                      port "http" {}
    79                      port "https" {}
    80                      port "admin" {}
    81                  }
    82              }
    83  
    84              kill_timeout = "22s"
    85          }
    86  
    87          task "storagelocker" {
    88              driver = "java"
    89              config {
    90                  image = "hashicorp/storagelocker"
    91              }
    92              resources {
    93                  cpu = 500
    94                  memory = 128
    95                  IOPS = 30
    96              }
    97              constraint {
    98                  attribute = "kernel.arch"
    99                  value = "amd64"
   100              }
   101          }
   102  
   103          constraint {
   104              attribute = "kernel.os"
   105              value = "linux"
   106          }
   107  
   108          meta {
   109              elb_mode = "tcp"
   110              elb_interval = 10
   111              elb_checks = 3
   112          }
   113      }
   114  }