github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/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.5.5
    19  
    20  ### Docker `load` changes
    21  
    22  Nomad 0.5.5 has a backward incompatible change in the `docker` driver's
    23  configuration. Prior to 0.5.5 the `load` configuration option accepted a list
    24  images to load, in 0.5.5 it has been changed to a single string. No
    25  functionality was changed. Even if more than one item was specificed prior to
    26  0.5.5 only the first item was used.
    27  
    28  To do a zero-downtime deploy with jobs that use the `load` option:
    29  
    30  * Upgrade servers to version 0.5.5 or later.
    31  
    32  * Deploy new client nodes on the same version as the servers.
    33  
    34  * Resubmit jobs with the `load` option fixed and a constraint to only run on
    35    version 0.5.5 or later:
    36  
    37  ```hcl
    38      constraint {
    39        attribute = "${attr.nomad.version}"
    40        operator  = "version"
    41        value     = ">= 0.5.5"
    42      }
    43  ```
    44  
    45  * Drain and shutdown old client nodes.
    46  
    47  ### Validation changes
    48  
    49  Due to internal job serialization and validation changes you may run into
    50  issues using 0.5.5 command line tools such as `nomad run` and `nomad validate`
    51  with 0.5.4 or earlier agents.
    52  
    53  It is recommended you upgrade agents before or alongside your command line
    54  tools.
    55  
    56  ## Nomad 0.4.0
    57  
    58  Nomad 0.4.0 has backward incompatible changes in the logic for Consul
    59  deregistration.  When a Task which was started by Nomad 0.3.X is uncleanly shut
    60  down, the Nomad 0.4 Client will no longer clean up any stale services.  If an
    61  in-place upgrade of the Nomad client to 0.4 prevents the Task from gracefully
    62  shutting down and deregistering its Consul-registered services, the Nomad Client
    63  will not clean up the remaining Consul services registered with the 0.3
    64  Executor.
    65  
    66  We recommend draining a node before upgrading to 0.4.0 and then re-enabling the
    67  node once the upgrade is complete.
    68  
    69  
    70  ## Nomad 0.3.1
    71  
    72  Nomad 0.3.1 removes artifact downloading from driver configs and places them as
    73  a first class element of the task. As such, jobs will have to be rewritten in
    74  the proper format and resubmitted to Nomad. Nomad clients will properly
    75  re-attach to existing tasks but job definitions must be updated before they can
    76  be dispatched to clients running 0.3.1.
    77  
    78  ## Nomad 0.3.0
    79  
    80  Nomad 0.3.0 has made several substantial changes to job files included a new
    81  `log` block and variable interpretation syntax (`${var}`), a modified `restart`
    82  policy syntax, and minimum resources for tasks as well as validation. These
    83  changes require a slight change to the default upgrade flow.
    84  
    85  After upgrading the version of the servers, all previously submitted jobs must
    86  be resubmitted with the updated job syntax using a Nomad 0.3.0 binary.
    87  
    88  * All instances of `$var` must be converted to the new syntax of `${var}`
    89  
    90  * All tasks must provide their required resources for CPU, memory and disk as
    91    well as required network usage if ports are required by the task.
    92  
    93  * Restart policies must be updated to indicate whether it is desired for the
    94    task to restart on failure or to fail using `mode = "delay"` or `mode =
    95    "fail"` respectively.
    96  
    97  * Service names that include periods will fail validation. To fix, remove any
    98    periods from the service name before running the job.
    99  
   100  After updating the Servers and job files, Nomad Clients can be upgraded by first
   101  draining the node so no tasks are running on it. This can be verified by running
   102  `nomad node-status <node-id>` and verify there are no tasks in the `running`
   103  state. Once that is done the client can be killed, the `data_dir` should be
   104  deleted and then Nomad 0.3.0 can be launched.