Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions website/content/commands/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ information.
limit of 4k for maximum size of checks, this is a positive value. By limiting this
size, it allows to put less pressure on Consul servers when many checks are having
a very large output in their checks. In order to completely disable check output
capture, it is possible to use [`discard_check_output`](/consul/docs/reference/agent#discard_check_output).
capture, it is possible to use [`discard_check_output`](/consul/docs/reference/agent/configuration-file/general#discard_check_output).

- `-client` ((#\_client)) - The address to which Consul will bind client
interfaces, including the HTTP and DNS servers. By default, this is "127.0.0.1",
Expand Down Expand Up @@ -154,7 +154,7 @@ information.

- `-raft-protocol` ((#\_raft_protocol)) - This controls the internal version
of the Raft consensus protocol used for server communications. This must be set
to 3 in order to gain access to Autopilot features, with the exception of [`cleanup_dead_servers`](/consul/docs/reference/agent#cleanup_dead_servers). Defaults to 3 in Consul 1.0.0 and later (defaulted to 2 previously). See [Raft Protocol Version Compatibility](/consul/docs/upgrade/version-specific#raft-protocol-version-compatibility) for more details.
to 3 in order to gain access to Autopilot features, with the exception of [`cleanup_dead_servers`](/consul/docs/reference/agent/configuration-file/general#cleanup_dead_servers). Defaults to 3 in Consul 1.0.0 and later (defaulted to 2 previously). See [Raft Protocol Version Compatibility](/consul/docs/upgrade/version-specific#raft-protocol-version-compatibility) for more details.

- `-segment` ((#\_segment)) <EnterpriseAlert inline /> - This flag is used to set
the name of the network segment the agent belongs to. An agent can only join and
Expand Down Expand Up @@ -186,13 +186,13 @@ information.

- `-advertise-wan` ((#\_advertise-wan)) - The advertise WAN address is used
to change the address that we advertise to server nodes joining through the WAN.
This can also be set on client agents when used in combination with the [`translate_wan_addrs`](/consul/docs/reference/agent#translate_wan_addrs) configuration option. By default, the [`-advertise`](#_advertise) address
This can also be set on client agents when used in combination with the [`translate_wan_addrs`](/consul/docs/reference/agent/configuration-file/general#translate_wan_addrs) configuration option. By default, the [`-advertise`](#_advertise) address
is advertised. However, in some cases all members of all datacenters cannot be
on the same physical or virtual network, especially on hybrid setups mixing cloud
and private datacenters. This flag enables server nodes gossiping through the public
network for the WAN while using private VLANs for gossiping to each other and their
client agents, and it allows client agents to be reached at this address when being
accessed from a remote datacenter if the remote datacenter is configured with [`translate_wan_addrs`](/consul/docs/reference/agent#translate_wan_addrs). In Consul 1.1.0 and later this can be dynamically defined with a [go-sockaddr]
accessed from a remote datacenter if the remote datacenter is configured with [`translate_wan_addrs`](/consul/docs/reference/agent/configuration-file/general#translate_wan_addrs). In Consul 1.1.0 and later this can be dynamically defined with a [go-sockaddr]
template that is resolved at runtime.

## Address Bind Options
Expand Down Expand Up @@ -306,7 +306,7 @@ information.

- `-recursor` ((#\_recursor)) - Specifies the address of an upstream DNS
server. This option may be provided multiple times, and is functionally equivalent
to the [`recursors` configuration option](/consul/docs/reference/agent#recursors).
to the [`recursors` configuration option](/consul/docs/reference/agent/configuration-file/general#recursors).

- `-join` ((#\_join)) - **Deprecated in Consul 1.15. This flag will be removed in a future version of Consul. Use the `-retry-join` flag instead.**
This is an alias of [`-retry-join`](#_retry_join).
Expand All @@ -323,7 +323,7 @@ information.

This can be dynamically defined with a [go-sockaddr] template that is resolved at runtime.

If Consul is running on a non-default Serf LAN port, you must specify the port number in the address when using the `-retry-join` flag. Alternatively, you can specify the custom port number as the default in the agent's [`ports.serf_lan`](/consul/docs/reference/agent#serf_lan_port) configuration or with the [`-serf-lan-port`](#_serf_lan_port) command line flag when starting the agent.
If Consul is running on a non-default Serf LAN port, you must specify the port number in the address when using the `-retry-join` flag. Alternatively, you can specify the custom port number as the default in the agent's [`ports.serf_lan`](/consul/docs/reference/agent/configuration-file/general#serf_lan_port) configuration or with the [`-serf-lan-port`](#_serf_lan_port) command line flag when starting the agent.

If your network contains network segments, refer to the [network segments documentation](/consul/docs/multi-tenant/network-segment/vm) for additional information.

Expand Down
7 changes: 4 additions & 3 deletions website/content/docs/automate/kv/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The datastore itself is located on the Consul servers in the [data directory](/c

## Using Consul KV

Objects are opaque to Consul, meaning there are no restrictions on the type of object stored in a key/value entry. The main restriction on an object is size - the maximum is 512 KB. Due to the maximum object size and main use cases, you should not need extra storage; the general [sizing recommendations](/consul/docs/reference/agent#kv_max_value_size) are usually sufficient.
Objects are opaque to Consul, meaning there are no restrictions on the type of object stored in a key/value entry. The main restriction on an object is size - the maximum is 512 KB. Due to the maximum object size and main use cases, you should not need extra storage; the general [sizing recommendations](/consul/docs/reference/agent/configuration-file/general#kv_max_value_size) are usually sufficient.

Keys, like objects are not restricted by type and can include any character. However, we recommend using URL-safe chars - `[a-zA-Z0-9-._~]` with the exception of `/`, which can be used to help organize data. Note, `/` will be treated like any other character and is not fixed to the file system. Meaning, including `/` in a key does not fix it to a directory structure. This model is similar to Amazon S3 buckets. However, `/` is still useful for organizing data and when recursively searching within the data store. We also recommend that you avoid the use of `*`, `?`, `'`, and `%` because they can cause issues when using the API and in shell scripts.

## Using Sentinel to apply policies for Consul KV
## Using Sentinel to apply policies for Consul KV

<EnterpriseAlert>

Expand Down Expand Up @@ -59,4 +59,5 @@ Review the following tutorials to learn how to use Consul sessions for [applicat

### Vault

If you plan to use Consul KV as a backend for Vault, please review [this tutorial](/vault/tutorials/day-one-consul/ha-with-consul?utm_source=docs).
If you plan to use Consul KV as a backend for Vault, please review [this
tutorial](/vault/tutorials/day-one-consul/ha-with-consul?utm_source=docs).
44 changes: 22 additions & 22 deletions website/content/docs/connect/proxy/sidecar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ This topic describes how to create, register, and start sidecar proxy services i

## Overview

Sidecar proxies run on the same node as the single service instance that they handle traffic for.
They may be on the same VM or running as a separate container in the same network namespace.
Sidecar proxies run on the same node as the single service instance that they handle traffic for.
They may be on the same VM or running as a separate container in the same network namespace.

You can attach a sidecar proxy to a service you want to deploy to your mesh:

1. It is not required, but you can create a proxy defaults configuration entry that contains global passthrough settings for all Envoy proxies.
1. It is not required, but you can create a proxy defaults configuration entry that contains global passthrough settings for all Envoy proxies.
1. Create the service definition and include the `connect` block. The `connect` block contains the sidecar proxy configurations that allow the service to interact with other services in the mesh.
1. Register the service using either the API or CLI.
1. Start the sidecar proxy service.
1. Start the sidecar proxy service.

## Requirements

Expand All @@ -32,21 +32,21 @@ If you want to define global passthrough settings for all Envoy proxies, create
1. Create a proxy defaults configuration entry and specify the following parameters:
- `Kind`: Must be set to `proxy-defaults`
- `Name`: Must be set to `global`
1. Configure any additional settings you want to apply to all proxies. Refer to [Proxy defaults configuration entry reference](/consul/docs/reference/config-entry/proxy-defaults) for details about all settings available in the configuraiton entry.
1. Configure any additional settings you want to apply to all proxies. Refer to [Proxy defaults configuration entry reference](/consul/docs/reference/config-entry/proxy-defaults) for details about all settings available in the configuraiton entry.
1. Apply the configuration by either calling the [`/config` API endpoint](/consul/api-docs/config) or running the [`consul config write` CLI command](/consul/commands/config/write). The following example writes a proxy defaults configuration entry from a local HCL file using the CLI:

```shell-session
$ consul config write proxy-defaults.hcl
```

## Define service mesh proxy
## Define service mesh proxy

Create a service definition and configure the following fields:
Create a service definition and configure the following fields:

1. `name`: Specify a name for the service you want to attach a sidecar proxy to in the `name` field. This field is required for all services you want to register in Consul.
1. `name`: Specify a name for the service you want to attach a sidecar proxy to in the `name` field. This field is required for all services you want to register in Consul.
1. `port`: Specify a port number where other services registered with Consul can discover and connect to the service in the `port` field. This field is required for all services you want to register in Consul.
1. `connect`: Set the `connect` field to `{ sidecar_service: {} }`. The `{ sidecar_service: {} }` value is a macro that applies a set of default configurations that enable you to quickly implement a sidecar. Refer to [Sidecar service defaults](#sidecar-service-defaults) for additional information.
1. Configure any additional options for your service. Refer to [Services configuration reference](/consul/docs/reference/service) for details.
1. Configure any additional options for your service. Refer to [Services configuration reference](/consul/docs/reference/service) for details.

In the following example, a service named `web` is configured with a sidecar proxy:

Expand All @@ -60,7 +60,7 @@ service = {
port = 8080
connect = { sidecar_service = {} }
}
```
```

</Tab>

Expand Down Expand Up @@ -89,7 +89,7 @@ When Consul processes the service definition, it generates the following configu
<Tab heading="HCL" group="hcl">

```hcl
services = [
services = [
{
name = "web"
port = 8080
Expand All @@ -114,7 +114,7 @@ services = [
}
]

```
```

</Tab>

Expand Down Expand Up @@ -156,12 +156,12 @@ services = [

</Tab>

</Tabs>
</Tabs>

## Register the service
## Register the service

Provide the service definition to the Consul agent to register your proxy service. You can use the same methods for registering proxy services as you do for registering application services:

- Place the service definition in a Consul agent's configuration directory and start, restart, or reload the agent. Use this method when implementing changes to an existing proxy service.
- Use the `consul services register` command to register the proxy service with a running Consul agent.
- Call the `/agent/service/register` HTTP API endpoint to register the proxy service with a running Consul agent.
Expand All @@ -176,19 +176,19 @@ $ consul services register proxy.hcl

## Start the proxy

Envoy requires a bootstrap configuration file before it can start. Use the [`consul connect envoy` command](/consul/commands/connect/envoy) to create the Envoy bootstrap configuration and start the proxy service. Specify the name of the service with the attached proxy with the `-sidecar-for` option.
Envoy requires a bootstrap configuration file before it can start. Use the [`consul connect envoy` command](/consul/commands/connect/envoy) to create the Envoy bootstrap configuration and start the proxy service. Specify the name of the service with the attached proxy with the `-sidecar-for` option.

The following example command starts an Envoy sidecar proxy for the `web` service:

```shell-session
$ consul connect envoy -sidecar-for=web
```

For details about operating an Envoy proxy in Consul, refer to [](/consul/docs/reference/proxy/envoy)
For details about operating an Envoy proxy in Consul, refer to [](/consul/docs/reference/proxy/envoy)

## Configuration reference

The `sidecar_service` block is a service definition that can contain most regular service definition fields. Refer to [Limitations](#limitations) for information about unsupported service definition fields for sidecar proxies.
The `sidecar_service` block is a service definition that can contain most regular service definition fields. Refer to [Limitations](#limitations) for information about unsupported service definition fields for sidecar proxies.

Consul treats sidecar proxy service definitions as a root-level service definition. All fields are optional in nested definitions, which default to opinionated settings that are intended to reduce burden of setting up a sidecar proxy.

Expand All @@ -207,8 +207,8 @@ proxy.
- `tags` - Defaults to the tags of the parent service.
- `meta` - Defaults to the service metadata of the parent service.
- `port` - Defaults to being auto-assigned from a configurable
range specified by [`sidecar_min_port`](/consul/docs/reference/agent#sidecar_min_port)
and [`sidecar_max_port`](/consul/docs/reference/agent#sidecar_max_port).
range specified by [`sidecar_min_port`](/consul/docs/reference/agent/configuration-file/general#sidecar_min_port)
and [`sidecar_max_port`](/consul/docs/reference/agent/configuration-file/general#sidecar_max_port).
- `kind` - Defaults to `connect-proxy`. This value cannot be overridden.
- `check`, `checks` - By default we add a TCP check on the local address and
port for the proxy, and a [service alias check](/consul/docs/register/health-check/vm#alias-checks) for the parent service. If either
Expand All @@ -223,7 +223,7 @@ proxy.
In the following example, the `sidecar_service` macro sets baselines configurations for the proxy, but the [proxy
upstreams](/consul/docs/reference/proxy/connect-proxy#upstream-configuration-reference)
and [built-in proxy
configuration](/consul/docs/reference/proxy/built-in) fields contain custom values:
configuration](/consul/docs/reference/proxy/built-in) fields contain custom values:

```json
{
Expand Down Expand Up @@ -280,4 +280,4 @@ service's ID, which enables the following behavior.
- When reloading the configuration files, if a service definition changes its
ID, then a new service instance and a new sidecar instance are
registered. The old instance and proxy are removed because they are no longer found in
the configuration files.
the configuration files.
6 changes: 3 additions & 3 deletions website/content/docs/deploy/server/cloud-auto-join.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ A Consul client agent wishing to join the "alpha" segment would need to be confi
<Tabs>
<Tab heading="Agent configuration">

The following example configuration overrides the default Serf LAN port using the [`ports.serf_lan`](/consul/docs/reference/agent#serf_lan_port) configuration option.
The following example configuration overrides the default Serf LAN port using the [`ports.serf_lan`](/consul/docs/reference/agent/configuration-file/general#serf_lan_port) configuration option.

<CodeBlockConfig filename="client-config.hcl">

Expand Down Expand Up @@ -207,7 +207,7 @@ that contains the virtual NICs for the Virtual Machines.
When using Virtual Machine Scale Sets the only role action needed is `Microsoft.Compute/virtualMachineScaleSets/*/read`.

<Note>

If the Consul datacenter is hosted on Azure, Consul can use Managed Service Identities (MSI) to access Azure instead of an environment variable, shared client id and secret. MSI must be enabled on the VMs or Virtual Machine Scale Sets hosting Consul. It is the preferred configuration since MSI prevents your Azure credentials from being stored in Consul configuration. This feature is supported in Consul 1.7 and above. When using MSI, the `tag_key`, `tag_value` and `subscription_id` need to be supplied for Virtual machines. Be aware that the amount of time that Azure takes for the VMs to detect the MSI permissions can be between a minute to an hour.

</Note>
Expand Down Expand Up @@ -481,4 +481,4 @@ $ consul agent -retry-join "provider=linode region=us-east tag_name=consul-serve

Variables can also be provided by environment variables:

- `LINODE_TOKEN` for `api_token`
- `LINODE_TOKEN` for `api_token`
8 changes: 4 additions & 4 deletions website/content/docs/deploy/server/vm/bootstrap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can also create an agent configuration file to use when deploying multiple C

<CodeBlockConfig filename="bootstrap.hcl">

```hcl
```hcl
datacenter = "dc1"
data_dir = "/tmp/consul"
log_level = "INFO"
Expand All @@ -64,7 +64,7 @@ Consul prints a warning message to the console when the number of servers in a c

## Join the servers

After you start the servers, you must join them in a cluster to initiate the Raft election. To join servers automatically, specify network addresses or [cloud auto join](/consul/docs/deploy/server/cloud-auto-join) tags for supported cloud environments using either the [-retry-join CLI flag](/consul/commands/agent#_retry_join) or the [`retry_join` configuration option](/consul/docs/reference/agent#retry_join).
After you start the servers, you must join them in a cluster to initiate the Raft election. To join servers automatically, specify network addresses or [cloud auto join](/consul/docs/deploy/server/cloud-auto-join) tags for supported cloud environments using either the [-retry-join CLI flag](/consul/commands/agent#_retry_join) or the [`retry_join` configuration option](/consul/docs/reference/agent/consul/docs/reference/agent/configuration-file/join#retry_join).

The following examples demonstrate address options and their formatting for the `-retry-join` CLI flag.

Expand Down Expand Up @@ -129,8 +129,8 @@ After you bootstrap a datacenter, you can make additional changes to the datacen

We recommend removing `bootstrap_expect` from agent configurations and reloading the agents after the initial bootstrap process is complete. This action prevents server agents that fail from unintentionally bootstrapping again after they restart. Instead, they will rejoin a datacenter's cluster automatically.

You can also enable Consul's browser-based user interface, deploy client agents, and register services in the Consul catalog for service discovery and service mesh use cases. Refer to the following topics for more information:
You can also enable Consul's browser-based user interface, deploy client agents, and register services in the Consul catalog for service discovery and service mesh use cases. Refer to the following topics for more information:

- [Consul UI visualization](/consul/docs/fundamentals/interface/ui)
- [Configure client agents](/consul/docs/deploy/workload/client/vm)
- [Register service](/register/service/vm)
- [Register service](/register/service/vm)
Loading
Loading