15 lines
6.9 KiB
HTML
15 lines
6.9 KiB
HTML
<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width, initial-scale=1.0"> <meta name=description content=""> <meta name=author content=""> <title>Upgrading Serf - Serf</title> <link href="/stylesheets/bootstrap.min-82fe1490.css" media=screen rel=stylesheet /><link href="/stylesheets/main-e5014f86.css" media=screen rel=stylesheet /> <!--[if lt IE 9]><script src="/javascripts/html5shiv-310dd184.js"></script> <script src="/javascripts/respond.min-88c91176.js"></script><![endif]--> <script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-45101516-1', 'serfdom.io');
|
|
ga('send', 'pageview');
|
|
|
|
</script> </head> <body class="page-Upgrading Serf"> <div id=header> <div class=container> <a class="navbar-brand logo" href="/"> <span></span> </a> <a class="navbar-brand text rls-l" href="/">SERF</a> <ul class="buttons nav navbar-nav navbar-right rls-sb"> <li class=first><a href="/downloads.html">Download</a></li> <li><a href="https://github.com/hashicorp/serf">Github</a></li> </ul> <ul class="main-links nav navbar-nav navbar-right rls-sb"> <li><a href="/intro/index.html">Intro</a></li> <li><a href="/docs/index.html">Docs</a></li> <li><a href="/community.html">Community</a></li> </ul> </div> </div> <div class=container> <div class=col-md-4> <div class="docs-sidebar hidden-print affix-top" role=complementary> <ul class="nav docs-sidenav"> <li> <a href="/docs/index.html">Documentation Home</a> </li> <li class=active> <a href="/docs/upgrading.html">Upgrading and Compatibility</a> <ul class=nav> <li class=active> <a href="/docs/upgrading.html">Upgrading Serf</a> </li> <li> <a href="/docs/compatibility.html">Compatibility Promise</a> </li> </ul> </li> <li> <a href="/docs/internals/index.html">Serf Internals</a> <ul class=nav> <li> <a href="/docs/internals/gossip.html">Gossip Protocol</a> </li> <li> <a href="/docs/internals/security.html">Security Model</a> </li> <li> <a href="/docs/internals/simulator.html">Convergence Simulator</a> </li> </ul> </li> <li> <a href="/docs/commands/index.html">Serf Commands (CLI)</a> <ul class=nav> <li> <a href="/docs/commands/agent.html">agent</a> </li> <li> <a href="/docs/commands/event.html">event</a> </li> <li> <a href="/docs/commands/force-leave.html">force-leave</a> </li> <li> <a href="/docs/commands/join.html">join</a> </li> <li> <a href="/docs/commands/keygen.html">keygen</a> </li> <li> <a href="/docs/commands/leave.html">leave</a> </li> <li> <a href="/docs/commands/members.html">members</a> </li> <li> <a href="/docs/commands/monitor.html">monitor</a> </li> </ul> </li> <li> <a href="/docs/agent/basics.html">Serf Agent</a> <ul class=nav> <li> <a href="/docs/agent/basics.html">Running and Stopping</a> </li> <li> <a href="/docs/agent/options.html">Configuration</a> </li> <li> <a href="/docs/agent/event-handlers.html">Event Handlers</a> </li> <li> <a href="/docs/agent/encryption.html">Encryption</a> </li> <li> <a href="/docs/agent/rpc.html">RPC Protocol</a> </li> </ul> <li> <a href="/docs/roadmap.html">Roadmap</a> </li> </ul> </div> </div> <div class=col-md-8 role=main> <div class=bs-docs-section> <h1 id=toc_0>Upgrading Serf</h1> <p>Serf is meant to be a long-running agent on any nodes participating in a Serf cluster. These nodes consistently communicate with each other. As such, protocol level compatibility and ease of upgrades is an important thing to keep in mind when using Serf.</p> <p>This page documents how to upgrade Serf when a new version is released.</p> <h2 id=toc_1>Upgrading Serf</h2> <p>In short, upgrading Serf is a short series of easy steps. For the steps below, assume you're running version A of Serf, and then version B comes out.</p> <ol> <li><p>On each node, install version B of Serf.</p></li> <li><p>Shut down version A, and start version B with the <code>-protocol=PREVIOUS</code> flag, where "PREVIOUS" is the protocol version of version A (which can be discovered by running <code>serf -v</code> or `serf members -detailed).</p></li> <li><p>Once all nodes are running version B, go through every node and restart the version B agent <em>without</em> the <code>-protocol</code> flag.</p></li> <li><p>Done! You're now running the latest Serf agent speaking the latest protocol. You can verify this is the case by running <code>serf members -detailed</code> to make sure all members are speaking the same, latest protocol version.</p></li> </ol> <p>The key to making this work is the <a href="/docs/compatibility.html">protocol compatibility</a> of Serf. The protocol version system is discussed below.</p> <h2 id=toc_2>Protocol Versions</h2> <p>By default, Serf agents speak the latest protocol they can. However, each new version of Serf is also able to speak the previous protocol, if there were any protocol changes.</p> <p>You can see what protocol versions your version of Serf understands by running <code>serf -v</code>. You'll see output similar to that below:</p> <pre><code>$ serf -v
|
|
Serf v0.2.0
|
|
Agent Protocol: 1 (Understands back to: 0)
|
|
</code></pre> <p>This says the version of Serf as well as the latest protocol version (1, in this case). It also says the earliest protocol version that this Serf agent can understand (0, in this case).</p> <p>By specifying the <code>-protocol</code> flag on <code>serf agent</code>, you can tell the Serf agent to speak any protocol version that it can understand. This only specifies the protocol version to <em>speak</em>. Every Serf agent can always understand the entire range of protocol versions it claims to on <code>serf -v</code>.</p> <div class="alert alert-block alert-warning"> <strong>By running a previous protocol version</strong>, some features of Serf, especially newer features, may not be available. If this is the case, Serf will typically warn you. In general, you should always upgrade your cluster so that you can run the latest protocol version. </div> </div> </div> </div> <div id=footer> <div class=container> <div class=footer-links> <ul class="main-links nav navbar-nav rls-sb"> <li><a href="/intro/index.html">Intro</a></li> <li class=active><a href="/docs/index.html">Docs</a></li> <li><a href="/community.html">Community</a></li> </ul> <ul class="buttons nav navbar-nav rls-sb"> <li class=first><a href="/downloads.html">Download</a></li> <li><a href="https://github.com/hashicorp/serf">Github</a></li> </ul> </div> <div class=footer-logo> <span></span> </div> <div class="footer-hashi os"> <span>© 2013. A <a href="//www.hashicorp.com">HashiCorp</a> Project.</span> <a href="//www.hashicorp.com"><img src="/images/hashi-logo-s-3644fe63.png"></a> </div> </div> </div> <script src="javascripts/lib/d3.v3.min.js"></script> <script src="javascripts/app/deploy/site.js"></script> <script>
|
|
Serf.initialize();
|
|
</script> </body> </html> |