github.com/maier/nomad@v0.4.1-0.20161110003312-a9e3d0b8549d/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    vault_token = "foo"
     8  
     9    meta {
    10      foo = "bar"
    11    }
    12  
    13    constraint {
    14      attribute = "kernel.os"
    15      value     = "windows"
    16    }
    17  
    18    update {
    19      stagger      = "60s"
    20      max_parallel = 2
    21    }
    22  
    23    task "outside" {
    24      driver = "java"
    25  
    26      config {
    27        jar_path = "s3://my-cool-store/foo.jar"
    28      }
    29  
    30      meta {
    31        my-cool-key = "foobar"
    32      }
    33    }
    34  
    35    group "binsl" {
    36      count = 5
    37  
    38      restart {
    39        attempts = 5
    40        interval = "10m"
    41        delay    = "15s"
    42        mode     = "delay"
    43      }
    44  
    45      ephemeral_disk {
    46          sticky = true
    47          size = 150
    48      }
    49  
    50      task "binstore" {
    51        driver = "docker"
    52        user   = "bob"
    53  
    54        config {
    55          image = "hashicorp/binstore"
    56  
    57          labels {
    58            FOO = "bar"
    59          }
    60        }
    61  
    62        logs {
    63          max_files     = 10
    64          max_file_size = 100
    65        }
    66  
    67        env {
    68          HELLO = "world"
    69          LOREM = "ipsum"
    70        }
    71  
    72        service {
    73          tags = ["foo", "bar"]
    74          port = "http"
    75  
    76          check {
    77            name     = "check-name"
    78            type     = "tcp"
    79            interval = "10s"
    80            timeout  = "2s"
    81            port     = "admin"
    82          }
    83        }
    84  
    85        resources {
    86          cpu    = 500
    87          memory = 128
    88  
    89          network {
    90            mbits = "100"
    91  
    92            port "one" {
    93              static = 1
    94            }
    95  
    96            port "two" {
    97              static = 2
    98            }
    99  
   100            port "three" {
   101              static = 3
   102            }
   103  
   104            port "http" {
   105            }
   106  
   107            port "https" {
   108            }
   109  
   110            port "admin" {
   111            }
   112          }
   113        }
   114  
   115        kill_timeout = "22s"
   116  
   117        artifact {
   118          source = "http://foo.com/artifact"
   119  
   120          options {
   121            checksum = "md5:b8a4f3f72ecab0510a6a31e997461c5f"
   122          }
   123        }
   124  
   125        artifact {
   126          source = "http://bar.com/artifact"
   127  
   128          options {
   129            checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c"
   130          }
   131        }
   132  
   133        vault {
   134          policies = ["foo", "bar"]
   135        }
   136  
   137        template {
   138          source = "foo"
   139          destination = "foo"
   140          change_mode = "foo"
   141          change_signal = "foo"
   142          splay = "10s"
   143        }
   144  
   145        template {
   146          source = "bar"
   147          destination = "bar"
   148        }
   149      }
   150  
   151      task "storagelocker" {
   152        driver = "docker"
   153  
   154        config {
   155          image = "hashicorp/storagelocker"
   156        }
   157  
   158        resources {
   159          cpu    = 500
   160          memory = 128
   161          iops   = 30
   162        }
   163  
   164        constraint {
   165          attribute = "kernel.arch"
   166          value     = "amd64"
   167        }
   168  
   169        vault {
   170          policies = ["foo", "bar"]
   171          env = false
   172          change_mode = "signal"
   173          change_signal = "SIGUSR1"
   174        }
   175      }
   176  
   177      constraint {
   178        attribute = "kernel.os"
   179        value     = "linux"
   180      }
   181  
   182      meta {
   183        elb_mode     = "tcp"
   184        elb_interval = 10
   185        elb_checks   = 3
   186      }
   187    }
   188  }