github.com/mattyr/nomad@v0.3.3-0.20160919021406-3485a065154a/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  
   138      task "storagelocker" {
   139        driver = "docker"
   140  
   141        config {
   142          image = "hashicorp/storagelocker"
   143        }
   144  
   145        resources {
   146          cpu    = 500
   147          memory = 128
   148          iops   = 30
   149        }
   150  
   151        constraint {
   152          attribute = "kernel.arch"
   153          value     = "amd64"
   154        }
   155      }
   156  
   157      constraint {
   158        attribute = "kernel.os"
   159        value     = "linux"
   160      }
   161  
   162      meta {
   163        elb_mode     = "tcp"
   164        elb_interval = 10
   165        elb_checks   = 3
   166      }
   167    }
   168  }