github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/jobspec/test-fixtures/basic.hcl (about)

     1  job "binstore-storagelocker" {
     2    region      = "fooregion"
     3    namespace   = "foonamespace"
     4    type        = "batch"
     5    priority    = 52
     6    all_at_once = true
     7    datacenters = ["us2", "eu1"]
     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      health_check = "manual"
    23      min_healthy_time = "10s"
    24      healthy_deadline = "10m"
    25      auto_revert = true
    26      canary = 1
    27    }
    28  
    29    task "outside" {
    30      driver = "java"
    31  
    32      config {
    33        jar_path = "s3://my-cool-store/foo.jar"
    34      }
    35  
    36      meta {
    37        my-cool-key = "foobar"
    38      }
    39    }
    40  
    41    group "binsl" {
    42      count = 5
    43  
    44      restart {
    45        attempts = 5
    46        interval = "10m"
    47        delay    = "15s"
    48        mode     = "delay"
    49      }
    50  
    51      reschedule {
    52         attempts = 5
    53         interval = "12h"
    54      }
    55  
    56      ephemeral_disk {
    57          sticky = true
    58          size = 150
    59      }
    60  
    61      update {
    62          max_parallel = 3
    63          health_check = "checks"
    64          min_healthy_time = "1s"
    65          healthy_deadline = "1m"
    66          auto_revert = false
    67          canary = 2
    68      }
    69  
    70      task "binstore" {
    71        driver = "docker"
    72        user   = "bob"
    73        leader = true
    74  
    75        config {
    76          image = "hashicorp/binstore"
    77  
    78          labels {
    79            FOO = "bar"
    80          }
    81        }
    82  
    83        logs {
    84          max_files     = 14
    85          max_file_size = 101
    86        }
    87  
    88        env {
    89          HELLO = "world"
    90          LOREM = "ipsum"
    91        }
    92  
    93        service {
    94          tags = ["foo", "bar"]
    95          port = "http"
    96  
    97          check {
    98            name     = "check-name"
    99            type     = "tcp"
   100            interval = "10s"
   101            timeout  = "2s"
   102            port     = "admin"
   103  
   104            check_restart {
   105              limit = 3
   106              grace = "10s"
   107              ignore_warnings = true
   108            }
   109          }
   110        }
   111  
   112        resources {
   113          cpu    = 500
   114          memory = 128
   115  
   116          network {
   117            mbits = "100"
   118  
   119            port "one" {
   120              static = 1
   121            }
   122  
   123            port "two" {
   124              static = 2
   125            }
   126  
   127            port "three" {
   128              static = 3
   129            }
   130  
   131            port "http" {
   132            }
   133  
   134            port "https" {
   135            }
   136  
   137            port "admin" {
   138            }
   139          }
   140        }
   141  
   142        kill_timeout = "22s"
   143  
   144        shutdown_delay = "11s"
   145  
   146        artifact {
   147          source = "http://foo.com/artifact"
   148  
   149          options {
   150            checksum = "md5:b8a4f3f72ecab0510a6a31e997461c5f"
   151          }
   152        }
   153  
   154        artifact {
   155          source = "http://bar.com/artifact"
   156          destination = "test/foo/"
   157          mode = "file"
   158  
   159          options {
   160            checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c"
   161          }
   162        }
   163  
   164        vault {
   165          policies = ["foo", "bar"]
   166        }
   167  
   168        template {
   169          source = "foo"
   170          destination = "foo"
   171          change_mode = "foo"
   172          change_signal = "foo"
   173          splay = "10s"
   174          env = true
   175          vault_grace = "33s"
   176        }
   177  
   178        template {
   179          source = "bar"
   180          destination = "bar"
   181          perms = "777"
   182          left_delimiter = "--"
   183          right_delimiter = "__"
   184        }
   185      }
   186  
   187      task "storagelocker" {
   188        driver = "docker"
   189  
   190        config {
   191          image = "hashicorp/storagelocker"
   192        }
   193  
   194        resources {
   195          cpu    = 500
   196          memory = 128
   197          iops   = 30
   198        }
   199  
   200        constraint {
   201          attribute = "kernel.arch"
   202          value     = "amd64"
   203        }
   204  
   205        vault {
   206          policies = ["foo", "bar"]
   207          env = false
   208          change_mode = "signal"
   209          change_signal = "SIGUSR1"
   210        }
   211      }
   212  
   213      constraint {
   214        attribute = "kernel.os"
   215        value     = "linux"
   216      }
   217  
   218      meta {
   219        elb_mode     = "tcp"
   220        elb_interval = 10
   221        elb_checks   = 3
   222      }
   223    }
   224  }