Skip to content

Commit

Permalink
Merge pull request #341 from arista-eosplus/ztr-doc
Browse files Browse the repository at this point in the history
Add more ZTR information to docs
  • Loading branch information
jerearista committed May 8, 2017
2 parents 443e61a + 46d1c63 commit 6a6f8be
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions docs/cookbook/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Advanced
.. contents:: :local:
:depth: 1

Configuration Management and ZTR
--------------------------------
Configuration Management and prep for ZTR
-----------------------------------------

Objective
^^^^^^^^^
Expand Down Expand Up @@ -80,10 +80,31 @@ Copy and paste the option text into a new template in:
! For serial number, non-default VRF:
action bash export SERIAL=`FastCli -p 15 -c 'show ver' | grep Serial | tr -s ' ' | cut -d ' ' -f 3 | tr -d '\r'`; sudo ip netns exec ns-$vrf_name curl http://$ztpserver:$port/nodes/$SERIAL/startup-config -H "content-type: text/plain" --data-binary @/mnt/flash/startup-config -X PUT
Zero-touch replatement (ZTR)
----------------------------

Explanation
^^^^^^^^^^^
Objective
^^^^^^^^^

I replaced a switch with a new one and want it to provision with the same
configuration and, optionally, EOS version as the node it replaced.

Solution
^^^^^^^^

ZTPServer first looks for a pre-existing definition for a node in the
``<configdir>/nodes/<node-id>`` directory before trying to match through neighbordb, etc.
Thus, you can make ZTPServer think it has already seen this node by
renaming, linking or copying the old-node's directory to the new-node's
unique-id before powering the switch on for the first time.

Moving (renaming) or linking are most commonly used, however, making a
recursive copy will ensure that the last-known configuration of the previous
node remains stored as a backup.

.. code-block:: console
(add explanation here)
cd /usr/share/ztpserver/nodes
ln -s <old-node_id> <new-node_id>
.. End of <RECIPE TITLE>
.. End of ZTR

0 comments on commit 6a6f8be

Please sign in to comment.