Skip to content

Commit

Permalink
Fix website
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed May 31, 2018
1 parent 29a8747 commit f9d2bea
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ description: |-

# Cloud Auto-joining

As of Nomad 0.8.4, `retry-join` accepts a unified interface using the
As of Nomad 0.8.4,
[`retry_join`](/docs/agent/configuration/server_join.html#retry_join) accepts a
unified interface using the
[go-discover](https://github.com/hashicorp/go-discover) library for doing
automatic cluster joining using cloud metadata. To use retry-join with a
supported cloud provider, specify the configuration on the command line or
Expand Down
2 changes: 1 addition & 1 deletion website/source/docs/agent/configuration/client.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ client {
receive work. This may be specified as an IP address or DNS, with or without
the port. If the port is omitted, the default port of `4647` is used.

- `server_join` <code>([server_join](#server-join): nil)</code> - Specifies
- `server_join` <code>([server_join][server-join]: nil)</code> - Specifies
how the Nomad client will connect to Nomad servers. The `start_join` field
is not supported on the client. The retry_join fields may directly specify
the server address or use go-discover syntax for auto-discovery. See the
Expand Down
30 changes: 15 additions & 15 deletions website/source/docs/agent/configuration/server.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ server {
cluster again when starting. This flag allows the previous state to be used to
rejoin the cluster.

- `server_join` <code>([server_join](#server-join): nil)</code> - Specifies
how the Nomad client will connect to Nomad servers. The retry_join fields may
directly specify the server address or use go-discover syntax for
auto-discovery. See the documentation for more detail.
- `server_join` <code>([server_join][server-join]: nil)</code> - Specifies
how the Nomad server will connect to other Nomad servers. The `retry_join`
fields may directly specify the server address or use go-discover syntax for
auto-discovery. See the [server_join documentation][server-join] for more detail.

- `upgrade_version` `(string: "")` - A custom version of the format X.Y.Z to use
in place of the Nomad version when custom upgrades are enabled in Autopilot.
Expand All @@ -153,25 +153,25 @@ server {
succeeds. After one succeeds, no further addresses will be contacted. This is
useful for cases where we know the address will become available eventually.
Use `retry_join` with an array as a replacement for `start_join`, **do not use
both options**. See the [server_join](#server-join)
both options**. See the [server_join][server-join]
section for more information on the format of the string. This field is
deprecated in favor of [server_join](#server-join).
deprecated in favor of the [server_join stanza][server-join].

- `retry_interval` `(string: "30s")` - Specifies the time to wait between retry
join attempts. This field is deprecated in favor of
[server_join](#server-join).
join attempts. This field is deprecated in favor of the [server_join
stanza][server-join].

- `retry_max` `(int: 0)` - Specifies the maximum number of join attempts to be
made before exiting with a return code of 1. By default, this is set to 0
which is interpreted as infinite retries. This field is deprecated in favor
of [server_join](#server-join).
which is interpreted as infinite retries. This field is deprecated in favor of
the [server_join stanza][server-join].

- `start_join` `(array<string>: [])` - Specifies a list of server addresses to
join on startup. If Nomad is unable to join with any of the specified
addresses, agent startup will fail. See the
[server address format](#server-address-format) section for more information
on the format of the string. This field is deprecated in favor of
[server_join](#server-join).
addresses, agent startup will fail. See the [server address
format](/docs/agent/configuration/server_join.html#server-address-format)
section for more information on the format of the string. This field is
deprecated in favor of the [server_join stanza][server-join].

## `server` Examples

Expand Down Expand Up @@ -219,4 +219,4 @@ server {
```

[encryption]: /docs/agent/encryption.html "Nomad Agent Encryption"
[server-join]: /docs/agent/configuration/server_join.html.md "Server Join"
[server-join]: /docs/agent/configuration/server_join.html "Server Join"
75 changes: 44 additions & 31 deletions website/source/docs/agent/configuration/server_join.html.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
---
layout: "docs"
page_title: "server_join Stanza - Agent Configuration"
sidebar_current: "docs-agent-configuration-server_join"
sidebar_current: "docs-agent-configuration--server-join"
description: |-
The server_join stanza specifies how the Nomad agent will discover and connect to Nomad servers.
The "server_join" stanza specifies how the Nomad agent will discover and connect to Nomad servers.
---

# `server_join` Stanza

The server_join stanza specifies how the Nomad agent will discover and connect to Nomad servers.
<table class="table table-bordered table-striped">
<tr>
<th width="120">Placement</th>
<td>
<code>server -> **server_join**</code>
<br>
<code>client -> **server_join**</code>
</td>
</tr>
</table>

The `server_join` stanza specifies how the Nomad agent will discover and connect
to Nomad servers.

```hcl
server_join {
Expand All @@ -20,60 +32,60 @@ server_join {

## `server_join` Parameters

- `retry_join` `(array<string>: [])` - Specifies a list of server
addresses to retry joining if the first attempt fails. This is similar to
[`start_join`](#start_join), but only invokes if the initial join attempt
fails, and is available to both Nomad servers and clients, while
`start_join` is only defined for Nomad servers. The list of addresses will
be tried in the order specified, until one succeeds. After one succeeds, no
further addresses will be contacted. This is
useful for cases where we know the address will become available eventually.
Use `retry_join` with an array as a replacement for `start_join`, **do not use
both options**.

Address format includes both using IP addresses as well as an interface to the
- `retry_join` `(array<string>: [])` - Specifies a list of server addresses to
join. This is similar to [`start_join`](#start_join), but will continue to
be attempted even if the initial join attempt fails, up to
[retry_max](#retry_max). Further, `retry_join` is available to
both Nomad servers and clients, while `start_join` is only defined for Nomad
servers. This is useful for cases where we know the address will become
available eventually. Use `retry_join` with an array as a replacement for
`start_join`, **do not use both options**.

Address format includes both using IP addresses as well as an interface to the
[go-discover](https://github.com/hashicorp/go-discover) library for doing
automated cluster joining using cloud metadata.
See Cloud Auto Join`<code>([CloudAutoJoin][cloud_auto_join]: nil)</code>.
automated cluster joining using cloud metadata. See [Cloud
Auto-join][cloud_auto_join] for more information.

```
```
server_join {
retry_join = [ "1.1.1.1", "2.2.2.2" ]
}
```
Using the `go-discover` interface, this can be defined both in a client or
Using the `go-discover` interface, this can be defined both in a client or
server configuration as well as provided as a command-line argument.
```
```
server_join {
retry_join = [ "provider=aws tag_key=..." ]
}
```
See the [server address format](#server-address-format) for more information
See the [server address format](#server-address-format) for more information
about expected server address formats.
- `retry_interval` `(string: "30s")` - Specifies the time to wait between retry
- `retry_interval` `(string: "30s")` - Specifies the time to wait between retry
join attempts.
- `retry_max` `(int: 0)` - Specifies the maximum number of join attempts to be
- `retry_max` `(int: 0)` - Specifies the maximum number of join attempts to be
made before exiting with a return code of 1. By default, this is set to 0
which is interpreted as infinite retries.
- `start_join` `(array<string>: [])` - Specifies a list of server addresses to
- `start_join` `(array<string>: [])` - Specifies a list of server addresses to
join on startup. If Nomad is unable to join with any of the specified
addresses, agent startup will fail. See the
[server address format](#server-address-format) section for more information
on the format of the string. This field is defined only for Nomad servers and
will result in a configuration parse error if included in a client
configuration.
### Server Address Format
## Server Address Format
This section describes the acceptable syntax and format for describing the
location of a Nomad server. There are many ways to reference a Nomad server,
including directly by IP address and resolving through DNS.
#### Directly via IP Address
### Directly via IP Address
It is possible to address another Nomad server using its IP address. This is
done in the `ip:port` format, such as:
Expand All @@ -89,7 +101,7 @@ unless configured otherwise:
1.2.3.4 => 1.2.3.4:4648
```
#### Via Domains or DNS
### Via Domains or DNS
It is possible to address another Nomad server using its DNS address. This is
done in the `address:port` format, such as:
Expand All @@ -105,14 +117,15 @@ unless configured otherwise:
nomad-01.company.local => nomad-01.company.local:4648
```
#### Via the go-discover interface
### Via the go-discover interface
As of Nomad 0.8.4, `retry_join` accepts a unified interface using the
[go-discover](https://github.com/hashicorp/go-discover) library for doing
automated cluster joining using cloud metadata.
automated cluster joining using cloud metadata. See [Cloud
Auto-join][cloud_auto_join] for more information.
```
"provider=aws tag_key=..." => 1.2.3.4:4648
See <code>([CloudAutoJoin][cloud_auto_join]: nil)</code> for further information.
```
[cloud_auto_join]: /docs/agent/cloud_auto_join.html "Nomad Cloud Auto-join"
13 changes: 7 additions & 6 deletions website/source/docs/commands/agent.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ via CLI arguments. The `agent` command accepts the following arguments:
* `-region=<region>`: Equivalent to the [region](#region) config option.
* `-rejoin`: Equivalent to the [rejoin_after_leave](#rejoin_after_leave) config option.
* `-retry-interval`: Equivalent to the [retry_interval](#retry_interval) config option.
* `-retry-join`: Similar to `-join` but allows retrying a join if the first attempt fails.
* `-retry-join`: Similar to `-join` but allows retrying a join if the first attempt fails.

Note that `retry_join` can be defined for only servers as a command-line
flag (clients are only able to define via the client configuration).
```sh
$ nomad agent -retry-join "127.0.0.1:4648"
`
```sh
$ nomad agent -retry-join "127.0.0.1:4648"
```

Note that `retry_join` can be defined for only servers as a command-line
flag (clients are only able to define via the client configuration).

* `-retry-max`: Similar to the [retry_max](#retry_max) config option.
* `-server`: Enable server mode on the local agent.
Expand Down
11 changes: 6 additions & 5 deletions website/source/layouts/docs.erb
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@
<a href="/docs/agent/index.html">Nomad Agent</a>

<ul class="nav">
<li <%= sidebar_current("docs-agent-cloud-auto-join") %>>
<a href="/docs/agent/cloud_auto_join.html">Cloud Auto-join</a>
</li>
<li<%= sidebar_current("docs-agent-configuration") %>>
<a href="/docs/agent/configuration/index.html">Configuration</a>
<ul class="nav">
Expand All @@ -402,9 +405,6 @@
<li <%= sidebar_current("docs-agent-configuration-autopilot") %>>
<a href="/docs/agent/configuration/autopilot.html">autopilot</a>
</li>
<li <%= sidebar_current("docs-agent-configuration-cloud-auto-join") %>>
<a href="/docs/agent/configuration/cloud-auto-join.html">cloud auto join</a>
</li>
<li <%= sidebar_current("docs-agent-configuration-client") %>>
<a href="/docs/agent/configuration/client.html">client</a>
</li>
Expand All @@ -417,8 +417,8 @@
<li <%= sidebar_current("docs-agent-configuration-server") %>>
<a href="/docs/agent/configuration/server.html">server</a>
</li>
<li <%= sidebar_current("docs-agent-configuration-server_join") %>>
<a href="/docs/agent/configuration/server_join.html">server_join</>
<li <%= sidebar_current("docs-agent-configuration--server-join") %>>
<a href="/docs/agent/configuration/server_join.html">server_join</a>
</li>
<li <%= sidebar_current("docs-agent-configuration-telemetry") %>>
<a href="/docs/agent/configuration/telemetry.html">telemetry</a>
Expand All @@ -431,6 +431,7 @@
</li>
</ul>
</li>

<li<%= sidebar_current("docs-agent-encryption") %>>
<a href="/docs/agent/encryption.html">Encryption</a>
</li>
Expand Down

0 comments on commit f9d2bea

Please sign in to comment.