github.com/jrxfive/nomad@v0.6.1-0.20170802162750-1fef470e89bf/jobspec/test-fixtures/basic.hcl (about)

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