github.com/emate/nomad@v0.8.2-wo-binpacking/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      migrate {
    71          max_parallel = 2
    72          health_check = "task_states"
    73          min_healthy_time = "11s"
    74          healthy_deadline = "11m"
    75      }
    76  
    77      task "binstore" {
    78        driver = "docker"
    79        user   = "bob"
    80        leader = true
    81  
    82        config {
    83          image = "hashicorp/binstore"
    84  
    85          labels {
    86            FOO = "bar"
    87          }
    88        }
    89  
    90        logs {
    91          max_files     = 14
    92          max_file_size = 101
    93        }
    94  
    95        env {
    96          HELLO = "world"
    97          LOREM = "ipsum"
    98        }
    99  
   100        service {
   101          tags = ["foo", "bar"]
   102          port = "http"
   103  
   104          check {
   105            name     = "check-name"
   106            type     = "tcp"
   107            interval = "10s"
   108            timeout  = "2s"
   109            port     = "admin"
   110  
   111            check_restart {
   112              limit = 3
   113              grace = "10s"
   114              ignore_warnings = true
   115            }
   116          }
   117        }
   118  
   119        resources {
   120          cpu    = 500
   121          memory = 128
   122  
   123          network {
   124            mbits = "100"
   125  
   126            port "one" {
   127              static = 1
   128            }
   129  
   130            port "two" {
   131              static = 2
   132            }
   133  
   134            port "three" {
   135              static = 3
   136            }
   137  
   138            port "http" {
   139            }
   140  
   141            port "https" {
   142            }
   143  
   144            port "admin" {
   145            }
   146          }
   147        }
   148  
   149        kill_timeout = "22s"
   150  
   151        shutdown_delay = "11s"
   152  
   153        artifact {
   154          source = "http://foo.com/artifact"
   155  
   156          options {
   157            checksum = "md5:b8a4f3f72ecab0510a6a31e997461c5f"
   158          }
   159        }
   160  
   161        artifact {
   162          source = "http://bar.com/artifact"
   163          destination = "test/foo/"
   164          mode = "file"
   165  
   166          options {
   167            checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c"
   168          }
   169        }
   170  
   171        vault {
   172          policies = ["foo", "bar"]
   173        }
   174  
   175        template {
   176          source = "foo"
   177          destination = "foo"
   178          change_mode = "foo"
   179          change_signal = "foo"
   180          splay = "10s"
   181          env = true
   182          vault_grace = "33s"
   183        }
   184  
   185        template {
   186          source = "bar"
   187          destination = "bar"
   188          perms = "777"
   189          left_delimiter = "--"
   190          right_delimiter = "__"
   191        }
   192      }
   193  
   194      task "storagelocker" {
   195        driver = "docker"
   196  
   197        config {
   198          image = "hashicorp/storagelocker"
   199        }
   200  
   201        resources {
   202          cpu    = 500
   203          memory = 128
   204          iops   = 30
   205        }
   206  
   207        constraint {
   208          attribute = "kernel.arch"
   209          value     = "amd64"
   210        }
   211  
   212        vault {
   213          policies = ["foo", "bar"]
   214          env = false
   215          change_mode = "signal"
   216          change_signal = "SIGUSR1"
   217        }
   218      }
   219  
   220      constraint {
   221        attribute = "kernel.os"
   222        value     = "linux"
   223      }
   224  
   225      meta {
   226        elb_mode     = "tcp"
   227        elb_interval = 10
   228        elb_checks   = 3
   229      }
   230    }
   231  }