Skip to content

Commit

Permalink
Rewrite paths to be internal to repo
Browse files Browse the repository at this point in the history
As-per [this
ticket](https://app.asana.com/0/1207142155269470/1207142155269473/f). The
current content of these files are (were?) served up by the ruby application in
`/website` and could be accessed using `/docs/filename.html`. Since this is
being retired, this content now needs to be accessible (and navigable) from the
GitHub repository alone.

In order to accomplish this, links to `file.html` need to be rewritten
to `file.html.markdown`. The suggestion in the ticket was to use a
codemod to do this - however this could instead be accomplished using
the following `sed` expression:

```bash
find . -type f -name '*.*' -exec sed -i -E '
  s|\/intro\/(.*)\.html\)|\/docs\/intro\/\1.html.markdown\)|g;
  s|\/docs\/(.*)\.html\)|\/docs\/\1.html.markdown\)|g' {} +; git status
```
  • Loading branch information
rmainwork committed Sep 17, 2024
1 parent 0ab9cc3 commit 70e0ba1
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions docs/agent/basics.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ There are six important components that `serf agent` outputs:
By default, this binds only to localhost on the default port. If you
change this address, you'll have to specify an `-rpc-addr` to commands
such as `serf members` so they know how to talk to the agent. This is also
the address other applications can use over [RPC to control Serf](/docs/agent/rpc.html).
the address other applications can use over [RPC to control Serf](/docs/agent/rpc.html.markdown).

* **Encrypted**: This shows if Serf is encrypting all traffic that it
sends and expects to receive. It is a good sanity check to avoid sending
non-encrypted traffic over any public networks. You can read more about
[encryption here](/docs/agent/encryption.html).
[encryption here](/docs/agent/encryption.html.markdown).

* **Snapshot**: This shows if Serf snapshotting is enabled. The snapshot
file enables Serf to automatically re-join a cluster after failure and
prevents replay of events that have already been seen. It requires storing
state on disk, and [must be configured](/docs/agent/options.html)
state on disk, and [must be configured](/docs/agent/options.html.markdown)
using a CLI flag or in the configuration directory. If it is not provided,
other nodes will still attempt to reconnect on recovery, however the node
will take longer to join the cluster and will replay old events.
Expand All @@ -76,7 +76,7 @@ There are six important components that `serf agent` outputs:
be appropriate to the environment Serf is running in. It defaults to
optimizing for a LAN environment, but can also be set for WAN or
local-only communication. The profile can be set in
the [configuration](/docs/agent/options.html).
the [configuration](/docs/agent/options.html.markdown).

## Stopping an Agent

Expand Down
2 changes: 1 addition & 1 deletion docs/agent/encryption.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

The Serf agent supports encrypting all of its network traffic. The exact
method of this encryption is described on the
[encryption internals page](/docs/internals/security.html).
[encryption internals page](/docs/internals/security.html.markdown).

## Enabling Encryption

Expand Down
4 changes: 2 additions & 2 deletions docs/agent/event-handlers.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Serf's true power and flexibility comes in the form of event handlers:
scripts that are executed in response to various events that can occur
related to the Serf cluster. Serf invokes events related to membership
changes (when a node comes online or goes offline) as well as
[custom events](/docs/commands/event.html) or [queries](/docs/commands/query.html).
[custom events](/docs/commands/event.html) or [queries](/docs/commands/query.html.markdown).

Event handlers can be any executable, including piped executables (such
as `awk '{print $2}' | grep foo`), since event handlers are invoked within
Expand Down Expand Up @@ -137,4 +137,4 @@ $stderr.reopen('/dev/null', 'w')
```

**Note:** This method is really only useful for event handlers, and is mostly
useless for [queries](/docs/commands/query.html).
useless for [queries](/docs/commands/query.html.markdown).
10 changes: 5 additions & 5 deletions docs/agent/options.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The options below are all specified on the command-line.
If this configuration value is changed and no port is specified, the default of
"7946" will be used. An important compatibility note, protocol version 2
introduces support for non-consistent ports across the cluster. For more information,
see the [compatibility page](/docs/compatibility.html).
see the [compatibility page](/docs/compatibility.html.markdown).
Note: To use an IPv6 address, specify "[::1]" or "[::1]:7946".

* `-iface` - This flag can be used to provide a binding interface. It can be
Expand Down Expand Up @@ -89,7 +89,7 @@ The options below are all specified on the command-line.
* `-event-handler` - Adds an event handler that Serf will invoke for
events. This flag can be specified multiple times to define multiple
event handlers. By default no event handlers are registered. See the
[event handler page](/docs/agent/event-handlers.html) for more details on
[event handler page](/docs/agent/event-handlers.html.markdown) for more details on
event handlers as well as a syntax for filtering event handlers by event.
Event handlers can be changed by reloading the configuration.

Expand Down Expand Up @@ -124,7 +124,7 @@ The options below are all specified on the command-line.
are too tight.

* `-protocol` - The Serf protocol version to use. This defaults to the latest
version. This should be set only when [upgrading](/docs/upgrading.html).
version. This should be set only when [upgrading](/docs/upgrading.html.markdown).
You can view the protocol versions supported by Serf by running `serf -v`.

* `-retry-join` - Address of another agent to join after starting up. This can
Expand Down Expand Up @@ -157,7 +157,7 @@ The options below are all specified on the command-line.
By default this is "127.0.0.1:7373", allowing only loopback connections.
The RPC address is used by other Serf commands, such as `serf members`,
in order to query a running Serf agent. It is also used by other applications
to control Serf using it's [RPC protocol](/docs/agent/rpc.html).
to control Serf using it's [RPC protocol](/docs/agent/rpc.html.markdown).

* `-snapshot` - The snapshot flag provides a file path that is used to store
recovery information, so when Serf restarts it is able to automatically
Expand Down Expand Up @@ -223,7 +223,7 @@ at a single JSON object with configuration within it.

* `role` - **Deprecated**. Equivalent to the `-role` command-line flag.

* `disable_coordinates` - Disables features related to [network coordinates](/docs/internals/coordinates.html).
* `disable_coordinates` - Disables features related to [network coordinates](/docs/internals/coordinates.html.markdown).

* `tags` - This is a dictionary of tag values. It is the same as specifying
the `tag` command-line flag once per tag.
Expand Down
10 changes: 5 additions & 5 deletions docs/agent/rpc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ following request body:
```

The `Name` is a string, but `Payload` is just opaque bytes. Coalesce
is used to control if Serf should enable [event coalescing](/docs/commands/event.html).
is used to control if Serf should enable [event coalescing](/docs/commands/event.html.markdown).

There is no special response body.

Expand Down Expand Up @@ -217,7 +217,7 @@ the stream is stopped. The request body looks like:
{"Type": "member-join,user:deploy"}`
```

The format of type is the same as the [event handler](/docs/agent/event-handlers.html),
The format of type is the same as the [event handler](/docs/agent/event-handlers.html.markdown),
except no script is specified. The one exception is that `"*"` can be specified to
subscribe to all events.

Expand Down Expand Up @@ -415,7 +415,7 @@ The request looks like:
```

The `Key` should be 32 bytes of base64-encoded data. `24` and `16` bytes are also accepted, but 32 bytes are recommended for improved security. This value can be generated
using the [keygen command](/docs/commands/keygen.html).
using the [keygen command](/docs/commands/keygen.html.markdown).

Once invoked, this method will begin broadcasting the new key to all members in
the cluster via the gossip protocol. Once the query has completed, a response
Expand Down Expand Up @@ -507,7 +507,7 @@ successful, this number should be equivalent to the `NumNodes` field. If not all
members are aware of a key, you should either rebroadcast that key using the
`install-key` RPC command, or remove it using the `remove-key` RPC command. More
on encryption keys can be found on the
[agent encryption](/docs/agent/encryption.html) page.
[agent encryption](/docs/agent/encryption.html.markdown) page.

### stats

Expand Down Expand Up @@ -577,6 +577,6 @@ The returned coordinate is valid only if `Ok` is true. Otherwise, there wasn't
a coordinate available for the given node. This might mean that coordinates
are not enabled, or that the node has not yet contacted the agent.

See the [Network Coordinates](/docs/internals/coordinates.html)
See the [Network Coordinates](/docs/internals/coordinates.html.markdown)
internals guide for more information on how these coordinates are computed, and
for details on how to perform calculations with them.
4 changes: 2 additions & 2 deletions docs/commands/agent.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ performs the important task of maintaining membership information,
propagating events, detecting failures, etc.

Due to the power and flexibility of this command, the Serf agent
is documented in its own section. See the [Serf Agent](/docs/agent/basics.html)
is documented in its own section. See the [Serf Agent](/docs/agent/basics.html.markdown)
section for more information on how to use this command and the
[options](/docs/agent/options.html) available.
[options](/docs/agent/options.html.markdown) available.
2 changes: 1 addition & 1 deletion docs/commands/event.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ send the "deploy" event with "1234567890" as the payload.
## Receiving an Event

The events can be handled by registering an
[event handler](/docs/agent/event-handlers.html) with the Serf agent. The
[event handler](/docs/agent/event-handlers.html.markdown) with the Serf agent. The
documentation for how the user event is dispatched is all contained within
that linked page.

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/keygen.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ description: |-
Command: `serf keygen`

The `serf keygen` command generates an encryption key that can be used for
[Serf agent traffic encryption](/docs/agent/encryption.html).
[Serf agent traffic encryption](/docs/agent/encryption.html.markdown).
The keygen command uses a cryptographically
strong pseudo-random number generator to generate the key.
2 changes: 1 addition & 1 deletion docs/commands/rtt.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-
Command: `serf rtt`

The `rtt` command estimates the network round trip time between two nodes using
Serf's network coordinate model of the cluster. See the [Network Coordinates](/docs/internals/coordinates.html)
Serf's network coordinate model of the cluster. See the [Network Coordinates](/docs/internals/coordinates.html.markdown)
internals guide for more information on how these coordinates are computed.

While contacting nodes as part of its normal gossip protocol, Serf builds up a
Expand Down
2 changes: 1 addition & 1 deletion docs/compatibility.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ can be upgraded without cluster disruption.

This compatibility guarantee makes it possible to upgrade Serf agents one
at a time, one version at a time. For more details on the specifics of
upgrading, see the [upgrading page](/docs/upgrading.html).
upgrading, see the [upgrading page](/docs/upgrading.html.markdown).

## Protocol Compatibility Table

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ description: |-
Welcome to the Serf documentation! This documentation is more of a reference
guide for all available features and options of Serf. If you're just getting
started with Serf, please start with the
[introduction and getting started guide](/intro/index.html) instead.
[introduction and getting started guide](/docs/intro/index.html.markdown) instead.
4 changes: 2 additions & 2 deletions docs/internals/coordinates.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ allow the network round trip time to be estimated between any two nodes using a
very simple calculation.

Coordinates are obtained by adding a very small amount of data to the probe
messages that Serf already sends as part of its [gossip protocol](/docs/internals/gossip.html),
messages that Serf already sends as part of its [gossip protocol](/docs/internals/gossip.html.markdown),
so this system scales well and incurs very little overhead.

Serf's network tomography is based on ["Vivaldi: A Decentralized Network Coordinate System"](https://www.cs.ucsb.edu/~ravenben/classes/276/papers/vivaldi-sigcomm04.pdf), with some additions from ["Network Coordinates in the Wild"](https://www.usenix.org/legacy/events/nsdi07/tech/full_papers/ledlie/ledlie_html/index_save.html) and ["On Suitability of Euclidean Embedding for Host-Based Network Coordinate Systems"](http://domino.research.ibm.com/library/cyberdig.nsf/papers/492D147FCCEA752C8525768F00535D8A).
Expand Down Expand Up @@ -110,7 +110,7 @@ The following section shows how to perform calculations with these coordinates.

Computing the estimated network round trip time between any two nodes is simple
once you have their coordinates. Here's a sample coordinate, as returned from the
`get-coordinate` [RPC call](/docs/agent/rpc.html):
`get-coordinate` [RPC call](/docs/agent/rpc.html.markdown):

```
"Coord": {
Expand Down
2 changes: 1 addition & 1 deletion docs/internals/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |-

This section goes over some of the internals of Serf, such as the gossip
protocol, ordering of messages via Lamport clocks, etc. This section
also contains a useful [convergence simulator](/docs/internals/simulator.html)
also contains a useful [convergence simulator](/docs/internals/simulator.html.markdown)
that can be used to see how fast a Serf cluster will converge under
various conditions with specific configurations.

Expand Down
2 changes: 1 addition & 1 deletion docs/intro/getting-started/event-handlers.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ to invoke multiple event handlers as well as invoke certain event handlers
for only certain Serf events.

To learn more about these features, see the full documentation section
of [event handlers](/docs/agent/event-handlers.html).
of [event handlers](/docs/agent/event-handlers.html.markdown).

4 changes: 2 additions & 2 deletions docs/intro/getting-started/next-steps.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ description: |-
That concludes the getting started guide for Serf. Hopefully you're able to
see that while Serf is an incredibly simple tool, it is also extremely
powerful. The dead simple membership information and events system that
Serf provides make up the building blocks of [incredible use cases](/intro/use-cases.html).
Serf provides make up the building blocks of [incredible use cases](/docs/intro/use-cases.html.markdown).

And because Serf is completely decentralized, fault tolerant, self-healing,
etc. it is a dream tool for system administrators and built specifically
for modern, elastic infrastructures.

As a next step, the following resources are available:

* [Documentation](/docs/index.html) - The documentation is an in-depth reference
* [Documentation](/docs/index.html.markdown) - The documentation is an in-depth reference
guide to all the features of Serf, including technical details about the
internals of how Serf operates.

Expand Down
2 changes: 1 addition & 1 deletion docs/intro/getting-started/queries.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ the current load average of the machine.

Serf agents must be configured to handle queries before they will
respond to them. See the "Specifying Event Handlers" section in the
[Event Handlers documentation](/docs/agent/event-handlers.html) for
[Event Handlers documentation](/docs/agent/event-handlers.html.markdown) for
examples of the configuration format.

## Query Payloads
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/getting-started/user-events.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Custom events come with some trade-offs, however:
* Events are eventually consistent: Because events are delivered over
gossip, the messages _eventually_ arrive at every node. In theory
(and anecdotally in practice), the state of the cluster
[converges rapidly](/docs/internals/simulator.html).
[converges rapidly](/docs/internals/simulator.html.markdown).

* Payload size is limited: Serf gossips via UDP, so the payload must fit
within a single UDP packet (alongside any other data Serf sends). This
Expand Down
10 changes: 5 additions & 5 deletions docs/intro/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-
Welcome to the intro guide to Serf! This guide will show you what Serf is,
explain the problems Serf solves, compare Serf versus other similar
software, and show how easy it is to actually use Serf. If you're already familiar
with the basics of Serf, the [documentation](/docs/index.html) provides more
with the basics of Serf, the [documentation](/docs/index.html.markdown) provides more
of a reference for all available features.

## What is Serf?
Expand All @@ -22,7 +22,7 @@ highly available. Serf runs on every major platform: Linux, Mac OS X, and Window
extremely lightweight: it uses 5 to 10 MB of resident memory and primarily
communicates using infrequent UDP messages.

Serf uses an efficient [gossip protocol](/docs/internals/gossip.html)
Serf uses an efficient [gossip protocol](/docs/internals/gossip.html.markdown)
to solve three major problems:

* **Membership**: Serf maintains cluster membership lists and is able to
Expand All @@ -42,9 +42,9 @@ to solve three major problems:
deliver messages in the face of offline nodes or network partitions. Queries
provide a simple realtime request/response mechanism.

See the [use cases page](/intro/use-cases.html) for a list of concrete use
See the [use cases page](/docs/intro/use-cases.html.markdown) for a list of concrete use
cases built on top of the features Serf provides. See the page on
[how Serf compares to other software](/intro/vs-other-sw.html) to see just
[how Serf compares to other software](/docs/intro/vs-other-sw.html.markdown) to see just
how it fits into your existing infrastructure. Or continue onwards with
the [getting started guide](/intro/getting-started/install.html) to get
the [getting started guide](/docs/intro/getting-started/install.html.markdown) to get
Serf up and running and see how it works.
2 changes: 1 addition & 1 deletion docs/intro/use-cases.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: |-

# Use Cases

At this point you should know [what Serf is](/intro/index.html) and
At this point you should know [what Serf is](/docs/intro/index.html.markdown) and
the high-level features Serf provides. This page lists a handful of
concrete use cases of Serf. Note that this list is not exhaustive by
any means. Serf is a general purpose tool and has infinitely many more
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/vs-consul.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Catalog, while Serf is only eventually consistent.
In addition to the service level abstraction and improved health checking,
Consul provides a key/value store and support for multiple datacenters.
Serf can run across the WAN but with degraded performance. Consul makes use
of [multiple gossip pools](https://www.consul.io/docs/internals/architecture.html),
of [multiple gossip pools](https://www.consul.io/docs/internals/architecture.html.markdown),
so that the performance of Serf over a LAN can be retained while still using it over
a WAN for linking together multiple datacenters.

Expand Down
4 changes: 2 additions & 2 deletions docs/recipes.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ request.

---

* [Event handler router](/docs/recipes/event-handler-router.html) - Provides
* [Event handler router](/docs/recipes/event-handler-router.html.markdown) - Provides
dynamic event handler configuration using a simple shell script.

* [Get agent uptime](/docs/recipes/agent-uptime.html) - Expose the elapsed time
* [Get agent uptime](/docs/recipes/agent-uptime.html.markdown) - Expose the elapsed time
since startup of a Serf agent.
2 changes: 1 addition & 1 deletion docs/recipes/event-handler-router.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |-
# Recipe: Event handler router

Typically you must configure a handler for each type of event you expect to
encounter (more about events and handlers [here](/docs/agent/event-handlers.html)).
encounter (more about events and handlers [here](/docs/agent/event-handlers.html.markdown)).
To change handler configuration, one must update the Serf configuration and reload
the agent with a SIGHUP or a restart.

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ below, assume you're running version A of Serf, and then version B comes out.
You can verify this is the case by running `serf members -detailed` to
make sure all members are speaking the same, latest protocol version.

The key to making this work is the [protocol compatibility](/docs/compatibility.html)
The key to making this work is the [protocol compatibility](/docs/compatibility.html.markdown)
of Serf. The protocol version system is discussed below.

## Protocol Versions
Expand Down

0 comments on commit 70e0ba1

Please sign in to comment.