open-consul/website/build/docs/agent/options.html

21 lines
13 KiB
HTML
Raw Normal View History

2014-02-08 00:41:03 +00:00
<!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>Configuration - 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-Configuration> <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> <a href="/docs/upgrading.html">Upgrading and Compatibility</a> <ul class=nav> <li> <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 class=active> <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 class=active> <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>Configuration</h1> <p>The agent has various configuration options that can be specified via the command-line or via configuration files. All of the configuration options are completely optional and their defaults will be specified with their descriptions.</p> <p>When loading configuration, Serf loads the configuration from files and directories in the order specified. Configuration specified later will be merged into configuration specified earlier. In most cases, &quot;merge&quot; means that the later version will override the earlier. But in some cases, such as event handlers, merging just appends the handlers. The exact merging behavior will be specified.</p> <p>Serf also supports reloading of configuration when it receives the SIGHUP signal. Not all changes are respected, but those that are are documented below.</p> <h2 id=toc_1>Command-line Options</h2> <p>The options below are all specified on the command-line.</p> <ul> <li><p><code>-bind</code> - The address that Serf will bind to for communication with other Serf nodes. By default this is &quot;0.0.0.0:7946&quot;. Serf nodes may have different ports. If a join is specified without a port, we default to locally configured port. Serf uses both TCP and UDP and use the same port for both, so if you have any firewalls be sure to allow both protocols. If this configuration value is changed and no port is specified, the default of &quot;7946&quot; will be used. An important compatibility note, protocol version 2 introduces support for non-consistent ports across the cluster. For more information, see the <a href="/docs/compatibility.h
{
"role": "load-balancer",
"event_handlers": [
"handle.sh",
"user:deploy=deploy.sh"
]
}
</pre> <h4 id=toc_4>Configuration Key Reference</h4> <ul> <li><p><code>node_name</code> - Equivalent to the <code>-node</code> command-line flag.</p></li> <li><p><code>role</code> - Equivalent to the <code>-role</code> command-line flag.</p></li> <li><p><code>bind</code> - Equivalent to the <code>-bind</code> command-line flag.</p></li> <li><p><code>encrypt_key</code> - Equivalent to the <code>-encrypt</code> command-line flag.</p></li> <li><p><code>log_level</code> - Equivalent to the <code>-log-level</code> command-line flag.</p></li> <li><p><code>profile</code> - Equivalent to the <code>-profile</code> command-line flag.</p></li> <li><p><code>protocol</code> - Equivalent to the <code>-protocol</code> command-line flag.</p></li> <li><p><code>rpc_addr</code> - Equivalent to the <code>-rpc-addr</code> command-line flag.</p></li> <li><p><code>event_handlers</code> - An array of strings specifying the event handlers. The format of the strings is equivalent to the format specified for the <code>-event-handler</code> command-line flag.</p></li> <li><p><code>start_join</code> - An array of strings specifying addresses of nodes to join upon startup.</p></li> <li><p><code>replay_on_join</code> - Equivalent to the <code>-replay</code> command-line flag.</p></li> <li><p><code>snapshot_path</code> - Equivalent to the <code>-snapshot</code> command-line flag.</p></li> <li><p><code>leave_on_terminate</code> - If enabled, when the agent receives a TERM signal, it will send a Leave message to the rest of the cluster and gracefully leave. Defaults to false.</p></li> <li><p><code>leave_on_interrupt</code> - This is the same as <code>leave_on_terminate</code> but only affects interrupt handling. This is usually from a Control-C from a shell. Defaults to true.</p></li> </ul> </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>