github.com/jrxfive/nomad@v0.6.1-0.20170802162750-1fef470e89bf/website/source/docs/upgrade/upgrade-specific.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Upgrade Guides"
     4  sidebar_current: "docs-upgrade-specific"
     5  description: |-
     6    Specific versions of Nomad may have additional information about the upgrade
     7    process beyond the standard flow.
     8  ---
     9  
    10  # Upgrading Specific Versions
    11  
    12  The [upgrading page](/docs/upgrade/index.html) covers the details of doing
    13  a standard upgrade. However, specific versions of Nomad may have more
    14  details provided for their upgrades as a result of new features or changed
    15  behavior. This page is used to document those details separately from the
    16  standard upgrade flow.
    17  
    18  ## Nomad 0.6.0
    19  
    20  ### Default `advertise` address changes
    21  
    22  When no `advertise` address was specified and Nomad's `bind_addr` was loopback
    23  or `0.0.0.0`, Nomad attempted to resolve the local hostname to use as an
    24  advertise address.
    25  
    26  Many hosts cannot properly resolve their hostname, so Nomad 0.6 defaults
    27  `advertise` to the first private IP on the host (e.g. `10.1.2.3`).
    28  
    29  If you manually configure `advertise` addresses no changes are necessary.
    30  
    31  ## Nomad 0.5.5
    32  
    33  ### Docker `load` changes
    34  
    35  Nomad 0.5.5 has a backward incompatible change in the `docker` driver's
    36  configuration. Prior to 0.5.5 the `load` configuration option accepted a list
    37  images to load, in 0.5.5 it has been changed to a single string. No
    38  functionality was changed. Even if more than one item was specified prior to
    39  0.5.5 only the first item was used.
    40  
    41  To do a zero-downtime deploy with jobs that use the `load` option:
    42  
    43  * Upgrade servers to version 0.5.5 or later.
    44  
    45  * Deploy new client nodes on the same version as the servers.
    46  
    47  * Resubmit jobs with the `load` option fixed and a constraint to only run on
    48    version 0.5.5 or later:
    49  
    50  ```hcl
    51      constraint {
    52        attribute = "${attr.nomad.version}"
    53        operator  = "version"
    54        value     = ">= 0.5.5"
    55      }
    56  ```
    57  
    58  * Drain and shutdown old client nodes.
    59  
    60  ### Validation changes
    61  
    62  Due to internal job serialization and validation changes you may run into
    63  issues using 0.5.5 command line tools such as `nomad run` and `nomad validate`
    64  with 0.5.4 or earlier agents.
    65  
    66  It is recommended you upgrade agents before or alongside your command line
    67  tools.
    68  
    69  ## Nomad 0.4.0
    70  
    71  Nomad 0.4.0 has backward incompatible changes in the logic for Consul
    72  deregistration.  When a Task which was started by Nomad v0.3.x is uncleanly shut
    73  down, the Nomad 0.4 Client will no longer clean up any stale services.  If an
    74  in-place upgrade of the Nomad client to 0.4 prevents the Task from gracefully
    75  shutting down and deregistering its Consul-registered services, the Nomad Client
    76  will not clean up the remaining Consul services registered with the 0.3
    77  Executor.
    78  
    79  We recommend draining a node before upgrading to 0.4.0 and then re-enabling the
    80  node once the upgrade is complete.
    81  
    82  
    83  ## Nomad 0.3.1
    84  
    85  Nomad 0.3.1 removes artifact downloading from driver configurations and places them as
    86  a first class element of the task. As such, jobs will have to be rewritten in
    87  the proper format and resubmitted to Nomad. Nomad clients will properly
    88  re-attach to existing tasks but job definitions must be updated before they can
    89  be dispatched to clients running 0.3.1.
    90  
    91  ## Nomad 0.3.0
    92  
    93  Nomad 0.3.0 has made several substantial changes to job files included a new
    94  `log` block and variable interpretation syntax (`${var}`), a modified `restart`
    95  policy syntax, and minimum resources for tasks as well as validation. These
    96  changes require a slight change to the default upgrade flow.
    97  
    98  After upgrading the version of the servers, all previously submitted jobs must
    99  be resubmitted with the updated job syntax using a Nomad 0.3.0 binary.
   100  
   101  * All instances of `$var` must be converted to the new syntax of `${var}`
   102  
   103  * All tasks must provide their required resources for CPU, memory and disk as
   104    well as required network usage if ports are required by the task.
   105  
   106  * Restart policies must be updated to indicate whether it is desired for the
   107    task to restart on failure or to fail using `mode = "delay"` or `mode =
   108    "fail"` respectively.
   109  
   110  * Service names that include periods will fail validation. To fix, remove any
   111    periods from the service name before running the job.
   112  
   113  After updating the Servers and job files, Nomad Clients can be upgraded by first
   114  draining the node so no tasks are running on it. This can be verified by running
   115  `nomad node-status <node-id>` and verify there are no tasks in the `running`
   116  state. Once that is done the client can be killed, the `data_dir` should be
   117  deleted and then Nomad 0.3.0 can be launched.