diff --git a/command/connect/envoy/testdata/existing-ca-path.golden b/command/connect/envoy/testdata/existing-ca-path.golden
index 1dd467ce4c..2daaddf371 100644
--- a/command/connect/envoy/testdata/existing-ca-path.golden
+++ b/command/connect/envoy/testdata/existing-ca-path.golden
@@ -13,7 +13,7 @@
"id": "test-proxy",
"metadata": {
"namespace": "default",
- "envoy_version": "1.15.0"
+ "envoy_version": "1.14.2"
}
},
"static_resources": {
diff --git a/website/.env b/website/.env
new file mode 100644
index 0000000000..49d070016e
--- /dev/null
+++ b/website/.env
@@ -0,0 +1,6 @@
+NEXT_PUBLIC_SEGMENT_WRITE_KEY='IyzLrqXkox5KJ8XL4fo8vTYNGfiKlTCm'
+NEXT_PUBLIC_BUGSNAG_CLIENT_KEY='01625078d856ef022c88f0c78d2364f1'
+NEXT_PUBLIC_BUGSNAG_SERVER_KEY='be8ed0d0fc887d547284cce9e98e60e5'
+NEXT_PUBLIC_ALGOLIA_APP_ID=YY0FFNI7MF
+NEXT_PUBLIC_ALGOLIA_INDEX=product_CONSUL
+NEXT_PUBLIC_ALGOLIA_SEARCH_ONLY_API_KEY=5037da4824714676226913c65e961ca0
diff --git a/website/.gitignore b/website/.gitignore
index 1d23ce1de1..507cbf4e57 100644
--- a/website/.gitignore
+++ b/website/.gitignore
@@ -3,3 +3,6 @@ node_modules
.next
out
.mdx-data
+
+# As per Next.js conventions (https://nextjs.org/docs/basic-features/environment-variables#default-environment-variables)
+.env*.local
diff --git a/website/.stylelintrc.js b/website/.stylelintrc.js
new file mode 100644
index 0000000000..3231b9826b
--- /dev/null
+++ b/website/.stylelintrc.js
@@ -0,0 +1,11 @@
+module.exports = {
+ ...require('@hashicorp/nextjs-scripts/.stylelintrc.js'),
+ rules: {
+ 'selector-pseudo-class-no-unknown': [
+ true,
+ {
+ ignorePseudoClasses: ['first', 'last'],
+ },
+ ],
+ },
+}
diff --git a/website/README.md b/website/README.md
index 1d8619c8b5..c53157b8dc 100644
--- a/website/README.md
+++ b/website/README.md
@@ -4,13 +4,41 @@
This subdirectory contains the entire source for the [Consul Website](https://consul.io/). This is a [NextJS](https://nextjs.org/) project, which builds a static site from these source files.
+
+
+## Table of Contents
+
+- [Contributions](#contributions-welcome)
+- [Running the Site Locally](#running-the-site-locally)
+- [Editing Markdown Content](#editing-markdown-content)
+- [Editing Navigation Sidebars](#editing-navigation-sidebars)
+- [Changing the Release Version](#changing-the-release-version)
+- [Redirects](#redirects)
+- [Browser Support](#browser-support)
+- [Deployment](#deployment)
+
+
+
+
## Contributions Welcome!
If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in π
+
+
+
+
+
## Running the Site Locally
-The website can be run locally through node.js or Docker. If you choose to run through Docker, everything will be a little bit slower due to the additional overhead, so for frequent contributors it may be worth it to use node.
+The website can be run locally through node.js or [Docker](https://www.docker.com/get-started). If you choose to run through Docker, everything will be a little bit slower due to the additional overhead, so for frequent contributors it may be worth it to use node.
> **Note:** If you are using a text editor that uses a "safe write" save style such as **vim** or **goland**, this can cause issues with the live reload in development. If you turn off safe write, this should solve the problem. In vim, this can be done by running `:set backupcopy=yes`. In goland, search the settings for "safe write" and turn that setting off.
@@ -27,11 +55,16 @@ If your local development environment has a supported version (v10.0.0+) of [nod
- `npm install`
- `npm start`
-and then visit `http://localhost:3000`.
+...and then visit `http://localhost:3000`.
If you pull down new code from github, you should run `npm install` again. Otherwise, there's no need to re-run `npm install` each time the site is run, you can just run `npm start` to get it going.
-## Editing Content
+
+
+
+
+
+## Editing Markdown Content
Documentation content is written in [Markdown](https://www.markdownguide.org/cheat-sheet/) and you'll find all files listed under the `/pages` directory.
@@ -52,73 +85,18 @@ The significant keys in the YAML frontmatter are:
- `title` `(string)` - This is the title of the page that will be set in the HTML title.
- `description` `(string)` - This is a description of the page that will be set in the HTML description.
-> β οΈSince `api` is a reserved directory within NextJS, all `/api/**` pages are listed under the `/pages/api-docs` path.
-
-### Editing Sidebars
-
-The structure of the sidebars are controlled by files in the [`/data` directory](data).
-
-- Edit [this file](data/docs-navigation.js) to change the **docs** sidebar
-- Edit [this file](data/api-navigation.js) to change the **api** sidebar
-- Edit [this file](data/guides-navigation.js) to change the **guides** sidebar
-- Edit [this file](data/intro-navigation.js) to change the **intro** sidebar
-
-To nest sidebar items, you'll want to add a new `category` key/value accompanied by the appropriate embedded `content` values.
-
-- `category` values will be **directory names** within the `pages` directory
-- `content` values will be **file names** within their appropriately nested directory.
+> β οΈ Since `api` is a reserved directory within NextJS, all `/api/**` pages are listed under the `/pages/api-docs` path.
### Creating New Pages
There is currently a small bug with new page creation - if you create a new page and link it up via subnav data while the server is running, it will report an error saying the page was not found. This can be resolved by restarting the server.
-### Changing the Release Version
-
-To change the version of Consul displayed for download on the website, head over to `data/version.js` and change the number there. It's important to note that the version number must match a version that has been released and is live on `releases.hashicorp.com` -- if it does not, the website will be unable to fetch links to the binaries and will not compile. So this version number should be changed _only after a release_.
-
-#### Displaying a Prerelease
-
-If there is a prerelease of any type that should be displayed on the downloads page, this can be done by editing `pages/downloads/index.jsx`. By default, the download component might look something like this:
-
-```jsx
-
-```
-
-To add a prerelease, an extra `prerelease` property can be added to the component as such:
-
-```jsx
-
-```
-
-This configuration would display something like the following text on the website, emphasis added to the configurable parameters:
-
-```
-A {{ release candidate }} for Consul {{ v1.0.0 }} is available! The release can be downloaded here.
-```
-
-You may customize the parameters in any way you'd like. To remove a prerelease from the website, simply delete the `prerelease` paremeter from the above component.
-
### Markdown Enhancements
-There are several custom markdown plugins that are available by default that enhance standard markdown to fit our use cases. This set of plugins introduces a couple instances of custom syntax, and a couple specific pitfalls that are not present by default with markdown, detailed below:
+There are several custom markdown plugins that are available by default that enhance [standard markdown](https://commonmark.org/) to fit our use cases. This set of plugins introduces a couple instances of custom syntax, and a couple specific pitfalls that are not present by default with markdown, detailed below:
- If you see the symbols `~>`, `->`, `=>`, or `!>`, these represent [custom alerts](https://github.com/hashicorp/remark-plugins/tree/master/plugins/paragraph-custom-alerts#paragraph-custom-alerts). These render as colored boxes to draw the user's attention to some type of aside.
-- If you see `@include '/some/path.mdx'`, this is a [markdown include](https://github.com/hashicorp/remark-plugins/tree/master/plugins/include-markdown#include-markdown-plugin). It's worth noting as well that all includes resolve from `website/pages/partials` by default.
+- If you see `@include '/some/path.mdx'`, this is a [markdown include](https://github.com/hashicorp/remark-plugins/tree/master/plugins/include-markdown#include-markdown-plugin). It's worth noting as well that all includes resolve from `website/pages/partials` by default, and that changes to partials will not live-reload the website.
- If you see `# Headline ((#slug))`, this is an example of an [anchor link alias](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-link-aliases). It adds an extra permalink to a headline for compatibility and is removed from the output.
- Due to [automatically generated permalinks](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-links), any text changes to _headlines_ or _list items that begin with inline code_ can and will break existing permalinks. Be very cautious when changing either of these two text items.
@@ -138,12 +116,267 @@ There are several custom markdown plugins that are available by default that enh
...while it perhaps would not be an improved user experience, no links would break because of it. The best approach is to **avoid changing headlines and inline code at the start of a list item**. If you must change one of these items, make sure to tag someone from the digital marketing development team on your pull request, they will help to ensure as much compatibility as possible.
-There are also a couple of custom components that can be used within markdown, see the list below for documentation and details:
+### Custom Components
-- [Enterprise Alert](components/enterprise-alert/README.md)
-- [Tabs](components/tabs/README.md)
+A number of custom [mdx components](https://mdxjs.com/) are available for use within any `.mdx` file. Each one is documented below:
-### Redirects
+#### Tabs
+
+The `Tabs` component creates tabbed content of any type, but is often used for code examples given in different languages. Here's an example of how it looks from the Vagrant documentation website:
+
+![Tabs Component](https://p176.p0.n0.cdn.getcloudapp.com/items/WnubALZ4/Screen%20Recording%202020-06-11%20at%2006.03%20PM.gif?v=1de81ea720a8cc8ade83ca64fb0b9edd)
+
+It can be used as such within a markdown file:
+
+````mdx
+Normal **markdown** content.
+
+
+
+
+```shell-session
+$ command ...
+```
+
+
+
+
+```shell-session
+$ curl ...
+```
+
+
+
+
+Contined normal markdown content
+````
+
+The intentionally skipped line is a limitation of the mdx parser which is being actively worked on. All tabs mst have a heading, and there is no limit to the number of tabs, though it is recommended to go for a maximum of three or four.
+
+#### Enterprise Alert
+
+This component provides a standard way to call out functionality as being present only in the enterprise version of the software. It can be presented in two contexts, inline or standalone. Here's an example of standalone usage from the Consul docs website:
+
+![Enterprise Alert Component - Standalone](https://p176.p0.n0.cdn.getcloudapp.com/items/WnubALp8/Screen%20Shot%202020-06-11%20at%206.06.03%20PM.png?v=d1505b90bdcbde6ed664831a885ea5fb)
+
+The standalone component can be used as such in markdown files:
+
+```mdx
+# Page Headline
+
+
+
+Continued markdown content...
+```
+
+It can also receive custom text contents if you need to change the messaging but wish to retain the style. This will replace the text `This feature is available in all versions of Consul Enterprise.` with whatever you add. For example:
+
+```mdx
+# Page Headline
+
+
+ My custom text here, and a link!
+
+
+Continued markdown content...
+```
+
+It's important to note that once you are adding custom content, it must be html and can not be markdown, as demonstrated above with the link.
+
+Now let's look at inline usage, here's an example:
+
+![Enterprise Alert Component - Inline](https://p176.p0.n0.cdn.getcloudapp.com/items/L1upYLEJ/Screen%20Shot%202020-06-11%20at%206.07.50%20PM.png?v=013ba439263de8292befbc851d31dd78)
+
+And here's how it could be used in your markdown document:
+
+```mdx
+### Some Enterprise Feature
+
+Continued markdown content...
+```
+
+It's also worth noting that this component will automatically adjust to the correct product colors depending on the context.
+
+#### Other Components
+
+Other custom components can be made available on a per-site basis, the above are the standards. If you have questions about custom components that are not documented here, or have a request for a new custom component, please reach out to @hashicorp/digital-marketing.
+
+### Syntax Highlighting
+
+When using fenced code blocks, the recommendation is to tag the code block with a language so that it can be syntax highlighted. For example:
+
+````
+```
+// BAD: Code block with no language tag
+```
+
+```javascript
+// GOOD: Code block with a language tag
+```
+````
+
+Check out the [supported languages list](https://prismjs.com/#supported-languages) for the syntax highlighter we use if you want to double check the language name.
+
+It is also worth noting specifically that if you are using a code block that is an example of a terminal command, the correct language tag is `shell-session`. For example:
+
+π«**BAD**: Using `shell`, `sh`, `bash`, or `plaintext` to represent a terminal command
+
+````
+```shell
+$ terraform apply
+```
+````
+
+β **GOOD**: Using `shell-session` to represent a terminal command
+
+````
+```shell-session
+$ terraform apply
+```
+````
+
+
+
+
+
+
+## Editing Navigation Sidebars
+
+The structure of the sidebars are controlled by files in the [`/data` directory](data). For example, [this file](data/docs-navigation.js) controls the **docs** sidebar. Within the `data` folder, any file with `-navigation` after it controls the navigation for the given section.
+
+The sidebar uses a simple recursive data structure to represent _files_ and _directories_. A file is represented by a string, and a directory is represented by an object. The sidebar is meant to reflect the structure of the docs within the filesystem while also allowing custom ordering. Let's look at an example. First, here's our example folder structure:
+
+```text
+.
+βββ docs
+βΒ Β βββ directory
+βΒ Β βββ index.mdx
+βΒ Β βββ file.mdx
+βΒ Β βββ another-file.mdx
+βΒ Β βββ nested-directory
+βΒ Β βββ index.mdx
+βΒ Β βββ nested-file.mdx
+```
+
+Here's how this folder structure could be represented as a sidebar navigation, in this example it would be the file `website/data/docs-navigation.js`:
+
+```js
+export default {
+ category: 'directory',
+ content: [
+ 'file',
+ 'another-file',
+ {
+ category: 'nested-directory',
+ content: ['nested-file'],
+ },
+ ],
+}
+```
+
+- `category` values will be **directory names** within the `pages/` directory
+- `content` values will be **file names** within their appropriately nested directory
+
+A couple more important notes:
+
+- Within this data structure, ordering does not matter, but hierarchy does. So while you could put `file` and `another-file` in any order, or even leave one or both of them out, you could not decide to un-nest the `nested-directory` object without also un-nesting it in the filesystem.
+- The `sidebar_title` frontmatter property on each `mdx` page is responsible for displaying the human-readable page name in the navigation.
+- _By default_, every directory/category must have an `index.mdx` file. This file will be automatically added to the navigation as "Overview", and its `sidebar_title` property will set the human-readable name of the entire category.
+
+Below we will discuss a couple of more unusual but still helpful patterns.
+
+### Index-less Categories
+
+Sometimes you may want to include a category but not have a need for an index page for the category. This can be accomplished, but a human-readable category name needs to be set manually, since the category name is normally pulled from the `sidebar_title` property of the index page. Here's an example of how an index-less category might look:
+
+```text
+.
+βββ docs
+βΒ Β βββ indexless-category
+βΒ Β βββ file.mdx
+```
+
+```js
+// website/data/docs-navigation.js
+export default {
+ category: 'indexless-category',
+ name: 'Indexless Category',
+ content: ['file'],
+}
+```
+
+The addition of the `name` property to a category object is all it takes to be able to skip the index file.
+
+### Custom or External Links
+
+Sometimes you may have a need to include a link that is not directly to a file within the docs hierarchy. This can also be supported using a different pattern. For example:
+
+```js
+export default {
+ category: 'directory',
+ content: [
+ 'file',
+ 'another-file',
+ { title: 'Tao of HashiCorp', href: 'https://www.hashicorp.com/tao-of-hashicorp' }
+ }
+ ]
+}
+```
+
+If the link provided in the `href` property is external, it will display a small icon indicating this. If it's internal, it will appear the same way as any other direct file link.
+
+
+
+
+
+
+## Changing the Release Version
+
+To change the version displayed for download on the website, head over to `data/version.js` and change the number there. It's important to note that the version number must match a version that has been released and is live on `releases.hashicorp.com` -- if it does not, the website will be unable to fetch links to the binaries and will not compile. So this version number should be changed _only after a release_.
+
+### Displaying a Prerelease
+
+If there is a prerelease of any type that should be displayed on the downloads page, this can be done by editing `pages/downloads/index.jsx`. By default, the download component might look something like this:
+
+```jsx
+
+```
+
+To add a prerelease, an extra `prerelease` property can be added to the component as such:
+
+```jsx
+
+```
+
+This configuration would display something like the following text on the website, emphasis added to the configurable parameters:
+
+```
+A {{ release candidate }} for {{ v1.0.0 }} is available! The release can be downloaded here.
+```
+
+You may customize the parameters in any way you'd like. To remove a prerelease from the website, simply delete the `prerelease` paremeter from the above component.
+
+
+
+
+
+
+## Redirects
This website structures URLs based on the filesystem layout. This means that if a file is moved, removed, or a folder is re-organized, links will break. If a path change is necessary, it can be mitigated using redirects.
@@ -186,7 +419,7 @@ If we no longer want the link to be in the side nav, we can simply remove it. If
{
category: 'docs',
content: [
- { title: 'Foo Title', href: 'https://learn.hashicorp.com/vault/foo' }
+ { title: 'Foo Title', href: 'https://learn.hashicorp.com//foo' }
]
}
```
@@ -195,6 +428,26 @@ As the majority of items in the side nav are internal links, the structure makes
It's also worth noting that it is possible to do glob-based redirects, for example matching `/docs/*`, and you may see this pattern in the `_redirects` file. This type of redirect is much higher risk and the behavior is a bit more nuanced, so if you need to add a glob redirect, please reach out to the website maintainers and ask about it first.
-### Deployment
+
+
+
+
+
+## Browser Support
+
+We support the following browsers targeting roughly the versions specified.
+
+| ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_24x24.png) | ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_24x24.png) | ![Opera](https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_24x24.png) | ![Safari](https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_24x24.png) | ![Internet Explorer](https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_24x24.png) |
+| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
+| **Latest** | **Latest** | **Latest** | **Latest** | **11+** |
+
+
+
+
+
+
+## Deployment
This website is hosted on Netlify and configured to automatically deploy anytime you push code to the `stable-website` branch. Any time a pull request is submitted that changes files within the `website` folder, a deployment preview will appear in the github checks which can be used to validate the way docs changes will look live. Deployments from `stable-website` will look and behave the same way as deployment previews.
+
+
diff --git a/website/_redirects b/website/_redirects
index 10a84a8d4e..d48f80e402 100644
--- a/website/_redirects
+++ b/website/_redirects
@@ -5,6 +5,11 @@
# Consul Redirects
+/discovery.html /use-cases/service-discovery-and-health-checking 301!
+/mesh.html /use-cases/multi-platform-service-mesh 301!
+/mesh /use-cases/multi-platform-service-mesh 301!
+/segmentation /use-cases/multi-platform-service-mesh 301!
+/segmentation.html /use-cases/multi-platform-service-mesh 301!
/api.html /api-docs 301!
/docs/agent/acl-rules.html /docs/acl/acl-rules 301!
/docs/agent/acl-rules /docs/acl/acl-rules 301!
@@ -24,23 +29,186 @@
/docs/connect/proxies/sidecar-service /docs/connect/registration/sidecar-service 301!
/docs/enterprise/connect-multi-datacenter/index.html /docs/enterprise 301!
/docs/enterprise/connect-multi-datacenter /docs/enterprise 301!
-/segmentation.html /mesh 301!
-/segmentation /mesh 301!
/configuration.html / 301!
/configuration / 301!
+/docs/connect/mesh_gateway /docs/connect/gateways/mesh-gateway 301!
+/docs/connect/mesh_gateway.html /docs/connect/gateways/mesh-gateway 301!
+/docs/connect/mesh-gateway /docs/connect/gateways/mesh-gateway 301!
+/docs/connect/ingress_gateway /docs/connect/gateways/ingress-gateway 301!
+/docs/connect/ingress_gateway.html /docs/connect/gateways/ingress-gateway 301!
+/docs/connect/ingress-gateway /docs/connect/gateways/ingress-gateway 301!
+/docs/connect/terminating_gateway /docs/connect/gateways/terminating-gateway 301!
+/docs/connect/terminating_gateway.html /docs/connect/gateways/terminating-gateway 301!
+/docs/connect/terminating-gateway /docs/connect/gateways/terminating-gateway 301!
+/docs/k8s/connect.html /docs/k8s/connect 301!
+/docs/agent/cloud-auto-join /docs/install/cloud-auto-join 301!
+/docs/internals/security /docs/security 301!
+/docs/acl/ /docs/security/acl/ 301!
+/docs/acl/acl-system /docs/security/acl/acl-system 301!
+/docs/acl/acl-rules /docs/security/acl/acl-rules 301!
+/docs/acl/acl-legacy /docs/security/acl/acl-legacy 301!
+/docs/acl/acl-migrate-tokens /docs/security/acl/acl-migrate-tokens 301!
+/docs/acl/auth-methods /docs/security/acl/auth-methods 301!
+/docs/acl/auth-methods/kubernetes /docs/security/acl/auth-methods/kubernetes 301!
+/docs/acl/auth-methods/jwt /docs/security/acl/auth-methods/jwt 301!
+/docs/acl/auth-methods/oidc /docs/security/acl/auth-methods/oidc 301!
+/docs/agent/kv /docs/dynamic-app-config/kv 301!
+/docs/internals/sessions /docs/dynamic-app-config/sessions 301!
+/docs/agent/watches /docs/dynamic-app-config/watches 301!
+/docs/connect/l7-traffic-management /docs/connect/l7-traffic/ 301!
+/docs/internals/discovery-chain /docs/connect/l7-traffic/discovery-chain 301!
+/docs/k8s/operations/upgrading /docs/k8s/upgrade 301!
+/docs/k8s/operations/uninstalling /docs/k8s/uninstall 301!
+/docs/k8s/operations/tls-on-existing-cluster /docs/k8s/tls-on-existing-cluster 301!
+/docs/k8s/helm /docs/k8s/installation/helm 301!
+/docs/agent/services /docs/discovery/services 301!
+/docs/agent/checks /docs/discovery/checks 301!
+/docs/agent/dns /docs/discovery/dns 301!
+/docs/agent/encryption /docs/security/encryption 301!
+/docs/internals/architecture /docs/architecture 301!
+/docs/internals/anti-entropy /docs/architecture/anti-entropy 301!
+/docs/internals/consensus /docs/architecture/consensus 301!
+/docs/internals/gossip /docs/architecture/gossip 301!
+/docs/internals/jepsen /docs/internals/jepsen 301!
+/docs/internals/coordinates /docs/architecture/coordinates 301!
+/docs/glossary /docs/install/glossary 301!
+/docs/connect/gateways/mesh-gateways /docs/connect/gateways/mesh-gateway 301!
+/docs/connect/gateways/wan-federation-via-mesh-gateways /docs/connect/gateways/mesh-gateway/wan-federation-via-mesh-gateways 301!
+/docs/faq /docs/troubleshoot/faq 301!
+/docs/common-errors /docs/troubleshoot/common-errors 301!
+/intro /docs/intro 301!
+/intro/vs /docs/intro/vs 301!
+/intro/vs/zookeeper /docs/intro/vs/zookeeper 301!
+/intro/vs/chef-puppet /docs/intro/vs/chef-puppet 301!
+/intro/vs/nagios-sensu /docs/intro/vs/nagios-sensu 301!
+/intro/vs/skydns /docs/intro/vs/skydns 301!
+/intro/vs/smartstack /docs/intro/vs/smartstack 301!
+/intro/vs/serf /docs/intro/vs/serf 301!
+/intro/vs/eureka /docs/intro/vs/eureka 301!
+/intro/vs/istio /docs/intro/vs/istio 301!
+/intro/vs/proxies /docs/intro/vs/proxies 301!
+/intro/vs/custom /docs/intro/vs/custom 301!
+/download-tools /docs/download-tools 301!
+/docs/k8s/ambassador /docs/k8s/connect/ambassador 301!
+/docs/k8s/installation/overview /docs/k8s/installation/install 301!
+/docs/partnerships /docs/integrate/partnerships 301!
+
+# CLI redirects
+/docs/commands /commands 301!
+/docs/commands/acl /commands/acl 301!
+/docs/commands/acl/auth-method /commands/acl/auth-method 301!
+/docs/commands/acl/auth-method/create /commands/acl/auth-method/create 301!
+/docs/commands/acl/auth-method/delete /commands/acl/auth-method/delete 301!
+/docs/commands/acl/auth-method/list /commands/acl/auth-method/list 301!
+/docs/commands/acl/auth-method/read /commands/acl/auth-method/read 301!
+/docs/commands/acl/auth-method/update /commands/acl/auth-method/update 301!
+/docs/commands/acl/binding-rule /commands/acl/binding-rule 301!
+/docs/commands/acl/binding-rule/create /commands/acl/binding-rule/create 301!
+/docs/commands/acl/binding-rule/delete /commands/acl/binding-rule/delete 301!
+/docs/commands/acl/binding-rule/list /commands/acl/binding-rule/list 301!
+/docs/commands/acl/binding-rule/read /commands/acl/binding-rule/read 301!
+/docs/commands/acl/binding-rule/update /commands/acl/binding-rule/update 301!
+/docs/commands/acl/bootstrap /commands/acl/bootstrap 301!
+/docs/commands/acl/policy/ /commands/acl/policy 301!
+/docs/commands/acl/policy/create /commands/acl/policy/create 301!
+/docs/commands/acl/policy/delete /commands/acl/policy/delete 301!
+/docs/commands/acl/policy/list /commands/acl/policy/list 301!
+/docs/commands/acl/policy/read /commands/acl/policy/read 301!
+/docs/commands/acl/policy/update /commands/acl/policy/update 301!
+/docs/commands/acl/set-agent-token /commands/acl/set-agent-token 301!
+/docs/commands/acl/token /commands/acl/token 301!
+/docs/commands/acl/token/clone /commands/acl/token/clone 301!
+/docs/commands/acl/token/create /commands/acl/token/create 301!
+/docs/commands/acl/token/delete /commands/acl/token/delete 301!
+/docs/commands/acl/token/list /commands/acl/token/list 301!
+/docs/commands/acl/token/read /commands/acl/token/read 301!
+/docs/commands/acl/token/update /commands/acl/token/update 301!
+/docs/commands/acl/translate-rules /commands/acl/translate-rules 301!
+/docs/commands/agent /commands/agent 301!
+/docs/commands/catalog /commands/catalog 301!
+/docs/commands/catalog/datacenters /commands/catalog/datacenters 301!
+/docs/commands/catalog/nodes /commands/catalog/nodes 301!
+/docs/commands/catalog/services /commands/catalog/services 301!
+/docs/commands/config /commands/config 301!
+/docs/commands/config/delete /commands/config/delete 301!
+/docs/commands/config/list /commands/config/list 301!
+/docs/commands/config/read /commands/config/read 301!
+/docs/commands/config/write /commands/config/write 301!
+/docs/commands/connect /commands/connect 301!
+/docs/commands/connect/ca /commands/connect/ca 301!
+/docs/commands/connect/proxy /commands/connect/proxy 301!
+/docs/commands/connect/envoy /commands/connect/envoy 301!
+/docs/commands/connect/expose /commands/connect/expose 301!
+/docs/commands/debug /commands/debug 301!
+/docs/commands/event /commands/event 301!
+/docs/commands/exec /commands/exec 301!
+/docs/commands/force-leave /commands/force-leave 301!
+/docs/commands/info /commands/info 301!
+/docs/commands/intention /commands/intention 301!
+/docs/commands/intention/check /commands/intention/check 301!
+/docs/commands/intention/create /commands/intention/create 301!
+/docs/commands/intention/delete /commands/intention/delete 301!
+/docs/commands/intention/get /commands/intention/get 301!
+/docs/commands/intention/match /commands/intention/match 301!
+/docs/commands/join /commands/join 301!
+/docs/commands/keygen /commands/keygen 301!
+/docs/commands/keyring /commands/keyring 301!
+/docs/commands/kv /commands/kv 301!
+/docs/commands/kv/delete /commands/kv/delete 301!
+/docs/commands/kv/export /commands/kv/export 301!
+/docs/commands/kv/get /commands/kv/get 301!
+/docs/commands/kv/import /commands/kv/import 301!
+/docs/commands/kv/put /commands/kv/put 301!
+/docs/commands/leave /commands/leave 301!
+/docs/commands/license /commands/license 301!
+/docs/commands/lock /commands/lock 301!
+/docs/commands/login /commands/login 301!
+/docs/commands/logout /commands/logout 301!
+/docs/commands/maint /commands/maint 301!
+/docs/commands/members /commands/members 301!
+/docs/commands/monitor /commands/monitor 301!
+/docs/commands/namespace /commands/namespace 301!
+/docs/commands/namespace/create /commands/namespace/create 301!
+/docs/commands/namespace/delete /commands/namespace/delete 301!
+/docs/commands/namespace/list /commands/namespace/list 301!
+/docs/commands/namespace/read /commands/namespace/read 301!
+/docs/commands/namespace/update /commands/namespace/update 301!
+/docs/commands/namespace/write /commands/namespace/write 301!
+/docs/commands/operator /commands/operator 301!
+/docs/commands/operator/area /commands/operator/area 301!
+/docs/commands/operator/autopilot /commands/operator/autopilot 301!
+/docs/commands/operator/raft /commands/operator/raft 301!
+/docs/commands/reload /commands/reload 301!
+/docs/commands/rft /commands/rft 301!
+/docs/commands/rtt /commands/rtt 301!
+/docs/commands/services /commands/services 301!
+/docs/commands/services/register /commands/services/register 301!
+/docs/commands/services/deregister /commands/services/deregister 301!
+/docs/commands/snapshot /commands/snapshot 301!
+/docs/commands/snapshot/agent /commands/snapshot/agent 301!
+/docs/commands/snapshot/inspect /commands/snapshot/inspect 301!
+/docs/commands/snapshot/restore /commands/snapshot/restore 301!
+/docs/commands/snapshot/save /commands/snapshot/save 301!
+/docs/commands/tls /commands/tls 301!
+/docs/commands/tls/ca /commands/tls/ca 301!
+/docs/commands/tls/cert /commands/tls/cert 301!
+/docs/commands/validate /commands/validate 301!
+/docs/commands/version /commands/version 301!
+/docs/commands/watch /commands/watch 301!
+/commands/index /commands 301!
# CLI renames
-/docs/commands/acl/acl-bootstrap.html /docs/commands/acl/bootstrap.html 301!
-/docs/commands/acl/acl-bootstrap /docs/commands/acl/bootstrap.html 301!
-/docs/commands/acl/acl-policy.html /docs/commands/acl/policy.html 301!
-/docs/commands/acl/acl-policy /docs/commands/acl/policy.html 301!
-/docs/commands/acl/acl-set-agent-token.html /docs/commands/acl/set-agent-token.html 301!
-/docs/commands/acl/acl-set-agent-token /docs/commands/acl/set-agent-token.html 301!
-/docs/commands/acl/acl-token.html /docs/commands/acl/token.html 301!
-/docs/commands/acl/acl-token /docs/commands/acl/token.html 301!
-/docs/commands/acl/acl-translate-rules.html /docs/commands/acl/translate-rules.html 301!
-/docs/commands/acl/acl-translate-rules /docs/commands/acl/translate-rules.html 301!
+/docs/commands/acl/acl-bootstrap.html /commands/acl/bootstrap 301!
+/docs/commands/acl/acl-bootstrap /commands/acl/bootstrap 301!
+/docs/commands/acl/acl-policy.html /commands/acl/policy 301!
+/docs/commands/acl/acl-policy /commands/acl/policy 301!
+/docs/commands/acl/acl-set-agent-token.html /commands/acl/set-agent-token 301!
+/docs/commands/acl/acl-set-agent-token /commands/acl/set-agent-token 301!
+/docs/commands/acl/acl-token.html /commands/acl/token 301!
+/docs/commands/acl/acl-token /commands/acl/token 301!
+/docs/commands/acl/acl-translate-rules.html /commands/acl/translate-rules 301!
+/docs/commands/acl/acl-translate-rules /commands/acl/translate-rules 301!
# Consul Learn Redirects
/docs/guides/acl.html https://learn.hashicorp.com/consul/security-networking/production-acls 301!
@@ -97,6 +265,10 @@
/docs/guides/kubernetes-reference https://learn.hashicorp.com/consul/day-1-operations/kubernetes-reference 301!
/docs/guides/outage.html https://learn.hashicorp.com/consul/day-2-operations/outage 301!
/docs/guides/outage https://learn.hashicorp.com/consul/day-2-operations/outage 301!
+/docs/platform/k8s/minikube.html https://learn.hashicorp.com/consul/kubernetes/minikube 301!
+/docs/platform/k8s/aks.html https://learn.hashicorp.com/consul/kubernetes/azure-k8s 301!
+/docs/platform/k8s/eks.html https://learn.hashicorp.com/consul/kubernetes/aws-k8s 301!
+/docs/platform/k8s/gke.html https://learn.hashicorp.com/consul/kubernetes/google-cloud-k8s 301!
# Glob Redirects, Ported from Varnish
@@ -157,31 +329,25 @@
/docs/connect/platform/nomad.html /docs/connect/nomad 301!
/docs/connect/platform/nomad /docs/connect/nomad 301!
-/docs/platform/k8s/run.html /docs/k8s/installation 301!
-/docs/platform/k8s/run /docs/k8s/installation 301!
-/docs/platform/k8s/aks.html /docs/k8s/installation/aks 301!
-/docs/platform/k8s/aks /docs/k8s/installation/aks 301!
-/docs/platform/k8s/gke.html /docs/k8s/installation/gke 301!
-/docs/platform/k8s/gke /docs/k8s/installation/gke 301!
-/docs/platform/k8s/minikube.html /docs/k8s/installation/minikube 301!
-/docs/platform/k8s/minikube /docs/k8s/installation/minikube 301!
-/docs/platform/k8s/consul-enterprise.html /docs/k8s/installation/consul-enterprise 301!
-/docs/platform/k8s/consul-enterprise /docs/k8s/installation/consul-enterprise 301!
-/docs/platform/k8s/clients-outside-kubernetes.html /docs/k8s/installation/clients-outside-kubernetes 301!
-/docs/platform/k8s/clients-outside-kubernetes /docs/k8s/installation/clients-outside-kubernetes 301!
-/docs/platform/k8s/servers-outside-kubernetes.html /docs/k8s/installation/servers-outside-kubernetes 301!
-/docs/platform/k8s/servers-outside-kubernetes /docs/k8s/installation/servers-outside-kubernetes 301!
-/docs/platform/k8s/predefined-pvcs.html /docs/k8s/installation/predefined-pvcs 301!
-/docs/platform/k8s/predefined-pvcs /docs/k8s/installation/predefined-pvcs 301!
-/docs/platform/k8s/operations.html /docs/k8s/operations 301!
-/docs/platform/k8s/operations /docs/k8s/operations 301!
-/docs/platform/k8s/upgrading.html /docs/k8s/operations/upgrading 301!
-/docs/platform/k8s/upgrading /docs/k8s/operations/upgrading 301!
-/docs/platform/k8s/tls-on-existing-cluster.html /docs/k8s/operations/tls-on-existing-cluster 301!
-/docs/platform/k8s/tls-on-existing-cluster /docs/k8s/operations/tls-on-existing-cluster 301!
-/docs/platform/k8s/uninstalling.html /docs/k8s/operations/upgrading 301!
-/docs/platform/k8s/uninstalling /docs/k8s/operations/upgrading 301!
-/docs/platform/k8s/* /docs/k8s/:splat 301!
+/docs/platform/k8s/run.html /docs/k8s/installation 301!
+/docs/platform/k8s/run /docs/k8s/installation 301!
+/docs/platform/k8s/consul-enterprise.html /docs/k8s/installation/deployment-configurations/consul-enterprise 301!
+/docs/platform/k8s/consul-enterprise /docs/k8s/installation/deployment-configurations/consul-enterprise 301!
+/docs/platform/k8s/clients-outside-kubernetes.html /docs/k8s/installation/deployment-configurations/clients-outside-kubernetes 301!
+/docs/platform/k8s/clients-outside-kubernetes /docs/k8s/installation/deployment-configurations/clients-outside-kubernetes 301!
+/docs/platform/k8s/servers-outside-kubernetes.html /docs/k8s/installation/deployment-configurations/servers-outside-kubernetes 301!
+/docs/platform/k8s/servers-outside-kubernetes /docs/k8s/installation/deployment-configurations/servers-outside-kubernetes 301!
+/docs/platform/k8s/predefined-pvcs.html /docs/k8s/installation/platforms/self-hosted-kubernetes 301!
+/docs/platform/k8s/predefined-pvcs /docs/k8s/installation/platforms/self-hosted-kubernetes 301!
+/docs/platform/k8s/operations.html /docs/k8s/operations 301!
+/docs/platform/k8s/operations /docs/k8s/operations 301!
+/docs/platform/k8s/upgrading.html /docs/k8s/operations/upgrading 301!
+/docs/platform/k8s/upgrading /docs/k8s/operations/upgrading 301!
+/docs/platform/k8s/tls-on-existing-cluster.html /docs/k8s/operations/tls-on-existing-cluster 301!
+/docs/platform/k8s/tls-on-existing-cluster /docs/k8s/operations/tls-on-existing-cluster 301!
+/docs/platform/k8s/uninstalling.html /docs/k8s/operations/upgrading 301!
+/docs/platform/k8s/uninstalling /docs/k8s/operations/upgrading 301!
+/docs/platform/k8s/* /docs/k8s/:splat 301!
/docs/partnerships/index.html /docs/partnerships 301!
/docs/enterprise/backups/index.html /docs/enterprise/backups 301!
@@ -193,4 +359,6 @@
/docs/enterprise/namespaces/index.html /docs/enterprise/namespaces 301!
/docs/enterprise/sentinel/index.html /docs/enterprise/sentinel 301!
+/use-cases/network-middleware-automation /use-cases/network-infrastructure-automation 301!
+
/*/index.html /:splat 301!
diff --git a/website/components/basic-hero/img/right-arrow-icon.svg b/website/components/basic-hero/img/right-arrow-icon.svg
new file mode 100644
index 0000000000..49131e4dd9
--- /dev/null
+++ b/website/components/basic-hero/img/right-arrow-icon.svg
@@ -0,0 +1 @@
+
diff --git a/website/components/basic-hero/index.jsx b/website/components/basic-hero/index.jsx
new file mode 100644
index 0000000000..16a80d78af
--- /dev/null
+++ b/website/components/basic-hero/index.jsx
@@ -0,0 +1,59 @@
+import Button from '@hashicorp/react-button'
+import InlineSvg from '@hashicorp/react-inline-svg'
+import RightArrowIcon from './img/right-arrow-icon.svg?include'
+
+export default function BasicHero({
+ heading,
+ content,
+ links,
+ brand,
+ backgroundImage,
+}) {
+ return (
+
+
+
+
+ )
}
-export default NextApp
+App.getInitialProps = async function ({ Component, ctx }) {
+ let pageProps = {}
+
+ if (Component.getInitialProps) {
+ pageProps = await Component.getInitialProps(ctx)
+ } else if (Component.isMDXComponent) {
+ // fix for https://github.com/mdx-js/mdx/issues/382
+ const mdxLayoutComponent = Component({}).props.originalType
+ if (mdxLayoutComponent.getInitialProps) {
+ pageProps = await mdxLayoutComponent.getInitialProps(ctx)
+ }
+ }
+
+ return { pageProps }
+}
+
+export default App
diff --git a/website/pages/_error.jsx b/website/pages/_error.jsx
index 433da07d6f..a71e603878 100644
--- a/website/pages/_error.jsx
+++ b/website/pages/_error.jsx
@@ -1,13 +1,15 @@
-import React from 'react'
-import ErrorPage from 'next/error'
-import bugsnagClient from '../lib/bugsnag'
+import NotFound from './404'
+import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
-export default class Page extends React.Component {
- static async getInitialProps(ctx) {
- if (ctx.err) bugsnagClient.notify(ctx.err)
- return ErrorPage.getInitialProps(ctx)
- }
- render() {
- return
- }
+function Error({ statusCode }) {
+ console.log('this is working')
+ return
}
+
+Error.getInitialProps = ({ res, err }) => {
+ if (err) Bugsnag.notify(err)
+ const statusCode = res ? res.statusCode : err ? err.statusCode : 404
+ return { statusCode }
+}
+
+export default Error
diff --git a/website/pages/api-docs/acl-legacy.mdx b/website/pages/api-docs/acl-legacy.mdx
index 068d800e41..2cdf0e0491 100644
--- a/website/pages/api-docs/acl-legacy.mdx
+++ b/website/pages/api-docs/acl-legacy.mdx
@@ -12,8 +12,8 @@ the new ACL [Token](/docs/api/acl-token) and [Policy](/docs/api/acl-policy) APIs
# ACL HTTP API
-These `/acl` endpoints create, update, destroy, and query ACL tokens in Consul. For more information about ACLs, please see the
-[ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls).
+These `/acl` endpoints create, update, destroy, and query ACL tokens in Consul. For more information about ACLs, please check the
+[ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Bootstrap ACLs
@@ -42,7 +42,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -62,8 +62,8 @@ a 403 means that the cluster has already been bootstrapped, at which point you s
consider the cluster in a potentially compromised state.
The returned token will be a management token which can be used to further configure the
-ACL system. Please see the
-[ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls) for more details.
+ACL system. Please check the
+[ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production) for more details.
## Create ACL Token
@@ -94,7 +94,7 @@ The table below shows this endpoint's support for
are: `client` and `management`.
- `Rules` `(string: "")` - Specifies rules for this ACL token. The format of the
- `Rules` property is documented in the [ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls).
+ `Rules` property is documented in the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
### Sample Payload
@@ -108,7 +108,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -160,7 +160,7 @@ required.
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -202,7 +202,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/destroy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -241,7 +241,7 @@ Note: No ACL is required because the ACL is specified in the URL path.
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/info/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/clone/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -322,7 +322,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/list
```
@@ -348,7 +348,7 @@ This endpoint returns the status of the ACL replication process in the
datacenter. This is intended to be used by operators, or by automation checking
the health of ACL replication.
-Please see the [ACL Replication Guide](https://learn.hashicorp.com/consul/day-2-operations/acl-replication) for more details.
+Please check the [ACL Replication tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-replication-multiple-datacenters)
for more details.
| Method | Path | Produces |
@@ -373,7 +373,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/replication
```
diff --git a/website/pages/api-docs/acl/auth-methods.mdx b/website/pages/api-docs/acl/auth-methods.mdx
index 74da614b26..ef4dcad934 100644
--- a/website/pages/api-docs/acl/auth-methods.mdx
+++ b/website/pages/api-docs/acl/auth-methods.mdx
@@ -14,8 +14,8 @@ The `/acl/auth-method` endpoints [create](#create-an-auth-method),
[list](#list-auth-methods) and [delete](#delete-an-auth-method)
ACL auth methods in Consul.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create an Auth Method
@@ -53,8 +53,8 @@ The table below shows this endpoint's support for
- `MaxTokenTTL` `(duration: 0s)` - This specifies the maximum life of any token
created by this auth method. When set it will initialize the
- [`ExpirationTime`](/api/acl/tokens.html#expirationtime) field on all tokens
- to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
+ [`ExpirationTime`](/api/acl/tokens#expirationtime) field on all tokens
+ to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
persisted beyond its initial use. Can be specified in the form of `"60s"` or
`"5m"` (i.e., 60 seconds or 5 minutes, respectively). This value must be no
smaller than 1 minute and no longer than 24 hours. Added in Consul 1.8.0.
@@ -118,7 +118,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/auth-method
@@ -174,7 +174,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/auth-method/minikube
```
@@ -232,8 +232,8 @@ The table below shows this endpoint's support for
- `MaxTokenTTL` `(duration: 0s)` - This specifies the maximum life of any token
created by this auth method. When set it will initialize the
- [`ExpirationTime`](/api/acl/tokens.html#expirationtime) field on all tokens
- to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
+ [`ExpirationTime`](/api/acl/tokens#expirationtime) field on all tokens
+ to a value of `Token.CreateTime + AuthMethod.MaxTokenTTL`. This field is not
persisted beyond its initial use. Can be specified in the form of `"60s"` or
`"5m"` (i.e., 60 seconds or 5 minutes, respectively). This value must be no
smaller than 1 minute and no longer than 24 hours. Added in Consul 1.8.0.
@@ -296,7 +296,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/auth-method/minikube
@@ -357,7 +357,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/auth-method/minikube
```
@@ -397,7 +397,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/auth-methods
```
diff --git a/website/pages/api-docs/acl/binding-rules.mdx b/website/pages/api-docs/acl/binding-rules.mdx
index d96e7779bf..0166ed5179 100644
--- a/website/pages/api-docs/acl/binding-rules.mdx
+++ b/website/pages/api-docs/acl/binding-rules.mdx
@@ -14,8 +14,8 @@ The `/acl/binding-rule` endpoints [create](#create-a-binding-rule),
[list](#list-binding-rules) and [delete](#delete-a-binding-rule) ACL binding
rules in Consul.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create a Binding Rule
@@ -63,7 +63,7 @@ The table below shows this endpoint's support for
]
}
```
-
+
- `BindType=node` - The computed bind name value is used as an
`ACLNodeIdentity.NodeName` field in the token that is created.
@@ -118,7 +118,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/binding-rule
@@ -172,7 +172,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
```
@@ -243,7 +243,7 @@ The table below shows this endpoint's support for
]
}
```
-
+
- `BindType=node` - The computed bind name value is used as an
`ACLNodeIdentity.NodeName` field in the token that is created.
@@ -254,7 +254,7 @@ The table below shows this endpoint's support for
]
}
```
-
+
- `BindType=role` - The computed bind name value is used as a `RoleLink.Name`
field in the token that is created. This binding rule will only apply if a
role with the given name exists at login-time. If it does not then this
@@ -297,7 +297,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
@@ -352,7 +352,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/binding-rule/000ed53c-e2d3-e7e6-31a5-c19bc3518a3d
```
@@ -395,7 +395,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/binding-rules
```
diff --git a/website/pages/api-docs/acl/index.mdx b/website/pages/api-docs/acl/index.mdx
index 3e32facea6..d4cc06e750 100644
--- a/website/pages/api-docs/acl/index.mdx
+++ b/website/pages/api-docs/acl/index.mdx
@@ -11,8 +11,8 @@ description: The /acl endpoints manage the Consul's ACL system.
The `/acl` endpoints are used to manage ACL tokens and policies in Consul, [bootstrap the ACL system](#bootstrap-acls), [check ACL replication status](#check-acl-replication), and [translate rules](#translate-rules). There are additional pages for managing [tokens](/api/acl/tokens) and [policies](/api/acl/policies) with the `/acl` endpoints.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Bootstrap ACLs
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -78,8 +78,8 @@ a 403 means that the cluster has already been bootstrapped, at which point you s
consider the cluster in a potentially compromised state.
The returned token will have unrestricted privileges to manage all details of the system.
-It can then be used to further configure the ACL system. Please see the
-[ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls) for more details.
+It can then be used to further configure the ACL system. Please check the
+[ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production) for more details.
## Check ACL Replication
@@ -87,7 +87,7 @@ This endpoint returns the status of the ACL replication processes in the
datacenter. This is intended to be used by operators or by automation checking
to discover the health of ACL replication.
-Please see the [ACL Replication Guide](https://learn.hashicorp.com/consul/day-2-operations/acl-replication)
+Please check the [ACL Replication tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-replication-multiple-datacenters)
for more details.
| Method | Path | Produces |
@@ -112,7 +112,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/acl/replication
@@ -165,7 +165,7 @@ $ curl \
- `ReplicatedTokenIndex` - The last token index that was successfully replicated.
This index can be compared with the value of the `X-Consul-Index` header returned
- by the [`/v1/acl/tokens`](/api/acl/tokens#list-acls) endpoint to determine
+ by the [`/v1/acl/tokens`](/api/acl/tokens#list-tokens) endpoint to determine
if the replication process has gotten all available ACL tokens. Note that ACL
replication is rate limited so the indexes may lag behind the primary
datacenter.
@@ -213,7 +213,7 @@ agent "" {
### Sample Request
-```text
+```shell-session
$ curl -X POST -d @rules.hcl http://127.0.0.1:8500/v1/acl/rules/translate
```
@@ -252,7 +252,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/rules/translate/4f48f7e6-9359-4890-8e67-6144a962b0a5
```
@@ -320,7 +320,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -379,7 +379,7 @@ deleting a token for which you already must possess its secret.
### Sample Request
-```shell
+```shell-session
$ curl \
-H "X-Consul-Token: b78d37c7-0ca7-5f4d-99ee-6d9975ce4586" \
--request POST \
@@ -388,7 +388,10 @@ $ curl \
## OIDC Authorization URL Request
- This is an enterprise only endpoint. This feature is currently in beta.
+
+ {' '}
+ This is an enterprise only endpoint. This feature is currently in beta.{' '}
+
This endpoint was added in Consul 1.8.0 and is used to obtain an authorization
URL from Consul to start an [OIDC login flow](/docs/acl/auth-methods/oidc).
@@ -417,9 +420,9 @@ replication enabled.
### Parameters
- `AuthMethod` `(string: )` - The name of the auth method to use for
- login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
+ login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
-- `RedirectURI` `(string: )` - See [Redirect
+- `RedirectURI` `(string: )` - See [Redirect
URIs](/docs/acl/auth-methods/oidc#redirect-uris) for more information.
- `ClientNonce` `(string: "")` - Optional client-provided nonce that must match
@@ -447,7 +450,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -464,7 +467,10 @@ $ curl \
## OIDC Callback
- This is an enterprise only endpoint. This feature is currently in beta.
+
+ {' '}
+ This is an enterprise only endpoint. This feature is currently in beta.{' '}
+
This endpoint was added in Consul 1.8.0 and is used to exchange an OIDC
authorization code for an OIDC ID Token. The ID token will in turn be exchanged
@@ -494,7 +500,7 @@ replication enabled.
### Parameters
- `AuthMethod` `(string: )` - The name of the auth method to use for
- login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
+ login. This must be of type [`oidc`](/docs/acl/auth-methods/oidc).
- `State` `(string: )` - Opaque state ID that is part of the
Authorization URL and will be included in the the redirect following
@@ -529,7 +535,7 @@ replication enabled.
### Sample Request
-```shell
+```shell-session
$ curl \
--request POST \
--data @payload.json \
diff --git a/website/pages/api-docs/acl/legacy.mdx b/website/pages/api-docs/acl/legacy.mdx
index 90e53f7c2c..bb1476199b 100644
--- a/website/pages/api-docs/acl/legacy.mdx
+++ b/website/pages/api-docs/acl/legacy.mdx
@@ -15,7 +15,7 @@ the new ACL [Token](/api/acl/tokens) and [Policy](/api/acl/policies) APIs instea
The `/acl` endpoints create, update, destroy, and query ACL tokens in Consul.
-For more information about ACLs, please see the [ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls).
+For more information about ACLs, please check the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create ACL Token
@@ -60,7 +60,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -112,7 +112,7 @@ required.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -155,7 +155,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/destroy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -194,7 +194,7 @@ Note: No ACL is required because the ACL is specified in the URL path.
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/info/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -241,7 +241,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/clone/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -275,7 +275,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/acl/list
```
diff --git a/website/pages/api-docs/acl/policies.mdx b/website/pages/api-docs/acl/policies.mdx
index 06f4ae4957..b59b16d018 100644
--- a/website/pages/api-docs/acl/policies.mdx
+++ b/website/pages/api-docs/acl/policies.mdx
@@ -13,8 +13,8 @@ The `/acl/policy` endpoints [create](#create-a-policy), [read](#read-a-policy),
[update](#update-a-policy), [list](#list-policies) and
[delete](#delete-a-policy) ACL policies in Consul.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create a Policy
@@ -68,7 +68,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/policy
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policy/e359bd81-baca-903e-7e64-1ccd9fdc78f5
```
@@ -170,7 +170,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policy/name/node-read
```
@@ -245,7 +245,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/policy/c01a1f82-44be-41b0-a686-685fb6e0f485
@@ -299,7 +299,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/policy/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -339,7 +339,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/policies
```
diff --git a/website/pages/api-docs/acl/roles.mdx b/website/pages/api-docs/acl/roles.mdx
index 7caedf262b..7198acfd5d 100644
--- a/website/pages/api-docs/acl/roles.mdx
+++ b/website/pages/api-docs/acl/roles.mdx
@@ -12,8 +12,8 @@ description: The /acl/role endpoints manage Consul's ACL Roles.
The `/acl/role` endpoints [create](#create-a-role), [read](#read-a-role),
[update](#update-a-role), [list](#list-roles) and [delete](#delete-a-role) ACL roles in Consul.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create a Role
@@ -114,7 +114,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/role
@@ -186,7 +186,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/role/aa770e5b-8b0b-7fcf-e5a1-8535fcc388b4
```
@@ -256,7 +256,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/role/name/example-role
```
@@ -338,7 +338,7 @@ The table below shows this endpoint's support for
- `NodeIdentities` `(array)` - The list of [node
identities](/docs/acl/acl-system#acl-node-identities) that should be
applied to the role. Added in Consul 1.8.1.
-
+
- `Namespace` `(string: "")` - Specifies the namespace of
the role to update. If not provided in the JSON body, the value of
the `ns` URL query parameter or in the `X-Consul-Namespace` header will be used.
@@ -372,7 +372,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/role/8bec74a4-5ced-45ed-9c9d-bca6153490bb
@@ -441,7 +441,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/role/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -486,7 +486,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/roles
```
diff --git a/website/pages/api-docs/acl/tokens.mdx b/website/pages/api-docs/acl/tokens.mdx
index 223753408a..0b6f791a80 100644
--- a/website/pages/api-docs/acl/tokens.mdx
+++ b/website/pages/api-docs/acl/tokens.mdx
@@ -12,8 +12,8 @@ description: The /acl/token endpoints manage Consul's ACL Tokens.
The `/acl/token` endpoints [create](#create-a-token), [read](#read-a-token),
[update](#update-a-token), [list](#list-tokens), [clone](#clone-a-token) and [delete](#delete-a-token) ACL tokens in Consul.
-For more information on how to setup ACLs, please see
-the [ACL Guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/production-acls).
+For more information on how to setup ACLs, please check
+the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
## Create a Token
@@ -125,7 +125,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token
@@ -187,7 +187,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511
```
@@ -246,7 +246,7 @@ retrieving the data for a token that you must already possess its secret.
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: 6a1253d2-1785-24fd-91c2-f8e78c745511" \
http://127.0.0.1:8500/v1/acl/token/self
```
@@ -389,7 +389,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511
@@ -465,7 +465,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
--data @payload.json \
http://127.0.0.1:8500/v1/acl/token/6a1253d2-1785-24fd-91c2-f8e78c745511/clone
@@ -534,7 +534,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
http://127.0.0.1:8500/v1/acl/token/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -589,7 +589,7 @@ The table below shows this endpoint's support for
## Sample Request
-```shell
+```shell-session
$ curl -X GET http://127.0.0.1:8500/v1/acl/tokens
```
diff --git a/website/pages/api-docs/agent/check.mdx b/website/pages/api-docs/agent/check.mdx
index 4620b560d5..af38eaf965 100644
--- a/website/pages/api-docs/agent/check.mdx
+++ b/website/pages/api-docs/agent/check.mdx
@@ -43,7 +43,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/checks
```
@@ -228,7 +228,7 @@ The table below shows this endpoint's support for
"Shell": "/bin/bash",
"HTTP": "https://example.com",
"Method": "POST",
- "Header": { "Content-Type": ["application/json"]},
+ "Header": { "Content-Type": ["application/json"] },
"Body": "{\"check\":\"mem\"}",
"TCP": "example.com:22",
"Interval": "10s",
@@ -239,7 +239,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -273,7 +273,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/check/deregister/my-check-id
@@ -308,7 +308,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/pass/my-check-id
```
@@ -342,7 +342,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/warn/my-check-id
```
@@ -376,7 +376,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/check/fail/my-check-id
```
@@ -422,7 +422,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/agent/connect.mdx b/website/pages/api-docs/agent/connect.mdx
index 75aeb2cef8..dee7d3aa5b 100644
--- a/website/pages/api-docs/agent/connect.mdx
+++ b/website/pages/api-docs/agent/connect.mdx
@@ -76,7 +76,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/connect/ca/roots
```
@@ -190,7 +190,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/connect/ca/leaf/web
```
diff --git a/website/pages/api-docs/agent/index.mdx b/website/pages/api-docs/agent/index.mdx
index f4a9164a02..043fd734b6 100644
--- a/website/pages/api-docs/agent/index.mdx
+++ b/website/pages/api-docs/agent/index.mdx
@@ -53,7 +53,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/members
```
@@ -107,7 +107,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/self
```
@@ -187,7 +187,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/reload
@@ -230,7 +230,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/maintenance?enable=true&reason=For+API+docs
@@ -268,7 +268,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/metrics
```
@@ -397,7 +397,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/monitor
```
@@ -443,7 +443,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/join/1.2.3.4
```
@@ -474,7 +474,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/leave
@@ -515,7 +515,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/force-leave/agent-one
@@ -580,7 +580,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/agent/service.mdx b/website/pages/api-docs/agent/service.mdx
index c1ff57b060..20e166f1cf 100644
--- a/website/pages/api-docs/agent/service.mdx
+++ b/website/pages/api-docs/agent/service.mdx
@@ -45,7 +45,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/services
```
@@ -154,7 +154,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/agent/service/web-sidecar-proxy
```
@@ -513,9 +513,9 @@ service definition keys for compatibility with the config file format.
- `Kind` `(string: "")` - The kind of service. Defaults to "" which is a
typical Consul service. This value may also be "connect-proxy" for
[Connect](/docs/connect) proxies representing another service,
- "mesh-gateway" for instances of a [mesh gateway](/docs/connect/mesh_gateway),
- "terminating-gateway" for instances of a [terminating gateway](/docs/connect/terminating_gateway),
- or "ingress-gateway" for instances of a [ingress gateway](/docs/connect/ingress_gateway).
+ "mesh-gateway" for instances of a [mesh gateway](/docs/connect/mesh-gateway),
+ "terminating-gateway" for instances of a [terminating gateway](/docs/connect/terminating-gateway),
+ or "ingress-gateway" for instances of a [ingress gateway](/docs/connect/ingress-gateway).
- `Proxy` `(Proxy: nil)` - From 1.2.3 on, specifies the configuration for a
Connect service proxy instance. This is only valid if `Kind` defines a proxy or gateway.
@@ -613,7 +613,7 @@ For the `Connect` field, the parameters are:
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -649,7 +649,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/service/deregister/my-service-id
@@ -693,7 +693,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/agent/service/maintenance/my-service-id?enable=true&reason=For+the+docs
diff --git a/website/pages/api-docs/catalog.mdx b/website/pages/api-docs/catalog.mdx
index e5684aa8d9..941b6f2f8d 100644
--- a/website/pages/api-docs/catalog.mdx
+++ b/website/pages/api-docs/catalog.mdx
@@ -156,7 +156,7 @@ and vice versa. A catalog entry can have either, neither, or both.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -236,7 +236,7 @@ The behavior of the endpoint depends on what keys are provided.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -269,7 +269,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/datacenters
```
@@ -319,7 +319,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/nodes
```
@@ -409,7 +409,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/services?ns=foo
```
@@ -478,7 +478,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/service/my-service?ns=default
```
@@ -682,7 +682,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/node/my-node
```
@@ -810,7 +810,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/catalog/node-services/my-node
```
@@ -904,10 +904,12 @@ top level object. The following selectors and filter operations are supported:
## List Services for Gateway
+-> **1.8.0+:** This API is available in Consul versions 1.8.0 and later.
+
This endpoint returns the services associated with an ingress gateway or terminating gateway.
-| Method | Path | Produces |
-| ------ | ------------------------------ | ------------------ |
+| Method | Path | Produces |
+| ------ | ------------------------------------ | ------------------ |
| `GET` | `/catalog/gateway-services/:gateway` | `application/json` |
The table below shows this endpoint's support for
@@ -916,8 +918,8 @@ The table below shows this endpoint's support for
[agent caching](/api/features/caching), and
[required ACLs](/api#authentication).
-| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
-| ---------------- | ----------------- | ------------- | ------------------------ |
+| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
+| ---------------- | ----------------- | ------------- | -------------- |
| `YES` | `all` | `none` | `service:read` |
### Parameters
@@ -962,7 +964,7 @@ $ curl \
"SNI": "api.my-domain",
"CreateIndex": 16,
"ModifyIndex": 16
-},
+ },
{
"Gateway": {
"Name": "my-terminating-gateway",
@@ -993,7 +995,7 @@ $ curl \
"GatewayKind": "ingress-gateway",
"Port": 8888,
"Protocol": "http",
- "Hosts": ["api.mydomain.com"],
+ "Hosts": ["api.mydomain.com"],
"CreateIndex": 15,
"ModifyIndex": 15
},
diff --git a/website/pages/api-docs/config.mdx b/website/pages/api-docs/config.mdx
index 075d74043e..61125a8c8f 100644
--- a/website/pages/api-docs/config.mdx
+++ b/website/pages/api-docs/config.mdx
@@ -38,10 +38,15 @@ The table below shows this endpoint's support for
1 The ACL required depends on the config entry kind being updated:
-| Config Entry Kind | Required ACL |
-| ----------------- | ---------------- |
-| service-defaults | `service:write` |
-| proxy-defaults | `operator:write` |
+| Config Entry Kind | Required ACL |
+| ------------------- | ---------------- |
+| ingress-gateway | `operator:write` |
+| proxy-defaults | `operator:write` |
+| service-defaults | `service:write` |
+| service-resolver | `service:write` |
+| service-router | `service:write` |
+| service-splitter | `service:write` |
+| terminating-gateway | `operator:write` |
### Parameters
@@ -72,7 +77,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request PUT \
--data @payload \
@@ -99,10 +104,15 @@ The table below shows this endpoint's support for
1 The ACL required depends on the config entry kind being read:
-| Config Entry Kind | Required ACL |
-| ----------------- | -------------- |
-| service-defaults | `service:read` |
-| proxy-defaults | `` |
+| Config Entry Kind | Required ACL |
+| ------------------- | -------------- |
+| ingress-gateway | `service:read` |
+| proxy-defaults | `` |
+| service-defaults | `service:read` |
+| service-resolver | `service:read` |
+| service-router | `service:read` |
+| service-splitter | `service:read` |
+| terminating-gateway | `service:read` |
### Parameters
@@ -123,7 +133,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/config/service-defaults/web
@@ -161,10 +171,15 @@ The table below shows this endpoint's support for
1 The ACL required depends on the config entry kind being read:
-| Config Entry Kind | Required ACL |
-| ----------------- | -------------- |
-| service-defaults | `service:read` |
-| proxy-defaults | `` |
+| Config Entry Kind | Required ACL |
+| ------------------- | -------------- |
+| ingress-gateway | `service:read` |
+| proxy-defaults | `` |
+| service-defaults | `service:read` |
+| service-resolver | `service:read` |
+| service-router | `service:read` |
+| service-splitter | `service:read` |
+| terminating-gateway | `service:read` |
### Parameters
@@ -182,7 +197,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request GET \
http://127.0.0.1:8500/v1/config/service-defaults
@@ -229,10 +244,15 @@ The table below shows this endpoint's support for
1 The ACL required depends on the config entry kind being deleted:
-| Config Entry Kind | Required ACL |
-| ----------------- | ---------------- |
-| service-defaults | `service:write` |
-| proxy-defaults | `operator:write` |
+| Config Entry Kind | Required ACL |
+| ------------------- | ---------------- |
+| ingress-gateway | `operator:write` |
+| proxy-defaults | `operator:write` |
+| service-defaults | `service:write` |
+| service-resolver | `service:write` |
+| service-router | `service:write` |
+| service-splitter | `service:write` |
+| terminating-gateway | `operator:write` |
### Parameters
@@ -253,7 +273,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/config/service-defaults/web
diff --git a/website/pages/api-docs/connect/ca.mdx b/website/pages/api-docs/connect/ca.mdx
index 91258b526d..113a4f65df 100644
--- a/website/pages/api-docs/connect/ca.mdx
+++ b/website/pages/api-docs/connect/ca.mdx
@@ -33,7 +33,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/ca/roots
```
@@ -85,7 +85,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/connect/ca/configuration
```
@@ -157,7 +157,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/connect/intentions.mdx b/website/pages/api-docs/connect/intentions.mdx
index 598ed5d25d..e0eb037dc3 100644
--- a/website/pages/api-docs/connect/intentions.mdx
+++ b/website/pages/api-docs/connect/intentions.mdx
@@ -51,14 +51,14 @@ The table below shows this endpoint's support for
service doesn't need to be registered.
- `SourceNS` `(string: "")` - The namespace for the
- `SourceName` parameter.
+ `SourceName` parameter.
- `DestinationName` `(string: )` - The destination of the intention.
The intention destination is always a Consul service, unlike the source.
The service doesn't need to be registered.
- `DestinationNS` `(string: "")` - The namespace for the
- `DestinationName` parameter.
+ `DestinationName` parameter.
- `SourceType` `(string: )` - The type for the `SourceName` value.
This can be only "consul" today to represent a Consul service.
@@ -151,8 +151,6 @@ $ curl \
"DestinationName": "db",
"SourceType": "consul",
"Action": "allow",
- "DefaultAddr": "",
- "DefaultPort": 0,
"Meta": {},
"Precedence": 9,
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
@@ -214,8 +212,6 @@ $ curl \
"DestinationName": "db",
"SourceType": "consul",
"Action": "allow",
- "DefaultAddr": "",
- "DefaultPort": 0,
"Meta": {},
"Precedence": 9,
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
@@ -234,8 +230,6 @@ the following selectors and filter operations being supported:
| Selector | Supported Operations |
| ----------------- | -------------------------------------------------- |
| `Action` | Equal, Not Equal, In, Not In, Matches, Not Matches |
-| `DefaultAddr` | Equal, Not Equal, In, Not In, Matches, Not Matches |
-| `DefaultPort` | Equal, Not Equal |
| `Description` | Equal, Not Equal, In, Not In, Matches, Not Matches |
| `DestinationNS` | Equal, Not Equal, In, Not In, Matches, Not Matches |
| `DestinationName` | Equal, Not Equal, In, Not In, Matches, Not Matches |
@@ -459,8 +453,6 @@ $ curl \
"DestinationName": "db",
"SourceType": "consul",
"Action": "deny",
- "DefaultAddr": "",
- "DefaultPort": 0,
"Meta": {},
"CreatedAt": "2018-05-21T16:41:33.296693825Z",
"UpdatedAt": "2018-05-21T16:41:33.296694288Z",
@@ -476,8 +468,6 @@ $ curl \
"DestinationName": "*",
"SourceType": "consul",
"Action": "allow",
- "DefaultAddr": "",
- "DefaultPort": 0,
"Meta": {},
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
"UpdatedAt": "2018-05-21T16:41:27.977157724Z",
diff --git a/website/pages/api-docs/coordinate.mdx b/website/pages/api-docs/coordinate.mdx
index 5eadeb027e..50d795868a 100644
--- a/website/pages/api-docs/coordinate.mdx
+++ b/website/pages/api-docs/coordinate.mdx
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/datacenters
```
@@ -104,7 +104,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/nodes
```
@@ -161,7 +161,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/coordinate/node/agent-one
```
@@ -229,7 +229,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/api-docs/discovery-chain.mdx b/website/pages/api-docs/discovery-chain.mdx
index 7434586170..2090e214db 100644
--- a/website/pages/api-docs/discovery-chain.mdx
+++ b/website/pages/api-docs/discovery-chain.mdx
@@ -90,7 +90,7 @@ The table below shows this endpoint's support for
parameter.
- `OverrideMeshGateway` `(MeshGatewayConfig: )` - Overrides the final
- [mesh gateway configuration](/docs/connect/mesh_gateway#connect-proxy-configuration)
+ [mesh gateway configuration](/docs/connect/mesh-gateway#connect-proxy-configuration)
for this any service resolved in the compiled chain.
This value comes from either the [proxy
@@ -126,7 +126,7 @@ failover = {
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web
```
@@ -203,7 +203,7 @@ redirect {
Request:
-```text
+```shell-session
$ curl -X POST \
-d'
{
@@ -292,7 +292,7 @@ splits = [
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web?compile-dc=dc2
```
@@ -428,7 +428,7 @@ routes = [
Request:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/discovery-chain/web
```
diff --git a/website/pages/api-docs/event.mdx b/website/pages/api-docs/event.mdx
index fc44eac54c..e93302b569 100644
--- a/website/pages/api-docs/event.mdx
+++ b/website/pages/api-docs/event.mdx
@@ -60,7 +60,7 @@ Lorem ipsum dolor sit amet, consectetur adipisicing elit...
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload \
@@ -122,7 +122,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/event/list
```
diff --git a/website/pages/api-docs/health.mdx b/website/pages/api-docs/health.mdx
index 3746f825ff..f9a8663750 100644
--- a/website/pages/api-docs/health.mdx
+++ b/website/pages/api-docs/health.mdx
@@ -53,7 +53,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
-H "X-Consul-Namespace: *" \
http://127.0.0.1:8500/v1/health/node/my-node
@@ -157,7 +157,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/checks/my-service?ns=default
```
@@ -256,7 +256,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/service/my-service?ns=default
```
@@ -403,6 +403,20 @@ so this endpoint may be used to filter only the Connect-capable endpoints.
Parameters and response format are the same as
[`/health/service/:service`](/api/health#list-nodes-for-service).
+## List Nodes for Ingress Gateways Associated to a Service
+
+-> **1.8.0+:** This API is available in Consul versions 1.8.0 and later.
+
+This endpoint returns the nodes providing a [ingress
+gateway](/docs/connect/ingress-gateway) for a service in a given datacenter.
+
+| Method | Path | Produces |
+| ------ | -------------------------- | ------------------ |
+| `GET` | `/health/ingress/:service` | `application/json` |
+
+Parameters and response format are the same as
+[`/health/service/:service`](/api/health#list-nodes-for-service).
+
## List Checks in State
This endpoint returns the checks in the state provided on the path.
@@ -451,7 +465,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/health/state/passing?ns=default
```
diff --git a/website/pages/api-docs/index.mdx b/website/pages/api-docs/index.mdx
index 5a843b2fa9..c9c2b7fbd2 100644
--- a/website/pages/api-docs/index.mdx
+++ b/website/pages/api-docs/index.mdx
@@ -23,7 +23,7 @@ clients should communicate via TLS. If you donβt provide a token in the reques
Below is an example using `curl` with `X-Consul-Token`.
-```shell
+```shell-session
$ curl \
--header "X-Consul-Token: " \
http://127.0.0.1:8500/v1/agent/members
@@ -31,7 +31,7 @@ $ curl \
Below is an example using `curl` with Bearer scheme.
-```shell
+```shell-session
$ curl \
--header "Authorization: Bearer " \
http://127.0.0.1:8500/v1/agent/members
@@ -69,7 +69,7 @@ the `GET` operation reads an existing key.
Here is the same example using `curl`:
-```shell
+```shell-session
$ curl \
--request PUT \
--data 'hello consul' \
diff --git a/website/pages/api-docs/kv.mdx b/website/pages/api-docs/kv.mdx
index 3c1db7185d..98c8a5d753 100644
--- a/website/pages/api-docs/kv.mdx
+++ b/website/pages/api-docs/kv.mdx
@@ -76,7 +76,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/kv/my-key
```
@@ -197,7 +197,8 @@ The table below shows this endpoint's support for
that does not include the acquire parameter will proceed normally even if another
session has locked the key.**
- For an example of how to use the lock feature, see the [Leader Election Guide](https://learn.hashicorp.com/consul/developer-configuration/elections).
+ For an example of how to use the lock feature, check the
+ [Leader Election tutorial](https://learn.hashicorp.com/tutorials/consul/application-leader-elections).
- `release` `(string: "")` - Supply a session ID to use in a release operation. This is
useful when paired with `?acquire=` as it allows clients to yield a lock. This
@@ -215,7 +216,7 @@ The payload is arbitrary, and is loaded directly into Consul as supplied.
### Sample Requests
-```bash
+```shell-session
$ curl \
--request PUT \
--data @contents \
@@ -255,6 +256,11 @@ The table below shows this endpoint's support for
### Parameters
+- `dc` `(string: "")` - Specifies the datacenter to query. This will default to
+ the datacenter of the agent being queried. This is specified as part of the
+ URL as a query parameter, and gives "No path to datacenter" error when dc is
+ invalid.
+
- `recurse` `(bool: false)` - Specifies to delete all keys which have the
specified prefix. Without this, only a key with an exact match will be
deleted.
@@ -272,7 +278,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/kv/my-key
diff --git a/website/pages/api-docs/libraries-and-sdks.mdx b/website/pages/api-docs/libraries-and-sdks.mdx
index 5c2480944c..fe6411ed79 100644
--- a/website/pages/api-docs/libraries-and-sdks.mdx
+++ b/website/pages/api-docs/libraries-and-sdks.mdx
@@ -124,4 +124,8 @@ the community.
crystal-consul -
Crystal client for the Consul HTTP API
+
+ consul-dart -
+ Dart client for the Consul HTTP API
+
diff --git a/website/pages/api-docs/namespaces.mdx b/website/pages/api-docs/namespaces.mdx
index 50dbc86dc8..a6dc14aef7 100644
--- a/website/pages/api-docs/namespaces.mdx
+++ b/website/pages/api-docs/namespaces.mdx
@@ -94,7 +94,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
-H "X-Consul-Token: 5cdcae6c-0cce-4210-86fe-5dff3b984a6e" \
--data @payload.json \
@@ -165,7 +165,7 @@ the request has been granted any access in the namespace (read, list or write).
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: b23b3cad-5ea1-4413-919e-c76884b9ad60" \
http://127.0.0.1:8500/v1/namespace/team-1
```
@@ -288,7 +288,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X PUT \
-H "X-Consul-Token: 5cdcae6c-0cce-4210-86fe-5dff3b984a6e" \
--data @payload.json \
@@ -364,7 +364,7 @@ The table below shows this endpoint's support for
### Sample Request
-```shell
+```shell-session
$ curl -X DELETE \
-H "X-Consul-Token: b23b3cad-5ea1-4413-919e-c76884b9ad60" \
http://127.0.0.1:8500/v1/namespace/team-1
@@ -431,7 +431,7 @@ the request has been granted any access in the namespace (read, list or write).
### Sample Request
-```shell
+```shell-session
$ curl -H "X-Consul-Token: 0137db51-5895-4c25-b6cd-d9ed992f4a52" \
http://127.0.0.1:8500/v1/namespaces
```
diff --git a/website/pages/api-docs/operator/area.mdx b/website/pages/api-docs/operator/area.mdx
index eda90dc5b3..3056ba9364 100644
--- a/website/pages/api-docs/operator/area.mdx
+++ b/website/pages/api-docs/operator/area.mdx
@@ -25,7 +25,7 @@ datacenters, so not all servers need to be fully connected. This allows for
complex topologies among Consul datacenters like hub/spoke and more general
trees.
-Please see the [Network Areas Guide](https://learn.hashicorp.com/consul/day-2-operations/advanced-federation) for more details.
+Please check the [Network Areas tutorial](https://learn.hashicorp.com/tutorials/consul/federation-network-areas) for more details.
## Create Network Area
@@ -79,7 +79,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -120,7 +120,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area
```
@@ -174,7 +174,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -210,7 +210,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -256,7 +256,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -300,7 +300,7 @@ This can be provided as `IP`, `IP:port`, `hostname`, or `hostname:port`.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -365,7 +365,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/area/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/members
```
diff --git a/website/pages/api-docs/operator/autopilot.mdx b/website/pages/api-docs/operator/autopilot.mdx
index beb90c830c..6d4260336e 100644
--- a/website/pages/api-docs/operator/autopilot.mdx
+++ b/website/pages/api-docs/operator/autopilot.mdx
@@ -14,7 +14,7 @@ The `/operator/autopilot` endpoints allow for automatic operator-friendly
management of Consul servers including cleanup of dead servers, monitoring
the state of the Raft cluster, and stable server introduction.
-Please see the [Autopilot Guide](https://learn.hashicorp.com/consul/day-2-operations/autopilot) for more details.
+Please check the [Autopilot tutorial](https://learn.hashicorp.com/tutorials/consul/autopilot-datacenter-operations) for more details.
## Read Configuration
@@ -46,7 +46,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/autopilot/configuration
```
@@ -173,7 +173,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/autopilot/health
```
diff --git a/website/pages/api-docs/operator/index.mdx b/website/pages/api-docs/operator/index.mdx
index 2cc9f3ad14..1443081426 100644
--- a/website/pages/api-docs/operator/index.mdx
+++ b/website/pages/api-docs/operator/index.mdx
@@ -11,14 +11,14 @@ description: |-
The `/operator` endpoints provide cluster-level tools for Consul operators,
such as interacting with the Raft subsystem. For a CLI to perform these
-operations manually, please see the documentation for the
+operations manually, please check the documentation for the
[`consul operator`](/docs/commands/operator) command.
If ACLs are enabled then a token with operator privileges may be required in
-order to use this interface. See the [ACL Rules documentation](/docs/acl/acl-rules#operator-rules)
+order to use this interface. Check the [ACL Rules documentation](/docs/acl/acl-rules#operator-rules)
for more information.
-See the [Outage Recovery](https://learn.hashicorp.com/consul/day-2-operations/outage) guide for some examples of
+Check the [Outage Recovery](https://learn.hashicorp.com/tutorials/consul/recovery-outage) tutorial for some examples of
how these capabilities are used.
Please choose a sub-section in the navigation for more information.
diff --git a/website/pages/api-docs/operator/keyring.mdx b/website/pages/api-docs/operator/keyring.mdx
index 146d04a8fc..c9bc8264d4 100644
--- a/website/pages/api-docs/operator/keyring.mdx
+++ b/website/pages/api-docs/operator/keyring.mdx
@@ -48,7 +48,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/keyring
```
@@ -132,7 +132,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -178,7 +178,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -223,7 +223,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
--data @payload.json \
diff --git a/website/pages/api-docs/operator/license.mdx b/website/pages/api-docs/operator/license.mdx
index a919497c12..6986232f0f 100644
--- a/website/pages/api-docs/operator/license.mdx
+++ b/website/pages/api-docs/operator/license.mdx
@@ -40,7 +40,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/license
```
@@ -106,7 +106,7 @@ The payload is the raw license blob.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @consul.license \
@@ -169,7 +169,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/license
diff --git a/website/pages/api-docs/operator/raft.mdx b/website/pages/api-docs/operator/raft.mdx
index a70db4522d..483dcaacd3 100644
--- a/website/pages/api-docs/operator/raft.mdx
+++ b/website/pages/api-docs/operator/raft.mdx
@@ -48,7 +48,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/raft/configuration
```
@@ -141,7 +141,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/operator/raft/peer?address=1.2.3.4:5678
diff --git a/website/pages/api-docs/operator/segment.mdx b/website/pages/api-docs/operator/segment.mdx
index 2965c7b854..70d2e129e0 100644
--- a/website/pages/api-docs/operator/segment.mdx
+++ b/website/pages/api-docs/operator/segment.mdx
@@ -19,7 +19,7 @@ The network area functionality described here is available only in
later. Network segments are operator-defined sections of agents on the LAN, typically
isolated from other segments by network configuration.
-Please see the [Network Segments Guide](https://learn.hashicorp.com/consul/day-2-operations/network-segments) for more details.
+Please check the [Network Segments tutorial](https://learn.hashicorp.com/tutorials/consul/network-partition-datacenters) for more details.
## List Network Segments
@@ -47,7 +47,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/segment
```
diff --git a/website/pages/api-docs/query.mdx b/website/pages/api-docs/query.mdx
index 02d7bf8f3e..c5a2c4c15b 100644
--- a/website/pages/api-docs/query.mdx
+++ b/website/pages/api-docs/query.mdx
@@ -15,10 +15,10 @@ service. This is particularly useful in combination with Consul's
[DNS Interface](/docs/agent/dns) as it allows for much richer queries than
would be possible given the limited entry points exposed by DNS.
-See the [Geo Failover Guide](https://learn.hashicorp.com/consul/developer-discovery/geo-failover) for details and
+Check the [Geo Failover tutorial](https://learn.hashicorp.com/tutorials/consul/automate-geo-failover) for details and
examples for using prepared queries to implement geo failover for services.
-See the [prepared query rules](/docs/agent/acl-rules#prepared-query-rules)
+Check the [prepared query rules](/docs/agent/acl-rules#prepared-query-rules)
section of the agent ACL documentation for more details about how prepared
queries work with Consul's ACL system.
@@ -278,7 +278,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request POST \
--data @payload.json \
@@ -293,7 +293,7 @@ $ curl \
}
```
-## Read Prepared Query
+## List Prepared Queries
This endpoint returns a list of all prepared queries.
@@ -319,7 +319,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query
```
@@ -388,7 +388,7 @@ more information.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -425,7 +425,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
```
@@ -465,7 +465,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request DELETE \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05
@@ -523,7 +523,7 @@ be used.
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/execute?near=_agent
```
@@ -632,7 +632,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/query/8f246b77-f3e1-ff88-5b48-8ec93abf3e05/explain
```
diff --git a/website/pages/api-docs/session.mdx b/website/pages/api-docs/session.mdx
index 806de02ea5..c9c05b0bc6 100644
--- a/website/pages/api-docs/session.mdx
+++ b/website/pages/api-docs/session.mdx
@@ -57,13 +57,13 @@ The table below shows this endpoint's support for
- `release` - causes any locks that are held to be released
- `delete` - causes any locks that are held to be deleted
-- `TTL` `(string: "")` - Specifies the number of seconds (between 10s and
+- `TTL` `(string: "")` - Specifies the duration of a session (between 10s and
86400s). If provided, the session is invalidated if it is not renewed before
the TTL expires. The lowest practical TTL should be used to keep the number of
managed sessions low. When locks are forcibly expired, such as when following
- the [leader election pattern](https://learn.hashicorp.com/consul/developer-configuration/elections) in an application,
+ the [leader election pattern](https://learn.hashicorp.com/tutorials/consul/application-leader-elections) in an application,
sessions may not be reaped for up to double this TTL, so long TTL
- values (> 1 hour) should be avoided.
+ values (> 1 hour) should be avoided. Valid time units include "s", "m" and "h".
### Sample Payload
@@ -80,7 +80,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
@@ -137,7 +137,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/session/destroy/adf4238a-882b-9ddc-4a9d-5b6758e4159e
@@ -183,7 +183,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/info/adf4238a-882b-9ddc-4a9d-5b6758e4159e
```
@@ -244,7 +244,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/node/node-abcd1234
```
@@ -299,7 +299,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
http://127.0.0.1:8500/v1/session/list
```
@@ -357,7 +357,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/session/renew/adf4238a-882b-9ddc-4a9d-5b6758e4159e
diff --git a/website/pages/api-docs/snapshot.mdx b/website/pages/api-docs/snapshot.mdx
index ab079c3b0b..a416ae01bd 100644
--- a/website/pages/api-docs/snapshot.mdx
+++ b/website/pages/api-docs/snapshot.mdx
@@ -60,7 +60,7 @@ The table below shows this endpoint's support for
With a custom datacenter:
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/snapshot?dc=my-datacenter -o snapshot.tgz
```
@@ -103,7 +103,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data-binary @snapshot.tgz \
diff --git a/website/pages/api-docs/status.mdx b/website/pages/api-docs/status.mdx
index b4cdc21d4f..2e7d65ea3a 100644
--- a/website/pages/api-docs/status.mdx
+++ b/website/pages/api-docs/status.mdx
@@ -41,7 +41,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/status/leader
```
@@ -79,7 +79,7 @@ The table below shows this endpoint's support for
### Sample Request
-```text
+```shell-session
$ curl http://127.0.0.1:8500/v1/status/peers
```
diff --git a/website/pages/api-docs/txn.mdx b/website/pages/api-docs/txn.mdx
index efd60d8da3..ae12697463 100644
--- a/website/pages/api-docs/txn.mdx
+++ b/website/pages/api-docs/txn.mdx
@@ -172,7 +172,7 @@ atomic transaction. Up to 64 operations may be present in a single transaction.
### Sample Request
-```text
+```shell-session
$ curl \
--request PUT \
--data @payload.json \
diff --git a/website/pages/docs/commands/acl/auth-method/create.mdx b/website/pages/commands/acl/auth-method/create.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/auth-method/create.mdx
rename to website/pages/commands/acl/auth-method/create.mdx
index 18fa799eb5..e685c0684a 100644
--- a/website/pages/docs/commands/acl/auth-method/create.mdx
+++ b/website/pages/commands/acl/auth-method/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Method Create'
sidebar_title: create
---
@@ -75,7 +75,7 @@ Usage: `consul acl auth-method create [options] [args]`
Create a new Kubernetes auth method:
-```shell
+```shell-session
$ consul acl auth-method create -name minikube -type kubernetes \
-description 'minikube auth method' \
-kubernetes-host 'https://192.0.2.42:8443' \
diff --git a/website/pages/docs/commands/acl/auth-method/delete.mdx b/website/pages/commands/acl/auth-method/delete.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/auth-method/delete.mdx
rename to website/pages/commands/acl/auth-method/delete.mdx
index 2b99d4ca84..3a25521e88 100644
--- a/website/pages/docs/commands/acl/auth-method/delete.mdx
+++ b/website/pages/commands/acl/auth-method/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Method Delete'
sidebar_title: delete
---
@@ -32,7 +32,7 @@ Usage: `consul acl auth-method delete [options]`
Delete an auth method:
-```shell
+```shell-session
$ consul acl auth-method delete -name minikube
Auth-method "minikube" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/auth-method/index.mdx b/website/pages/commands/acl/auth-method/index.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/auth-method/index.mdx
rename to website/pages/commands/acl/auth-method/index.mdx
index ef180c6c0b..bd1b8aa323 100644
--- a/website/pages/docs/commands/acl/auth-method/index.mdx
+++ b/website/pages/commands/acl/auth-method/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Methods'
sidebar_title: auth-method
---
@@ -45,7 +45,7 @@ of the subcommand in the sidebar.
Create a new auth method:
-```shell
+```shell-session
$ consul acl auth-method create -type "kubernetes" \
-name "my-k8s" \
-description "This is an example kube auth method" \
@@ -56,13 +56,13 @@ $ consul acl auth-method create -type "kubernetes" \
List all auth methods:
-```shell
+```shell-session
$ consul acl auth-method list
```
Update all editable fields of the auth method:
-```shell
+```shell-session
$ consul acl auth-method update -name "my-k8s" \
-description "new description" \
-kubernetes-host "https://new-apiserver.example.com:8443" \
@@ -72,12 +72,12 @@ $ consul acl auth-method update -name "my-k8s" \
Read an auth method:
-```shell
+```shell-session
$ consul acl auth-method read -name my-k8s
```
Delete an auth method:
-```shell
+```shell-session
$ consul acl auth-method delete -name my-k8s
```
diff --git a/website/pages/docs/commands/acl/auth-method/list.mdx b/website/pages/commands/acl/auth-method/list.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/auth-method/list.mdx
rename to website/pages/commands/acl/auth-method/list.mdx
index 4e3165665c..933b9c1875 100644
--- a/website/pages/docs/commands/acl/auth-method/list.mdx
+++ b/website/pages/commands/acl/auth-method/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Method List'
sidebar_title: list
---
@@ -35,7 +35,7 @@ Usage: `consul acl auth-method list`
Default listing.
-```shell
+```shell-session
$ consul acl auth-method list
minikube:
Type: kubernetes
@@ -47,7 +47,7 @@ minikube-two:
Show Metadata.
-```shell
+```shell-session
$ consul acl auth-method list -meta
minikube:
Type: kubernetes
diff --git a/website/pages/docs/commands/acl/auth-method/read.mdx b/website/pages/commands/acl/auth-method/read.mdx
similarity index 96%
rename from website/pages/docs/commands/acl/auth-method/read.mdx
rename to website/pages/commands/acl/auth-method/read.mdx
index d403cfb67c..20ed1f5264 100644
--- a/website/pages/docs/commands/acl/auth-method/read.mdx
+++ b/website/pages/commands/acl/auth-method/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Method Read'
sidebar_title: read
---
@@ -37,7 +37,7 @@ Usage: `consul acl auth-method read [options] [args]`
Get auth method details:
-```shell
+```shell-session
$ consul acl auth-method read -name minikube
Name: minikube
Type: kubernetes
diff --git a/website/pages/docs/commands/acl/auth-method/update.mdx b/website/pages/commands/acl/auth-method/update.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/auth-method/update.mdx
rename to website/pages/commands/acl/auth-method/update.mdx
index 20ac2e06a1..c403c583ef 100644
--- a/website/pages/docs/commands/acl/auth-method/update.mdx
+++ b/website/pages/commands/acl/auth-method/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Auth Method Update'
sidebar_title: update
---
@@ -80,7 +80,7 @@ Usage: `consul acl auth-method update [options] [args]`
Update an auth method:
-```shell
+```shell-session
$ consul acl auth-method update -name minikube \
-description 'dev cluster' \
-kubernetes-host 'https://192.0.2.44:8443'
diff --git a/website/pages/docs/commands/acl/binding-rule/create.mdx b/website/pages/commands/acl/binding-rule/create.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/binding-rule/create.mdx
rename to website/pages/commands/acl/binding-rule/create.mdx
index fa7fb51e5b..d4bfef9aaf 100644
--- a/website/pages/docs/commands/acl/binding-rule/create.mdx
+++ b/website/pages/commands/acl/binding-rule/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule Create'
sidebar_title: create
---
@@ -48,7 +48,7 @@ Usage: `consul acl binding-rule create [options] [args]`
Create a new binding rule that binds to a service identity:
-```shell
+```shell-session
$ consul acl binding-rule create -method 'minikube' \
-description 'wildcard service' \
-bind-type 'service' \
@@ -64,7 +64,7 @@ Selector: serviceaccount.namespace==default and serviceaccount.name!=vault
Create a new binding rule that binds to a role:
-```shell
+```shell-session
$ consul acl binding-rule create -method 'minikube' \
-description 'just vault role' \
-bind-type 'role' \
diff --git a/website/pages/docs/commands/acl/binding-rule/delete.mdx b/website/pages/commands/acl/binding-rule/delete.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/binding-rule/delete.mdx
rename to website/pages/commands/acl/binding-rule/delete.mdx
index 32183586b8..01d9efb32c 100644
--- a/website/pages/docs/commands/acl/binding-rule/delete.mdx
+++ b/website/pages/commands/acl/binding-rule/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule Delete'
sidebar_title: delete
---
@@ -33,7 +33,7 @@ Usage: `consul acl binding-rule delete [options]`
Delete a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule delete -id 0ec1bd
Binding rule "0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/binding-rule/index.mdx b/website/pages/commands/acl/binding-rule/index.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/binding-rule/index.mdx
rename to website/pages/commands/acl/binding-rule/index.mdx
index ea9a41f54d..0c24bb8196 100644
--- a/website/pages/docs/commands/acl/binding-rule/index.mdx
+++ b/website/pages/commands/acl/binding-rule/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule'
sidebar_title: binding-rule
---
@@ -55,7 +55,7 @@ resolved to the full UUID and used.
Create a new binding rule:
-```shell
+```shell-session
$ consul acl binding-rule create \
-method=minikube \
-bind-type=service \
@@ -65,25 +65,25 @@ $ consul acl binding-rule create \
List all binding rules:
-```shell
+```shell-session
$ consul acl binding-rule list
```
Update a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule update -id=43cb72df-9c6f-4315-ac8a-01a9d98155ef \
-bind-name='k8s-${serviceaccount.name}'
```
Read a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule read -id fdabbcb5-9de5-4b1a-961f-77214ae88cba
```
Delete a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule delete -id b6b856da-5193-4e78-845a-7d61ca8371ba
```
diff --git a/website/pages/docs/commands/acl/binding-rule/list.mdx b/website/pages/commands/acl/binding-rule/list.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/binding-rule/list.mdx
rename to website/pages/commands/acl/binding-rule/list.mdx
index faea261a1c..418e4a685c 100644
--- a/website/pages/docs/commands/acl/binding-rule/list.mdx
+++ b/website/pages/commands/acl/binding-rule/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule List'
sidebar_title: list
---
@@ -35,7 +35,7 @@ Usage: `consul acl binding-rule list`
Default listing.
-```shell
+```shell-session
$ consul acl binding-rule list
0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890:
AuthMethod: minikube
@@ -53,7 +53,7 @@ e21ae868-7b13-a230-0235-f8e83510642c:
Show Metadata.
-```shell
+```shell-session
$ consul acl binding-rule list -meta
0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890:
AuthMethod: minikube
diff --git a/website/pages/docs/commands/acl/binding-rule/read.mdx b/website/pages/commands/acl/binding-rule/read.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/binding-rule/read.mdx
rename to website/pages/commands/acl/binding-rule/read.mdx
index 7e7584397f..dbafa02ed0 100644
--- a/website/pages/docs/commands/acl/binding-rule/read.mdx
+++ b/website/pages/commands/acl/binding-rule/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule Read'
sidebar_title: read
---
@@ -38,7 +38,7 @@ Usage: `consul acl binding-rule read [options] [args]`
Get binding rule details:
-```shell
+```shell-session
$ consul acl binding-rule read -id '0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890'
ID: 0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890
AuthMethod: minikube
diff --git a/website/pages/docs/commands/acl/binding-rule/update.mdx b/website/pages/commands/acl/binding-rule/update.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/binding-rule/update.mdx
rename to website/pages/commands/acl/binding-rule/update.mdx
index b61353545d..78346fbc28 100644
--- a/website/pages/docs/commands/acl/binding-rule/update.mdx
+++ b/website/pages/commands/acl/binding-rule/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Binding Rule Update'
sidebar_title: update
---
@@ -55,7 +55,7 @@ Usage: `consul acl binding-rule update [options] [args]`
Update a binding rule:
-```shell
+```shell-session
$ consul acl binding-rule update -id '0ec1bd2f-1d3b-bafb-d9bf-90ef04ab1890' \
-selector 'serviceaccount.namespace==default'
Binding rule updated successfully
diff --git a/website/pages/docs/commands/acl/bootstrap.mdx b/website/pages/commands/acl/bootstrap.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/bootstrap.mdx
rename to website/pages/commands/acl/bootstrap.mdx
index 7c34efa938..3e34bc798e 100644
--- a/website/pages/docs/commands/acl/bootstrap.mdx
+++ b/website/pages/commands/acl/bootstrap.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Bootstrap'
sidebar_title: bootstrap
---
diff --git a/website/pages/docs/commands/acl/index.mdx b/website/pages/commands/acl/index.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/index.mdx
rename to website/pages/commands/acl/index.mdx
index c0eb332b61..901c2a2fde 100644
--- a/website/pages/docs/commands/acl/index.mdx
+++ b/website/pages/commands/acl/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL'
sidebar_title: acl
---
@@ -17,7 +17,7 @@ ACLs are also accessible via the [HTTP API](/api/acl/acl).
Bootstrap Consul's ACLs:
-```shell
+```shell-session
$ consul acl bootstrap
AccessorID: 4d123dff-f460-73c3-02c4-8dd64d136e01
SecretID: 86cddfb9-2760-d947-358d-a2811156bf31
@@ -30,7 +30,7 @@ Policies:
Create a policy:
-```shell
+```shell-session
$ consul acl policy create -name "acl-replication" -description "Token capable of replicating ACL policies" -rules 'acl = "read"'
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -42,7 +42,7 @@ acl = "read"
Create a token:
-```shell
+```shell-session
$ consul acl token create -description "Agent Policy Replication - my-agent" -policy-name "acl-replication"
AccessorID: c24c11aa-4e08-e25c-1a67-705a2e8d75a4
SecretID: e7024f9c-f016-02dd-6217-daedbffb86ac
diff --git a/website/pages/docs/commands/acl/policy/create.mdx b/website/pages/commands/acl/policy/create.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/policy/create.mdx
rename to website/pages/commands/acl/policy/create.mdx
index 57f3fcff44..2a26492429 100644
--- a/website/pages/docs/commands/acl/policy/create.mdx
+++ b/website/pages/commands/acl/policy/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy Create'
sidebar_title: create
---
@@ -66,7 +66,7 @@ Usage: `consul acl policy create [options] [args]`
Create a new policy that is valid in all datacenters:
-```shell
+```shell-session
$ consul acl policy create -name "acl-replication" -description "Policy capable of replicating ACL policies" -rules 'acl = "read"'
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -78,7 +78,7 @@ acl = "read"
Create a new policy valid only in specific datacenters with rules read from a file:
-```shell
+```shell-session
$ consul acl policy create -name "replication" -description "Replication" -rules @rules.hcl -valid-datacenter dc1 -valid-datacenter dc2
ID: ca44555b-a2d8-94de-d763-88caffdaf11f
Name: replication
@@ -94,7 +94,7 @@ service_prefix "" {
Create a new policy with rules equivalent to that of a legacy ACL token:
-```shell
+```shell-session
$ consul acl policy create -name "node-services-read" -from-token 5793a5ce -description "Can read any node and service"
ID: 06acc965-df4b-5a99-58cb-3250930c6324
Name: node-services-read
diff --git a/website/pages/docs/commands/acl/policy/delete.mdx b/website/pages/commands/acl/policy/delete.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/policy/delete.mdx
rename to website/pages/commands/acl/policy/delete.mdx
index e04347464c..039f87d52e 100644
--- a/website/pages/docs/commands/acl/policy/delete.mdx
+++ b/website/pages/commands/acl/policy/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy Delete'
sidebar_title: delete
---
@@ -35,14 +35,14 @@ Usage: `consul acl policy delete [options]`
Delete a policy:
-```shell
+```shell-session
$ consul acl policy delete -id 35b8
Policy "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
Delete a policy by name:
-```shell
+```shell-session
$ consul acl policy delete -name acl-replication
Policy "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/policy/index.mdx b/website/pages/commands/acl/policy/index.mdx
similarity index 96%
rename from website/pages/docs/commands/acl/policy/index.mdx
rename to website/pages/commands/acl/policy/index.mdx
index c9081a56e1..e153e21047 100644
--- a/website/pages/docs/commands/acl/policy/index.mdx
+++ b/website/pages/commands/acl/policy/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy'
sidebar_title: policy
---
@@ -63,7 +63,7 @@ Builtin policies:
Create a new ACL policy:
-```shell
+```shell-session
$ consul acl policy create -name "new-policy" \
-description "This is an example policy" \
-datacenter "dc1" \
@@ -73,24 +73,24 @@ $ consul acl policy create -name "new-policy" \
List all policies:
-```shell
+```shell-session
$ consul acl policy list
```
Update a policy:
-```shell
+```shell-session
$ consul acl policy update -name "other-policy" -datacenter "dc1"
```
Read a policy:
-```shell
+```shell-session
$ consul acl policy read -id 0479e93e-091c-4475-9b06-79a004765c24
```
Delete a policy
-```shell
+```shell-session
$ consul acl policy delete -name "my-policy"
```
diff --git a/website/pages/docs/commands/acl/policy/list.mdx b/website/pages/commands/acl/policy/list.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/policy/list.mdx
rename to website/pages/commands/acl/policy/list.mdx
index 710aed87ad..d1da9799af 100644
--- a/website/pages/docs/commands/acl/policy/list.mdx
+++ b/website/pages/commands/acl/policy/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy List'
sidebar_title: list
---
@@ -35,7 +35,7 @@ Usage: `consul acl policy list`
Default listing.
-```shell
+```shell-session
$ consul acl policy list
global-management:
ID: 00000000-0000-0000-0000-000000000001
@@ -49,7 +49,7 @@ acl-replication:
Show Metadata.
-```shell
+```shell-session
$ consul acl policy list -meta
global-management:
ID: 00000000-0000-0000-0000-000000000001
diff --git a/website/pages/docs/commands/acl/policy/read.mdx b/website/pages/commands/acl/policy/read.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/policy/read.mdx
rename to website/pages/commands/acl/policy/read.mdx
index 461a97ebc8..cc5243b3c6 100644
--- a/website/pages/docs/commands/acl/policy/read.mdx
+++ b/website/pages/commands/acl/policy/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy Read'
sidebar_title: read
---
@@ -40,7 +40,7 @@ Usage: `consul acl policy read [options] [args]`
Get policy details:
-```shell
+```shell-session
$ consul acl policy read -id 00000000-0000-0000-0000-000000000001
ID: 00000000-0000-0000-0000-000000000001
Name: global-management
@@ -77,7 +77,7 @@ session_prefix "" {
Get policy details by name:
-```shell
+```shell-session
$ consul acl policy read -name "acl-replication"
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
Name: acl-replication
@@ -91,7 +91,7 @@ Get policy details (Builtin Policies):
Builtin policies can be accessed by specifying their original name as the value to the `-id` parameter.
-```shell
+```shell-session
$ consul acl policy read -id global-management
ID: 00000000-0000-0000-0000-000000000001
Name: global-management
diff --git a/website/pages/docs/commands/acl/policy/update.mdx b/website/pages/commands/acl/policy/update.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/policy/update.mdx
rename to website/pages/commands/acl/policy/update.mdx
index 247b43a178..a517e06389 100644
--- a/website/pages/docs/commands/acl/policy/update.mdx
+++ b/website/pages/commands/acl/policy/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Policy Update'
sidebar_title: update
---
@@ -57,7 +57,7 @@ Usage: `consul acl policy update [options] [args]`
Update a policy:
-```shell
+```shell-session
$ consul acl policy update -id 35b8 -name "replication" -description "Policy capable of replication ACL policies and Intentions" -rules @rules.hcl
Policy updated successfully
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
@@ -75,7 +75,7 @@ service_prefix "" {
Rename a policy:
-```shell
+```shell-session
$ consul acl policy update -id 35b8 -name "dc1-replication"
Policy updated successfully
ID: 35b8ecb0-707c-ee18-2002-81b238b54b38
diff --git a/website/pages/docs/commands/acl/role/create.mdx b/website/pages/commands/acl/role/create.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/role/create.mdx
rename to website/pages/commands/acl/role/create.mdx
index 9375db4f6e..28cdc167f5 100644
--- a/website/pages/docs/commands/acl/role/create.mdx
+++ b/website/pages/commands/acl/role/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role Create'
sidebar_title: create
---
@@ -49,7 +49,7 @@ Usage: `consul acl role create [options] [args]`
Create a new role with one policy:
-```shell
+```shell-session
$ consul acl role create -name "crawler" -description "web crawler role" -policy-name "crawler-kv"
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
Name: crawler
@@ -60,7 +60,7 @@ Policies:
Create a new role with one service identity:
-```shell
+```shell-session
$ consul acl role create -name archiver -description 'archiver role' -service-identity "archiver:dc2"
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
Name: archiver
diff --git a/website/pages/docs/commands/acl/role/delete.mdx b/website/pages/commands/acl/role/delete.mdx
similarity index 94%
rename from website/pages/docs/commands/acl/role/delete.mdx
rename to website/pages/commands/acl/role/delete.mdx
index 11167bce85..e46258b509 100644
--- a/website/pages/docs/commands/acl/role/delete.mdx
+++ b/website/pages/commands/acl/role/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role Delete'
sidebar_title: delete
---
@@ -35,14 +35,14 @@ Usage: `consul acl role delete [options]`
Delete a role by prefix:
-```shell
+```shell-session
$ consul acl role delete -id 57147
Role "57147d87-6bf7-f794-1a6e-7d038c4e4ae9" deleted successfully
```
Delete a role by name:
-```shell
+```shell-session
$ consul acl role delete -name crawler
Role "a365fdc9-ac71-e754-0645-7ab6bd747301" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/role/index.mdx b/website/pages/commands/acl/role/index.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/role/index.mdx
rename to website/pages/commands/acl/role/index.mdx
index beec68c7bd..238202ddab 100644
--- a/website/pages/docs/commands/acl/role/index.mdx
+++ b/website/pages/commands/acl/role/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role'
sidebar_title: role
---
@@ -55,7 +55,7 @@ full UUID and used.
Create a new ACL role:
-```shell
+```shell-session
$ consul acl role create -name "new-role" \
-description "This is an example role" \
-policy-id 06acc965
@@ -63,24 +63,24 @@ $ consul acl role create -name "new-role" \
List all roles:
-```shell
+```shell-session
$ consul acl role list
```
Update a role:
-```shell
+```shell-session
$ consul acl role update -name "other-role" -datacenter "dc1"
```
Read a role:
-```shell
+```shell-session
$ consul acl role read -id 0479e93e-091c-4475-9b06-79a004765c24
```
Delete a role
-```shell
+```shell-session
$ consul acl role delete -name "my-role"
```
diff --git a/website/pages/docs/commands/acl/role/list.mdx b/website/pages/commands/acl/role/list.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/role/list.mdx
rename to website/pages/commands/acl/role/list.mdx
index 5f8dffe12b..ddfc0ac213 100644
--- a/website/pages/docs/commands/acl/role/list.mdx
+++ b/website/pages/commands/acl/role/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role List'
sidebar_title: list
---
@@ -35,7 +35,7 @@ Usage: `consul acl role list`
Default listing.
-```shell
+```shell-session
$ consul acl role list
web-crawler:
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
@@ -53,7 +53,7 @@ archiver:
Show Metadata.
-```shell
+```shell-session
$ consul acl role list -meta
web-crawler:
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
diff --git a/website/pages/docs/commands/acl/role/read.mdx b/website/pages/commands/acl/role/read.mdx
similarity index 96%
rename from website/pages/docs/commands/acl/role/read.mdx
rename to website/pages/commands/acl/role/read.mdx
index 0b11dd7001..d9002e1221 100644
--- a/website/pages/docs/commands/acl/role/read.mdx
+++ b/website/pages/commands/acl/role/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role Read'
sidebar_title: read
---
@@ -40,7 +40,7 @@ Usage: `consul acl role read [options] [args]`
Get role details:
-```shell
+```shell-session
$ consul acl role read -id 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
Name: crawler
@@ -51,7 +51,7 @@ Policies:
Get role details by name:
-```shell
+```shell-session
$ consul acl role read -name archiver
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
Name: archiver
diff --git a/website/pages/docs/commands/acl/role/update.mdx b/website/pages/commands/acl/role/update.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/role/update.mdx
rename to website/pages/commands/acl/role/update.mdx
index 98e5b9d5c7..c59dc15445 100644
--- a/website/pages/docs/commands/acl/role/update.mdx
+++ b/website/pages/commands/acl/role/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Role Update'
sidebar_title: update
---
@@ -60,7 +60,7 @@ Usage: `consul acl role update [options] [args]`
Update a role:
-```shell
+```shell-session
$ consul acl role update -id 57147d87-6bf7-f794-1a6e-7d038c4e4ae9 \
-description 'web crawler updated role' -service-identity 'crawler'
Role updated successfully
@@ -75,7 +75,7 @@ Service Identities:
Rename a role by prefix:
-```shell
+```shell-session
$ consul acl role update -id 57147 -name web-crawler
Role updated successfully
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
diff --git a/website/pages/docs/commands/acl/set-agent-token.mdx b/website/pages/commands/acl/set-agent-token.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/set-agent-token.mdx
rename to website/pages/commands/acl/set-agent-token.mdx
index 14664bf953..cb07fda30e 100644
--- a/website/pages/docs/commands/acl/set-agent-token.mdx
+++ b/website/pages/commands/acl/set-agent-token.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Set Agent Token'
sidebar_title: set-agent-token
---
@@ -44,6 +44,6 @@ Usage: `consul acl set-agent-token [options] TYPE TOKEN`
Set the `default` token:
-```
+```shell-session
$ consul acl set-agent-token default c4d0f8df-3aba-4ab6-a7a0-35b760dc29a1
```
diff --git a/website/pages/docs/commands/acl/token/clone.mdx b/website/pages/commands/acl/token/clone.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/token/clone.mdx
rename to website/pages/commands/acl/token/clone.mdx
index 47c77a240b..88397a3002 100644
--- a/website/pages/docs/commands/acl/token/clone.mdx
+++ b/website/pages/commands/acl/token/clone.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token Clone'
sidebar_title: clone
---
@@ -39,7 +39,7 @@ Usage: `consul acl token clone [options]`
Clone a token:
-```shell
+```shell-session
$ consul acl token clone -id 59f8 -description "Clone of Super User"
Token cloned successfully.
AccessorID: dcfa52ed-9288-b3ff-056d-255ef69d2d88
diff --git a/website/pages/docs/commands/acl/token/create.mdx b/website/pages/commands/acl/token/create.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/token/create.mdx
rename to website/pages/commands/acl/token/create.mdx
index fc4e29f583..70999b2aab 100644
--- a/website/pages/docs/commands/acl/token/create.mdx
+++ b/website/pages/commands/acl/token/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token Create'
sidebar_title: create
---
@@ -63,7 +63,7 @@ Usage: `consul acl token create [options] [args]`
Create a new token:
-```shell
+```shell-session
$ consul acl token create -description "Read Nodes and Services" -policy-id 06acc965
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
SecretID: ec15675e-2999-d789-832e-8c4794daa8d7
@@ -76,7 +76,7 @@ Policies:
Create a new local token:
-```shell
+```shell-session
$ consul acl token create -description "Read Nodes and Services" -policy-id 06acc965 -local
AccessorID: 4fdf0ec8-d251-3865-079c-7247c974fc50
SecretID: 02143514-abf2-6c23-0aa1-ec2107e68f6b
@@ -89,7 +89,7 @@ Policies:
Create a new token and link with policies by name:
-```shell
+```shell-session
$ consul acl token create -description "Super User" -policy-name global-management
AccessorID: 59f86a9b-d3b6-166c-32a0-be4ab3f94caa
SecretID: ada7f751-f654-8872-7f93-498e799158b6
@@ -102,7 +102,7 @@ Policies:
Create a new token with one service identity that expires in 15 minutes:
-```shell
+```shell-session
$ consul acl token create -description 'crawler token' -service-identity 'crawler' -expires-ttl '15m'
AccessorID: 0c083aca-6c15-f0cc-c4d9-30578db54cd9
SecretID: 930dafb6-5c08-040b-23fb-a368a95256f9
diff --git a/website/pages/docs/commands/acl/token/delete.mdx b/website/pages/commands/acl/token/delete.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/token/delete.mdx
rename to website/pages/commands/acl/token/delete.mdx
index d27e055a55..9772cc8b23 100644
--- a/website/pages/docs/commands/acl/token/delete.mdx
+++ b/website/pages/commands/acl/token/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token Delete'
sidebar_title: delete
---
@@ -33,7 +33,7 @@ Usage: `consul acl token delete [options]`
Delete a token:
-```shell
+```shell-session
$ consul acl token delete -id 35b8
Token "35b8ecb0-707c-ee18-2002-81b238b54b38" deleted successfully
```
diff --git a/website/pages/docs/commands/acl/token/index.mdx b/website/pages/commands/acl/token/index.mdx
similarity index 95%
rename from website/pages/docs/commands/acl/token/index.mdx
rename to website/pages/commands/acl/token/index.mdx
index d01004b377..2c28c1ab14 100644
--- a/website/pages/docs/commands/acl/token/index.mdx
+++ b/website/pages/commands/acl/token/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token'
sidebar_title: token
---
@@ -61,7 +61,7 @@ Builtin Tokens:
Create a new ACL token:
-```shell
+```shell-session
$ consul acl token create \
-description "This is an example token" \
-policy-id 06acc965
@@ -69,24 +69,24 @@ $ consul acl token create \
List all tokens:
-```shell
+```shell-session
$ consul acl token list
```
Update a token:
-```shell
+```shell-session
$ consul acl token update -id 986193 -description "WonderToken"
```
Read a token with an accessor ID:
-```shell
+```shell-session
$ consul acl token read -id 986193
```
Delete a token
-```shell
+```shell-session
$ consul acl token delete -id 986193
```
diff --git a/website/pages/docs/commands/acl/token/list.mdx b/website/pages/commands/acl/token/list.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/token/list.mdx
rename to website/pages/commands/acl/token/list.mdx
index dcbb39e544..a43ac075b9 100644
--- a/website/pages/docs/commands/acl/token/list.mdx
+++ b/website/pages/commands/acl/token/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token List'
sidebar_title: list
---
@@ -35,7 +35,7 @@ Usage: `consul acl token list`
Default listing.
-```shell
+```shell-session
$ consul acl token list
AccessorID: 4d123dff-f460-73c3-02c4-8dd64d136e01
Description: Bootstrap Token (Global Management)
diff --git a/website/pages/docs/commands/acl/token/read.mdx b/website/pages/commands/acl/token/read.mdx
similarity index 97%
rename from website/pages/docs/commands/acl/token/read.mdx
rename to website/pages/commands/acl/token/read.mdx
index 464ea4eb79..4cfa070218 100644
--- a/website/pages/docs/commands/acl/token/read.mdx
+++ b/website/pages/commands/acl/token/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token Read'
sidebar_title: read
---
@@ -41,7 +41,7 @@ Usage: `consul acl token read [options] [args]`
Get token details:
-```shell
+```shell-session
$ consul acl token read -id 986
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
SecretID: ec15675e-2999-d789-832e-8c4794daa8d7
@@ -67,7 +67,7 @@ Policies:
Get token details (Builtin Tokens)
-```shell
+```shell-session
$ consul acl token read -id anonymous
AccessorID: 00000000-0000-0000-0000-000000000002
SecretID: anonymous
diff --git a/website/pages/docs/commands/acl/token/update.mdx b/website/pages/commands/acl/token/update.mdx
similarity index 98%
rename from website/pages/docs/commands/acl/token/update.mdx
rename to website/pages/commands/acl/token/update.mdx
index 32b5d2d0b0..db48904b3b 100644
--- a/website/pages/docs/commands/acl/token/update.mdx
+++ b/website/pages/commands/acl/token/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Token Update'
sidebar_title: update
---
@@ -69,7 +69,7 @@ guide.
Update the anonymous token:
-```shell
+```shell-session
$ consul acl token update -id anonymous -policy-id 06acc
Token updated successfully.
AccessorID: 00000000-0000-0000-0000-000000000002
@@ -83,7 +83,7 @@ Policies:
Update a token description and take the policies from the existing token:
-```shell
+```shell-session
$ consul acl token update -id 986193 -description "WonderToken" -merge-policies
Token updated successfully.
AccessorID: 986193b5-e2b5-eb26-6264-b524ea60cc6d
diff --git a/website/pages/docs/commands/acl/translate-rules.mdx b/website/pages/commands/acl/translate-rules.mdx
similarity index 91%
rename from website/pages/docs/commands/acl/translate-rules.mdx
rename to website/pages/commands/acl/translate-rules.mdx
index 4e12aef55d..e11b03da99 100644
--- a/website/pages/docs/commands/acl/translate-rules.mdx
+++ b/website/pages/commands/acl/translate-rules.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: ACL Translate Rules'
sidebar_title: translate-rules
---
@@ -15,7 +15,7 @@ This command translates the legacy ACL rule syntax into the new syntax.
### Usage
-Usage: `consul acl translate rules [options] TRANSLATE`
+Usage: `consul acl translate-rules [options] TRANSLATE`
#### API Options
@@ -42,30 +42,30 @@ Usage: `consul acl translate rules [options] TRANSLATE`
Translate rules within a file:
-```shell
+```shell-session
$ consul acl translate-rules @rules.hcl
```
Translate rules from stdin:
-```shell
+```shell-session
$ consul acl translate-rules -
```
Translate rules from a string argument:
-```shell
+```shell-session
$ consul acl translate-rules 'key "" { policy = "write"}'
```
Translate rules for a legacy ACL token using its SecretID passed from stdin:
-```shell
+```shell-session
$ consul acl translate-rules --token-secret -
```
Translate rules for a legacy ACL token using its AccessorID:
-```shell
+```shell-session
$ consul acl translate-rules 429cd746-03d5-4bbb-a83a-18b164171c89
```
diff --git a/website/pages/docs/commands/agent.mdx b/website/pages/commands/agent.mdx
similarity index 97%
rename from website/pages/docs/commands/agent.mdx
rename to website/pages/commands/agent.mdx
index 90458ff7cd..3cf0123a91 100644
--- a/website/pages/docs/commands/agent.mdx
+++ b/website/pages/commands/agent.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Agent'
sidebar_title: agent
description: >-
diff --git a/website/pages/docs/commands/catalog/datacenters.mdx b/website/pages/commands/catalog/datacenters.mdx
similarity index 93%
rename from website/pages/docs/commands/catalog/datacenters.mdx
rename to website/pages/commands/catalog/datacenters.mdx
index dce6eb1339..1d2cd5a6d4 100644
--- a/website/pages/docs/commands/catalog/datacenters.mdx
+++ b/website/pages/commands/catalog/datacenters.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Catalog List Datacenters'
sidebar_title: datacenters
---
@@ -14,7 +14,7 @@ The `catalog datacenters` command prints all known datacenters.
List all datacenters:
-```
+```shell-session
$ consul catalog datacenters
dc1
dc2
diff --git a/website/pages/docs/commands/catalog/index.mdx b/website/pages/commands/catalog/index.mdx
similarity index 94%
rename from website/pages/docs/commands/catalog/index.mdx
rename to website/pages/commands/catalog/index.mdx
index 226696fb06..925d3211ef 100644
--- a/website/pages/docs/commands/catalog/index.mdx
+++ b/website/pages/commands/catalog/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Catalog'
sidebar_title: catalog
---
@@ -18,7 +18,7 @@ The catalog is also accessible via the [HTTP API](/api/catalog).
List all datacenters:
-```text
+```shell-session
$ consul catalog datacenters
dc1
dc2
@@ -27,7 +27,7 @@ dc3
List all nodes:
-```text
+```shell-session
$ consul catalog nodes
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -35,7 +35,7 @@ worker-01 1b662d97 10.4.5.31 dc1
List all nodes which provide a particular service:
-```text
+```shell-session
$ consul catalog nodes -service=redis
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -44,7 +44,7 @@ worker-02 d407a592 10.4.4.158 dc1
List all services:
-```text
+```shell-session
$ consul catalog services
consul
postgresql
@@ -53,7 +53,7 @@ redis
List all services on a node:
-```text
+```shell-session
$ consul catalog services -node=worker-01
consul
postgres
diff --git a/website/pages/docs/commands/catalog/nodes.mdx b/website/pages/commands/catalog/nodes.mdx
similarity index 96%
rename from website/pages/docs/commands/catalog/nodes.mdx
rename to website/pages/commands/catalog/nodes.mdx
index fe13fac17a..f07ddab288 100644
--- a/website/pages/docs/commands/catalog/nodes.mdx
+++ b/website/pages/commands/catalog/nodes.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Catalog List Nodes'
sidebar_title: nodes
---
@@ -16,7 +16,7 @@ particular service.
List all nodes:
-```text
+```shell-session
$ consul catalog nodes
Node ID Address DC
worker-01 1b662d97 10.4.5.31 dc1
@@ -24,7 +24,7 @@ worker-01 1b662d97 10.4.5.31 dc1
Print detailed node information such as tagged addresses and node metadata:
-```text
+```shell-session
$ consul catalog nodes -detailed
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
@@ -32,7 +32,7 @@ worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31,
List nodes which provide the service name "web":
-```text
+```shell-session
$ consul catalog nodes -service=web
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
@@ -40,7 +40,7 @@ worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31,
Sort the resulting node list by estimated round trip time to worker-05:
-```text
+```shell-session
$ consul catalog nodes -near=web-05
Node ID Address DC TaggedAddresses Meta
worker-01 1b662d97-8b5c-3cc2-0ac0-96f55ad423b5 10.4.5.31 dc1 lan=10.4.5.31, wan=10.4.5.31
diff --git a/website/pages/docs/commands/catalog/services.mdx b/website/pages/commands/catalog/services.mdx
similarity index 95%
rename from website/pages/docs/commands/catalog/services.mdx
rename to website/pages/commands/catalog/services.mdx
index 1154a0e07f..ca2192080c 100644
--- a/website/pages/docs/commands/catalog/services.mdx
+++ b/website/pages/commands/catalog/services.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Catalog List Services'
sidebar_title: services
---
@@ -16,7 +16,7 @@ particular node provides.
List all services:
-```text
+```shell-session
$ consul catalog services
consul
postgresql
@@ -25,7 +25,7 @@ redis
Show all services with their tags:
-```text
+```shell-session
$ consul catalog services -tags
consul
postgresql leader
@@ -34,7 +34,7 @@ redis primary,v1
List services for the node "worker-01":
-```text
+```shell-session
$ consul catalog services -node=worker-01
consul
redis
diff --git a/website/pages/docs/commands/config/delete.mdx b/website/pages/commands/config/delete.mdx
similarity index 97%
rename from website/pages/docs/commands/config/delete.mdx
rename to website/pages/commands/config/delete.mdx
index 442c511fa4..c897d0340d 100644
--- a/website/pages/docs/commands/config/delete.mdx
+++ b/website/pages/commands/config/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Config Delete'
sidebar_title: delete
---
diff --git a/website/pages/docs/commands/config/index.mdx b/website/pages/commands/config/index.mdx
similarity index 98%
rename from website/pages/docs/commands/config/index.mdx
rename to website/pages/commands/config/index.mdx
index 4a39604704..6abbc1ceb9 100644
--- a/website/pages/docs/commands/config/index.mdx
+++ b/website/pages/commands/config/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Config'
sidebar_title: config
---
diff --git a/website/pages/docs/commands/config/list.mdx b/website/pages/commands/config/list.mdx
similarity index 97%
rename from website/pages/docs/commands/config/list.mdx
rename to website/pages/commands/config/list.mdx
index 3378dc0518..77670ff567 100644
--- a/website/pages/docs/commands/config/list.mdx
+++ b/website/pages/commands/config/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Config List'
sidebar_title: list
---
diff --git a/website/pages/docs/commands/config/read.mdx b/website/pages/commands/config/read.mdx
similarity index 98%
rename from website/pages/docs/commands/config/read.mdx
rename to website/pages/commands/config/read.mdx
index 19b1a656bc..a36c599048 100644
--- a/website/pages/docs/commands/config/read.mdx
+++ b/website/pages/commands/config/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Config Read'
sidebar_title: read
---
diff --git a/website/pages/docs/commands/config/write.mdx b/website/pages/commands/config/write.mdx
similarity index 99%
rename from website/pages/docs/commands/config/write.mdx
rename to website/pages/commands/config/write.mdx
index bf4a91544b..034bd75ddd 100644
--- a/website/pages/docs/commands/config/write.mdx
+++ b/website/pages/commands/config/write.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Config Write'
sidebar_title: write
---
diff --git a/website/pages/docs/commands/connect/ca.mdx b/website/pages/commands/connect/ca.mdx
similarity index 99%
rename from website/pages/docs/commands/connect/ca.mdx
rename to website/pages/commands/connect/ca.mdx
index 412c10b88e..8d82466841 100644
--- a/website/pages/docs/commands/connect/ca.mdx
+++ b/website/pages/commands/connect/ca.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Connect CA'
sidebar_title: ca
description: >
diff --git a/website/pages/docs/commands/connect/envoy.mdx b/website/pages/commands/connect/envoy.mdx
similarity index 98%
rename from website/pages/docs/commands/connect/envoy.mdx
rename to website/pages/commands/connect/envoy.mdx
index eb4ded8829..c8be962140 100644
--- a/website/pages/docs/commands/connect/envoy.mdx
+++ b/website/pages/commands/connect/envoy.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Connect Proxy'
sidebar_title: envoy
description: >
@@ -76,7 +76,7 @@ proxy configuration needed.
allowed to access by [Connect intentions](/docs/connect/intentions).
- `-envoy-version` - The version of envoy that is being started. Default is
- `1.14.2`. This is required so that the correct configuration can be generated.
+ `1.14.4`. This is required so that the correct configuration can be generated.
- `-- [pass-through options]` - Any options given after a double dash are passed
directly through to the `envoy` invocation. See [Envoy's
@@ -145,7 +145,7 @@ service {
The sidecar Envoy process can be started with.
-```text
+```shell-session
$ consul connect envoy -sidecar-for web
```
@@ -158,7 +158,7 @@ agent is using all-default configuration.
To pass additional arguments directly to Envoy, for example output logging
level, you can use:
-```text
+```shell-session
$ consul connect envoy -sidecar-for web -- -l debug
```
@@ -168,7 +168,7 @@ To run multiple different proxy instances on the same host, you will
need to use `-admin-bind` on all but one to ensure they don't attempt to bind to
the same port as in the following example.
-```text
+```shell-session
$ consul connect envoy -sidecar-for db -admin-bind localhost:19001
```
@@ -176,7 +176,7 @@ $ consul connect envoy -sidecar-for db -admin-bind localhost:19001
The mesh gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=mesh -register \
-address '{{ GetInterfaceIP "eth0" }}:8443' \
-wan-address '{{ GetInterfaceIP "eth1" }}:8443'
@@ -186,7 +186,7 @@ $ consul connect envoy -gateway=mesh -register \
The terminating gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=terminating -register -service my-gateway \
-address '{{ GetInterfaceIP "eth0" }}:8443'
```
@@ -195,7 +195,7 @@ $ consul connect envoy -gateway=terminating -register -service my-gateway \
The ingress gateway Envoy process can be auto-registered and started with the following command.
-```shell
+```shell-session
$ consul connect envoy -gateway=ingress -register -service ingress-service \
-address '{{ GetInterfaceIP "eth0" }}:8888'
```
diff --git a/website/pages/docs/commands/connect/expose.mdx b/website/pages/commands/connect/expose.mdx
similarity index 98%
rename from website/pages/docs/commands/connect/expose.mdx
rename to website/pages/commands/connect/expose.mdx
index 04373d9bad..a590517bf2 100644
--- a/website/pages/docs/commands/connect/expose.mdx
+++ b/website/pages/commands/connect/expose.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Connect Expose'
sidebar_title: expose
description: >
@@ -12,7 +12,7 @@ description: >
Command: `consul connect expose`
-The connect expose subcommand is used to expose a Connect-enabled service
+The connect expose subcommand is used to expose a Connect-enabled service
through an Ingress gateway by modifying the gateway's configuration and adding
an intention to allow traffic from the gateway to the service. See the
[Ingress gateway documentation](/docs/connect/ingress-gateway) for more information
@@ -46,7 +46,7 @@ Usage: consul connect expose [options]
- `-protocol` - The protocol for the service. Defaults to 'tcp'.
-- `-host` - Additional DNS hostname to use for routing to this service. Can be
+- `-host` - Additional DNS hostname to use for routing to this service. Can be
specified multiple times.
## Examples
diff --git a/website/pages/docs/commands/connect/index.mdx b/website/pages/commands/connect/index.mdx
similarity index 98%
rename from website/pages/docs/commands/connect/index.mdx
rename to website/pages/commands/connect/index.mdx
index 63b15c8005..31fb952ea3 100644
--- a/website/pages/docs/commands/connect/index.mdx
+++ b/website/pages/commands/connect/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Connect'
sidebar_title: connect
---
diff --git a/website/pages/docs/commands/connect/proxy.mdx b/website/pages/commands/connect/proxy.mdx
similarity index 98%
rename from website/pages/docs/commands/connect/proxy.mdx
rename to website/pages/commands/connect/proxy.mdx
index 15f21d97f0..b5c644dc0e 100644
--- a/website/pages/docs/commands/connect/proxy.mdx
+++ b/website/pages/commands/connect/proxy.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Connect Proxy'
sidebar_title: proxy
description: >
@@ -82,14 +82,14 @@ connections to "db" representing the frontend service. Once running, any
process that creates a TCP connection to the specified port (8181) will
establish a mutual TLS connection to "db" identified as "frontend".
-```text
+```shell-session
$ consul connect proxy -service frontend -upstream db:8181
```
The next example starts a local proxy that also accepts inbound connections
on port 8443, authorizes the connection, then proxies it to port 8080:
-```text
+```shell-session
$ consul connect proxy \
-service frontend \
-service-addr 127.0.0.1:8080 \
diff --git a/website/pages/docs/commands/debug.mdx b/website/pages/commands/debug.mdx
similarity index 98%
rename from website/pages/docs/commands/debug.mdx
rename to website/pages/commands/debug.mdx
index 9349ce1c1f..9c2bad0964 100644
--- a/website/pages/docs/commands/debug.mdx
+++ b/website/pages/commands/debug.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Debug'
sidebar_title: debug
---
@@ -91,7 +91,7 @@ directory) on the host where the command runs.
By default the command will capture all available data from the default
agent address on loopback for 2 minutes at 30 second intervals.
-```text
+```shell-session
$ consul debug
...
```
@@ -99,7 +99,7 @@ $ consul debug
In this example, the archive is collected from a different agent on the
network using the standard Consul CLI flag to change the API address.
-```text
+```shell-session
$ consul debug -http-addr=10.0.1.10:8500
...
```
@@ -107,7 +107,7 @@ $ consul debug -http-addr=10.0.1.10:8500
The capture flag can be specified to only record a subset of data
about the agent and environment.
-```text
+```shell-session
$ consul debug -capture agent -capture host -capture logs
...
```
@@ -116,7 +116,7 @@ The duration of the command and interval of capturing dynamic
information (such as metrics) can be specified with the `-interval`
and `-duration` flags.
-```text
+```shell-session
$ consul debug -interval=15s -duration=1m
...
```
diff --git a/website/pages/docs/commands/event.mdx b/website/pages/commands/event.mdx
similarity index 99%
rename from website/pages/docs/commands/event.mdx
rename to website/pages/commands/event.mdx
index eb60dfbd17..a0453b6f4c 100644
--- a/website/pages/docs/commands/event.mdx
+++ b/website/pages/commands/event.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Event'
sidebar_title: event
description: >-
diff --git a/website/pages/docs/commands/exec.mdx b/website/pages/commands/exec.mdx
similarity index 99%
rename from website/pages/docs/commands/exec.mdx
rename to website/pages/commands/exec.mdx
index 8403c2b9d4..97154f2fc3 100644
--- a/website/pages/docs/commands/exec.mdx
+++ b/website/pages/commands/exec.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Exec'
sidebar_title: exec
description: >-
diff --git a/website/pages/docs/commands/force-leave.mdx b/website/pages/commands/force-leave.mdx
similarity index 99%
rename from website/pages/docs/commands/force-leave.mdx
rename to website/pages/commands/force-leave.mdx
index f6d3c51640..f676368fa9 100644
--- a/website/pages/docs/commands/force-leave.mdx
+++ b/website/pages/commands/force-leave.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Force Leave'
sidebar_title: force-leave
description: >-
diff --git a/website/pages/docs/commands/index.mdx b/website/pages/commands/index.mdx
similarity index 98%
rename from website/pages/docs/commands/index.mdx
rename to website/pages/commands/index.mdx
index d593dbe64f..03d5b68448 100644
--- a/website/pages/docs/commands/index.mdx
+++ b/website/pages/commands/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: Commands
sidebar_title: Commands (CLI)
description: >-
@@ -24,7 +24,7 @@ as you'd most likely expect. And some commands that expect input accept
To view a list of the available commands at any time, just run `consul` with
no arguments:
-```text
+```shell-session
$ consul
Usage: consul [--version] [--help] []
@@ -64,7 +64,7 @@ Available commands are:
To get help for any specific command, pass the `-h` flag to the relevant
subcommand. For example, to see help about the `join` subcommand:
-```text
+```shell-session
$ consul join -h
Usage: consul join [options] address ...
@@ -100,7 +100,7 @@ you can invoke a new shell and use the feature.
For example, assume a tab is typed at the end of each prompt line:
-```shell
+```shell-session
$ consul e
event exec
@@ -248,8 +248,8 @@ scheme should be used, or `CONSUL_HTTP_SSL` set.
### `CONSUL_NAMESPACE`
**Enterprise only**
-If you're using Consul Enterprise namespaces you can set this for the CLI to
-explicitly use a single namespace. This is common across all Hashicorp
+If you're using Consul Enterprise namespaces you can set this for the CLI to
+explicitly use a single namespace. This is common across all Hashicorp
products that support Enterprise namespaces.
```
diff --git a/website/pages/docs/commands/info.mdx b/website/pages/commands/info.mdx
similarity index 99%
rename from website/pages/docs/commands/info.mdx
rename to website/pages/commands/info.mdx
index fd6fa1290e..24618ae274 100644
--- a/website/pages/docs/commands/info.mdx
+++ b/website/pages/commands/info.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Info'
sidebar_title: info
description: >-
diff --git a/website/pages/docs/commands/intention/check.mdx b/website/pages/commands/intention/check.mdx
similarity index 98%
rename from website/pages/docs/commands/intention/check.mdx
rename to website/pages/commands/intention/check.mdx
index 263d782ab0..d49609154e 100644
--- a/website/pages/docs/commands/intention/check.mdx
+++ b/website/pages/commands/intention/check.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention Check'
sidebar_title: check
---
diff --git a/website/pages/docs/commands/intention/create.mdx b/website/pages/commands/intention/create.mdx
similarity index 98%
rename from website/pages/docs/commands/intention/create.mdx
rename to website/pages/commands/intention/create.mdx
index efb65040d9..3cc698d449 100644
--- a/website/pages/docs/commands/intention/create.mdx
+++ b/website/pages/commands/intention/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention Create'
sidebar_title: create
---
diff --git a/website/pages/docs/commands/intention/delete.mdx b/website/pages/commands/intention/delete.mdx
similarity index 97%
rename from website/pages/docs/commands/intention/delete.mdx
rename to website/pages/commands/intention/delete.mdx
index 9bf1f1aa03..2a5ce032a8 100644
--- a/website/pages/docs/commands/intention/delete.mdx
+++ b/website/pages/commands/intention/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention Delete'
sidebar_title: delete
---
diff --git a/website/pages/docs/commands/intention/get.mdx b/website/pages/commands/intention/get.mdx
similarity index 97%
rename from website/pages/docs/commands/intention/get.mdx
rename to website/pages/commands/intention/get.mdx
index 570eb72438..c961fc580a 100644
--- a/website/pages/docs/commands/intention/get.mdx
+++ b/website/pages/commands/intention/get.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention Get'
sidebar_title: get
---
diff --git a/website/pages/docs/commands/intention/index.mdx b/website/pages/commands/intention/index.mdx
similarity index 89%
rename from website/pages/docs/commands/intention/index.mdx
rename to website/pages/commands/intention/index.mdx
index fae4235bb6..c26a269268 100644
--- a/website/pages/docs/commands/intention/index.mdx
+++ b/website/pages/commands/intention/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention'
sidebar_title: intention
---
@@ -70,10 +70,10 @@ $ consul intention match db
Intention commands commonly take positional arguments referred to as `SRC` and
`DST` in the command documentation. These can take several forms:
-| Format | Meaning |
-| ----------------------- | -----------------------------------------------------------------------|
-| `` | the named service in the current namespace |
-| `*` | any service in the current namespace |
-| `/` | the named service in a specific namespace |
-| `/*` | any service in the specified namespace |
-| `*/*` | any service in any namespace |
+| Format | Meaning |
+| ----------------------- | -------------------------------------------------------------------- |
+| `` | the named service in the current namespace |
+| `*` | any service in the current namespace |
+| `/` | the named service in a specific namespace |
+| `/*` | any service in the specified namespace |
+| `*/*` | any service in any namespace |
diff --git a/website/pages/docs/commands/intention/match.mdx b/website/pages/commands/intention/match.mdx
similarity index 98%
rename from website/pages/docs/commands/intention/match.mdx
rename to website/pages/commands/intention/match.mdx
index 12edbc0ee5..b94b56c761 100644
--- a/website/pages/docs/commands/intention/match.mdx
+++ b/website/pages/commands/intention/match.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Intention Match'
sidebar_title: match
---
diff --git a/website/pages/docs/commands/join.mdx b/website/pages/commands/join.mdx
similarity index 98%
rename from website/pages/docs/commands/join.mdx
rename to website/pages/commands/join.mdx
index a04847cd0f..c2c8e295e4 100644
--- a/website/pages/docs/commands/join.mdx
+++ b/website/pages/commands/join.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Join'
sidebar_title: join
description: >-
diff --git a/website/pages/docs/commands/keygen.mdx b/website/pages/commands/keygen.mdx
similarity index 97%
rename from website/pages/docs/commands/keygen.mdx
rename to website/pages/commands/keygen.mdx
index 02976065c0..0a48ff909d 100644
--- a/website/pages/docs/commands/keygen.mdx
+++ b/website/pages/commands/keygen.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Keygen'
sidebar_title: keygen
description: >-
diff --git a/website/pages/docs/commands/keyring.mdx b/website/pages/commands/keyring.mdx
similarity index 99%
rename from website/pages/docs/commands/keyring.mdx
rename to website/pages/commands/keyring.mdx
index 5908c4a131..cc61b619a4 100644
--- a/website/pages/docs/commands/keyring.mdx
+++ b/website/pages/commands/keyring.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Keyring'
sidebar_title: keyring
---
diff --git a/website/pages/docs/commands/kv/delete.mdx b/website/pages/commands/kv/delete.mdx
similarity index 96%
rename from website/pages/docs/commands/kv/delete.mdx
rename to website/pages/commands/kv/delete.mdx
index ed84cc6779..52953dc2e1 100644
--- a/website/pages/docs/commands/kv/delete.mdx
+++ b/website/pages/commands/kv/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV Delete'
sidebar_title: delete
---
@@ -41,7 +41,7 @@ Usage: `consul kv delete [options] KEY_OR_PREFIX`
To remove the value for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv delete redis/config/connections
Success! Deleted key: redis/config/connections
```
@@ -49,7 +49,7 @@ Success! Deleted key: redis/config/connections
If the key does not exist, the command will not error, and a success message
will be returned:
-```shell
+```shell-session
$ consul kv delete not-a-real-key
Success! Deleted key: not-a-real-key
```
@@ -57,7 +57,7 @@ Success! Deleted key: not-a-real-key
To only delete a key if it has not been modified since a given index, specify
the `-cas` and `-modify-index` flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections | grep ModifyIndex
ModifyIndex 456
@@ -71,7 +71,7 @@ Success! Deleted key: redis/config/connections
To recursively delete all keys that start with a given prefix, specify the
`-recurse` flag:
-```shell
+```shell-session
$ consul kv delete -recurse redis/
Success! Deleted keys with prefix: redis/
```
@@ -85,7 +85,7 @@ a folder, always use a trailing slash.
It is not valid to combine the `-cas` option with `-recurse`, since you are
deleting multiple keys under a prefix in a single operation:
-```shell
+```shell-session
$ consul kv delete -cas -recurse redis/
Cannot specify both -cas and -recurse!
```
diff --git a/website/pages/docs/commands/kv/export.mdx b/website/pages/commands/kv/export.mdx
similarity index 95%
rename from website/pages/docs/commands/kv/export.mdx
rename to website/pages/commands/kv/export.mdx
index 20b5439a51..a48a736fca 100644
--- a/website/pages/docs/commands/kv/export.mdx
+++ b/website/pages/commands/kv/export.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV Export'
sidebar_title: export
---
@@ -31,7 +31,7 @@ Usage: `consul kv export [options] [PREFIX]`
To export the tree at "vault/" in the key value store:
-```
+```shell-session
$ consul kv export vault/
# JSON output
```
diff --git a/website/pages/docs/commands/kv/get.mdx b/website/pages/commands/kv/get.mdx
similarity index 95%
rename from website/pages/docs/commands/kv/get.mdx
rename to website/pages/commands/kv/get.mdx
index b1fdd66173..288fa38e38 100644
--- a/website/pages/docs/commands/kv/get.mdx
+++ b/website/pages/commands/kv/get.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV Get'
sidebar_title: get
---
@@ -52,7 +52,7 @@ Usage: `consul kv get [options] [KEY_OR_PREFIX]`
To retrieve the value for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv get redis/config/connections
5
```
@@ -62,7 +62,7 @@ information about the key, specify the "-detailed" flag. This will output all
known metadata about the key including ModifyIndex and any user-supplied
flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections
CreateIndex 336
Flags 0
@@ -75,7 +75,7 @@ Value 5
If the key with the given name does not exist, an error is returned:
-```shell
+```shell-session
$ consul kv get not-a-real-key
Error! No key exists at: not-a-real-key
```
@@ -83,7 +83,7 @@ Error! No key exists at: not-a-real-key
To treat the path as a prefix and list all keys which start with the given
prefix, specify the "-recurse" flag:
-```shell
+```shell-session
$ consul kv get -recurse redis/
redis/config/connections:5
redis/config/cpu:128
@@ -92,7 +92,7 @@ redis/config/memory:512
Or list detailed information about all pairs under a prefix:
-```shell
+```shell-session
$ consul kv get -recurse -detailed redis
CreateIndex 336
Flags 0
@@ -122,7 +122,7 @@ Value 512
To just list the keys which start with the specified prefix, use the "-keys"
option instead. This is more performant and results in a smaller payload:
-```shell
+```shell-session
$ consul kv get -keys redis/config/
redis/config/connections
redis/config/cpu
@@ -133,7 +133,7 @@ By default, the `-keys` operation uses a separator of "/", meaning it will not
recurse beyond that separator. You can choose a different separator by setting
`-separator=""`.
-```shell
+```shell-session
$ consul kv get -keys -separator="c" redis
redis/c
```
@@ -141,7 +141,7 @@ redis/c
Alternatively, you can disable the separator altogether by setting it to the
empty string:
-```shell
+```shell-session
$ consul kv get -keys -separator="" redis
redis/config/connections
redis/config/cpu
@@ -150,7 +150,7 @@ redis/config/memory
To list all keys at the root, simply omit the prefix parameter:
-```shell
+```shell-session
$ consul kv get -keys
memcached/
redis/
diff --git a/website/pages/docs/commands/kv/import.mdx b/website/pages/commands/kv/import.mdx
similarity index 92%
rename from website/pages/docs/commands/kv/import.mdx
rename to website/pages/commands/kv/import.mdx
index ce0f564b7c..3e6dff10d5 100644
--- a/website/pages/docs/commands/kv/import.mdx
+++ b/website/pages/commands/kv/import.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV Import'
sidebar_title: import
---
@@ -29,14 +29,14 @@ Usage: `consul kv import [options] [DATA]`
To import from a file, prepend the filename with `@`:
-```shell
+```shell-session
$ consul kv import @values.json
# Output
```
To import from stdin, use `-` as the data parameter:
-```shell
+```shell-session
$ cat values.json | consul kv import -
# Output
```
@@ -44,7 +44,7 @@ $ cat values.json | consul kv import -
You can also pass the JSON directly, however care must be taken with shell
escaping:
-```shell
+```shell-session
$ consul kv import "$(cat values.json)"
# Output
```
diff --git a/website/pages/docs/commands/kv/index.mdx b/website/pages/commands/kv/index.mdx
similarity index 95%
rename from website/pages/docs/commands/kv/index.mdx
rename to website/pages/commands/kv/index.mdx
index 7495daf251..ece8859323 100644
--- a/website/pages/docs/commands/kv/index.mdx
+++ b/website/pages/commands/kv/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV'
sidebar_title: kv
---
@@ -51,21 +51,21 @@ of the subcommand in the sidebar or one of the links below:
To create or update the key named "redis/config/connections" to the value "5" in
Consul's KV store:
-```text
+```shell-session
$ consul kv put redis/config/connections 5
Success! Data written to: redis/config/connections
```
To read a value back from Consul:
-```text
+```shell-session
$ consul kv get redis/config/connections
5
```
Or you can query for detailed information:
-```text
+```shell-session
$ consul kv get -detailed redis/config/connections
CreateIndex 336
Flags 0
@@ -78,7 +78,7 @@ Value 5
Finally, deleting a key is just as easy:
-```text
+```shell-session
$ consul kv delete redis/config/connections
Success! Data deleted at key: redis/config/connections
```
diff --git a/website/pages/docs/commands/kv/put.mdx b/website/pages/commands/kv/put.mdx
similarity index 96%
rename from website/pages/docs/commands/kv/put.mdx
rename to website/pages/commands/kv/put.mdx
index b39fed41f8..50093e88f2 100644
--- a/website/pages/docs/commands/kv/put.mdx
+++ b/website/pages/commands/kv/put.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: KV Put'
sidebar_title: put
---
@@ -56,21 +56,21 @@ Usage: `consul kv put [options] KEY [DATA]`
To insert a value of "5" for the key named "redis/config/connections" in the
KV store:
-```shell
+```shell-session
$ consul kv put redis/config/connections 5
Success! Data written to: redis/config/connections
```
If no data is specified, the key will be created with empty data:
-```shell
+```shell-session
$ consul kv put redis/config/connections
Success! Data written to: redis/config/connections
```
If the `-base64` flag is set, the data will be decoded before writing:
-```shell
+```shell-session
$ consul kv put -base64 foo/encoded aGVsbG8gd29ybGQK
Success! Data written to: foo/encoded
```
@@ -81,14 +81,14 @@ the value at the key to the empty value.
For longer or sensitive values, it is possible to read from a file by prefixing
with the `@` symbol:
-```shell
+```shell-session
$ consul kv put redis/config/password @password.txt
Success! Data written to: redis/config/connections
```
Or read values from stdin by specifying the `-` symbol:
-```shell
+```shell-session
$ echo "5" | consul kv put redis/config/password -
Success! Data written to: redis/config/connections
@@ -106,7 +106,7 @@ more robust interface for secret management.
To only update a key if it has not been modified since a given index, specify
the `-cas` and `-modify-index` flags:
-```shell
+```shell-session
$ consul kv get -detailed redis/config/connections | grep ModifyIndex
ModifyIndex 456
@@ -120,21 +120,21 @@ Success! Data written to: redis/config/connections
To specify flags on the key, use the `-flags` option. These flags are completely
controlled by the user:
-```shell
+```shell-session
$ consul kv put -flags=42 redis/config/password s3cr3t
Success! Data written to: redis/config/password
```
To create or tune a lock, use the `-acquire` and `-session` flags. The session must already exist (this command will not create it or manage it):
-```shell
+```shell-session
$ consul kv put -acquire -session=abc123 redis/lock/update
Success! Lock acquired on: redis/lock/update
```
When you are finished, release the lock:
-```shell
+```shell-session
$ consul kv put -release -session=acb123 redis/lock/update
Success! Lock released on: redis/lock/update
```
diff --git a/website/pages/docs/commands/leave.mdx b/website/pages/commands/leave.mdx
similarity index 98%
rename from website/pages/docs/commands/leave.mdx
rename to website/pages/commands/leave.mdx
index 077c3a9d23..dd946e62c5 100644
--- a/website/pages/docs/commands/leave.mdx
+++ b/website/pages/commands/leave.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Leave'
sidebar_title: leave
description: >-
diff --git a/website/pages/docs/commands/license.mdx b/website/pages/commands/license.mdx
similarity index 98%
rename from website/pages/docs/commands/license.mdx
rename to website/pages/commands/license.mdx
index a47b5095c5..eaa0cabf48 100644
--- a/website/pages/docs/commands/license.mdx
+++ b/website/pages/commands/license.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: License'
sidebar_title: license
description: >
@@ -42,7 +42,7 @@ Usage: consul license [options] [args]
Retrieve the current license:
$ consul license get
-
+
Reset the current license:
$ consul license reset
@@ -117,7 +117,7 @@ Licensed Features:
## reset
-Resets license for the datacenter to the one builtin in Consul binary, if it is still valid.
+Resets license for the datacenter to the one builtin in Consul binary, if it is still valid.
If the builtin license is invalid, the current one stays active.
Usage: `consul license reset [options]`
diff --git a/website/pages/docs/commands/lock.mdx b/website/pages/commands/lock.mdx
similarity index 95%
rename from website/pages/docs/commands/lock.mdx
rename to website/pages/commands/lock.mdx
index 6056cea56d..d25b1fe9e8 100644
--- a/website/pages/docs/commands/lock.mdx
+++ b/website/pages/commands/lock.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Lock'
sidebar_title: lock
description: >-
@@ -77,12 +77,9 @@ Windows has no POSIX compatible notion for `SIGTERM`.
- `-pass-stdin` - Pass stdin to child process.
-- `-timeout` - Maximum amount of time to wait to acquire the lock, specified
- as a duration like `1s` or `3h`. The default value is 0.
-
- `-timeout` - Attempt to acquire the lock up to the given timeout. The timeout is a
positive decimal number, with unit suffix, such as "500ms". Valid time units
- are "ns", "us" (or "Β΅s"), "ms", "s", "m", "h".
+ are "ns", "us" (or "Β΅s"), "ms", "s", "m", "h". The default value is 0.
- `-verbose` - Enables verbose output.
diff --git a/website/pages/docs/commands/login.mdx b/website/pages/commands/login.mdx
similarity index 98%
rename from website/pages/docs/commands/login.mdx
rename to website/pages/commands/login.mdx
index de001441e4..6a9804f9ad 100644
--- a/website/pages/docs/commands/login.mdx
+++ b/website/pages/commands/login.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Login'
sidebar_title: login
description: >
@@ -52,7 +52,7 @@ Usage: `consul login [options]`
Login to an auth method.
-```shell
+```shell-session
$ consul login -method 'minikube' \
-bearer-token-file '/run/secrets/kubernetes.io/serviceaccount/token' \
-token-sink-file 'consul.token'
diff --git a/website/pages/docs/commands/logout.mdx b/website/pages/commands/logout.mdx
similarity index 95%
rename from website/pages/docs/commands/logout.mdx
rename to website/pages/commands/logout.mdx
index 3463c8f2e7..4a60a938dc 100644
--- a/website/pages/docs/commands/logout.mdx
+++ b/website/pages/commands/logout.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Logout'
sidebar_title: logout
description: >
@@ -30,6 +30,6 @@ Usage: `consul logout [options]`
Logout and delete a login token.
-```shell
+```shell-session
$ consul logout -token-file 'consul.token'
```
diff --git a/website/pages/docs/commands/maint.mdx b/website/pages/commands/maint.mdx
similarity index 98%
rename from website/pages/docs/commands/maint.mdx
rename to website/pages/commands/maint.mdx
index 9445a2c3e4..f260d19b3f 100644
--- a/website/pages/docs/commands/maint.mdx
+++ b/website/pages/commands/maint.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Maint'
sidebar_title: maint
description: |
@@ -50,7 +50,7 @@ If neither `-enable` nor `-disable` are passed, the `maint` command will
switch to "list mode", displaying any current maintenances. This may return
blank if nothing is currently under maintenance. The output will look like:
-```shell
+```shell-session
$ consul maint
Node:
Name: node1.local
diff --git a/website/pages/docs/commands/members.mdx b/website/pages/commands/members.mdx
similarity index 98%
rename from website/pages/docs/commands/members.mdx
rename to website/pages/commands/members.mdx
index 190831c868..b141441462 100644
--- a/website/pages/docs/commands/members.mdx
+++ b/website/pages/commands/members.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Members'
sidebar_title: members
description: >-
diff --git a/website/pages/docs/commands/monitor.mdx b/website/pages/commands/monitor.mdx
similarity index 98%
rename from website/pages/docs/commands/monitor.mdx
rename to website/pages/commands/monitor.mdx
index 8b06a7acd5..5d30f52ed6 100644
--- a/website/pages/docs/commands/monitor.mdx
+++ b/website/pages/commands/monitor.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Monitor'
sidebar_title: monitor
description: >-
diff --git a/website/pages/docs/commands/namespace/create.mdx b/website/pages/commands/namespace/create.mdx
similarity index 97%
rename from website/pages/docs/commands/namespace/create.mdx
rename to website/pages/commands/namespace/create.mdx
index 6757d604ce..88b6a802db 100644
--- a/website/pages/docs/commands/namespace/create.mdx
+++ b/website/pages/commands/namespace/create.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace Create'
sidebar_title: create
---
@@ -56,14 +56,14 @@ from the CLI arguments.
Create a new Namespace:
-```shell
+```shell-session
$ consul namespace create -name "team-1"
Name: team-1
```
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace create -name team-1 -show-meta
Name: team-1
Create Index: 339
@@ -72,7 +72,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace create -name team2 -description "Example Namespace" -meta "team-id=574407f3-8b26-4c84-8e51-028bb8cbdd37" -format=json
{
"Name": "team2",
diff --git a/website/pages/docs/commands/namespace/delete.mdx b/website/pages/commands/namespace/delete.mdx
similarity index 94%
rename from website/pages/docs/commands/namespace/delete.mdx
rename to website/pages/commands/namespace/delete.mdx
index 3303f5fb35..8102f3c39d 100644
--- a/website/pages/docs/commands/namespace/delete.mdx
+++ b/website/pages/commands/namespace/delete.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace Delete'
sidebar_title: delete
---
@@ -27,6 +27,6 @@ Usage: `consul namespace delete `
Delete a Namespace:
-```shell
+```shell-session
$ consul namespace delete "team-1"
```
diff --git a/website/pages/docs/commands/namespace/index.mdx b/website/pages/commands/namespace/index.mdx
similarity index 93%
rename from website/pages/docs/commands/namespace/index.mdx
rename to website/pages/commands/namespace/index.mdx
index fe4cdec742..dd2f34a85f 100644
--- a/website/pages/docs/commands/namespace/index.mdx
+++ b/website/pages/commands/namespace/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace'
sidebar_title: namespace
description: |
@@ -49,36 +49,36 @@ of the subcommand in the sidebar.
Create a Namespace
-```shell
+```shell-session
$ consul namespace create -name team1
```
Create or Update a Namespace from its full definition:
-```shell
+```shell-session
$ consul namespace write ns1.hcl
```
Read a Namespace:
-```shell
+```shell-session
$ consul namespace read ns1
```
List all Namespaces:
-```shell
+```shell-session
$ consul namespace list
```
Update a namespace
-```shell
+```shell-session
$ consul namespace update -name team1 -description "first namespace"
```
Delete a Namespace:
-```shell
+```shell-session
$ consul namespace delete team1
```
diff --git a/website/pages/docs/commands/namespace/list.mdx b/website/pages/commands/namespace/list.mdx
similarity index 96%
rename from website/pages/docs/commands/namespace/list.mdx
rename to website/pages/commands/namespace/list.mdx
index ede7230952..fbb82ac449 100644
--- a/website/pages/docs/commands/namespace/list.mdx
+++ b/website/pages/commands/namespace/list.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace List'
sidebar_title: list
---
@@ -36,7 +36,7 @@ Usage: `consul namespace list`
List Namespaces:
-```shell
+```shell-session
$ consul namespace list
default:
Description:
@@ -51,7 +51,7 @@ team-1:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace list -meta
default:
Description:
@@ -72,7 +72,7 @@ team-1:
JSON Format:
-```shell
+```shell-session
$ consul namespace list -format=json
[
{
diff --git a/website/pages/docs/commands/namespace/read.mdx b/website/pages/commands/namespace/read.mdx
similarity index 94%
rename from website/pages/docs/commands/namespace/read.mdx
rename to website/pages/commands/namespace/read.mdx
index e371a27cd0..f0de955024 100644
--- a/website/pages/docs/commands/namespace/read.mdx
+++ b/website/pages/commands/namespace/read.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace Read'
sidebar_title: read
---
@@ -35,7 +35,7 @@ Usage: `consul namespace read `
Read a Namespace:
-```shell
+```shell-session
$ consul namespace read "team-1"
Name: team-1
Description:
@@ -43,7 +43,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace read -meta "team-1"
Name: team-1
Description:
@@ -53,7 +53,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace read -format=json foo
{
"Name": "foo",
diff --git a/website/pages/docs/commands/namespace/update.mdx b/website/pages/commands/namespace/update.mdx
similarity index 97%
rename from website/pages/docs/commands/namespace/update.mdx
rename to website/pages/commands/namespace/update.mdx
index e513c29cf8..73187e31f6 100644
--- a/website/pages/docs/commands/namespace/update.mdx
+++ b/website/pages/commands/namespace/update.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace Update'
sidebar_title: update
---
@@ -61,7 +61,7 @@ with the existing namespace definition.
Update a namespace with a new description:
-```shell
+```shell-session
$ consul namespace update -name "team-1" -description "example description"
Name: team-1
Description:
@@ -70,7 +70,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace update -name team-1 -show-meta -default-policy-id 1206bf1c-6239-46e8-b9f8-b426667cf428
Name: team-1
ACLs:
@@ -82,7 +82,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ consul namespace update -name team2 -description "Example Namespace" -meta "external-source=kubernetes" -format=json
{
"Name": "team2",
diff --git a/website/pages/docs/commands/namespace/write.mdx b/website/pages/commands/namespace/write.mdx
similarity index 95%
rename from website/pages/docs/commands/namespace/write.mdx
rename to website/pages/commands/namespace/write.mdx
index aa9901691d..f2b6e5b421 100644
--- a/website/pages/docs/commands/namespace/write.mdx
+++ b/website/pages/commands/namespace/write.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Namespace Write'
sidebar_title: write
---
@@ -37,7 +37,7 @@ or HCL format. See [here](/docs/enterprise/namespaces#namespace-definition) for
Create a new Namespace:
-```shell
+```shell-session
$ consul namespace write - <<< 'Name = "team-1"'
Name: team-1
Description:
@@ -45,7 +45,7 @@ Description:
Showing Raft Metadata:
-```shell
+```shell-session
$ consul namespace write -meta - <<< 'Name = "team-1"'
Name: team-1
Description:
@@ -55,7 +55,7 @@ Modify Index: 344
JSON Format:
-```shell
+```shell-session
$ cat ns.hcl
Name = "foo"
Description = "Example Namespace"
diff --git a/website/pages/docs/commands/operator/area.mdx b/website/pages/commands/operator/area.mdx
similarity index 99%
rename from website/pages/docs/commands/operator/area.mdx
rename to website/pages/commands/operator/area.mdx
index e0d694dd93..f8b137d955 100644
--- a/website/pages/docs/commands/operator/area.mdx
+++ b/website/pages/commands/operator/area.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Operator Area'
sidebar_title: area
description: >
diff --git a/website/pages/docs/commands/operator/autopilot.mdx b/website/pages/commands/operator/autopilot.mdx
similarity index 99%
rename from website/pages/docs/commands/operator/autopilot.mdx
rename to website/pages/commands/operator/autopilot.mdx
index 0c20e4e453..44977dc801 100644
--- a/website/pages/docs/commands/operator/autopilot.mdx
+++ b/website/pages/commands/operator/autopilot.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Operator Autopilot'
sidebar_title: autopilot
description: >
diff --git a/website/pages/docs/commands/operator/index.mdx b/website/pages/commands/operator/index.mdx
similarity index 98%
rename from website/pages/docs/commands/operator/index.mdx
rename to website/pages/commands/operator/index.mdx
index f45b586ac9..9b89e7322c 100644
--- a/website/pages/docs/commands/operator/index.mdx
+++ b/website/pages/commands/operator/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Operator'
sidebar_title: operator
description: |
diff --git a/website/pages/docs/commands/operator/raft.mdx b/website/pages/commands/operator/raft.mdx
similarity index 96%
rename from website/pages/docs/commands/operator/raft.mdx
rename to website/pages/commands/operator/raft.mdx
index c9e1c15254..8c17297316 100644
--- a/website/pages/docs/commands/operator/raft.mdx
+++ b/website/pages/commands/operator/raft.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Operator Raft'
sidebar_title: raft
description: >
@@ -59,7 +59,7 @@ but may be upgraded to a GUID in a future version of Consul.
Raft configuration.
`Voter` is "true" or "false", indicating if the server has a vote in the Raft
-configuration. Future versions of Consul may add support for non-voting servers.
+configuration.
## remove-peer
diff --git a/website/pages/docs/commands/reload.mdx b/website/pages/commands/reload.mdx
similarity index 98%
rename from website/pages/docs/commands/reload.mdx
rename to website/pages/commands/reload.mdx
index 6d75826cf3..ddd036d427 100644
--- a/website/pages/docs/commands/reload.mdx
+++ b/website/pages/commands/reload.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Reload'
sidebar_title: reload
description: The `reload` command triggers a reload of configuration files for the agent.
diff --git a/website/pages/docs/commands/rtt.mdx b/website/pages/commands/rtt.mdx
similarity index 98%
rename from website/pages/docs/commands/rtt.mdx
rename to website/pages/commands/rtt.mdx
index 3e11fd763f..e990658d16 100644
--- a/website/pages/docs/commands/rtt.mdx
+++ b/website/pages/commands/rtt.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: RTT'
sidebar_title: rtt
description: |
@@ -47,7 +47,7 @@ The following environment variables control accessing the HTTP server via SSL:
If coordinates are available, the command will print the estimated round trip
time between the given nodes:
-```
+```shell-session
$ consul rtt n1 n2
Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates)
diff --git a/website/pages/docs/commands/services/deregister.mdx b/website/pages/commands/services/deregister.mdx
similarity index 97%
rename from website/pages/docs/commands/services/deregister.mdx
rename to website/pages/commands/services/deregister.mdx
index c1903f0ecb..35df89dd47 100644
--- a/website/pages/docs/commands/services/deregister.mdx
+++ b/website/pages/commands/services/deregister.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Services Deregister'
sidebar_title: deregister
---
@@ -49,13 +49,13 @@ service.
To deregister by ID:
-```text
+```shell-session
$ consul services deregister -id=web
```
To deregister from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/services/index.mdx b/website/pages/commands/services/index.mdx
similarity index 96%
rename from website/pages/docs/commands/services/index.mdx
rename to website/pages/commands/services/index.mdx
index d4b70ae95e..13f41bca06 100644
--- a/website/pages/docs/commands/services/index.mdx
+++ b/website/pages/commands/services/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Services'
sidebar_title: services
---
@@ -39,13 +39,13 @@ of the subcommand in the sidebar.
To create a simple service:
-```shell
+```shell-session
$ consul services register -name=web
```
To create a service from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/services/register.mdx b/website/pages/commands/services/register.mdx
similarity index 98%
rename from website/pages/docs/commands/services/register.mdx
rename to website/pages/commands/services/register.mdx
index 9dd15bc5ac..3c38bba6d3 100644
--- a/website/pages/docs/commands/services/register.mdx
+++ b/website/pages/commands/services/register.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Services Register'
sidebar_title: register
---
@@ -85,13 +85,13 @@ Please refer to that documentation for full details.
To create a simple service:
-```text
+```shell-session
$ consul services register -name=web
```
To create a service from a configuration file:
-```text
+```shell-session
$ cat web.json
{
"Service": {
diff --git a/website/pages/docs/commands/snapshot/agent.mdx b/website/pages/commands/snapshot/agent.mdx
similarity index 92%
rename from website/pages/docs/commands/snapshot/agent.mdx
rename to website/pages/commands/snapshot/agent.mdx
index 16d49e10a5..284738aba3 100644
--- a/website/pages/docs/commands/snapshot/agent.mdx
+++ b/website/pages/commands/snapshot/agent.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Snapshot Agent'
sidebar_title: agent
---
@@ -83,53 +83,53 @@ Usage: `consul snapshot agent [options]`
format (shown populated with default values):
```json
- {
- "snapshot_agent": {
- "http_addr": "127.0.0.1:8500",
- "token": "",
- "datacenter": "",
- "ca_file": "",
- "ca_path": "",
- "cert_file": "",
- "key_file": "",
- "tls_server_name": "",
- "log": {
- "level": "INFO",
- "enable_syslog": false,
- "syslog_facility": "LOCAL0"
- },
- "snapshot": {
- "interval": "1h",
- "retain": 30,
- "stale": false,
- "service": "consul-snapshot",
- "deregister_after": "72h",
- "lock_key": "consul-snapshot/lock",
- "max_failures": 3,
- "local_scratch_path": ""
- },
- "local_storage": {
- "path": "."
- },
- "aws_storage": {
- "access_key_id": "",
- "secret_access_key": "",
- "s3_region": "",
- "s3_bucket": "",
- "s3_key_prefix": "consul-snapshot",
- "s3_server_side_encryption": false,
- "s3_static_snapshot_name": ""
- },
- "azure_blob_storage": {
- "account_name": "",
- "account_key": "",
- "container_name": ""
- },
- "google_storage": {
- "bucket": ""
- }
+{
+ "snapshot_agent": {
+ "http_addr": "127.0.0.1:8500",
+ "token": "",
+ "datacenter": "",
+ "ca_file": "",
+ "ca_path": "",
+ "cert_file": "",
+ "key_file": "",
+ "tls_server_name": "",
+ "log": {
+ "level": "INFO",
+ "enable_syslog": false,
+ "syslog_facility": "LOCAL0"
+ },
+ "snapshot": {
+ "interval": "1h",
+ "retain": 30,
+ "stale": false,
+ "service": "consul-snapshot",
+ "deregister_after": "72h",
+ "lock_key": "consul-snapshot/lock",
+ "max_failures": 3,
+ "local_scratch_path": ""
+ },
+ "local_storage": {
+ "path": "."
+ },
+ "aws_storage": {
+ "access_key_id": "",
+ "secret_access_key": "",
+ "s3_region": "",
+ "s3_bucket": "",
+ "s3_key_prefix": "consul-snapshot",
+ "s3_server_side_encryption": false,
+ "s3_static_snapshot_name": ""
+ },
+ "azure_blob_storage": {
+ "account_name": "",
+ "account_key": "",
+ "container_name": ""
+ },
+ "google_storage": {
+ "bucket": ""
}
}
+}
```
All fields are optional, and config files without a `snapshot_agent` object will
@@ -303,7 +303,7 @@ perform leader election for highly available operation, register itself with Con
service discovery with health checks, take snapshots every hour, retain the last 30
snapshots, and save snapshots into the current working directory:
-```shell
+```shell-session
$ consul snapshot agent
```
@@ -311,7 +311,7 @@ To run a one-shot backup, set the backup interval to 0. This will run a single s
and delete any old snapshots based on the retain settings, but it will not perform any
leader election or service registration:
-```shell
+```shell-session
$ consul snapshot agent -interval=0
```
diff --git a/website/pages/docs/commands/snapshot/index.mdx b/website/pages/commands/snapshot/index.mdx
similarity index 96%
rename from website/pages/docs/commands/snapshot/index.mdx
rename to website/pages/commands/snapshot/index.mdx
index 3e4e6f4a4b..0abe51af33 100644
--- a/website/pages/docs/commands/snapshot/index.mdx
+++ b/website/pages/commands/snapshot/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Snapshot'
sidebar_title: snapshot
---
@@ -47,21 +47,21 @@ of the subcommand in the sidebar or one of the links below:
To create a snapshot and save it as a file called "backup.snap":
-```text
+```shell-session
$ consul snapshot save backup.snap
Saved and verified snapshot to index 8419
```
To restore a snapshot from a file called "backup.snap":
-```text
+```shell-session
$ consul snapshot restore backup.snap
Restored snapshot
```
To inspect a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot inspect backup.snap
ID 2-5-1477944140022
Size 667
@@ -72,7 +72,7 @@ Version 1
To run a daemon process that periodically saves snapshots
-```
+```shell-session
$ consul snapshot agent
```
diff --git a/website/pages/docs/commands/snapshot/inspect.mdx b/website/pages/commands/snapshot/inspect.mdx
similarity index 97%
rename from website/pages/docs/commands/snapshot/inspect.mdx
rename to website/pages/commands/snapshot/inspect.mdx
index c78e83c870..4743031405 100644
--- a/website/pages/docs/commands/snapshot/inspect.mdx
+++ b/website/pages/commands/snapshot/inspect.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Snapshot Inspect'
sidebar_title: inspect
---
@@ -34,7 +34,7 @@ Usage: `consul snapshot inspect [options] FILE`
To inspect a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot inspect backup.snap
ID 2-5-1477944140022
Size 667
diff --git a/website/pages/docs/commands/snapshot/restore.mdx b/website/pages/commands/snapshot/restore.mdx
similarity index 97%
rename from website/pages/docs/commands/snapshot/restore.mdx
rename to website/pages/commands/snapshot/restore.mdx
index de48f9585c..8bdae7041f 100644
--- a/website/pages/docs/commands/snapshot/restore.mdx
+++ b/website/pages/commands/snapshot/restore.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Snapshot Restore'
sidebar_title: restore
---
@@ -35,7 +35,7 @@ Usage: `consul snapshot restore [options] FILE`
To restore a snapshot from the file "backup.snap":
-```text
+```shell-session
$ consul snapshot restore backup.snap
Restored snapshot
```
diff --git a/website/pages/docs/commands/snapshot/save.mdx b/website/pages/commands/snapshot/save.mdx
similarity index 96%
rename from website/pages/docs/commands/snapshot/save.mdx
rename to website/pages/commands/snapshot/save.mdx
index 7c0d0437d5..5c3e24daa5 100644
--- a/website/pages/docs/commands/snapshot/save.mdx
+++ b/website/pages/commands/snapshot/save.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Snapshot Save'
sidebar_title: save
---
@@ -30,7 +30,7 @@ Usage: `consul snapshot save [options] FILE`
To create a snapshot from the leader server and save it to "backup.snap":
-```text
+```shell-session
$ consul snapshot save backup.snap
Saved and verified snapshot to index 8419
```
@@ -45,7 +45,7 @@ integrity.
To create a potentially stale snapshot from any available server, use the stale
consistency mode:
-```text
+```shell-session
$ consul snapshot save -stale backup.snap
# ...
```
diff --git a/website/pages/commands/tls/ca.mdx b/website/pages/commands/tls/ca.mdx
new file mode 100644
index 0000000000..3ac9a8f666
--- /dev/null
+++ b/website/pages/commands/tls/ca.mdx
@@ -0,0 +1,42 @@
+---
+layout: commands
+page_title: 'Commands: TLS CA Create'
+sidebar_title: ca
+---
+
+# Consul TLS CA Create
+
+Command: `consul tls ca create`
+
+This command create a self signed CA to be used for Consul TLS setup.
+
+## Example
+
+Create CA:
+
+```shell-session
+$ consul tls ca create
+==> Saved consul-ca.pem
+==> Saved consul-ca-key.pem
+```
+
+## Usage
+
+Usage: `consul tls ca create [filename-prefix] [options]`
+
+#### TLS CA Create Options
+
+- `-additional-name-constraint=` - Add name constraints for the CA.
+ Results in rejecting certificates for other DNS than specified. Can be used
+ multiple times. Only used in combination with `-name-constraint`.
+
+- `-days=` - Provide number of days the CA is valid for from now on, defaults to 5 years.
+
+- `-domain=` - Domain of consul cluster. Only used in combination with
+ `-name-constraint`. Defaults to `consul`.
+
+- `-name-constraint` - Add name constraints for the CA. Results in rejecting
+ certificates for other DNS than specified. If turned on localhost and -domain
+ will be added to the allowed DNS. If the UI is going to be served over HTTPS
+ its DNS has to be added with `-additional-constraint`. It is not possible to
+ add that after the fact! Defaults to false.
diff --git a/website/pages/docs/commands/tls/cert.mdx b/website/pages/commands/tls/cert.mdx
similarity index 52%
rename from website/pages/docs/commands/tls/cert.mdx
rename to website/pages/commands/tls/cert.mdx
index 76eb058b71..328f0616fb 100644
--- a/website/pages/docs/commands/tls/cert.mdx
+++ b/website/pages/commands/tls/cert.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: TLS Cert Create'
sidebar_title: cert
---
@@ -15,7 +15,7 @@ setup.
Create a certificate for servers:
-```shell
+```shell-session
$ consul tls cert create -server
==> WARNING: Server Certificates grants authority to become a
server and access all state in the cluster including root keys
@@ -28,7 +28,7 @@ $ consul tls cert create -server
Create a certificate for clients:
-```shell
+```shell-session
$ consul tls cert create -client
==> Using consul-ca.pem and consul-ca-key.pem
==> Saved consul-client-0.pem
@@ -37,7 +37,7 @@ $ consul tls cert create -client
Create a certificate for cli:
-```shell
+```shell-session
$ consul tls cert create -cli
==> Using consul-ca.pem and consul-ca-key.pem
==> Saved consul-cli-0.pem
@@ -50,22 +50,34 @@ Usage: `consul tls cert create [filename-prefix] [options]`
#### TLS Cert Create Options
-- `-additional-dnsname=` - Provide additional dnsname for Subject Alternative Names.
+- `-additional-dnsname=` - Provide an additional dnsname for Subject
+ Alternative Names. localhost is always included. This flag may be provided
+ multiple times.
-- `-additional-ipaddress=` - Provide additional ipaddress for Subject Alternative Names.
+- `-additional-ipaddress=` - Provide an additional ipaddress for
+ Subject Alternative Names. `127.0.0.1` is always included. This flag may be
+ provided multiple times.
-- `-ca=` - Provide path to the ca
+- `-ca=` - Provide path to the ca. Defaults to `#DOMAIN#-agent-ca.pem`.
-- `-cli` - Generate cli certificate
+- `-cli` - Generate cli certificate.
-- `-client` - Generate client certificate
+- `-client` - Generate client certificate.
-- `-days=` - Provide number of days the certificate is valid for from now on.
+- `-days=` - Provide number of days the certificate is valid for from now
+ on. Defaults to 1 year.
-- `-dc=` - Provide the datacenter. Matters only for -server certificates
+- `-dc=` - Provide the datacenter. Matters only for `-server`
+ certificates. Defaults to `dc1`.
-- `-domain=` - Provide the domain. Matters only for -server certificates
+- `-domain=` - Provide the domain. Matters only for `-server`
+ certificates.
-- `-key=` - Provide path to the key
+- `-key=` - Provide path to the key. Defaults to
+ `#DOMAIN#-agent-ca-key.pem`.
-- `-server` - Generate server certificate
+- `-node=` - When generating a server cert and this is set an
+ additional dns name is included of the form
+ `.server..`.
+
+- `-server` - Generate server certificate.
diff --git a/website/pages/docs/commands/tls/index.mdx b/website/pages/commands/tls/index.mdx
similarity index 95%
rename from website/pages/docs/commands/tls/index.mdx
rename to website/pages/commands/tls/index.mdx
index 8f9f566325..d696988776 100644
--- a/website/pages/docs/commands/tls/index.mdx
+++ b/website/pages/commands/tls/index.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: TLS'
sidebar_title: tls
---
@@ -14,7 +14,7 @@ The `tls` command is used to help with setting up a CA and certificates for Cons
Create a CA:
-```text
+```shell-session
$ consul tls ca create
==> Saved consul-agent-ca.pem
==> Saved consul-agent-ca-key.pem
@@ -22,7 +22,7 @@ $ consul tls ca create
Create a client certificate:
-```text
+```shell-session
$ consul tls cert create -client
==> Using consul-agent-ca.pem and consul-agent-ca-key.pem
==> Saved dc1-client-consul-0.pem
diff --git a/website/pages/docs/commands/validate.mdx b/website/pages/commands/validate.mdx
similarity index 97%
rename from website/pages/docs/commands/validate.mdx
rename to website/pages/commands/validate.mdx
index f3c95df2cc..03ef8c530a 100644
--- a/website/pages/docs/commands/validate.mdx
+++ b/website/pages/commands/validate.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Validate'
sidebar_title: validate
description: >
@@ -31,7 +31,7 @@ Usage: `consul validate [options] FILE_OR_DIRECTORY...`
Returns 0 if the configuration is valid, or 1 if there are problems.
-```text
+```shell-session
$ consul validate /etc/consul.d
Configuration is valid!
```
diff --git a/website/pages/docs/commands/version.mdx b/website/pages/commands/version.mdx
similarity index 98%
rename from website/pages/docs/commands/version.mdx
rename to website/pages/commands/version.mdx
index eae2aa99e0..0f6ebf3889 100644
--- a/website/pages/docs/commands/version.mdx
+++ b/website/pages/commands/version.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Version'
sidebar_title: version
description: >-
diff --git a/website/pages/docs/commands/watch.mdx b/website/pages/commands/watch.mdx
similarity index 99%
rename from website/pages/docs/commands/watch.mdx
rename to website/pages/commands/watch.mdx
index 6faf1189b9..40312048fb 100644
--- a/website/pages/docs/commands/watch.mdx
+++ b/website/pages/commands/watch.mdx
@@ -1,5 +1,5 @@
---
-layout: docs
+layout: commands
page_title: 'Commands: Watch'
sidebar_title: watch
description: >-
diff --git a/website/pages/community/index.jsx b/website/pages/community/index.jsx
index 1994555f57..729367fb22 100644
--- a/website/pages/community/index.jsx
+++ b/website/pages/community/index.jsx
@@ -35,6 +35,11 @@ export default function CommunityPage() {
body:
'Paid [HashiCorp training courses](https://www.hashicorp.com/training) are also available in a city near you. Private training courses are also available.',
},
+ {
+ header: 'Certification',
+ body:
+ "Learn more about our [Cloud Engineer Certification program](https://www.hashicorp.com/certification/) and [HashiCorp's Networking Automation Certification ](https://www.hashicorp.com/certification/consul-associate/) exams.",
+ },
]}
/>
diff --git a/website/pages/discovery/index.jsx b/website/pages/discovery/index.jsx
deleted file mode 100644
index c950825f5a..0000000000
--- a/website/pages/discovery/index.jsx
+++ /dev/null
@@ -1,499 +0,0 @@
-import CallToAction from '@hashicorp/react-call-to-action'
-import CaseStudySlider from '@hashicorp/react-case-study-slider'
-import CodeBlock from '@hashicorp/react-code-block'
-import BeforeAfterDiagram from '../../components/before-after'
-
-export default function ServiceDiscovery() {
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
Features
-
-
-
-
-
Service Registry
-
- Consul provides a registry of all the running nodes and
- services, along with their current health status. This
- allows operators to understand the environment, and
- applications and automation tools to interact with dynamic
- infrastructure using an HTTP API.
-
- Consul enables service discovery using a built-in DNS
- server. This allows existing applications to easily
- integrate, as almost all applications support using DNS to
- resolve IP addresses. Using DNS instead of a static IP
- address allows services to scale up/down and route around
- failures easily.
-
-
- > DiG 9.8.3-P1 <<>> web-frontend.service.consul. ANY
-;; global options: +cmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29981
-;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
-
-;; QUESTION SECTION:
-;web-frontend.service.consul. IN ANY
-
-;; ANSWER SECTION:
-web-frontend.service.consul. 0 IN A 10.0.3.83
-web-frontend.service.consul. 0 IN A 10.0.1.109
- `}
- />
-
-
-
-
-
-
-
-
-
-
-
-
HTTP API with Edge Triggers
-
- Consul provides an HTTP API to query the service registry
- for nodes, services, and health check information. The API
- also supports blocking queries, or long-polling for any
- changes. This allows automation tools to react to services
- being registered or health status changes to change
- configurations or traffic routing in real time.
-
- Consul supports multiple datacenters out of the box with no
- complicated configuration. Look up services in other
- datacenters or keep the request local. Advanced features
- like Prepared Queries enable automatic failover to other
- datacenters.
-
- Pairing service discovery with health checking prevents
- routing requests to unhealthy hosts and enables services to
- easily provide circuit breakers.
-
- >
- )
-}
diff --git a/website/pages/discovery/style.css b/website/pages/discovery/style.css
deleted file mode 100644
index 77b43ddb03..0000000000
--- a/website/pages/discovery/style.css
+++ /dev/null
@@ -1,51 +0,0 @@
-.intro {
- text-align: center;
- margin-bottom: 64px;
-}
-
-.g-section.border-top {
- border-top: 1px solid #e5e6eb;
-}
-
-.g-cta-section.g-section {
- align-items: center;
- background: var(--consul);
- display: flex;
- justify-content: center;
- padding-left: 15px;
- padding-right: 15px;
- position: relative;
- text-align: center;
- overflow: hidden;
-
- &:after {
- content: '';
- background: url('/img/consul-connect/mesh.svg') top center;
- background-size: cover;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- opacity: 0.2;
- transform: scale(1.3, 1.3);
- }
-
- & > div {
- z-index: 1;
- }
-
- & h2 {
- color: var(--white);
- margin-top: 0;
- }
-
- & .button + .button {
- margin-left: 18px;
- }
-}
-
-.bg-dark {
- background: #252937 !important;
- color: #fff;
-}
diff --git a/website/pages/docs/agent/config-entries/index.mdx b/website/pages/docs/agent/config-entries/index.mdx
index cbcfc10d82..10e102377c 100644
--- a/website/pages/docs/agent/config-entries/index.mdx
+++ b/website/pages/docs/agent/config-entries/index.mdx
@@ -30,19 +30,19 @@ The supported `Kind` names for configuration entries are:
- [`proxy-defaults`](/docs/agent/config-entries/proxy-defaults) - controls
proxy configuration
-
+
- [`service-defaults`](/docs/agent/config-entries/service-defaults) - configures
defaults for all the instances of a given service
-
+
- [`service-resolver`](/docs/agent/config-entries/service-resolver) - matches
service instances with a specific Connect upstream discovery requests
-
+
- [`service-router`](/docs/agent/config-entries/service-router) - defines
where to send layer 7 traffic based on the HTTP route
- [`service-splitter`](/docs/agent/config-entries/service-splitter) - defines
how to divide requests for a single HTTP route based on percentages
-
+
- [`terminating-gateway`](/docs/agent/config-entries/terminating-gateway) - defines the
services associated with terminating gateway
@@ -76,7 +76,7 @@ Config {
Then to apply this configuration, run:
-```bash
+```shell-session
$ consul config write proxy-defaults.hcl
```
@@ -95,7 +95,7 @@ Consul's HTTP API.
Example:
-```bash
+```shell-session
$ consul config read -kind service-defaults -name web
{
"Kind": "service-defaults",
@@ -111,7 +111,7 @@ list out all the configuration entries for a given kind.
Example:
-```bash
+```shell-session
$ consul config list -kind service-defaults
web
api
@@ -125,7 +125,7 @@ to delete an entry by specifying both its `kind` and `name`.
Example:
-```bash
+```shell-session
$ consul config delete -kind service-defaults -name web
```
@@ -139,11 +139,11 @@ added in Consul 1.7.0.
Example:
-```bash
+```shell-session
$ consul config write service-defaults.hcl -namespace foo
```
-```bash
+```shell-session
$ consul config list -kind service-defaults -namespace foo
web
api
diff --git a/website/pages/docs/agent/config-entries/proxy-defaults.mdx b/website/pages/docs/agent/config-entries/proxy-defaults.mdx
index 662356f9da..f91ced8fd1 100644
--- a/website/pages/docs/agent/config-entries/proxy-defaults.mdx
+++ b/website/pages/docs/agent/config-entries/proxy-defaults.mdx
@@ -19,10 +19,10 @@ one global entry is supported.
Set the default protocol for all sidecar proxies in the default namespace:
```hcl
-kind = "proxy-defaults"
-name = "global"
-namespace = "default"
-config {
+Kind = "proxy-defaults"
+Name = "global"
+Namespace = "default"
+Config {
protocol = "http"
}
```
@@ -30,11 +30,11 @@ config {
Set proxy-specific defaults :
```hcl
-kind = "proxy-defaults"
-name = "global"
-config {
+Kind = "proxy-defaults"
+Name = "global"
+Config {
local_connect_timeout_ms = 1000
- handshake_timeout_ms = 10000
+ handshake_timeout_ms = 10000
}
```
@@ -57,7 +57,7 @@ config {
- [Consul's built-in proxy](/docs/connect/proxies/built-in)
- `MeshGateway` `(MeshGatewayConfig: )` - Controls the default
- [mesh gateway configuration](/docs/connect/mesh_gateway#connect-proxy-configuration)
+ [mesh gateway configuration](/docs/connect/mesh-gateway#connect-proxy-configuration)
for all proxies. Added in v1.6.0.
- `Mode` `(string: "")` - One of `none`, `local`, or `remote`.
@@ -87,7 +87,7 @@ config {
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `proxy-defaults` config entry requires no specific privileges.
diff --git a/website/pages/docs/agent/config-entries/service-defaults.mdx b/website/pages/docs/agent/config-entries/service-defaults.mdx
index 6a7e64981f..d8e81cb1a8 100644
--- a/website/pages/docs/agent/config-entries/service-defaults.mdx
+++ b/website/pages/docs/agent/config-entries/service-defaults.mdx
@@ -17,10 +17,10 @@ service, such as its protocol.
Set the default protocol for a service in the default namespace to HTTP:
```hcl
-Kind = "service-defaults"
-Name = "web"
+Kind = "service-defaults"
+Name = "web"
Namespace = "default"
-Protocol = "http"
+Protocol = "http"
```
## Available Fields
@@ -40,7 +40,7 @@ Protocol = "http"
entries for a service.
- `MeshGateway` `(MeshGatewayConfig: )` - Controls the default
- [mesh gateway configuration](/docs/connect/mesh_gateway#connect-proxy-configuration)
+ [mesh gateway configuration](/docs/connect/mesh-gateway#connect-proxy-configuration)
for this service. Added in v1.6.0.
- `Mode` `(string: "")` - One of `none`, `local`, or `remote`.
@@ -75,7 +75,7 @@ Protocol = "http"
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `service-defaults` config entry requires `service:read` on itself.
diff --git a/website/pages/docs/agent/config-entries/service-resolver.mdx b/website/pages/docs/agent/config-entries/service-resolver.mdx
index d486487f5f..cfdd3f6e4c 100644
--- a/website/pages/docs/agent/config-entries/service-resolver.mdx
+++ b/website/pages/docs/agent/config-entries/service-resolver.mdx
@@ -28,15 +28,15 @@ and discovery terminates.
Create service subsets based on a version metadata and override the defaults:
```hcl
-kind = "service-resolver"
-name = "web"
-default_subset = "v1"
-subsets = {
+Kind = "service-resolver"
+Name = "web"
+DefaultSubset = "v1"
+Subsets = {
"v1" = {
- filter = "Service.Meta.version == v1"
+ Filter = "Service.Meta.version == v1"
}
"v2" = {
- filter = "Service.Meta.version == v2"
+ Filter = "Service.Meta.version == v2"
}
}
```
@@ -44,23 +44,23 @@ subsets = {
Expose a set of services in another datacenter as a virtual service:
```hcl
-kind = "service-resolver"
-name = "web-dc2"
-redirect {
- service = "web"
- datacenter = "dc2"
+Kind = "service-resolver"
+Name = "web-dc2"
+Redirect {
+ Service = "web"
+ Datacenter = "dc2"
}
```
Enable failover for all subsets:
```hcl
-kind = "service-resolver"
-name = "web"
-connect_timeout = "15s"
-failover = {
+Kind = "service-resolver"
+Name = "web"
+ConnectTimeout = "15s"
+Failover = {
"*" = {
- datacenters = ["dc3", "dc4"]
+ Datacenters = ["dc3", "dc4"]
}
}
```
@@ -68,8 +68,8 @@ failover = {
Representation of the defaults when a resolver is not configured:
```hcl
-kind = "service-resolver"
-name = "web"
+Kind = "service-resolver"
+Name = "web"
```
## Available Fields
@@ -171,7 +171,7 @@ referenced by their names throughout the other configuration entry kinds.
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `service-resolver` config entry requires `service:read` on itself.
diff --git a/website/pages/docs/agent/config-entries/service-router.mdx b/website/pages/docs/agent/config-entries/service-router.mdx
index 53fea05cc3..ff6aba1031 100644
--- a/website/pages/docs/agent/config-entries/service-router.mdx
+++ b/website/pages/docs/agent/config-entries/service-router.mdx
@@ -41,18 +41,18 @@ service of the same name.
Route HTTP requests with a path starting with `/admin` to a different service:
```hcl
-kind = "service-router"
-name = "web"
-routes = [
+Kind = "service-router"
+Name = "web"
+Routes = [
{
- match {
- http {
- path_prefix = "/admin"
+ Match {
+ HTTP {
+ PathPrefix = "/admin"
}
}
- destination {
- service = "admin"
+ Destination {
+ Service = "admin"
}
},
# NOTE: a default catch-all will send unmatched traffic to "web"
@@ -62,39 +62,39 @@ routes = [
Route HTTP requests with a special url parameter or header to a canary subset:
```hcl
-kind = "service-router"
-name = "web"
-routes = [
+Kind = "service-router"
+Name = "web"
+Routes = [
{
- match {
- http {
- header = [
+ Match {
+ HTTP {
+ Header = [
{
- name = "x-debug"
- exact = "1"
+ Name = "x-debug"
+ Exact = "1"
},
]
}
}
- destination {
- service = "web"
- service_subset = "canary"
+ Destination {
+ Service = "web"
+ ServiceSubset = "canary"
}
},
{
- match {
- http {
- query_param = [
+ Match {
+ HTTP {
+ QueryParam = [
{
- name = "x-debug"
- exact = "1"
+ Name = "x-debug"
+ Exact = "1"
},
]
}
}
- destination {
- service = "web"
- service_subset = "canary"
+ Destination {
+ Service = "web"
+ ServiceSubset = "canary"
}
},
# NOTE: a default catch-all will send unmatched traffic to "web"
@@ -105,18 +105,18 @@ Re-route a gRPC method to another service. Since gRPC method calls [are
HTTP2](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md), we can use an HTTP path match rule to re-route traffic:
```hcl
-kind = "service-router"
-name = "billing"
-routes = [
+Kind = "service-router"
+Name = "billing"
+Routes = [
{
- match {
- http {
- path_exact = "/mycompany.BillingService/GenerateInvoice"
+ Match {
+ HTTP {
+ PathExact = "/mycompany.BillingService/GenerateInvoice"
}
}
- destination {
- service = "invoice-generator"
+ Destination {
+ Service = "invoice-generator"
}
},
# NOTE: a default catch-all will send unmatched traffic to "billing"
@@ -264,7 +264,7 @@ routes = [
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `service-router` config entry requires `service:read` on itself.
diff --git a/website/pages/docs/agent/config-entries/service-splitter.mdx b/website/pages/docs/agent/config-entries/service-splitter.mdx
index 29abc25425..b164d34cb6 100644
--- a/website/pages/docs/agent/config-entries/service-splitter.mdx
+++ b/website/pages/docs/agent/config-entries/service-splitter.mdx
@@ -44,16 +44,16 @@ resolution stage.
Split traffic between two subsets of the same service:
```hcl
-kind = "service-splitter"
-name = "web"
-splits = [
+Kind = "service-splitter"
+Name = "web"
+Splits = [
{
- weight = 90
- service_subset = "v1"
+ Weight = 90
+ ServiceSubset = "v1"
},
{
- weight = 10
- service_subset = "v2"
+ Weight = 10
+ ServiceSubset = "v2"
},
]
```
@@ -61,16 +61,16 @@ splits = [
Split traffic between two services:
```hcl
-kind = "service-splitter"
-name = "web"
-splits = [
+Kind = "service-splitter"
+Name = "web"
+Splits = [
{
- weight = 50
+ Weight = 50
# will default to service with same name as config entry ("web")
},
{
- weight = 10
- service = "web-rewrite"
+ Weight = 10
+ Service = "web-rewrite"
},
]
```
@@ -106,7 +106,7 @@ splits = [
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `service-splitter` config entry requires `service:read` on itself.
diff --git a/website/pages/docs/agent/config-entries/terminating-gateway.mdx b/website/pages/docs/agent/config-entries/terminating-gateway.mdx
index d57514b41c..c7e2a339a9 100644
--- a/website/pages/docs/agent/config-entries/terminating-gateway.mdx
+++ b/website/pages/docs/agent/config-entries/terminating-gateway.mdx
@@ -1,53 +1,58 @@
---
layout: docs
page_title: 'Configuration Entry Kind: Terminating Gateway'
-sidebar_title: terminating-gateway Beta
+sidebar_title: terminating-gateway
description: >-
The `terminating-gateway` config entry kind allows for configuring terminating gateways
to proxy traffic from services in the Consul service mesh to services outside the mesh.
---
-# Terminating Gateway Beta
+# Terminating Gateway
-> **1.8.0+:** This config entry is available in Consul versions 1.8.0 and newer.
- The `terminating-gateway` config entry kind you to configure terminating gateways
- to proxy traffic from services in the Consul service mesh to services registered with Consul that do not have a
- [Connect service sidecar proxy](/docs/connect/proxies). The configuration is associated with the name of a gateway service
- and will apply to all instances of the gateway with that name.
+The `terminating-gateway` config entry kind you to configure terminating gateways
+to proxy traffic from services in the Consul service mesh to services registered with Consul that do not have a
+[Connect service sidecar proxy](/docs/connect/proxies). The configuration is associated with the name of a gateway service
+and will apply to all instances of the gateway with that name.
~> [Configuration entries](/docs/agent/config-entries) are global in scope. A configuration entry for a gateway name applies
- across all federated Consul datacenters. If ingress gateways in different Consul datacenters need to route to different
- sets of services within their datacenter then the ingress gateways **must** be registered with different names.
+across all federated Consul datacenters. If terminating gateways in different Consul datacenters need to route to different
+sets of services within their datacenter then the terminating gateways **must** be registered with different names.
- See [Terminating Gateway](/docs/connect/terminating_gateway) for more information.
+See [Terminating Gateway](/docs/connect/terminating-gateway) for more information.
## TLS Origination
- By specifying a path to a [CA file](/docs/agent/config-entries/terminating-gateway#cafile) connections
- from the terminating gateway will be encrypted using one-way TLS authentication. If a path to a
- [client certificate](/docs/agent/config-entries/terminating-gateway#certfile)
- and [private key](/docs/agent/config-entries/terminating-gateway#keyfile) are also specified connections
- from the terminating gateway will be encrypted using mutual TLS authentication.
- If none of these are provided, Consul will **only** encrypt connections to the gateway and not
- from the gateway to the destination service.
+By specifying a path to a [CA file](/docs/agent/config-entries/terminating-gateway#cafile) connections
+from the terminating gateway will be encrypted using one-way TLS authentication. If a path to a
+[client certificate](/docs/agent/config-entries/terminating-gateway#certfile)
+and [private key](/docs/agent/config-entries/terminating-gateway#keyfile) are also specified connections
+from the terminating gateway will be encrypted using mutual TLS authentication.
+
+If none of these are provided, Consul will **only** encrypt connections to the gateway and not
+from the gateway to the destination service.
## Wildcard service specification
- Terminating gateways can optionally target all services within a Consul namespace by specifying a wildcard "*"
- as the service name. Configuration options set on the wildcard act as defaults that can be overridden
- by options set on a specific service name.
+Terminating gateways can optionally target all services within a Consul namespace by specifying a wildcard "\*"
+as the service name. Configuration options set on the wildcard act as defaults that can be overridden
+by options set on a specific service name.
- Note that if the wildcard specifier is used, and some services in that namespace have a Connect sidecar proxy,
- traffic from the mesh to those services will be evenly load-balanced between the gateway and their sidecars.
+Note that if the wildcard specifier is used, and some services in that namespace have a Connect sidecar proxy,
+traffic from the mesh to those services will be evenly load-balanced between the gateway and their sidecars.
## Sample Config Entries
-Link gateway "us-west-gateway" with the billing service:
+
+
+
+Link gateway named "us-west-gateway" with the billing service:
```hcl
Kind = "terminating-gateway"
Name = "us-west-gateway"
+
Services = [
{
Name = "billing"
@@ -55,27 +60,176 @@ Services = [
]
```
-Link gateway "us-west-gateway" with the api service and specify a CA file for one-way TLS authentication:
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the billing service in the finance namespace:
```hcl
Kind = "terminating-gateway"
Name = "us-west-gateway"
+Namespace = "default"
+
Services = [
{
- Name = "api"
+ Namespace = "finance"
+ Name = "billing"
+ }
+]
+```
+
+
+
+
+Link gateway named "us-west-gateway" with the billing service:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Services": [
+ {
+ "Name": "billing"
+ }
+ ]
+}
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the billing service in the finance namespace:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Namespace": "default",
+ "Services": [
+ {
+ "Namespace": "finance",
+ "Name": "billing"
+ }
+ ]
+}
+```
+
+
+
+
+
+
+
+Link gateway named "us-west-gateway" with the billing service and specify a CA file for one-way TLS authentication:
+
+```hcl
+Kind = "terminating-gateway"
+Name = "us-west-gateway"
+
+Services = [
+ {
+ Name = "billing"
+ CAFile = "/etc/certs/ca-chain.cert.pem"
+ }
+]
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the billing service in the finance namespace,
+and specify a CA file for one-way TLS authentication:
+
+```hcl
+Kind = "terminating-gateway"
+Name = "us-west-gateway"
+Namespace = "default"
+
+Services = [
+ {
+ Namespace = "finance"
+ Name = "billing"
CAFile = "/etc/certs/ca-chain.cert.pem"
}
]
```
-Link gateway "us-west-gateway" with the payments service and specify a CA file, key file, and cert file for mutual TLS authentication:
+
+
+
+Link gateway named "us-west-gateway" with the billing service and specify a CA file for one-way TLS authentication:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Services": [
+ {
+ "Name": "billing",
+ "CAFile": "/etc/certs/ca-chain.cert.pem"
+ }
+ ]
+}
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the billing service in the finance namespace,
+and specify a CA file for one-way TLS authentication:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Namespace": "default",
+ "Services": [
+ {
+ "Namespace": "finance",
+ "Name": "billing",
+ "CAFile": "/etc/certs/ca-chain.cert.pem"
+ }
+ ]
+}
+```
+
+
+
+
+
+
+
+Link gateway named "us-west-gateway" with the payments service and specify a CA file, key file, and cert file for mutual TLS authentication:
```hcl
Kind = "terminating-gateway"
Name = "us-west-gateway"
+
Services = [
{
- Name = "payments"
+ Name = "billing"
+ CAFile = "/etc/certs/ca-chain.cert.pem"
+ KeyFile = "/etc/certs/gateway.key.pem"
+ CertFile = "/etc/certs/gateway.cert.pem"
+ }
+]
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the payments service in the finance namespace.
+Also specify a CA file, key file, and cert file for mutual TLS authentication:
+
+```hcl
+Kind = "terminating-gateway"
+Name = "us-west-gateway"
+Namespace = "default"
+
+Services = [
+ {
+ Namespace = "finance"
+ Name = "billing"
CAFile = "/etc/certs/ca-chain.cert.pem"
KeyFile = "/etc/certs/gateway.key.pem"
CertFile = "/etc/certs/gateway.cert.pem"
@@ -83,13 +237,88 @@ Services = [
]
```
-Link gateway "us-west-gateway" with all services in the finance namespace, and configure default certificates for mutual TLS.
+
+
+
+Link gateway named "us-west-gateway" with the payments service and specify a CA file, key file, and cert file for mutual TLS authentication:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Services": [
+ {
+ "Name": "billing",
+ "CAFile": "/etc/certs/ca-chain.cert.pem",
+ "KeyFile": "/etc/certs/gateway.key.pem",
+ "CertFile": "/etc/certs/gateway.cert.pem"
+ }
+ ]
+}
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with the payments service in the finance namespace.
+Also specify a CA file, key file, and cert file for mutual TLS authentication:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Namespace": "default",
+ "Services": [
+ {
+ "Namespace": "finance",
+ "Name": "billing",
+ "CAFile": "/etc/certs/ca-chain.cert.pem",
+ "KeyFile": "/etc/certs/gateway.key.pem",
+ "CertFile": "/etc/certs/gateway.cert.pem"
+ }
+ ]
+}
+```
+
+
+
+
+
+
+
+Link gateway named "us-west-gateway" with all services in the datacenter, and configure default certificates for mutual TLS.
Also override the SNI and CA file used for connections to the billing service:
+```hcl
+Kind = "terminating-gateway"
+Name = "us-west-gateway"
+
+Services = [
+ {
+ Name = "*"
+ CAFile = "/etc/common-certs/ca-chain.cert.pem"
+ KeyFile = "/etc/common-certs/gateway.key.pem"
+ CertFile = "/etc/common-certs/gateway.cert.pem"
+ },
+ {
+ Name = "billing"
+ CAFile = "/etc/billing-ca/ca-chain.cert.pem",
+ SNI = "billing.service.com"
+ }
+]
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with all services in the finance namespace,
+and configure default certificates for mutual TLS. Also override the SNI and CA file used for connections to the billing service:
+
```hcl
Kind = "terminating-gateway"
Name = "us-west-gateway"
Namespace = "default"
+
Services = [
{
Namespace = "finance"
@@ -101,12 +330,72 @@ Services = [
{
Namespace = "finance"
Name = "billing"
- CAFile = "/etc/billing-ca/ca-chain.cert.pem"
- SNI = "billing.service.com"
+ CAFile = "/etc/billing-ca/ca-chain.cert.pem",
+ SNI = "billing.service.com"
}
]
```
+
+
+
+Link gateway named "us-west-gateway" with all services in the datacenter, and configure default certificates for mutual TLS.
+Also override the SNI and CA file used for connections to the billing service:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Services": [
+ {
+ "Name": "*",
+ "CAFile": "/etc/billing-ca/ca-chain.cert.pem",
+ "KeyFile": "/etc/certs/gateway.key.pem",
+ "CertFile": "/etc/certs/gateway.cert.pem",
+ "SNI": "billing.service.com"
+ },
+ {
+ "Name": "billing",
+ "CAFile": "/etc/billing-ca/ca-chain.cert.pem",
+ "SNI": "billing.service.com"
+ }
+ ]
+}
+```
+
+
+
+
+Link gateway named "us-west-gateway" in the default namespace with all services in the finance namespace,
+and configure default certificates for mutual TLS. Also override the SNI and CA file used for connections to the billing service:
+
+```json
+{
+ "Kind": "terminating-gateway",
+ "Name": "us-west-gateway",
+ "Namespace": "default",
+ "Services": [
+ {
+ "Namespace": "finance",
+ "Name": "*",
+ "CAFile": "/etc/billing-ca/ca-chain.cert.pem",
+ "KeyFile": "/etc/certs/gateway.key.pem",
+ "CertFile": "/etc/certs/gateway.cert.pem",
+ "SNI": "billing.service.com"
+ },
+ {
+ "Namespace": "finance",
+ "Name": "billing",
+ "CAFile": "/etc/billing-ca/ca-chain.cert.pem",
+ "SNI": "billing.service.com"
+ }
+ ]
+}
+```
+
+
+
+
## Available Fields
- `Kind` - Must be set to `terminating-gateway`
@@ -114,44 +403,44 @@ Services = [
- `Name` `(string: )` - Set to the name of the gateway being configured.
- `Namespace` `(string: "default")` - Specifies the namespace
- the config entry will apply to. This must be the namespace the gateway is registered in.
- If omitted, the namespace will be inherited from [the request](/api/config#ns)
- or will default to the `default` namespace.
+ the config entry will apply to. This must be the namespace the gateway is registered in.
+ If omitted, the namespace will be inherited from [the request](/api/config#ns)
+ or will default to the `default` namespace.
- `Meta` `(map: nil)` - Specifies arbitrary KV metadata pairs. Added in Consul 1.8.4.
- `Services` `(array: )` - A list of services to link
- with the gateway. The gateway will proxy traffic to these services. These linked services
- must be registered with Consul for the gateway to discover their addresses. They must also
- be registered in the same Consul datacenter as the terminating gateway.
+ with the gateway. The gateway will proxy traffic to these services. These linked services
+ must be registered with Consul for the gateway to discover their addresses. They must also
+ be registered in the same Consul datacenter as the terminating gateway.
- - `Name` `(string: "")` - The name of the service to link with the gateway.
+ - `Name` `(string: "")` - The name of the service to link with the gateway.
If the wildcard specifier, `*`, is provided, then ALL services within the namespace
will be linked with the gateway.
- - `Namespace` `(string: "")` - The namespace of the service.
+ - `Namespace` `(string: "")` - The namespace of the service.
If omitted, the namespace will be inherited from the config entry.
- - `CAFile` `(string: "")` - A file path to a PEM-encoded certificate authority.
+ - `CAFile` `(string: "")` - A file path to a PEM-encoded certificate authority.
The file must be present on the proxy's filesystem.
The certificate authority is used to verify the authenticity of the service linked with the gateway.
It can be provided along with a CertFile and KeyFile for mutual TLS authentication, or on its own
for one-way TLS authentication. If none is provided the gateway **will not** encrypt the traffic to the destination.
- - `CertFile` `(string: "")` - A file path to a PEM-encoded certificate.
+ - `CertFile` `(string: "")` - A file path to a PEM-encoded certificate.
The file must be present on the proxy's filesystem.
The certificate is provided servers to verify the gateway's authenticity. It must be provided if a KeyFile was specified.
- - `KeyFile` `(string: "")` - A file path to a PEM-encoded private key.
- The file must be present on the proxy's filesystem.
- The key is used with the certificate to verify the gateway's authenticity. It must be provided along if a CertFile was specified.
+ - `KeyFile` `(string: "")` - A file path to a PEM-encoded private key.
+ The file must be present on the proxy's filesystem.
+ The key is used with the certificate to verify the gateway's authenticity. It must be provided along if a CertFile was specified.
- - `SNI` `(string: "")` - An optional hostname or domain name to specify during the TLS handshake.
+ - `SNI` `(string: "")` - An optional hostname or domain name to specify during the TLS handshake.
## ACLs
Configuration entries may be protected by
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Reading a `terminating-gateway` config entry requires `service:read` on the `Name`
field of the config entry.
diff --git a/website/pages/docs/agent/index.mdx b/website/pages/docs/agent/index.mdx
index a39509290c..0a02c0b659 100644
--- a/website/pages/docs/agent/index.mdx
+++ b/website/pages/docs/agent/index.mdx
@@ -15,25 +15,30 @@ information, registers services, runs checks, responds to queries,
and more. The agent must run on every node that is part of a Consul cluster.
Any agent may run in one of two modes: client or server. A server
-node takes on the additional responsibility of being part of the [consensus quorum](/docs/internals/consensus).
+node takes on the additional responsibility of being part of the
+[consensus quorum](/docs/internals/consensus).
These nodes take part in Raft and provide strong consistency and availability in
-the case of failure. The higher burden on the server nodes means that usually they
-should be run on dedicated instances -- they are more resource intensive than a client
-node. Client nodes make up the majority of the cluster, and they are very lightweight
-as they interface with the server nodes for most operations and maintain very little state
-of their own.
+the case of failure. The higher burden on the server nodes means that usually
+they should be run on dedicated instances -- they are more resource intensive
+than a client node. Client nodes make up the majority of the cluster, and they
+are very lightweight as they interface with the server nodes for most
+operations and maintain very little state of their own.
## Running an Agent
-The agent is started with the [`consul agent`](/docs/commands/agent) command. This
-command blocks, running forever or until told to quit. You can test a local agent by following the [Getting Started guides](https://learn.hashicorp.com/consul/getting-started/install?utm_source=consul.io&utm_medium=docs).
+The agent is started with the [`consul agent`](/docs/commands/agent) command.
+This command blocks, running forever or until told to quit. You can test a
+local agent by following the
+[Getting Started tutorials](https://learn.hashicorp.com/tutorials/consul/get-started-install?utm_source=consul.io&utm_medium=docs).
-The agent command takes a variety
-of [`configuration options`](/docs/agent/options#command-line-options), but most have sane defaults.
+The agent command takes a variety of
+[`configuration options`](/docs/agent/options#command-line-options), but most
+have sane defaults.
-When running [`consul agent`](/docs/commands/agent), you should see output similar to this:
+When running [`consul agent`](/docs/commands/agent), you should see output
+similar to this:
-```text
+```shell-session
$ consul agent -data-dir=/tmp/consul
==> Starting Consul agent...
==> Consul agent running!
@@ -49,33 +54,38 @@ $ consul agent -data-dir=/tmp/consul
...
```
-There are several important messages that [`consul agent`](/docs/commands/agent) outputs:
+There are several important messages that
+[`consul agent`](/docs/commands/agent) outputs:
- **Node name**: This is a unique name for the agent. By default, this
is the hostname of the machine, but you may customize it using the
[`-node`](/docs/agent/options#_node) flag.
-- **Datacenter**: This is the datacenter in which the agent is configured to run.
- Consul has first-class support for multiple datacenters; however, to work efficiently,
- each node must be configured to report its datacenter. The [`-datacenter`](/docs/agent/options#_datacenter)
- flag can be used to set the datacenter. For single-DC configurations, the agent
- will default to "dc1".
+- **Datacenter**: This is the datacenter in which the agent is configured to
+ run.
+ Consul has first-class support for multiple datacenters; however, to work
+ efficiently, each node must be configured to report its datacenter. The
+ [`-datacenter`](/docs/agent/options#_datacenter) flag can be used to set the
+ datacenter. For single-DC configurations, the agent will default to "dc1".
-- **Server**: This indicates whether the agent is running in server or client mode.
+- **Server**: This indicates whether the agent is running in server or client
+ mode.
Server nodes have the extra burden of participating in the consensus quorum,
storing cluster state, and handling queries. Additionally, a server may be
in ["bootstrap"](/docs/agent/options#_bootstrap_expect) mode. Multiple servers
- cannot be in bootstrap mode as that would put the cluster in an inconsistent state.
+ cannot be in bootstrap mode as that would put the cluster in an inconsistent
+ state.
- **Client Addr**: This is the address used for client interfaces to the agent.
- This includes the ports for the HTTP and DNS interfaces. By default, this binds only
- to localhost. If you change this address or port, you'll have to specify a `-http-addr`
- whenever you run commands such as [`consul members`](/docs/commands/members) to
- indicate how to reach the agent. Other applications can also use the HTTP address and port
+ This includes the ports for the HTTP and DNS interfaces. By default, this
+ binds only to localhost. If you change this address or port, you'll have to
+ specify a `-http-addr` whenever you run commands such as
+ [`consul members`](/docs/commands/members) to indicate how to reach the
+ agent. Other applications can also use the HTTP address and port
[to control Consul](/api).
-- **Cluster Addr**: This is the address and set of ports used for communication between
- Consul agents in a cluster. Not all Consul agents in a cluster have to
+- **Cluster Addr**: This is the address and set of ports used for communication
+ between Consul agents in a cluster. Not all Consul agents in a cluster have to
use the same port, but this address **MUST** be reachable by all other nodes.
When running under `systemd` on Linux, Consul notifies systemd by sending
@@ -85,44 +95,62 @@ service definition file has to have `Type=notify` set.
## Stopping an Agent
-An agent can be stopped in two ways: gracefully or forcefully. To gracefully
-halt an agent, send the process an interrupt signal (usually
-`Ctrl-C` from a terminal or running `kill -INT consul_pid` ). When gracefully exiting, the agent first notifies
-the cluster it intends to leave the cluster. This way, other cluster members
-notify the cluster that the node has _left_.
+An agent can be stopped in two ways: gracefully or forcefully. Servers and
+Clients both behave differently depending on the leave that is performed. There
+are two potential states a process can be in after a system signal is sent:
+_left_ and _failed_.
-Alternatively, you can force kill the agent by sending it a kill signal.
-When force killed, the agent ends immediately. The rest of the cluster will
-eventually (usually within seconds) detect that the node has died and
-notify the cluster that the node has _failed_.
+To gracefully halt an agent, send the process an _interrupt signal_ (usually
+`Ctrl-C` from a terminal, or running `kill -INT consul_pid` ). For more
+information on different signals sent by the `kill` command, see
+[here](https://www.linux.org/threads/kill-signals-and-commands-revised.11625/)
-It is especially important that a server node be allowed to leave gracefully
-so that there will be a minimal impact on availability as the server leaves
-the consensus quorum.
+When a Client is gracefully exited, the agent first notifies the cluster it
+intends to leave the cluster. This way, other cluster members notify the
+cluster that the node has _left_.
+
+When a Server is gracefully exited, the server will not be marked as _left_.
+This is to minimally impact the consensus quorum. Instead, the Server will be
+marked as _failed_. To remove a server from the cluster, the
+[`force-leave`](/docs/commands/force-leave) command is used. Using
+`force-leave` will put the server instance in a _left_ state so long as the
+Server agent is not alive.
+
+Alternatively, you can forcibly stop an agent by sending it a
+`kill -KILL consul_pid` signal. This will stop any agent immediately. The rest
+of the cluster will eventually (usually within seconds) detect that the node has
+died and notify the cluster that the node has _failed_.
For client agents, the difference between a node _failing_ and a node _leaving_
may not be important for your use case. For example, for a web server and load
balancer setup, both result in the same outcome: the web node is removed
from the load balancer pool.
+The [`skip_leave_on_interrupt`](/docs/agent/options#skip_leave_on_interrupt) and
+[`leave_on_terminate`](/docs/agent/options#leave_on_terminate) configuration
+options allow you to adjust this behavior.
+
## Lifecycle
Every agent in the Consul cluster goes through a lifecycle. Understanding
this lifecycle is useful for building a mental model of an agent's interactions
with a cluster and how the cluster treats a node.
-When an agent is first started, it does not know about any other node in the cluster.
+When an agent is first started, it does not know about any other node in the
+cluster.
To discover its peers, it must _join_ the cluster. This is done with the
[`join`](/docs/commands/join)
-command or by providing the proper configuration to auto-join on start. Once a node
-joins, this information is gossiped to the entire cluster, meaning all nodes will
-eventually be aware of each other. If the agent is a server, existing servers will
-begin replicating to the new node.
+command or by providing the proper configuration to auto-join on start. Once a
+node joins, this information is gossiped to the entire cluster, meaning all
+nodes will eventually be aware of each other. If the agent is a server,
+existing servers will begin replicating to the new node.
In the case of a network failure, some nodes may be unreachable by other nodes.
-In this case, unreachable nodes are marked as _failed_. It is impossible to distinguish
-between a network failure and an agent crash, so both cases are handled the same.
-Once a node is marked as failed, this information is updated in the service catalog.
+In this case, unreachable nodes are marked as _failed_. It is impossible to
+distinguish between a network failure and an agent crash, so both cases are
+handled the same.
+Once a node is marked as failed, this information is updated in the service
+catalog.
-> **Note:** There is some nuance here since this update is only possible if the servers can still [form a quorum](/docs/internals/consensus). Once the network recovers or a crashed agent restarts the cluster will repair itself and unmark a node as failed. The health check in the catalog will also be updated to reflect this.
diff --git a/website/pages/docs/agent/options.mdx b/website/pages/docs/agent/options.mdx
index 1a430a461e..35591cb4c4 100644
--- a/website/pages/docs/agent/options.mdx
+++ b/website/pages/docs/agent/options.mdx
@@ -40,7 +40,9 @@ documented below in the
[reload command](/docs/commands/reload) can also be used to trigger a
configuration reload.
-You can test the following configuration options by following the [Getting Started](https://learn.hashicorp.com/consul/getting-started/install?utm_source=consul.io&utm_medium=docs) guides to install a local agent.
+You can test the following configuration options by following the
+[Getting Started](https://learn.hashicorp.com/tutorials/consul/get-started-install?utm_source=consul.io&utm_medium=docs)
+tutorials to install a local agent.
## Environment Variables
@@ -194,7 +196,7 @@ The options below are all specified on the command-line.
the data directory. This is useful when running multiple Consul agents on the same
host for testing. This defaults to false in Consul prior to version 0.8.5 and in
0.8.5 and later defaults to true, so you must opt-in for host-based IDs. Host-based
- IDs are generated using https://github.com/shirou/gopsutil/tree/master/host, which
+ IDs are generated using [gopsutil](https://github.com/shirou/gopsutil/tree/master/host), which
is shared with HashiCorp's [Nomad](https://www.nomadproject.io/), so if you opt-in
to host-based IDs then Consul and Nomad will use information on the host to automatically
assign the same ID in both systems.
@@ -413,7 +415,7 @@ The options below are all specified on the command-line.
- `-pid-file` ((#\_pid_file)) - This flag provides the file path for the
agent to store its PID. This is useful for sending signals (for example, `SIGINT`
- to close the agent or `SIGHUP` to update check definite
+ to close the agent or `SIGHUP` to update check definitions) to the agent.
- `-protocol` ((#\_protocol)) - The Consul protocol version to use. Consul
agents speak protocol 2 by default, however agents will automatically use protocol > 2 when speaking to compatible agents. This should be set only when [upgrading](/docs/upgrading). You can view the protocol versions supported by Consul by running `consul -v`.
@@ -423,7 +425,7 @@ The options below are all specified on the command-line.
primary datacenter if the first attempt fails. This is useful for cases where we
know the address will become available eventually. [Cloud Auto-Joining](#cloud-auto-joining)
is supported as well as [go-sockaddr](https://godoc.org/github.com/hashicorp/go-sockaddr/template)
- templates. This was added in Consul 1.8.x **TODO(wanfed)**.
+ templates. This was added in Consul 1.8.0.
- `-raft-protocol` ((#\_raft_protocol)) - This controls the internal version
of the Raft consensus protocol used for server communications. This must be set
@@ -440,12 +442,12 @@ The options below are all specified on the command-line.
- `-segment` ((#\_segment)) - This flag is used to set
the name of the network segment the agent belongs to. An agent can only join and
- communicate with other agents within its network segment. See the [Network Segments
- Guide](https://learn.hashicorp.com/consul/day-2-operations/network-segments) for
+ communicate with other agents within its network segment. Review the [Network Segments
+ tutorial](https://learn.hashicorp.com/tutorials/consul/network-partition-datacenters) for
more details. By default, this is an empty string, which is the default network
segment.
-- `-serf-lan-allowed-cidrs` - The Serf LAN allowed CIDRs allow to accept incoming
+- `-serf-lan-allowed-cidrs` ((#\_serf_lan_allowed_cidrs)) - The Serf LAN allowed CIDRs allow to accept incoming
connections for Serf only from several networks (mutiple values are supported).
Those networks are specified with CIDR notation (eg: 192.168.1.0/24).
This is available in Consul 1.8 and later.
@@ -454,7 +456,7 @@ The options below are all specified on the command-line.
This overrides the default Serf LAN port 8301. This is available in Consul 1.2.2
and later.
-- `-serf-lan-allowed-cidrs` - he Serf LAN allowed CIDRs allow to accept incoming
+- `-serf-wan-allowed-cidrs` ((#\_serf_wan_allowed_cidrs)) - The Serf WAN allowed CIDRs allow to accept incoming
connections for Serf only from several networks (mutiple values are supported).
Those networks are specified with CIDR notation (eg: 192.168.1.0/24).
This is available in Consul 1.8 and later.
@@ -624,7 +626,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
policy controls the behavior of a token when there is no matching rule. In "allow"
mode, ACLs are a denylist: any operation not specifically prohibited is allowed.
In "deny" mode, ACLs are an allowlist: any operation not specifically
- allowed is blocked. **Note**: this will not take effect until you'veenabled ACLs.
+ allowed is blocked. **Note**: this will not take effect until you've enabled ACLs.
- `enable_key_list_policy` ((#acl_enable_key_list_policy)) - Either "enabled"
or "disabled", defaults to "disabled". When enabled, the `list` permission will
@@ -639,6 +641,11 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
allow for the creation of both [local tokens](/api/acl/tokens#local) and
[auth methods](/docs/acl/auth-methods) in connected secondary datacenters.
+ ~> **Warning:** When enabling ACL token replication on the secondary datacenter,
+ global tokens already present in the secondary datacenter will be lost. For
+ production environments, consider configuring ACL replication in your initial
+ datacenter bootstrapping process.
+
- `enable_token_persistence` ((#acl_enable_token_persistence)) - Either
`true` or `false`. When `true` tokens set using the API will be persisted to
disk and reloaded when an agent restarts.
@@ -681,6 +688,11 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
authorize secondary datacenters with the primary datacenter for replication
operations. This token is required for servers outside the [`primary_datacenter`](#primary_datacenter) when ACLs are enabled. This token may be provided later using the [agent token API](/api/agent#update-acl-tokens) on each server. This token must have at least "read" permissions on ACL data but if ACL token replication is enabled then it must have "write" permissions. This also enables Connect replication, for which the token will require both operator "write" and intention "read" permissions for replicating CA and Intention data.
+ ~> **Warning:** When enabling ACL token replication on the secondary datacenter,
+ policies and roles already present in the secondary datacenter will be lost. For
+ production environments, consider configuring ACL replication in your initial
+ datacenter bootstrapping process.
+
- `managed_service_provider` ((#acl_tokens_managed_service_provider)) - An
array of ACL tokens used by Consul managed service providers for cluster operations.
@@ -697,7 +709,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
This designates the datacenter which is authoritative for ACL information. It must be provided to enable ACLs. All servers and datacenters must agree on the ACL datacenter. Setting it on the servers is all you need for cluster-level enforcement, but for the APIs to forward properly from the clients,
it must be set on them too. In Consul 0.8 and later, this also enables agent-level enforcement
- of ACLs. Please see the [ACL Guide](https://learn.hashicorp.com/consul/security-networking/production-acls) for more details.
+ of ACLs. Please review the [ACL tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production) for more details.
- `acl_default_policy` ((#acl_default_policy_legacy)) - **Deprecated in Consul 1.4.0. See the [`acl.default_policy`](#acl_default_policy) field instead.**
Either "allow" or "deny"; defaults to "allow". The default policy controls the
@@ -757,7 +769,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
- `acl_replication_token` ((#acl_replication_token_legacy)) - **Deprecated
in Consul 1.4.0. See the [`acl.tokens.replication`](#acl_tokens_replication) field
instead.** Only used for servers outside the [`primary_datacenter`](#primary_datacenter)
- running Consul 0.7 or later. When provided, this will enable [ACL replication](https://learn.hashicorp.com/consul/day-2-operations/acl-replication)
+ running Consul 0.7 or later. When provided, this will enable [ACL replication](https://learn.hashicorp.com/tutorials/consul/access-control-replication-multiple-datacenters)
using this ACL replication using this token to retrieve and replicate the ACLs
to the non-authoritative local datacenter. In Consul 0.9.1 and later you can enable
ACL replication using [`enable_acl_replication`](#enable_acl_replication) and then
@@ -812,58 +824,70 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
- `advertise_addr` Equivalent to the [`-advertise` command-line flag](#_advertise).
-- `serf_wan` ((#serf_wan_bind)) Equivalent to the [`-serf-wan-bind` command-line flag](#_serf_wan_bind).
+- `advertise_addr_ipv4` This was added together with [`advertise_addr_ipv6`](#advertise_addr_ipv6) to support dual stack IPv4/IPv6 environments. Using this, both IPv4 and IPv6 addresses can be specified and requested during eg service discovery.
-- `serf_lan` ((#serf_lan_bind)) Equivalent to the [`-serf-lan-bind` command-line flag](#_serf_lan_bind).
+- `advertise_addr_ipv6` This was added together with [`advertise_addr_ipv4`](#advertise_addr_ipv4) to support dual stack IPv4/IPv6 environments. Using this, both IPv4 and IPv6 addresses can be specified and requested during eg service discovery.
- `advertise_addr_wan` Equivalent to the [`-advertise-wan` command-line flag](#_advertise-wan).
+- `advertise_addr_wan_ipv4` This was added together with [`advertise_addr_wan_ipv6`](#advertise_addr_wan_ipv6) to support dual stack IPv4/IPv6 environments. Using this, both IPv4 and IPv6 addresses can be specified and requested during eg service discovery.
+
+- `advertise_addr_wan_ipv6` This was added together with [`advertise_addr_wan_ipv4`](#advertise_addr_wan_ipv4) to support dual stack IPv4/IPv6 environments. Using this, both IPv4 and IPv6 addresses can be specified and requested during eg service discovery.
+
+- `serf_lan` ((#serf_lan_bind)) Equivalent to the [`-serf-lan-bind` command-line flag](#_serf_lan_bind).
+
+- `serf_lan_allowed_cidrs` ((#serf_lan_allowed_cidrs)) Equivalent to the [`-serf-lan-allowed-cidrs` command-line flag](#_serf_lan_allowed_cidrs).
+
+- `serf_wan` ((#serf_wan_bind)) Equivalent to the [`-serf-wan-bind` command-line flag](#_serf_wan_bind).
+
+- `serf_wan_allowed_cidrs` ((#serf_wan_allowed_cidrs)) Equivalent to the [`-serf-wan-allowed-cidrs` command-line flag](#_serf_wan_allowed_cidrs).
+
- `audit` - Added in Consul 1.8, the audit object allow users to enable auditing
- and configure a sink and filters for their audit logs.
+ and configure a sink and filters for their audit logs.
- ```hcl
- audit {
- enabled = true
- sink "My sink" {
- type = "file"
- format = "json"
- path = "data/audit/audit.json"
- delivery_guarantee = "best-effort"
- rotate_duration = "24h"
- rotate_max_files = 15
- rotate_bytes = 25165824
- }
- }
- ```
+ ```hcl
+ audit {
+ enabled = true
+ sink "My sink" {
+ type = "file"
+ format = "json"
+ path = "data/audit/audit.json"
+ delivery_guarantee = "best-effort"
+ rotate_duration = "24h"
+ rotate_max_files = 15
+ rotate_bytes = 25165824
+ }
+ }
+ ```
- The following sub-keys are available:
+ The following sub-keys are available:
- - `enabled` - Controls whether Consul logs out each time a user
+ - `enabled` - Controls whether Consul logs out each time a user
performs an operation. ACLs must be enabled to use this feature. Defaults to `false`.
- - `sink` - This object provides configuration for the destination to which
- Consul will log auditing events. Sink is an object containing keys to sink objects, where the key is the name of the sink.
+ - `sink` - This object provides configuration for the destination to which
+ Consul will log auditing events. Sink is an object containing keys to sink objects, where the key is the name of the sink.
- - `type` - Type specifies what kind of sink this is.
- The following keys are valid:
- - `file` - Currently only file sinks are available, they take the following keys.
- - `format` - Format specifies what format the events will
- be emitted with.
- The following keys are valid:
- - `json` - Currently only json events are offered.
- - `path` - The directory and filename to write audit events to.
- - `delivery_guarantee` - Specifies
- the rules governing how audit events are written.
- The following keys are valid:
- - `best-effort` - Consul only supports `best-effort` event delivery.
- - `rotate_duration` - Specifies the
- interval by which the system rotates to a new log file. At least one of `rotate_duration` or `rotate_bytes`
- must be configured to enable audit logging.
- - `rotate_max_files` - Defines the
- limit that Consul should follow before it deletes old log files.
- - `rotate_bytes` - Specifies how large an
- individual log file can grow before Consul rotates to a new file. At least one of `rotate_bytes` or
- `rotate_duration` must be configured to enable audit logging.
+ - `type` - Type specifies what kind of sink this is.
+ The following keys are valid:
+ - `file` - Currently only file sinks are available, they take the following keys.
+ - `format` - Format specifies what format the events will
+ be emitted with.
+ The following keys are valid:
+ - `json` - Currently only json events are offered.
+ - `path` - The directory and filename to write audit events to.
+ - `delivery_guarantee` - Specifies
+ the rules governing how audit events are written.
+ The following keys are valid:
+ - `best-effort` - Consul only supports `best-effort` event delivery.
+ - `rotate_duration` - Specifies the
+ interval by which the system rotates to a new log file. At least one of `rotate_duration` or `rotate_bytes`
+ must be configured to enable audit logging.
+ - `rotate_max_files` - Defines the
+ limit that Consul should follow before it deletes old log files.
+ - `rotate_bytes` - Specifies how large an
+ individual log file can grow before Consul rotates to a new file. At least one of `rotate_bytes` or
+ `rotate_duration` must be configured to enable audit logging.
- `autopilot` Added in Consul 0.8, this object allows a
number of sub-keys to be set which can configure operator-friendly settings for
@@ -871,7 +895,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
respected on bootstrapping. If they are not provided, the defaults will be used.
In order to change the value of these options after bootstrapping, you will need
to use the [Consul Operator Autopilot](/docs/commands/operator/autopilot)
- command. For more information about Autopilot, see the [Autopilot Guide](https://learn.hashicorp.com/consul/day-2-operations/autopilot).
+ command. For more information about Autopilot, review the [Autopilot tutorial](https://learn.hashicorp.com/tutorials/consul/autopilot-datacenter-operations).
The following sub-keys are available:
@@ -910,11 +934,11 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
- `upgrade_version_tag` -
The node_meta tag to use for version info when performing upgrade migrations.
If this is not set, the Consul version will be used.
-
+
- `auto_config` This object allows setting options for the `auto_config` feature.
The following sub-keys are available:
-
+
- `enabled` (Defaults to `false`) This option enables `auto_config` on a client
agent. When starting up but before joining the cluster, the client agent will
make an RPC to the configured server addresses to request configuration settings,
@@ -927,44 +951,44 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
object available for use on Consul servers. Enabling this option also turns
on Connect because it is vital for `auto_config`, more specifically the CA
and certificates infrastructure.
-
- - `intro_token` (Defaults to `""`) This specifies the JWT to use for the initial
- `auto_config` RPC to the Consul servers. This can be overridden with the
+
+ - `intro_token` (Defaults to `""`) This specifies the JWT to use for the initial
+ `auto_config` RPC to the Consul servers. This can be overridden with the
`CONSUL_INTRO_TOKEN` environment variable
-
+
- `intro_token_file` (Defaults to `""`) This specifies a file containing the JWT
to use for the initial `auto_config` RPC to the Consul servers. This token
from this file is only loaded if the `intro_token` configuration is unset as
well as the `CONSUL_INTRO_TOKEN` environment variable
-
+
- `server_addresses` (Defaults to `[]`) This specifies the addresses of servers in
the local datacenter to use for the initial RPC. These addresses support
[Cloud Auto-Joining](#cloud-auto-joining) and can optionally include a port to
use when making the outbound connection. If not port is provided the `server_port`
will be used.
-
+
- `dns_sans` (Defaults to `[]`) This is a list of extra DNS SANs to request in the
client agent's TLS certificate. The `localhost` DNS SAN is always requested.
-
+
- `ip_sans` (Defaults to `[]`) This is a list of extra IP SANs to request in the
client agent's TLS certficate. The `::1` and `127.0.0.1` IP SANs are always requested.
-
+
- `authorization` This object controls how a Consul server will authorize `auto_config`
requests and in particular how to verify the JWT intro token.
-
- - `enabled` (Defaults to `false`) This option enables `auto_config` authorization
+
+ - `enabled` (Defaults to `false`) This option enables `auto_config` authorization
capabilities on the server.
-
+
- `static` This object controls configuring the static authorizer setup in the Consul
configuration file. Almost all sub-keys are identical to those provided by the [JWT
Auth Method](/docs/acl/auth-methods/jwt).
-
+
- `jwt_validation_pub_keys` (Defaults to `[]`) A list of PEM-encoded public keys
to use to authenticate signatures locally.
Exactly one of `jwks_url` `jwt_validation_pub_keys`, or `oidc_discovery_url` is required.
- - `oidc_discovery_url` (Defaults to `""`) The OIDC Discovery URL, without any
+ - `oidc_discovery_url` (Defaults to `""`) The OIDC Discovery URL, without any
.well-known component (base path).
Exactly one of `jwks_url` `jwt_validation_pub_keys`, or `oidc_discovery_url` is required.
@@ -982,7 +1006,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
(`\n`). If not set, system certificates are used.
- `claim_mappings` (Defaults to `(map[string]string)` Mappings of claims (key) that
- will be copied to a metadata field (value). Use this if the claim you are capturing
+ will be copied to a metadata field (value). Use this if the claim you are capturing
is singular (such as an attribute).
When mapped, the values can be any of a number, string, or boolean and will
@@ -1015,13 +1039,14 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
- `clock_skew_leeway` (Defaults to `"0s"`) Duration of leeway when
validating all claims to account for clock skew. Defaults to 60s (1 minute)
if set to 0s and can be disabled if set to -1ns.
-
+
- `claim_assertions` (Defaults to []) List of assertions about the mapped
claims required to authorize the incoming RPC request. The syntax uses
- github.com/hashicorp/go-bexpr which is shared with the
+ github.com/hashicorp/go-bexpr which is shared with the
[API filtering feature](/api/features/filtering). For example, the following
configurations when combined will ensure that the JWT `sub` matches the node
name requested by the client.
+
```
claim_mappings {
sub = "node_name"
@@ -1030,15 +1055,14 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
"value.node_name == \"${node}\""
]
```
-
+
The assertions are lightly templated using [HIL syntax](https://github.com/hashicorp/hil)
to interpolate some values from the RPC request. The list of variables that can be interpolated
are:
-
- - `node` - The node name the client agent is requesting.
-
- - `segment` - The network segment name the client is requesting.
-
+
+ - `node` - The node name the client agent is requesting.
+
+ - `segment` - The network segment name the client is requesting.
- `auto_encrypt` This object allows setting options for the `auto_encrypt` feature.
@@ -1145,7 +1169,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
in order for Connect to function properly. Defaults to false.
- `enable_mesh_gateway_wan_federation` ((#connect_enable_mesh_gateway_wan_federation)) Controls whether cross-datacenter federation traffic between servers is funneled
- through mesh gateways. Defaults to false. This was added in Consul 1.8.x **TODO(wanfed)**.
+ through mesh gateways. Defaults to false. This was added in Consul 1.8.0.
- `ca_provider` ((#connect_ca_provider)) Controls which CA provider to
use for Connect's CA. Currently only the `consul` and `vault` providers are supported.
@@ -1286,7 +1310,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
equivalent to the [`max_stale`](#max_stale) configuration for DNS requests. If this value is zero (default), all service discovery HTTP endpoints are forwarded to the leader. If this value is greater than zero, any Consul server can handle the service discovery request. If a Consul server is behind the leader by more than `discovery_max_stale`, the query will be re-evaluated on the leader to get more up-to-date results. Consul agents also add a new `X-Consul-Effective-Consistency` response header which indicates if the agent did a stale read. `discover-max-stale` was introduced in Consul 1.0.7 as a way for Consul operators to force stale requests from clients at the agent level, and defaults to zero which matches default consistency behavior in earlier Consul versions.
- `dns_config` This object allows a number of sub-keys
- to be set which can tune how DNS queries are serviced. See this guide on [DNS caching](https://learn.hashicorp.com/consul/security-networking/dns-caching) for more detail.
+ to be set which can tune how DNS queries are serviced. Check the tutorial on [DNS caching](https://learn.hashicorp.com/tutorials/consul/dns-caching) for more detail.
The following sub-keys are available:
@@ -1390,11 +1414,15 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
is enabled, the agent will attempt to re-fetch the result from the servers if
the cached value is older than this duration. See: [agent caching](/api/features/caching).
+ **Note** that unlike the `max-age` HTTP header, a value of 0 for this field is
+ equivalent to "no max age". To get a fresh value from the cache use a very small value
+ of `1ns` instead of 0.
+
- `prefer_namespace` ((#dns_prefer_namespace)) -
When set to true, in a DNS query for a service, the label between the domain
and the `service` label will be treated as a namespace name instead of a datacenter.
When set to false, the default, the behavior will be the same as non-Enterprise
- versions and will assume the label is the datacenter. See: [this section](/docs/agent/dns#namespaced-services-enterprise)
+ versions and will assume the label is the datacenter. See: [this section](/docs/agent/dns#namespaced-services)
for more details.
- `domain` Equivalent to the [`-domain` command-line flag](#_domain).
@@ -1404,6 +1432,11 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
and then introduce the token using the [agent token API](/api/agent#update-acl-tokens) on each server.
See [`acl_replication_token`](#acl_replication_token) for more details.
+ ~> **Warning:** When enabling ACL token replication on the secondary datacenter,
+ policies and roles already present in the secondary datacenter will be lost. For
+ production environments, consider configuring ACL replication in your initial
+ datacenter bootstrapping process.
+
- `enable_agent_tls_for_checks` When set, uses a subset of the agent's TLS configuration (`key_file`,
`cert_file`, `ca_file`, `ca_path`, and `server_name`) to set up the client for HTTP or gRPC health checks. This allows services requiring 2-way TLS to be checked using the agent's credentials. This was added in Consul 1.0.1 and defaults to false.
@@ -1544,7 +1577,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
only works with API endpoints, not `/ui` or `/debug`, those must be disabled
with their respective configuration options. Any CLI commands that use disabled
endpoints will no longer function as well. For more general access control, Consul's
- [ACL system](https://learn.hashicorp.com/consul/security-networking/production-acls)
+ [ACL system](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production)
should be used, but this option is useful for removing access to HTTP API endpoints
completely, or on specific agents. This is available in Consul 0.9.0 and later.
@@ -1623,7 +1656,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
configure Raft to its highest-performance mode, equivalent to the default timing of Consul
prior to 0.7, and is recommended for [production Consul servers](/docs/install/performance#production).
- See the note on [last contact](/docs/install/performance#last-contact) timing for more
+ See the note on [last contact](/docs/install/performance#production-server-requirements) timing for more
details on tuning this parameter. The maximum allowed value is 10.
- `rpc_hold_timeout` - A duration that a client
@@ -1680,11 +1713,11 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
mesh gateways for the primary datacenter when authoritative replicated catalog
data is not present. Discovery happens every [`primary_gateways_interval`](#primary_gateways_interval)
until at least one primary mesh gateway is discovered. This was added in Consul
- 1.8.x **TODO(wanfed)**.
+ 1.8.0.
- `primary_gateways_interval` Time to wait
between [`primary_gateways`](#primary_gateways) discovery attempts. Defaults to
- 30s. This was added in Consul 1.8.x **TODO(wanfed)**.
+ 30s. This was added in Consul 1.8.0.
- `protocol` ((#protocol)) Equivalent to the [`-protocol` command-line
flag](#_protocol).
@@ -1763,7 +1796,7 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
- `segments` - This is a list of nested objects
that allows setting the bind/advertise information for network segments. This can
- only be set on servers. See the [Network Segments Guide](https://learn.hashicorp.com/consul/day-2-operations/network-segments)
+ only be set on servers. Review the [Network Segments tutorial](https://learn.hashicorp.com/tutorials/consul/network-partition-datacenters)
for more details.
- `name` ((#segment_name)) - The name of the segment. Must be a string
@@ -1898,8 +1931,8 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
statsite.
- `prefix_filter` ((#telemetry-prefix_filter))
- This is a list of filter rules to apply for allowing/blocking metrics by prefix
- in the following format:
+ This is a list of filter rules to apply for allowing/blocking metrics by
+ prefix in the following format:
```json
["+consul.raft.apply", "-consul.http", "+consul.http.GET"]
@@ -1949,9 +1982,10 @@ Valid time units are 'ns', 'us' (or 'Β΅s'), 'ms', 's', 'm', 'h'."
or "tls13". This defaults to "tls12". WARNING: TLS 1.1 and lower are generally
considered less secure; avoid using these if possible.
-- `tls_cipher_suites` Added in Consul 0.8.2, this
- specifies the list of supported ciphersuites as a comma-separated-list. The list
- of all supported ciphersuites is available in the [source code](https://github.com/hashicorp/consul/blob/master/tlsutil/config.go#L363).
+- `tls_cipher_suites` Added in Consul 0.8.2, this specifies the list of
+ supported ciphersuites as a comma-separated-list. The list of all supported
+ ciphersuites is available through
+ [this search](https://github.com/hashicorp/consul/search?q=cipherMap+%3A%3D+map&unscoped_q=cipherMap+%3A%3D+map).
- `tls_prefer_server_cipher_suites` Added in Consul 0.8.2, this
will cause Consul to prefer the server's ciphersuite over the client ciphersuites.
@@ -2074,14 +2108,17 @@ required ports and their default settings.
Reloading configuration does not reload all configuration items. The
items which are reloaded include:
-- Log level
+- ACL Tokens
+- [Configuration Entry Bootstrap](#config_entries_bootstrap)
- Checks
-- Services
-- Watches
+- [Discard Check Output](#discard_check_output)
- HTTP Client Address
+- Log level
+- [Metric Prefix Filter](#telemetry-prefix_filter)
+- [Node Metadata](#node_meta)
+- [RPC rate limiting](#limits)
+- [HTTP Maximum Connections per Client](#http_max_conns_per_client)
+- Services
- TLS Configuration
- Please be aware that this is currently limited to reload a configuration that is already TLS enabled. You cannot enable or disable TLS only with reloading.
-- [Node Metadata](#node_meta)
-- [Metric Prefix Filter](#telemetry-prefix_filter)
-- [Discard Check Output](#discard_check_output)
-- [RPC rate limiting](#limits)
+- Watches
diff --git a/website/pages/docs/agent/telemetry.mdx b/website/pages/docs/agent/telemetry.mdx
index cd9f66920e..ea40e2ee64 100644
--- a/website/pages/docs/agent/telemetry.mdx
+++ b/website/pages/docs/agent/telemetry.mdx
@@ -20,13 +20,13 @@ it will dump the current telemetry information to the agent's `stderr`.
This telemetry information can be used for debugging or otherwise
getting a better view of what Consul is doing. Review the [Monitoring and
-Metrics guide](https://learn.hashicorp.com/consul/day-2-operations/monitoring?utm_source=consul.io&utm_medium=docs) to learn how collect and interpret Consul data.
+Metrics tutorial](https://learn.hashicorp.com/tutorials/consul/monitor-datacenter-health?utm_source=consul.io&utm_medium=docs) to learn how collect and interpret Consul data.
Additionally, if the [`telemetry` configuration options](/docs/agent/options#telemetry)
are provided, the telemetry information will be streamed to a
[statsite](http://github.com/armon/statsite) or [statsd](http://github.com/etsy/statsd) server where
it can be aggregated and flushed to Graphite or any other metrics store.
-For a configuration example for Telegraf, review the [Monitoring with Telegraf guide](https://learn.hashicorp.com/consul/integrations/telegraf?utm_source=consul.io&utm_medium=docs).
+For a configuration example for Telegraf, review the [Monitoring with Telegraf tutorial](https://learn.hashicorp.com/tutorials/consul/monitor-health-telegraf?utm_source=consul.io&utm_medium=docs).
This
information can also be viewed with the [metrics endpoint](/api/agent#view-metrics) in JSON
@@ -147,9 +147,9 @@ This is a full list of metrics emitted by Consul.
| `consul.client.api.catalog_register.` | This increments whenever a Consul agent receives a catalog register request. | requests | counter |
| `consul.client.api.success.catalog_register.` | This increments whenever a Consul agent successfully responds to a catalog register request. | requests | counter |
| `consul.client.rpc.error.catalog_register.` | This increments whenever a Consul agent receives an RPC error for a catalog register request. | errors | counter |
-| `consul.client.api.catalog_deregister.` | This increments whenever a Consul agent receives a catalog deregister request. | requests | counter |
-| `consul.client.api.success.catalog_deregister.` | This increments whenever a Consul agent successfully responds to a catalog deregister request. | requests | counter |
-| `consul.client.rpc.error.catalog_deregister.` | This increments whenever a Consul agent receives an RPC error for a catalog deregister request. | errors | counter |
+| `consul.client.api.catalog_deregister.` | This increments whenever a Consul agent receives a catalog deregister request. | requests | counter |
+| `consul.client.api.success.catalog_deregister.` | This increments whenever a Consul agent successfully responds to a catalog deregister request. | requests | counter |
+| `consul.client.rpc.error.catalog_deregister.` | This increments whenever a Consul agent receives an RPC error for a catalog deregister request. | errors | counter |
| `consul.client.api.catalog_datacenters.` | This increments whenever a Consul agent receives a request to list datacenters in the catalog. | requests | counter |
| `consul.client.api.success.catalog_datacenters.` | This increments whenever a Consul agent successfully responds to a request to list datacenters. | requests | counter |
| `consul.client.rpc.error.catalog_datacenters.` | This increments whenever a Consul agent receives an RPC error for a request to list datacenters. | errors | counter |
@@ -163,14 +163,17 @@ This is a full list of metrics emitted by Consul.
| `consul.client.api.success.catalog_service_nodes.` | This increments whenever a Consul agent successfully responds to a request to list nodes offering a service. | requests | counter |
| `consul.client.rpc.error.catalog_service_nodes.` | This increments whenever a Consul agent receives an RPC error for a request to list nodes offering a service. | errors | counter |
| `consul.client.api.catalog_node_services.` | This increments whenever a Consul agent receives a request to list services registered in a node. | requests | counter |
-| `consul.client.api.success.catalog_node_services.` | This increments whenever a Consul agent successfully responds to a request to list services in a node. | requests | counter |
-| `consul.client.rpc.error.catalog_node_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services in a node. | errors | counter |
-| `consul.client.api.catalog_gateway_services.` | This increments whenever a Consul agent receives a request to list services associated with a gateway. | requests | counter |
-| `consul.client.api.success.catalog_gateway_services.` | This increments whenever a Consul agent successfully responds to a request to list services associated with a gateway. | requests | counter |
-| `consul.client.rpc.error.catalog_gateway_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services associated with a gateway. | errors | counter |
+| `consul.client.api.success.catalog_node_services.` | This increments whenever a Consul agent successfully responds to a request to list services in a node. | requests | counter |
+| `consul.client.rpc.error.catalog_node_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services in a node. | errors | counter |
+| `consul.client.api.catalog_gateway_services.` | This increments whenever a Consul agent receives a request to list services associated with a gateway. | requests | counter |
+| `consul.client.api.success.catalog_gateway_services.` | This increments whenever a Consul agent successfully responds to a request to list services associated with a gateway. | requests | counter |
+| `consul.client.rpc.error.catalog_gateway_services.` | This increments whenever a Consul agent receives an RPC error for a request to list services associated with a gateway. | errors | counter |
| `consul.runtime.num_goroutines` | This tracks the number of running goroutines and is a general load pressure indicator. This may burst from time to time but should return to a steady state value. | number of goroutines | gauge |
| `consul.runtime.alloc_bytes` | This measures the number of bytes allocated by the Consul process. This may burst from time to time but should return to a steady state value. | bytes | gauge |
| `consul.runtime.heap_objects` | This measures the number of objects allocated on the heap and is a general memory pressure indicator. This may burst from time to time but should return to a steady state value. | number of objects | gauge |
+| `consul.state.nodes` | This meansures the current number of nodes registered with Consul. It is only emitted by Consul servers. | number of objects | gauge |
+| `consul.state.services` | This meansures the current number of unique services registered with Consul, based on service name. It is only emitted by Consul servers. | number of objects | gauge |
+| `consul.state.service_instances` | This meansures the current number of unique service instances registered with Consul. It is only emitted by Consul servers. | number of objects | gauge |
| `consul.acl.cache_hit` | The number of ACL cache hits. | hits | counter |
| `consul.acl.cache_miss` | The number of ACL cache misses. | misses | counter |
| `consul.acl.replication_hit` | The number of ACL replication cache hits (when not running in the ACL datacenter). | hits | counter |
@@ -199,8 +202,7 @@ These metrics are used to monitor the health of the Consul servers.
| `consul.raft.state.leader` | This increments whenever a Consul server becomes a leader. If there are frequent leadership changes this may be indication that the servers are overloaded and aren't meeting the soft real-time requirements for Raft, or that there are networking problems between the servers. | leadership transitions / interval | counter |
| `consul.raft.state.candidate` | This increments whenever a Consul server starts an election. If this increments without a leadership change occurring it could indicate that a single server is overloaded or is experiencing network connectivity issues. | election attempts / interval | counter |
| `consul.raft.apply` | This counts the number of Raft transactions occurring over the interval, which is a general indicator of the write load on the Consul servers. | raft transactions / interval | counter |
-| `consul.raft.barrier` | This metric counts the number of times the agent has started the barrier i.e the number of times it has |
-| issued a blocking call, to ensure that the agent has all the pending operations that were queued, to be applied to the agent's FSM. | blocks / interval | counter |
+| `consul.raft.barrier` | This metric counts the number of times the agent has started the barrier i.e the number of times it has issued a blocking call, to ensure that the agent has all the pending operations that were queued, to be applied to the agent's FSM. | blocks / interval | counter |
| `consul.raft.verify_leader` | This metric counts the number of times an agent checks whether it is still the leader or not | checks / interval | Counter |
| `consul.raft.restore` | This metric counts the number of times the restore operation has been performed by the agent. Here, restore refers to the action of raft consuming an external snapshot to restore its state. | operation invoked / interval | counter |
| `consul.raft.commitTime` | This measures the time it takes to commit a new entry to the Raft log on the leader. | ms | timer |
diff --git a/website/pages/docs/internals/anti-entropy.mdx b/website/pages/docs/architecture/anti-entropy.mdx
similarity index 100%
rename from website/pages/docs/internals/anti-entropy.mdx
rename to website/pages/docs/architecture/anti-entropy.mdx
diff --git a/website/pages/docs/internals/consensus.mdx b/website/pages/docs/architecture/consensus.mdx
similarity index 98%
rename from website/pages/docs/internals/consensus.mdx
rename to website/pages/docs/architecture/consensus.mdx
index b51f01877d..0059406cfc 100644
--- a/website/pages/docs/internals/consensus.mdx
+++ b/website/pages/docs/architecture/consensus.mdx
@@ -38,8 +38,8 @@ There are a few key terms to know when discussing Raft:
- Peer set - The peer set is the set of all members participating in log replication.
For Consul's purposes, all server nodes are in the peer set of the local datacenter.
-- Quorum - A quorum is a majority of members from a peer set: for a set of size `n`,
- quorum requires at least `(n+1)/2` members.
+- Quorum - A quorum is a majority of members from a peer set: for a set of size `N`,
+ quorum requires at least `(N/2)+1` members.
For example, if there are 5 members in the peer set, we would need 3 nodes
to form a quorum. If a quorum of nodes is unavailable for any reason, the
cluster becomes _unavailable_ and no new logs can be committed.
@@ -171,7 +171,7 @@ The three read modes are:
For more documentation about using these various modes, see the
[HTTP API](/api/features/consistency).
-## Deployment Table
+## Deployment Table ((#deployment_table))
Below is a table that shows quorum size and failure tolerance for various
cluster sizes. The recommended deployment is either 3 or 5 servers. A single
diff --git a/website/pages/docs/internals/coordinates.mdx b/website/pages/docs/architecture/coordinates.mdx
similarity index 86%
rename from website/pages/docs/internals/coordinates.mdx
rename to website/pages/docs/architecture/coordinates.mdx
index 68fb9d291d..a6c7187b58 100644
--- a/website/pages/docs/internals/coordinates.mdx
+++ b/website/pages/docs/architecture/coordinates.mdx
@@ -2,10 +2,7 @@
layout: docs
page_title: Network Coordinates
sidebar_title: Network Coordinates
-description: ''
-Serf uses a network tomography system to compute network coordinates for nodes in the cluster. These coordinates are useful for easily calculating the estimated network round trip time between any two nodes in the cluster. This page documents the details of this system. The core of the network tomography system us based on Vivaldi: >-
- A Decentralized Network Coordinate System, with several improvements based on
- several follow-on papers.
+description: A Decentralized Network Coordinate System, with several improvements based on several follow-on papers.
---
# Network Coordinates
@@ -35,7 +32,7 @@ Network coordinates manifest in several ways inside Consul:
- [Prepared queries](/api/query) can automatically fail over services
to other Consul datacenters based on network round trip times. See the
- [Geo Failover](https://learn.hashicorp.com/consul/developer-discovery/geo-failover) for some examples.
+ [Geo Failover](https://learn.hashicorp.com/tutorials/consul/automate-geo-failover) for some examples.
- The [Coordinate endpoint](/api/coordinate) exposes raw network
coordinates for use in other applications.
diff --git a/website/pages/docs/internals/gossip.mdx b/website/pages/docs/architecture/gossip.mdx
similarity index 98%
rename from website/pages/docs/internals/gossip.mdx
rename to website/pages/docs/architecture/gossip.mdx
index 3320790eaf..bfbbab47af 100644
--- a/website/pages/docs/internals/gossip.mdx
+++ b/website/pages/docs/architecture/gossip.mdx
@@ -41,9 +41,7 @@ is used as an embedded library to provide these features. From a user perspectiv
this is not important, since the abstraction should be masked by Consul. It can be useful
however as a developer to understand how this library is leveraged.
-
-
-## Lifeguard Enhancements
+## Lifeguard Enhancements ((#lifeguard))
SWIM makes the assumption that the local node is healthy in the sense
that soft real-time processing of packets is possible. However, in cases
diff --git a/website/pages/docs/internals/architecture.mdx b/website/pages/docs/architecture/index.mdx
similarity index 93%
rename from website/pages/docs/internals/architecture.mdx
rename to website/pages/docs/architecture/index.mdx
index f8a979f3e2..34dff34b02 100644
--- a/website/pages/docs/internals/architecture.mdx
+++ b/website/pages/docs/architecture/index.mdx
@@ -18,7 +18,7 @@ page documents the system architecture.
[glossary](/docs/glossary) of terms to help
clarify what is being discussed.
-The architecture concepts in this document can be used with the [Reference Architecture guide](https://learn.hashicorp.com/consul/datacenter-deploy/reference-architecture?utm_source=consul.io&utm_medium=docs) when deploying Consul in production.
+The architecture concepts in this document can be used with the [Reference Architecture guide](https://learn.hashicorp.com/tutorials/consul/reference-architecture?utm_source=consul.io&utm_medium=docs) when deploying Consul in production.
## 10,000 foot view
@@ -28,7 +28,7 @@ From a 10,000 foot altitude the architecture of Consul looks like this:
Let's break down this image and describe each piece. First of all, we can see
that there are two datacenters, labeled "one" and "two". Consul has first
-class support for [multiple datacenters](https://learn.hashicorp.com/consul/security-networking/datacenters) and
+class support for [multiple datacenters](https://learn.hashicorp.com/tutorials/consul/federarion-gossip-wan) and
expects this to be the common case.
Within each datacenter, we have a mixture of clients and servers. It is expected
@@ -68,7 +68,7 @@ an RPC request to the remote Consul servers for that resource and return the res
If the remote datacenter is not available, then those resources will also not be
available, but that won't otherwise affect the local datacenter. There are some special
situations where a limited subset of data can be replicated, such as with Consul's built-in
-[ACL replication](https://learn.hashicorp.com/consul/day-2-operations/acl-replication) capability, or
+[ACL replication](https://learn.hashicorp.com/tutorials/consul/access-control-replication-multiple-datacenters) capability, or
external tools like [consul-replicate](https://github.com/hashicorp/consul-replicate).
In some places, client agents may cache data from the servers to make it
diff --git a/website/pages/docs/internals/jepsen.mdx b/website/pages/docs/architecture/jepsen.mdx
similarity index 99%
rename from website/pages/docs/internals/jepsen.mdx
rename to website/pages/docs/architecture/jepsen.mdx
index d6988c22ba..f7f37376a0 100644
--- a/website/pages/docs/internals/jepsen.mdx
+++ b/website/pages/docs/architecture/jepsen.mdx
@@ -38,7 +38,7 @@ run.
-```text
+```shell-session
$ lein test :only jepsen.system.consul-test
lein test jepsen.system.consul-test
diff --git a/website/pages/docs/commands/tls/ca.mdx b/website/pages/docs/commands/tls/ca.mdx
deleted file mode 100644
index cfacfe1d35..0000000000
--- a/website/pages/docs/commands/tls/ca.mdx
+++ /dev/null
@@ -1,29 +0,0 @@
----
-layout: docs
-page_title: 'Commands: TLS CA Create'
-sidebar_title: ca
----
-
-# Consul TLS CA Create
-
-Command: `consul tls ca create`
-
-This command create a self signed CA to be used for Consul TLS setup.
-
-## Example
-
-Create CA:
-
-```bash
-$ consul tls ca create
-==> Saved consul-ca.pem
-==> Saved consul-ca-key.pem
-```
-
-## Usage
-
-Usage: `consul tls ca create [filename-prefix] [options]`
-
-#### TLS CA Create Options
-
-- `-days=` - Provide number of days the CA is valid for from now on, defaults to 5 years.
diff --git a/website/pages/docs/connect/ca/consul.mdx b/website/pages/docs/connect/ca/consul.mdx
index 472b7242d3..ebc3e7f29b 100644
--- a/website/pages/docs/connect/ca/consul.mdx
+++ b/website/pages/docs/connect/ca/consul.mdx
@@ -69,7 +69,7 @@ currently integrate with Consul directly.
To view the current CA configuration, use the [Get CA Configuration endpoint](/api/connect/ca#get-ca-configuration):
-```bash
+```shell-session
$ curl localhost:8500/v1/connect/ca/configuration
{
"Provider": "consul",
@@ -98,7 +98,7 @@ example, we will set the URI SAN to `spiffe://36cb52cd-4058-f811-0432-6798a240c5
In order to use the Update CA Configuration HTTP endpoint, the private key and certificate
must be passed via JSON:
-```bash
+```shell-session
$ jq -n --arg key "$(cat root.key)" --arg cert "$(cat root.crt)" '
{
"Provider": "consul",
@@ -114,7 +114,7 @@ $ jq -n --arg key "$(cat root.key)" --arg cert "$(cat root.crt)" '
The resulting `ca_config.json` file can then be used to update the active root certificate:
-```bash
+```shell-session
$ cat ca_config.json
{
"Provider": "consul",
diff --git a/website/pages/docs/connect/ca/index.mdx b/website/pages/docs/connect/ca/index.mdx
index fd60353c14..5e91a0354e 100644
--- a/website/pages/docs/connect/ca/index.mdx
+++ b/website/pages/docs/connect/ca/index.mdx
@@ -52,7 +52,7 @@ When a cluster first initializes, this will only list one trusted root. Multiple
roots may appear as part of
[rotation](#).
-```bash
+```shell-session
$ curl http://localhost:8500/v1/connect/ca/roots
{
"ActiveRootID": "31:6c:06:fb:49:94:42:d5:e4:55:cc:2e:27:b3:b2:2e:96:67:3e:7e",
@@ -85,7 +85,7 @@ After initialization, the CA provider configuration can be viewed with the
Consul will filter sensitive values from this endpoint depending on the
provider in use, so the configuration may not be complete.
-```bash
+```shell-session
$ curl http://localhost:8500/v1/connect/ca/configuration
{
"Provider": "consul",
@@ -139,7 +139,7 @@ certificates are present, and the currently active root has an intermediate
certificate which has been generated and cross-signed automatically by the old
root during the rotation process:
-```bash
+```shell-session
$ curl localhost:8500/v1/connect/ca/roots
{
"ActiveRootID": "d2:2c:41:94:1e:50:04:ea:86:fc:08:d6:b0:45:a4:af:8a:eb:76:a0",
diff --git a/website/pages/docs/connect/configuration.mdx b/website/pages/docs/connect/configuration.mdx
index 48bc7aa286..1e501865ee 100644
--- a/website/pages/docs/connect/configuration.mdx
+++ b/website/pages/docs/connect/configuration.mdx
@@ -63,7 +63,7 @@ via API.
!> **Security note:** Enabling Connect is enough to try the feature but doesn't
automatically ensure complete security. Please read the [Connect production
-guide](https://learn.hashicorp.com/consul/developer-segmentation/connect-production) to understand the additional steps
+tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-production-checklist) to understand the additional steps
needed for a secure deployment.
## Centralized Proxy and Service Configuration
diff --git a/website/pages/docs/connect/connect-internals.mdx b/website/pages/docs/connect/connect-internals.mdx
index f151531a1e..ef4eb6a0b6 100644
--- a/website/pages/docs/connect/connect-internals.mdx
+++ b/website/pages/docs/connect/connect-internals.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Connect - Architecture
-sidebar_title: Architecture
+page_title: How Connect Works
+sidebar_title: How Connect Works
description: >-
This page details the internals of Consul Connect: mutual TLS, agent caching
and performance, intention and certificate authority replication.
@@ -15,9 +15,9 @@ but will help you build a mental model of what's going on under the hood, which
may help you reason about Connect's behavior in more complex deployment
scenarios.
-To try Connect locally, complete the [Getting Started with Consul service
-mesh](https://learn.hashicorp.com/consul/gs-consul-service-mesh/understand-consul-service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
-guide.
+To try Connect locally, complete the [Getting Started with Consul service
+mesh](https://learn.hashicorp.com/tutorials/consul/service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
+tutorial.
## Mutual Transport Layer Security (mTLS)
@@ -96,7 +96,7 @@ a long period of inactivity (3 days by default), the cache will empty itself.
Sidecar proxy's [upstream configuration](/docs/connect/registration/service-registration#upstream-configuration-reference)
may specify an alternative datacenter or a prepared query that can address services
-in multiple datacenters (such as the [geo failover](https://learn.hashicorp.com/consul/developer-discovery/geo-failover) pattern).
+in multiple datacenters (such as the [geo failover](https://learn.hashicorp.com/tutorials/consul/automate-geo-failover) pattern).
[Intentions](/docs/connect/intentions) verify connections between services by
source and destination name seamlessly across datacenters.
diff --git a/website/pages/docs/connect/connectivity-tasks.mdx b/website/pages/docs/connect/connectivity-tasks.mdx
new file mode 100644
index 0000000000..5dade726d9
--- /dev/null
+++ b/website/pages/docs/connect/connectivity-tasks.mdx
@@ -0,0 +1,68 @@
+---
+layout: docs
+page_title: Connectivity Tasks
+sidebar_title: Connectivity Tasks
+description: >-
+ Tasks related to connectivity into, out of, and between Consul service meshes.
+---
+
+# Connectivity Tasks
+
+~> **Note**: The features shown below are extensions of Consulβs service mesh capabilities. If you are not utilizing
+Consul service mesh then these features will not be relevant to your task.
+
+## Service-to-service traffic between Consul datacenters
+-> **1.6.0+:** This feature is available in Consul versions 1.6.0 and newer.
+
+Mesh gateways enable routing of service mesh traffic between different Consul datacenters. Those datacenters can reside
+in different clouds or runtime environments where general interconnectivity between all services in all datacenters
+isn't feasible. One scenario where this is useful is when connecting networks with overlapping IP address space.
+
+These gateways operate by sniffing the SNI header out of the mTLS connection and then routing the connection to the
+appropriate destination based on the server name requested. The data within the mTLS session is not decrypted by
+the Gateway.
+
+As of Consul 1.8.0, mesh gateways can also forward gossip and RPC traffic between Consul servers.
+This is enabled by [WAN federation via mesh gateways](/docs/connect/gateways/wan-federation-via-mesh-gateways).
+
+For more information about mesh gateways, review the [complete documentation](/docs/connect/gateways/mesh-gateway)
+and the [mesh gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-gateways).
+
+![Mesh Gateway Architecture](/img/mesh-gateways.png)
+
+## Traffic from outside the Consul service mesh to services in the mesh
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+
+Ingress gateways are an entrypoint for outside traffic. They enable potentially unauthenticated ingress traffic from
+services outside the Consul service mesh to services inside the service mesh.
+
+These gateways allow you to define what services should be exposed, on what port, and by what hostname. You configure
+an ingress gateway by defining a set of listeners that can map to different sets of backing services.
+
+Ingress gateways are tightly integrated with Consulβs L7 configuration and enable dynamic routing of HTTP requests by
+attributes like the request path.
+
+For more information about ingress gateways, review the [complete documentation](/docs/connect/gateways/ingress-gateway)
+and the [ingress gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-gateways).
+
+![Ingress Gateway Architecture](/img/ingress-gateways.png)
+
+## Traffic from services in the Consul service mesh to external services
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+
+Terminating gateways enable connectivity from services in the Consul service mesh to services outside the mesh.
+Services outside the mesh do not have sidecar proxies or are not [integrated natively](/docs/connect/native).
+These may be services running on legacy infrastructure or managed cloud services running on
+infrastructure you do not control.
+
+Terminating gateways effectively act as egress proxies that can represent one or more services. They terminate Connect
+mTLS connections, enforce Consul intentions, and forward requests to the appropriate destination.
+
+These gateways also simplify authorization from dynamic service addresses. Consulβs intentions determine whether
+connections through the gateway are authorized. Then traditional tools like firewalls or IAM roles can authorize the
+connections from the known gateway nodes to the destination services.
+
+For more information about terminating gateways, review the [complete documentation](/docs/connect/gateways/terminating-gateway)
+and the [terminating gateway tutorial](https://learn.hashicorp.com/tutorials/consul/teminating-gateways-connect-external-services).
+
+![Terminating Gateway Architecture](/img/terminating-gateways.png)
diff --git a/website/pages/docs/connect/dev.mdx b/website/pages/docs/connect/dev.mdx
index e684cd3352..86cbc75f46 100644
--- a/website/pages/docs/connect/dev.mdx
+++ b/website/pages/docs/connect/dev.mdx
@@ -30,7 +30,7 @@ we want to connect to via `psql`, but the only non-loopback listener is
via Connect. Let's also assume that we have an ACL token to identify as
`operator-mitchellh`. We can start a local proxy:
-```shell
+```shell-session
$ consul connect proxy \
-service operator-mitchellh \
-upstream postgresql:8181
@@ -39,12 +39,12 @@ $ consul connect proxy \
This works because the source `-service` does not need to be registered
in the local Consul catalog. However, to retrieve a valid identifying
certificate, the ACL token must have `service:write` permissions. This
-can be used as a sort of "virtual service" to represent people, too. In
+can be used as a sort of "debug service" to represent people, too. In
the example above, the proxy is identifying as `operator-mitchellh`.
With the proxy running, we can now use `psql` like normal:
-```
+```shell-session
$ psql -h 127.0.0.1 -p 8181 -U mitchellh mydb
>
```
@@ -63,7 +63,7 @@ For example, if you have an ACL token that allows `service:write` for
`web` and you want to connect to the `postgresql` service as "web", you
can start a proxy like so:
-```shell
+```shell-session
$ consul connect proxy \
-service web \
-upstream postgresql:8181
diff --git a/website/pages/docs/connect/gateways/index.mdx b/website/pages/docs/connect/gateways/index.mdx
new file mode 100644
index 0000000000..12eac440ed
--- /dev/null
+++ b/website/pages/docs/connect/gateways/index.mdx
@@ -0,0 +1,71 @@
+---
+layout: docs
+page_title: Gateways
+sidebar_title: Gateways
+description: >-
+ Gateways provide connectivity into, out of, and between Consul service meshes.
+---
+
+# Gateways
+
+Gateways provide connectivity into, out of, and between Consul service meshes.
+
+* Enable service-to-service traffic between Consul datacenters with [mesh gateways](#mesh-gateways).
+* Accept traffic from outside the Consul service mesh to services in the mesh with [ingress gateways](#ingress-gateways).
+* Route traffic from services in the Consul service mesh to external services with [terminating gateways](#terminating-gateways).
+
+## Mesh Gateways
+-> **1.6.0+:** This feature is available in Consul versions 1.6.0 and newer.
+
+Mesh gateways enable routing of service mesh traffic between different Consul datacenters. Those datacenters can reside
+in different clouds or runtime environments where general interconnectivity between all services in all datacenters
+isn't feasible. One scenario where this is useful is when connecting networks with overlapping IP address space.
+
+These gateways operate by sniffing the SNI header out of the mTLS connection and then routing the connection to the
+appropriate destination based on the server name requested. The data within the mTLS session is not decrypted by
+the Gateway.
+
+As of Consul 1.8.0, mesh gateways can also forward gossip and RPC traffic between Consul servers.
+This is enabled by [WAN federation via mesh gateways](/docs/connect/gateways/wan-federation-via-mesh-gateways).
+
+For more information about mesh gateways, review the [complete documentation](/docs/connect/gateways/mesh-gateway)
+and the [mesh gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-gateways).
+
+![Mesh Gateway Architecture](/img/mesh-gateways.png)
+
+## Ingress Gateways
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+
+Ingress gateways are an entrypoint for outside traffic. They enable potentially unauthenticated ingress traffic from
+services outside the Consul service mesh to services inside the service mesh.
+
+These gateways allow you to define what services should be exposed, on what port, and by what hostname. You configure
+an ingress gateway by defining a set of listeners that can map to different sets of backing services.
+
+Ingress gateways are tightly integrated with Consulβs L7 configuration and enable dynamic routing of HTTP requests by
+attributes like the request path.
+
+For more information about ingress gateways, review the [complete documentation](/docs/connect/gateways/ingress-gateway)
+and the [ingress gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-ingress-gateways).
+
+![Ingress Gateway Architecture](/img/ingress-gateways.png)
+
+## Terminating Gateways
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+
+Terminating gateways enable connectivity from services in the Consul service mesh to services outside the mesh.
+Services outside the mesh do not have sidecar proxies or are not [integrated natively](/docs/connect/native).
+These may be services running on legacy infrastructure or managed cloud services running on
+infrastructure you do not control.
+
+Terminating gateways effectively act as egress proxies that can represent one or more services. They terminate Connect
+mTLS connections, enforce Consul intentions, and forward requests to the appropriate destination.
+
+These gateways also simplify authorization from dynamic service addresses. Consulβs intentions determine whether
+connections through the gateway are authorized. Then traditional tools like firewalls or IAM roles can authorize the
+connections from the known gateway nodes to the destination services.
+
+For more information about terminating gateways, review the [complete documentation](/docs/connect/gateways/terminating-gateway)
+and the [terminating gateway tutorial](https://learn.hashicorp.com/tutorials/consul/teminating-gateways-connect-external-services).
+
+![Terminating Gateway Architecture](/img/terminating-gateways.png)
diff --git a/website/pages/docs/connect/ingress_gateway.mdx b/website/pages/docs/connect/gateways/ingress-gateway.mdx
similarity index 55%
rename from website/pages/docs/connect/ingress_gateway.mdx
rename to website/pages/docs/connect/gateways/ingress-gateway.mdx
index 099a7d9060..170a4f460b 100644
--- a/website/pages/docs/connect/ingress_gateway.mdx
+++ b/website/pages/docs/connect/gateways/ingress-gateway.mdx
@@ -1,16 +1,16 @@
---
layout: docs
-page_title: Connect - Ingress Gateways
-sidebar_title: Ingress Gateways Beta
+page_title: External <> Internal Services - Ingress Gateways
+sidebar_title: External <> Internal Services - Ingress Gateways
description: >-
An ingress gateway enables ingress traffic from services outside the Consul
service mesh to services inside the Consul service mesh. This section details
how to use Envoy and describes how you can plug in a gateway of your choice.
---
-# Ingress Gateways Beta
+# Ingress Gateways
--> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
Ingress gateways enable ingress traffic from services outside the Consul
service mesh to services inside the Consul service mesh. An ingress gateway is
@@ -22,23 +22,26 @@ exposed and on what port. You configure an ingress gateway by defining a set of
to a set of backing
[services](/docs/agent/config-entries/ingress-gateway#services).
-Depending on the
-[protocol](/docs/agent/config-entries/ingress-gateway#protocol) defined for a
-listener, multiple services can be specified for a single listener. In this
-case, the ingress gateway relies on host/authority headers to decide the
-service that should receive the traffic.
-
To enable easier service discovery, a new Consul [DNS
subdomain](/docs/agent/dns#ingress-service-lookups) is provided, on
`.ingress.`.
+For listeners with a
+[protocol](/docs/agent/config-entries/ingress-gateway#protocol) other than
+`tcp`, multiple services can be specified for a single listener. In this
+case, the ingress gateway relies on host/authority headers to decide the
+service that should receive the traffic. The host used to match traffic
+defaults to the [Consul DNS ingress
+subdomain](/docs/agent/dns#ingress-service-lookups), but can be changed using
+the [hosts](/docs/agent/config-entries/ingress-gateway#hosts) field.
+
![Ingress Gateway Architecture](/img/ingress-gateways.png)
## Prerequisites
Ingress gateways also require that your Consul datacenters are configured correctly:
-- You'll need to use Consul version 1.8.0.
+- You'll need to use Consul version 1.8.0 or newer.
- Consul [Connect](/docs/agent/options#connect) must be enabled on the datacenter's Consul servers.
- [gRPC](/docs/agent/options#grpc_port) must be enabled on all client agents.
@@ -46,24 +49,8 @@ Currently, [Envoy](https://www.envoyproxy.io/) is the only proxy with ingress ga
## Running and Using an Ingress Gateway
-You must complete the following steps to configure an ingress gateway to proxy traffic to services in the Consul service mesh:
-
-1. On a host with a Consul client agent, start an Envoy proxy using the [envoy
-subcommand](/docs/commands/connect/envoy), specifying the `ingress` gateway
-type:
- ```shell
- $ consul connect envoy -gateway=ingress -register -service ingress-service \
- -address '{{ GetInterfaceIP "eth0" }}:8888'
- ```
-
-2. Create and apply an `ingress-gateway` [configuration entry](/docs/agent/config-entries/ingress-gateway) that defines
-a set of listeners that expose the desired backing services. The config entry can be applied via the
-[CLI](/docs/commands/config/write) or [API](/api/config#apply-configuration).
-
-3. Ensure that [Consul intentions](/docs/commands/intention) are setup to allow connections from the ingress gateway to the backing services.
-
-4. **Optionally** use the `.ingress.` [DNS subdomain](/docs/agent/dns#ingress-service-lookups) to discover the ingress
-gateways for a service.
+For a complete example of how to allow external traffic inside your Consul service mesh,
+review the [ingress gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-ingress-gateways).
## Ingress Gateway Configuration
@@ -74,10 +61,12 @@ Connect proxy service, to define opaque configuration parameters useful for the
For Envoy there are some supported [gateway options](/docs/connect/proxies/envoy#gateway-options) as well as
[escape-hatch overrides](/docs/connect/proxies/envoy#escape-hatch-overrides).
--> **Note:** If ACLs are enabled, a token granting `service:write` for the gateway's service name
-and `service:read` for all services in the datacenter. These permissions authorize the token to route
-communications for other Connect services.
+-> **Note:** If ACLs are enabled, ingress gateways must be registered with a token granting `service:write` for the ingress gateway's service name,
+`service:read` for all services in the ingress gateway's configuration entry, and `node:read` for all nodes of the services
+in the ingress gateway's configuration entry. These privileges authorize the token to route communications to other Connect services.
+If the Consul client agent on the gateway's node is not configured to use the default gRPC port, 8502, then the gateway's token
+must also provide `agent:read` for its node's name in order to discover the agent's gRPC port. gRPC is used to expose Envoy's xDS API to Envoy proxies.
~> [Configuration entries](/docs/agent/config-entries) are global in scope. A configuration entry for a gateway name applies
- across all federated Consul datacenters. If ingress gateways in different Consul datacenters need to route to different
- sets of services within their datacenter then the ingress gateways **must** be registered with different names.
+across all federated Consul datacenters. If ingress gateways in different Consul datacenters need to route to different
+sets of services within their datacenter then the ingress gateways **must** be registered with different names.
diff --git a/website/pages/docs/connect/mesh_gateway.mdx b/website/pages/docs/connect/gateways/mesh-gateway/index.mdx
similarity index 95%
rename from website/pages/docs/connect/mesh_gateway.mdx
rename to website/pages/docs/connect/gateways/mesh-gateway/index.mdx
index c05652e01c..76ddb1ed76 100644
--- a/website/pages/docs/connect/mesh_gateway.mdx
+++ b/website/pages/docs/connect/gateways/mesh-gateway/index.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Connect - Mesh Gateways
-sidebar_title: Mesh Gateways
+page_title: Connect Datacenters - Mesh Gateways
+sidebar_title: Connect Datacenters - Mesh Gateways
description: >-
A Mesh Gateway enables better routing of a Connect service's data to upstreams
in other datacenters. This section details how to use Envoy and describes how
@@ -16,12 +16,12 @@ Mesh gateways enable routing of Connect traffic between different Consul datacen
can reside in different clouds or runtime environments where general interconnectivity between all services
in all datacenters isn't feasible. These gateways operate by sniffing the SNI header out of the Connect session
and then route the connection to the appropriate destination based on the server name requested. The data
-within the Connect session is not decrypted by the Gateway.
+within the mTLS session is not decrypted by the Gateway.
![Mesh Gateway Architecture](/img/mesh-gateways.png)
For a complete example of how to connect services across datacenters,
-review the [mesh gateway guide](https://learn.hashicorp.com/consul/developer-mesh/connect-gateways).
+review the [mesh gateway tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-gateways).
## Prerequisites
@@ -36,10 +36,10 @@ Mesh gateways also require that your Consul datacenters are configured correctly
- You'll need to use Consul version 1.6.0.
- Consul [Connect](/docs/agent/options#connect) must be enabled in both datacenters.
- Each of your [datacenters](/docs/agent/options#datacenter) must have a unique name.
-- Your datacenters must be [WAN joined](https://learn.hashicorp.com/consul/security-networking/datacenters).
+- Your datacenters must be [WAN joined](https://learn.hashicorp.com/tutorials/consul/federarion-gossip-wan).
- The [primary datacenter](/docs/agent/options#primary_datacenter) must be set to the same value in both datacenters. This specifies which datacenter is the authority for Connect certificates and is required for services in all datacenters to establish mutual TLS with each other.
- [gRPC](/docs/agent/options#grpc_port) must be enabled.
-- If you want to [enable gateways globally](/docs/connect/mesh_gateway#enabling-gateways-globally) you must enable [centralized configuration](/docs/agent/options#enable_central_service_config).
+- If you want to [enable gateways globally](/docs/connect/mesh-gateway#enabling-gateways-globally) you must enable [centralized configuration](/docs/agent/options#enable_central_service_config).
Currently, Envoy is the only proxy with mesh gateway capabilities in Consul.
diff --git a/website/pages/docs/connect/wan-federation-via-mesh-gateways.mdx b/website/pages/docs/connect/gateways/mesh-gateway/wan-federation-via-mesh-gateways.mdx
similarity index 86%
rename from website/pages/docs/connect/wan-federation-via-mesh-gateways.mdx
rename to website/pages/docs/connect/gateways/mesh-gateway/wan-federation-via-mesh-gateways.mdx
index 013b2c2661..e8d726ae6c 100644
--- a/website/pages/docs/connect/wan-federation-via-mesh-gateways.mdx
+++ b/website/pages/docs/connect/gateways/mesh-gateway/wan-federation-via-mesh-gateways.mdx
@@ -1,22 +1,22 @@
---
layout: docs
-page_title: Connect - WAN Federation via Mesh Gateways
-sidebar_title: WAN Federation via Mesh Gateways Beta
+page_title: WAN Federation via Mesh Gateways
+sidebar_title: WAN Federation
description: |-
WAN federation via mesh gateways allows for Consul servers in different datacenters to be federated exclusively through mesh gateways.
---
-# WAN Federation via Mesh Gateways Beta
+# WAN Federation via Mesh Gateways
--> **1.8.0+:** This feature is available in Consul versions 1.8.0 and higher
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and higher
-~> This topic requires familiarity with [mesh gateways](/docs/connect/mesh_gateway).
+~> This topic requires familiarity with [mesh gateways](/docs/connect/gateways/mesh-gateway).
WAN federation via mesh gateways allows for Consul servers in different datacenters
to be federated exclusively through mesh gateways.
When setting up a
-[multi-datacenter](https://learn.hashicorp.com/consul/security-networking/datacenters)
+[multi-datacenter](https://learn.hashicorp.com/tutorials/consul/federarion-gossip-wan)
Consul cluster, operators must ensure that all Consul servers in every
datacenter must be directly connectable over their WAN-advertised network
address from each other.
@@ -28,40 +28,39 @@ the WAN.
Sometimes this prerequisite is difficult or undesirable to meet:
-* **Difficult:** The datacenters may exist in multiple Kubernetes clusters that
+- **Difficult:** The datacenters may exist in multiple Kubernetes clusters that
unfortunately have overlapping pod IP subnets, or may exist in different
cloud provider VPCs that have overlapping subnets.
-* **Undesirable:** Network security teams may not approve of granting so many
+- **Undesirable:** Network security teams may not approve of granting so many
firewall rules. When using platform autoscaling, keeping rules up to date becomes untenable.
Operators looking to simplify their WAN deployment and minimize the exposed
security surface area can elect to join these datacenters together using [mesh
-gateways](/docs/connect/mesh_gateways.html) to do so.
+gateways](/docs/connect/gateways/mesh-gateway) to do so.
## Architecture
There are two main kinds of communication that occur over the WAN link spanning
the gulf between disparate Consul datacenters:
-* **WAN gossip:** We leverage the serf and memberlist libraries to gossip
+- **WAN gossip:** We leverage the serf and memberlist libraries to gossip
around failure detector knowledge about Consul servers in each datacenter.
By default this operates point to point between servers over `8302/udp` with
a fallback to `8302/tcp` (which logs a warning indicating the network is
misconfigured).
-* **Cross-datacenter RPCs:** Consul servers expose a special multiplexed port
+- **Cross-datacenter RPCs:** Consul servers expose a special multiplexed port
over `8300/tcp`. Several distinct kinds of messages can be received on this
port, such as RPC requests forwarded from servers in other datacenters.
-
In this network topology individual Consul client agents on a LAN in one
datacenter never need to directly dial servers in other datacenters. This
means you could introduce a set of firewall rules prohibiting `10.0.0.0/24`
from sending any traffic at all to `10.1.2.0/24` for security isolation.
You may already have configured [mesh
-gateways](https://learn.hashicorp.com/consul/developer-mesh/connect-gateways)
+gateways](https://learn.hashicorp.com/tutorials/consul/service-mesh-gateways)
to allow for services in the service mesh to freely connect between datacenters
regardless of the lateral connectivity of the nodes hosting the Consul client
agents.
@@ -80,8 +79,7 @@ these SAN fields:
server.. (normal)
.server.. (needed for wan federation)
-This can be achieved using any number of tools, including `consul tls cert
-create` with the `-node` flag.
+This can be achieved using any number of tools, including `consul tls cert create` with the `-node` flag.
### Mesh Gateways
@@ -101,7 +99,7 @@ each datacenter otherwise the WAN will become only partly connected.
There are a few necessary additional pieces of configuration beyond those
required for standing up a
-[multi-datacenter](https://learn.hashicorp.com/consul/security-networking/datacenters)
+[multi-datacenter](https://learn.hashicorp.com/tutorials/consul/federarion-gossip-wan)
Consul cluster.
Consul servers in the _primary_ datacenter should add this snippet to the
@@ -157,7 +155,6 @@ follow this general procedure:
resolve ACL tokens from the secondary, at which time it should be possible
to launch the mesh gateways in the secondary datacenter.
-
### Existing secondary
1. Upgrade to the desired version of the consul binary for all servers,
@@ -175,9 +172,9 @@ follow this general procedure:
From any two datacenters joined together double check the following give you an
expected result:
-* Check that `consul members -wan` lists all servers in all datacenters with
+- Check that `consul members -wan` lists all servers in all datacenters with
their _local_ ip addresses and are listed as `alive`.
-* Ensure any API request that activates datacenter request forwarding. such as
- [`/v1/catalog/services?dc=`](/api/catalog.html#dc-1)
+- Ensure any API request that activates datacenter request forwarding. such as
+ [`/v1/catalog/services?dc=`](/api/catalog#dc-1)
succeeds.
diff --git a/website/pages/docs/connect/terminating_gateway.mdx b/website/pages/docs/connect/gateways/terminating-gateway.mdx
similarity index 68%
rename from website/pages/docs/connect/terminating_gateway.mdx
rename to website/pages/docs/connect/gateways/terminating-gateway.mdx
index 247972676c..889dd1db97 100644
--- a/website/pages/docs/connect/terminating_gateway.mdx
+++ b/website/pages/docs/connect/gateways/terminating-gateway.mdx
@@ -1,25 +1,28 @@
---
layout: docs
-page_title: Connect - Terminating Gateways
-sidebar_title: Terminating Gateways Beta
+page_title: Internal <> External Services - Terminating Gateways
+sidebar_title: Internal <> External Services - Terminating Gateways
description: >-
A terminating gateway enables traffic from services in the Consul
service mesh to services outside the mesh. This section details
how to configure and run a terminating gateway.
---
-# Terminating Gateways Beta
+# Terminating Gateways
--> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
+-> **1.8.0+:** This feature is available in Consul versions 1.8.0 and newer.
-Terminating gateways enable connections from services in the Consul service mesh to
+Terminating gateways enable connectivity from services in the Consul service mesh to
services outside the mesh. These gateways effectively act as Connect proxies that can
represent more than one service. They terminate Connect mTLS connections, enforce intentions,
and forward requests to the appropriate destination.
![Terminating Gateway Architecture](/img/terminating-gateways.png)
-~> **Beta limitations:** Terminating Gateways currently do not support targeting service subsets with
+For additional use cases and usage patterns, review the tutorial for
+[understanding terminating gateways](https://learn.hashicorp.com/tutorials/consul/service-mesh-terminating-gateways).
+
+~> **Known limitations:** Terminating gateways currently do not support targeting service subsets with
[L7 configuration](/docs/connect/l7-traffic-management). They route to all instances of a service with no capabilities
for filtering by instance.
@@ -27,7 +30,7 @@ for filtering by instance.
~> We recommend that terminating gateways are not exposed to the WAN or open internet. This is because terminating gateways
hold certificates to decrypt Consul Connect traffic directed at them and may be configured with credentials to connect
-to linked services. Connections over the WAN or open internet should flow through [mesh gateways](/docs/connect/mesh_gateway)
+to linked services. Connections over the WAN or open internet should flow through [mesh gateways](/docs/connect/mesh-gateway)
whenever possible since they are not capable of decrypting traffic or connecting directly to services.
By specifying a path to a [CA file](/docs/agent/config-entries/terminating-gateway#cafile) connections
@@ -39,7 +42,12 @@ from the terminating gateway will be encrypted using mutual TLS authentication.
If none of these are provided, Consul will **only** encrypt connections to the gateway and not
from the gateway to the destination service.
--> **Note:** If certificates and keys are configured the terminating gateway will upgrade HTTP connections to TLS.
+When certificates for linked services are rotated, the gateway must be restarted to pick up the new certificates from disk.
+To avoid downtime, perform a rolling restart to reload the certificates. Registering multiple terminating gateway instances
+with the same [name](https://www.consul.io/docs/commands/connect/envoy#service) provides additional fault tolerance
+as well as the ability to perform rolling restarts.
+
+-> **Note:** If certificates and keys are configured the terminating gateway will upgrade HTTP connections to TLS.
Client applications can issue plain HTTP requests even when connecting to servers that require HTTPS.
## Prerequisites
@@ -51,7 +59,7 @@ Each terminating gateway needs:
Terminating gateways also require that your Consul datacenters are configured correctly:
-- You'll need to use Consul version 1.8.0.
+- You'll need to use Consul version 1.8.0 or newer.
- Consul [Connect](/docs/agent/options#connect) must be enabled on the datacenter's Consul servers.
- [gRPC](/docs/agent/options#grpc_port) must be enabled on all client agents.
@@ -70,25 +78,8 @@ a terminating gateway as long as they discover upstreams with the
## Running and Using a Terminating Gateway
-You must complete the following steps to configure a terminating gateway to proxy traffic from services in the Consul service mesh:
-
-1. On a host with a Consul client agent, start an Envoy proxy using the [envoy subcommand](/docs/commands/connect/envoy#terminating-gateways) and
-specifying the `terminating` gateway type:
- ```shell
- $ consul connect envoy -gateway=terminating -register -service us-west-gateway \
- -address '{{ GetInterfaceIP "eth0" }}:8443'
- ```
-
-2. Create and apply a `terminating-gateway` [configuration entry](/docs/agent/config-entries/terminating-gateway) that defines
-a set of services that the gateway will proxy traffic to. The config entry can be applied via the
-[CLI](/docs/commands/config/write) or [API](/api/config#apply-configuration).
-
-3. Ensure that [Consul intentions](/docs/commands/intention) are set up to allow connections from the source services in the mesh
-to the gateway's linked services. The intentions must reference the destination service's name and not the gateway itself.
-
-4. Ensure necessary [upstreams](/docs/connect/registration/service-registration#upstream-configuration-reference)
-have been added to service definitions of the source services in the Consul service mesh. Each source service that needs
-to connect to a service proxied by a terminating gateway will need to add the external service as an upstream destination.
+For a complete example of how to enable connections from services in the Consul service mesh to
+services outside the mesh, review the [terminating gateway tutorial](https://learn.hashicorp.com/tutorials/consul/teminating-gateways-connect-external-services).
## Terminating Gateway Configuration
@@ -99,12 +90,15 @@ Connect proxy service, to define opaque configuration parameters useful for the
For Envoy there are some supported [gateway options](/docs/connect/proxies/envoy#gateway-options) as well as
[escape-hatch overrides](/docs/connect/proxies/envoy#escape-hatch-overrides).
--> **Note:** If ACLs are enabled, the terminating gateways must be registered with a token granting `service:write`
-for the gateway's service name **and** all linked services. These privileges will authorize the gateway
-to terminate mTLS connections on behalf of the linked services.
+-> **Note:** If ACLs are enabled, terminating gateways must be registered with a token granting `node:read` on the nodes
+of all services in its configuration entry. The token must also grant `service:write` for the terminating gateway's service name **and**
+the names of all services in the terminating gateway's configuration entry. These privileges will authorize the gateway
+to terminate mTLS connections on behalf of the linked services and then route the traffic to its final destination.
+If the Consul client agent on the gateway's node is not configured to use the default gRPC port, 8502, then the gateway's token
+must also provide `agent:read` for its node's name in order to discover the agent's gRPC port. gRPC is used to expose Envoy's xDS API to Envoy proxies.
Linking services to a terminating gateway is done with a `terminating-gateway`
-[configuration entry](/docs/agent/config-entries/terminating-gateway). This config entry can be applied via the
+[configuration entry](/docs/agent/config-entries/terminating-gateway). This config entry can be applied via the
[CLI](/docs/commands/config/write) or [API](/api/config#apply-configuration).
Gateways with the same name in Consul's service catalog are configured with a single configuration entry.
@@ -114,8 +108,8 @@ Adding replicas of a gateway that routes to a particular set of services require
the same gateway name with the `service` flag.
~> [Configuration entries](/docs/agent/config-entries) are global in scope. A configuration entry for a gateway name applies
- across all federated Consul datacenters. If terminating gateways in different Consul datacenters need to route to different
- sets of services within their datacenter then the terminating gateways **must** be registered with different names.
+across all federated Consul datacenters. If terminating gateways in different Consul datacenters need to route to different
+sets of services within their datacenter then the terminating gateways **must** be registered with different names.
The services that the terminating gateway will proxy for must be registered with Consul, even the services outside the mesh. They must also be registered
in the same Consul datacenter as the terminating gateway. Otherwise the terminating gateway will not be able to
@@ -125,9 +119,9 @@ by sending the registration request to a client or server agent on a different h
All services registered in the Consul catalog must be associated with a node, even when their node is
not managed by a Consul client agent. All agent-less services with the same address can be registered under the same node name and address.
-However, ensure that the [node name](/api/catalog.html#node) for external services registered directly in the catalog
+However, ensure that the [node name](/api/catalog#node) for external services registered directly in the catalog
does not match the node name of any Consul client agent node. If the node name overlaps with the node name of a Consul client agent,
Consul's [anti-entropy sync](/docs/internals/anti-entropy) will delete the services registered via the `/catalog/register` HTTP API endpoint.
For a complete example of how to register external services review the
-[external services guide](https://learn.hashicorp.com/consul/developer-discovery/external).
+[external services tutorial](https://learn.hashicorp.com/tutorials/consul/service-registration-external-services).
diff --git a/website/pages/docs/connect/index.mdx b/website/pages/docs/connect/index.mdx
index 6062a35ed7..b8abf9f3cd 100644
--- a/website/pages/docs/connect/index.mdx
+++ b/website/pages/docs/connect/index.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Connect (Service Segmentation)
-sidebar_title: Connect - Service Mesh
+page_title: Service Mesh
+sidebar_title: Service Mesh
description: |-
Consul Connect provides service-to-service connection authorization and
encryption using mutual TLS.
@@ -53,22 +53,22 @@ applications can also send open tracing data through Envoy.
There are several ways to try Connect in different environments.
-- The [Getting Started with Consul Service Mesh track](https://learn.hashicorp.com/consul/gs-consul-service-mesh/understand-consul-service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
+- The [Getting Started with Consul Service Mesh collection](https://learn.hashicorp.com/tutorials/consul/service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
walks you through installing Consul as service mesh for Kubernetes using the Helm
chart, deploying services in the service mesh, and using intentions to secure service
communications.
-- The [Secure Service-to-Service Communication guide](https://learn.hashicorp.com/consul/developer-mesh/connect-services?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
+- The [Secure Service-to-Service Communication tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-with-envoy-proxy?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
is a simple walk through of connecting two services on your local machine
using Consul Connect's built-in proxy and configuring your first intention. The guide also includes an introduction to
using Envoy as the Connect sidecar proxy.
-- The [Kubernetes guide](https://learn.hashicorp.com/consul/getting-started-k8s/minikube?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
+- The [Kubernetes tutorial](https://learn.hashicorp.com/tutorials/consul/kubernetes-minikube?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
walks you through configuring Consul Connect in Kubernetes using the Helm
chart, and using intentions. You can run the guide on Minikube or an existing
Kubernetes cluster.
-- The [observability guide](https://learn.hashicorp.com/consul/kubernetes/l7-observability-k8s?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
+- The [observability tutorial](https://learn.hashicorp.com/tutorials/consul/kubernetes-layer7-observability?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS)
shows how to deploy a basic metrics collection and visualization pipeline on
a Minikube or Kubernetes cluster using the official Helm charts for Consul,
Prometheus, and Grafana.
diff --git a/website/pages/docs/connect/intentions.mdx b/website/pages/docs/connect/intentions.mdx
index e971a1f26b..a2c46cf264 100644
--- a/website/pages/docs/connect/intentions.mdx
+++ b/website/pages/docs/connect/intentions.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Connect - Intentions
-sidebar_title: Intentions - Security Policies
+page_title: Service-to-service permissions - Intentions
+sidebar_title: Service-to-service permissions - Intentions
description: >-
Intentions define access control for services via Connect and are used to
control which services may establish connections. Intentions can be managed
@@ -17,12 +17,12 @@ managed via the API, CLI, or UI.
Intentions are enforced by the [proxy](/docs/connect/proxies)
or [natively integrated application](/docs/connect/native) on
inbound connections. After verifying the TLS client certificate, the
-[authorize API endpoint](#) is called which verifies the connection
+[authorize API endpoint](/api-docs/agent/connect#authorize) is called which verifies the connection
is allowed by testing the intentions. If authorize returns false the
connection must be terminated.
The default intention behavior is defined by the default
-[ACL policy](https://learn.hashicorp.com/consul/security-networking/production-acls). If the default ACL policy is "allow all",
+[ACL policy](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production). If the default ACL policy is "allow all",
then all Connect connections are allowed by default. If the default ACL policy
is "deny all", then all Connect connections are denied by default.
@@ -35,7 +35,7 @@ Below is an example of a basic intention to show the basic attributes
of an intention. The full data model of an intention can be found in the
[API documentation](#).
-```
+```shell-session
$ consul intention create -deny web db
Created: web => db (deny)
```
@@ -54,7 +54,7 @@ the near term roadmap for Consul.
An intention source or destination may also be the special wildcard
value `*`. This matches _any_ value and is used as a catch-all. Example:
-```
+```shell-session
$ consul intention create -deny web '*'
Created: web => * (deny)
```
@@ -67,7 +67,7 @@ Arbitrary string key/value data may be associated with intentions. This
is unused by Consul but can be used by external systems or for visibility
in the UI.
-```shell
+```shell-session
$ consul intention create \
-deny \
-meta description='Hello there' \
@@ -122,7 +122,7 @@ the table with a `*` for either the source namespace or destination namespace ar
## Intention Management Permissions
-Intention management can be protected by [ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+Intention management can be protected by [ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Permissions for intentions are _destination-oriented_, meaning the ACLs
for managing intentions are looked up based on the destination value
of the intention, not the source.
diff --git a/website/pages/docs/internals/discovery-chain.mdx b/website/pages/docs/connect/l7-traffic/discovery-chain.mdx
similarity index 99%
rename from website/pages/docs/internals/discovery-chain.mdx
rename to website/pages/docs/connect/l7-traffic/discovery-chain.mdx
index 8aeeda47f7..9c0ec3bb88 100644
--- a/website/pages/docs/internals/discovery-chain.mdx
+++ b/website/pages/docs/connect/l7-traffic/discovery-chain.mdx
@@ -216,7 +216,7 @@ A single node in the compiled discovery chain.
be considered healthy.
- `MeshGateway` `(MeshGatewayConfig)` - The [mesh gateway
- configuration](/docs/connect/mesh_gateway#connect-proxy-configuration)
+ configuration](/docs/connect/mesh-gateway#connect-proxy-configuration)
to use when connecting to this target's service instances.
- `Mode` `(string: "")` - One of `none`, `local`, or `remote`.
diff --git a/website/pages/docs/connect/l7-traffic-management.mdx b/website/pages/docs/connect/l7-traffic/index.mdx
similarity index 100%
rename from website/pages/docs/connect/l7-traffic-management.mdx
rename to website/pages/docs/connect/l7-traffic/index.mdx
diff --git a/website/pages/docs/connect/observability.mdx b/website/pages/docs/connect/observability.mdx
index b5f5772188..de40770f77 100644
--- a/website/pages/docs/connect/observability.mdx
+++ b/website/pages/docs/connect/observability.mdx
@@ -27,7 +27,7 @@ configuration](/docs/agent/options#enable_central_service_config).
If you
are using Kubernetes, the Helm chart can simplify much of the necessary
configuration, which you can learn about in the [observability
-guide](https://learn.hashicorp.com/consul/kubernetes/l7-observability-k8s).
+tutorial](https://learn.hashicorp.com/tutorials/consul/kubernetes-layer7-observability).
### Metrics Destination
diff --git a/website/pages/docs/connect/proxies/built-in.mdx b/website/pages/docs/connect/proxies/built-in.mdx
index c5cfc0c412..f48b3e8cfb 100644
--- a/website/pages/docs/connect/proxies/built-in.mdx
+++ b/website/pages/docs/connect/proxies/built-in.mdx
@@ -14,7 +14,7 @@ Connect.
## Getting Started
-To get started with the built-in proxy and see a working example you can follow the [Getting Started](https://learn.hashicorp.com/consul/getting-started/connect) guide.
+To get started with the built-in proxy and see a working example you can follow the [Getting Started](https://learn.hashicorp.com/tutorials/consul/get-started-service-networking) tutorial.
## Proxy Config Key Reference
@@ -53,34 +53,29 @@ for the built-in proxy.
All fields are optional with a sane default.
--
- `bind_address` - The address the proxy will bind it's
+- `bind_address` - The address the proxy will bind it's
_public_ mTLS listener to. It defaults to the same address the agent binds to.
--
- `bind_port` - The port the proxy will bind it's _public_
+- `bind_port` - The port the proxy will bind it's _public_
mTLS listener to. If not provided, the agent will attempt to assign one from its
- [configured proxy port range](/docs/agent/options#proxy_min_port) if available.
+ [configured proxy port range](/docs/agent/options#sidecar_min_port) if available.
By default the range is [20000, 20255] and the port is selected at random from
that range.
--
- `tcp_check_address` - The address the agent will
+- `tcp_check_address` - The address the agent will
run a [TCP health check](/docs/agent/checks) against. By default this is the same
- as the proxy's [bind address](#bind_address) except if the bind*address is `0.0.0.0`
+ as the proxy's [bind address](#bind_address) except if the bind address is `0.0.0.0`
or `[::]` in which case this defaults to `127.0.0.1` and assumes the agent can
dial the proxy over loopback. For more complex configurations where agent and proxy
communicate over a bridge for example, this configuration can be used to specify
- a different \_address* (but not port) for the agent to use for health checks if
+ a different _address_ (but not port) for the agent to use for health checks if
it can't talk to the proxy over localhost or it's publicly advertised port. The
check always uses the same port that the proxy is bound to.
--
- `disable_tcp_check` - If true, this disables a
+- `disable_tcp_check` - If true, this disables a
TCP check being setup for the proxy. Default is false.
--
- `local_service_address` - The `[address]:port`
+- `local_service_address`- The `[address]:port`
that the proxy should use to connect to the local application instance. By default
it assumes `127.0.0.1` as the address and takes the port from the service definition's
`port` field. Note that allowing the application to listen on any non-loopback
@@ -89,18 +84,15 @@ All fields are optional with a sane default.
known-private IP is available for example when using internal networking between
containers.
--
- `local_connect_timeout_ms` - The number
+- `local_connect_timeout_ms` - The number
of milliseconds the proxy will wait to establish a connection to the _local application_
before giving up. Defaults to `1000` or 1 second.
--
- `handshake_timeout_ms` - The number of milliseconds
+- `handshake_timeout_ms` - The number of milliseconds
the proxy will wait for _incoming_ mTLS connections to complete the TLS handshake.
Defaults to `10000` or 10 seconds.
--
- `upstreams` - **Deprecated** Upstreams are now specified
+- `upstreams`- **Deprecated** Upstreams are now specified
in the `connect.proxy` definition. Upstreams specified in the opaque config map
here will continue to work for compatibility but it's strongly recommended that
you move to using the higher level [upstream configuration](/docs/connect/registration/service-registration#upstream-configuration-reference).
@@ -109,7 +101,6 @@ All fields are optional with a sane default.
All fields are optional with a sane default.
--
- `connect_timeout_ms` - The number of milliseconds
+- `connect_timeout_ms` - The number of milliseconds
the proxy will wait to establish a TLS connection to the discovered upstream instance
before giving up. Defaults to `10000` or 10 seconds.
diff --git a/website/pages/docs/connect/proxies/envoy.mdx b/website/pages/docs/connect/proxies/envoy.mdx
index 3b407f197d..4b6ec8e80c 100644
--- a/website/pages/docs/connect/proxies/envoy.mdx
+++ b/website/pages/docs/connect/proxies/envoy.mdx
@@ -35,7 +35,7 @@ compatible Envoy versions.
| Consul Version | Compatible Envoy Versions |
| ------------------- | -------------------------------- |
-| 1.8.x | 1.14.2, 1.13.2, 1.12.4, 1.11.2 |
+| 1.8.x | 1.14.4, 1.13.4, 1.12.6, 1.11.2 |
| 1.7.x | 1.13.1, 1.12.3, 1.11.2, 1.10.0\* |
| 1.5.2, 1.5.3, 1.6.x | 1.11.1, 1.10.0, 1.9.1, 1.8.0β |
| 1.5.0, 1.5.1 | 1.9.1, 1.8.0β |
@@ -52,7 +52,7 @@ recent supported Envoy for your Consul version where possible.
\* Envoy
## Getting Started
To get started with Envoy and see a working example you can follow the [Using
-Envoy with Connect](https://learn.hashicorp.com/consul/developer-segmentation/connect-envoy) guide.
+Envoy with Connect](https://learn.hashicorp.com/tutorials/consul/service-mesh-with-envoy-proxy) tutorial.
## Configuration
@@ -287,7 +287,6 @@ definition](/docs/connect/registration/service-registration) or
- `max_failures` - The number of consecutive failures which cause a host to be
removed from the load balancer.
-
### Gateway Options
These fields may also be overridden explicitly in the [proxy service
@@ -319,7 +318,7 @@ will continue to be supported.
- `envoy_gateway_no_default_bind` - Prevents binding to the default address
of the gateway service. This should be used with one of the other options
to configure the gateway's bind addresses.
-
+
- `envoy_dns_discovery_type` - Determines how Envoy will resolve hostnames. Defaults to `LOGICAL_DNS`.
Must be one of `STRICT_DNS` or `LOGICAL_DNS`. Details for each type are available in
the [Envoy documentation](https://www.envoyproxy.io/docs/envoy/v1.14.1/intro/arch_overview/upstream/service_discovery).
diff --git a/website/pages/docs/connect/proxies/managed-deprecated.mdx b/website/pages/docs/connect/proxies/managed-deprecated.mdx
index 7f3e3ecfd1..c5d704ae39 100644
--- a/website/pages/docs/connect/proxies/managed-deprecated.mdx
+++ b/website/pages/docs/connect/proxies/managed-deprecated.mdx
@@ -79,7 +79,7 @@ via agent configuration files. They _cannot_ be registered via the HTTP API.
And 2.) Managed proxies are not started at all if Consul is running as root.
Both of these default configurations help prevent arbitrary process
execution or privilege escalation. This behavior can be configured
-[per-agent](/docs/agent/options#connect_proxy).
+[per-agent](/docs/agent/options).
### Lifecycle
@@ -172,7 +172,7 @@ passed to the proxy instance.
For full details of the additional configurable options available when using the
built-in proxy see the [built-in proxy configuration
-reference](/docs/connect/configuration#built-in-proxy-options).
+reference](/docs/connect/configuration).
### Prepared Query Upstreams
@@ -209,7 +209,7 @@ service.
For full details of the additional configurable options available when using the
built-in proxy see the [built-in proxy configuration
-reference](/docs/connect/configuration#built-in-proxy-options).
+reference](/docs/connect/configuration).
### Custom Managed Proxy
@@ -260,7 +260,7 @@ proxy command will use `my-proxy` instead of the default built-in proxy.
The `config` key is an optional opaque JSON object which will be passed through
to the proxy via the proxy configuration endpoint to allow any configuration
options the proxy needs to be specified. See the [built-in proxy
-configuration reference](/docs/connect/configuration#built-in-proxy-options)
+configuration reference](/docs/connect/configuration)
for details of config options that can be passed when using the built-in proxy.
### Managed Proxy Logs
diff --git a/website/pages/docs/connect/registration/service-registration.mdx b/website/pages/docs/connect/registration/service-registration.mdx
index b6b323e8db..ba71cdf27d 100644
--- a/website/pages/docs/connect/registration/service-registration.mdx
+++ b/website/pages/docs/connect/registration/service-registration.mdx
@@ -171,6 +171,8 @@ followed by documentation for each attribute.
- `destination_name` `(string: )` - Specifies the name of the service
or prepared query to route connect to. The prepared query should be the name
or the ID of the prepared query.
+- `destination_namespace` `(string: "")` -
+ Specifies the namespace of the upstream service.
- `local_bind_port` `(int: )` - Specifies the port to bind a local
listener to for the application to make outbound connections to this upstream.
- `local_bind_address` `(string: "")` - Specifies the address to bind a
diff --git a/website/pages/docs/connect/registration/sidecar-service.mdx b/website/pages/docs/connect/registration/sidecar-service.mdx
index 6565a7bfa7..23f0fac765 100644
--- a/website/pages/docs/connect/registration/sidecar-service.mdx
+++ b/website/pages/docs/connect/registration/sidecar-service.mdx
@@ -18,7 +18,7 @@ instance, Consul 1.3 introduced a new field in the Connect block of the [service
definition](/docs/agent/services).
To deploy a service and sidecar proxy locally, complete the
-[Getting Started guide](https://learn.hashicorp.com/consul/getting-started/connect?utm_source=consul.io&utm_medium=docs).
+[Getting Started guide](https://learn.hashicorp.com/tutorials/consul/get-started-service-networking?utm_source=consul.io&utm_medium=docs).
The `connect.sidecar_service` field is a complete nested service definition on
which almost any regular service definition field can be set. The exceptions are
diff --git a/website/pages/docs/connect/security.mdx b/website/pages/docs/connect/security.mdx
index d2cb569282..a92d8b060a 100644
--- a/website/pages/docs/connect/security.mdx
+++ b/website/pages/docs/connect/security.mdx
@@ -13,9 +13,9 @@ description: |-
Connect enables secure service-to-service communication over mutual TLS. This
provides both in-transit data encryption as well as authorization. This page
will document how to secure Connect. To try Connect locally, complete the
-[Getting Started guide](https://learn.hashicorp.com/consul/gs-consul-service-mesh/understand-consul-service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) or for a full security model reference,
-see the dedicated [Consul security model](/docs/internals/security.html) page. When
-setting up Connect in production, review this [guide](https://learn.hashicorp.com/consul/developer-mesh/connect-production?utm_source=consul.io&utm_medium=docs).
+[Getting Started guide](https://learn.hashicorp.com/tutorials/consul/service-mesh?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) or for a full security model reference,
+see the dedicated [Consul security model](/docs/internals/security) page. When
+setting up Connect in production, review this [tutorial](https://learn.hashicorp.com/tutorials/consul/service-mesh-production-checklist?utm_source=consul.io&utm_medium=docs).
Connect will function in any Consul configuration. However, unless the checklist
below is satisfied, Connect is not providing the security guarantees it was
@@ -37,7 +37,7 @@ configuration also forces all service-to-service communication to be explicitly
allowed via an allow [intention](/docs/connect/intentions).
To learn how to enable ACLs, please see the
-[guide on ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[tutorial on ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
**If ACLs are enabled but are in default allow mode**, then services will be
able to communicate by default. Additionally, if a proper anonymous token
diff --git a/website/pages/docs/agent/checks.mdx b/website/pages/docs/discovery/checks.mdx
similarity index 98%
rename from website/pages/docs/agent/checks.mdx
rename to website/pages/docs/discovery/checks.mdx
index 57a82025a7..6e114b95ff 100644
--- a/website/pages/docs/agent/checks.mdx
+++ b/website/pages/docs/discovery/checks.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Check Definition
-sidebar_title: Check Definitions
+page_title: Monitor Services - Check Definitions
+sidebar_title: Monitor Services - Check Definitions
description: >-
One of the primary roles of the agent is management of system- and
application-level health checks. A health check is considered to be
@@ -14,7 +14,7 @@ description: >-
One of the primary roles of the agent is management of system-level and application-level health
checks. A health check is considered to be application-level if it is associated with a
service. If not associated with a service, the check monitors the health of the entire node.
-Review the [health checks guide](https://learn.hashicorp.com/consul/developer-discovery/health-checks) to get a more complete example on how to leverage health check capabilities in Consul.
+Review the [health checks tutorial](https://learn.hashicorp.com/tutorials/consul/service-registration-health-checks) to get a more complete example on how to leverage health check capabilities in Consul.
A check is defined in a configuration file or added at runtime over the HTTP interface. Checks
created via the HTTP interface persist with that node.
diff --git a/website/pages/docs/agent/dns.mdx b/website/pages/docs/discovery/dns.mdx
similarity index 96%
rename from website/pages/docs/agent/dns.mdx
rename to website/pages/docs/discovery/dns.mdx
index 315e08e49d..08759d78f6 100644
--- a/website/pages/docs/agent/dns.mdx
+++ b/website/pages/docs/discovery/dns.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: DNS Interface
-sidebar_title: DNS Interface
+page_title: Find Services - DNS Interface
+sidebar_title: Find Services - DNS Interface
description: >-
One of the primary query interfaces for Consul is DNS. The DNS interface
allows applications to make use of service discovery without any high-touch
@@ -36,11 +36,11 @@ as the DNS server for a node and provide a
[`recursors`](/docs/agent/options#recursors) configuration so that non-Consul queries
can also be resolved. The last method is to forward all queries for the "consul."
domain to a Consul agent from the existing DNS server. Review the
-[DNS Forwarding guide](https://learn.hashicorp.com/consul/security-networking/forwarding?utm_source=consul.io&utm_medium=docs) for examples.
+[DNS Forwarding tutorial](https://learn.hashicorp.com/tutorials/consul/dns-forwarding?utm_source=consul.io&utm_medium=docs) for examples.
You can experiment with Consul's DNS server on the command line using tools such as `dig`:
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 redis.service.dc1.consul. ANY
```
@@ -68,7 +68,7 @@ For a node lookup, the only records returned are A and AAAA records
containing the IP address, and TXT records containing the
`node_meta` values of the node.
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 foo.node.consul ANY
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 foo.node.consul ANY
@@ -146,7 +146,7 @@ provide the port that a service is registered on, enabling clients to avoid rely
on well-known ports. SRV records are only served if the client specifically requests
them, like so:
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul SRV
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul ANY
@@ -185,7 +185,7 @@ of the RFC style lookup is the same as the standard style of lookup.
If you registered the service `rabbitmq` on port 5672 and tagged it with `amqp`,
you could make an RFC 2782 query for its SRV record as `_rabbitmq._amqp.service.consul`:
-```text
+```shell-session
$ dig @127.0.0.1 -p 8600 _rabbitmq._amqp.service.consul SRV
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 _rabbitmq._amqp.service.consul ANY
@@ -264,7 +264,7 @@ To find ingress-enabled services:
.ingress.
```
-This will find all [ingress gateway](/docs/connect/ingress_gateway)
+This will find all [ingress gateway](/docs/connect/ingress-gateway)
endpoints for the given `service`.
This endpoint currently only finds services within the same datacenter
@@ -283,8 +283,8 @@ are not truncated.
By default, all DNS results served by Consul set a 0 TTL value. This disables
caching of DNS results. However, there are many situations in which caching is
-desirable for performance and scalability. This is discussed more in the guide
-for [DNS caching](https://learn.hashicorp.com/consul/security-networking/dns-caching).
+desirable for performance and scalability. This is discussed more in the tutorial
+for [DNS caching](https://learn.hashicorp.com/tutorials/consul/dns-caching).
## WAN Address Translation
diff --git a/website/pages/docs/agent/services.mdx b/website/pages/docs/discovery/services.mdx
similarity index 97%
rename from website/pages/docs/agent/services.mdx
rename to website/pages/docs/discovery/services.mdx
index 473df1e565..41ec55d2aa 100644
--- a/website/pages/docs/agent/services.mdx
+++ b/website/pages/docs/discovery/services.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Service Definition
-sidebar_title: Service Definitions
+page_title: Register Services - Service Definitions
+sidebar_title: Register Services - Service Definitions
description: >-
One of the main goals of service discovery is to provide a catalog of
available services. To that end, the agent provides a simple service
@@ -20,7 +20,7 @@ a health check. A health check is considered to be application level if it is
associated with a service. A service is defined in a configuration file
or added at runtime over the HTTP interface.
-Use the [Getting Started guides](https://learn.hashicorp.com/consul/getting-started/services?utm_source=consul.io&utm_medium=docs) to get hands-on experience registering a simple service with a health check on your local machine.
+Use the [Getting Started tutorials](https://learn.hashicorp.com/tutorials/consul/get-started-service-discovery?utm_source=consul.io&utm_medium=docs) to get hands-on experience registering a simple service with a health check on your local machine.
## Service Definition
@@ -199,9 +199,9 @@ for the available configuration options.
The `kind` field is used to optionally identify the service as a [Connect
proxy](/docs/connect/proxies) instance. This value may be "connect-proxy" for
[Connect-capable](/docs/connect) proxies representing another service,
-"mesh-gateway" for instances of a [mesh gateway](/docs/connect/mesh_gateway),
-"terminating-gateway" for instances of a [terminating gateway](/docs/connect/terminating_gateway),
-or "ingress-gateway" for instances of a [ingress gateway](/docs/connect/ingress_gateway).
+"mesh-gateway" for instances of a [mesh gateway](/docs/connect/mesh-gateway),
+"terminating-gateway" for instances of a [terminating gateway](/docs/connect/terminating-gateway),
+or "ingress-gateway" for instances of a [ingress gateway](/docs/connect/ingress-gateway).
For typical non-proxy instances the `kind` field must be omitted. The `proxy` field
is also required for Connect proxy registrations and is only valid if `kind` is
`connect-proxy`. The only required `proxy` field for a `connect-proxy` is `destination_service_name`.
diff --git a/website/pages/downloads_tools/index.mdx b/website/pages/docs/download-tools.mdx
similarity index 95%
rename from website/pages/downloads_tools/index.mdx
rename to website/pages/docs/download-tools.mdx
index bb6848f63b..cf3785972b 100644
--- a/website/pages/downloads_tools/index.mdx
+++ b/website/pages/docs/download-tools.mdx
@@ -1,6 +1,7 @@
---
-layout: index
-page_title: Download Consul Tools
+layout: docs
+page_title: Consul Tools
+sidebar_title: Consul Tools
description: |-
From this page you can download various tools for Consul. These tools are
maintained by HashiCorp and the Consul Community.
@@ -17,7 +18,7 @@ These Consul tools are created and managed by the dedicated engineers at HashiCo
- [Envconsul](https://github.com/hashicorp/envconsul) - Read and set environmental variables for processes from Consul.
- [Consul Migrate](https://github.com/hashicorp/consul-migrate) - Data migration tool to handle Consul upgrades to 0.5.1+
- [Consul Replicate](https://github.com/hashicorp/consul-replicate) - Consul cross-DC KV replication daemon.
-- [Consul Template](https://github.com/hashicorp/consul-template) - Generic template rendering and notifications with Consul. A step by step tutorial is at [HashiCorp Learn](https://learn.hashicorp.com/consul/developer-configuration/consul-template).
+- [Consul Template](https://github.com/hashicorp/consul-template) - Generic template rendering and notifications with Consul. A step by step tutorial is available on [HashiCorp Learn](https://learn.hashicorp.com/tutorials/consul/consul-template).
## Community Tools
@@ -45,6 +46,7 @@ These Consul tools are created and managed by the amazing members of the Consul
- [file2consul](https://github.com/joeatbayes/file2consul) - Update Consul values from git or files. Config loader with support for multiple environments. Provides variable expansion, interpolation, inheritance with overrides and ability to update multiple consul servers. Reduces cost of maintaining larger configuration sets between environments by reducing restatement and manual editing of similar or predictably changing config properties. MIT license, Written in GO.
- [Flightpath](https://docs.flightpath.xyz/) - An xDS server that can configure Envoy to act as an Edge proxy for Consul Connect enabled services
- [git2consul](https://github.com/ryanbreen/git2consul) - Mirror the contents of a Git repository into Consul KVs
+- [gobetween](https://github.com/yyyar/gobetween) - Modern & minimalistic load balancer and reverse-proxy for the βοΈ Cloud era.
- [Gonsul](https://github.com/miniclip/gonsul) - A Git to Consul standalone tool made in Go. Updates Consul KV from a repo with multiple strategies.
- [gradle-consul-plugin](https://github.com/amirkibbar/red-apple) - A Consul Gradle plugin
- [hashi-ui](https://github.com/jippi/hashi-ui) - A modern user interface for the Consul and Nomad
diff --git a/website/pages/docs/agent/kv.mdx b/website/pages/docs/dynamic-app-config/kv.mdx
similarity index 83%
rename from website/pages/docs/agent/kv.mdx
rename to website/pages/docs/dynamic-app-config/kv.mdx
index 7f773e50fa..18b5f44006 100644
--- a/website/pages/docs/agent/kv.mdx
+++ b/website/pages/docs/dynamic-app-config/kv.mdx
@@ -23,7 +23,7 @@ Having a quorum of servers will decrease the risk of data loss if an outage
occurs.
If you have not used Consul KV, check out this [Getting Started
-guide](https://learn.hashicorp.com/consul/getting-started/kv?utm_source=consul.io&utm_medium=docs) on HashiCorp
+tutorial](https://learn.hashicorp.com/tutorials/consul/get-started-key-value-store?utm_source=consul.io&utm_medium=docs) on HashiCorp
Learn.
## Accessing the KV store
@@ -31,7 +31,7 @@ Learn.
The KV store can be accessed by the [consul kv CLI
subcommands](/docs/commands/kv), [HTTP API](/api/kv), and Consul UI.
To restrict access, enable and configure
-[ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls).
+[ACLs](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
Once the ACL system has been bootstrapped, users and services, will need a
valid token with KV [privileges](/docs/agent/acl-rules#key-value-rules) to
access the the data store, this includes even reads. We recommend creating a
@@ -49,7 +49,8 @@ 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](/docs/commands/snapshot/restore) are usually sufficient.
+recommendations](/docs/agent/options#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
@@ -67,8 +68,8 @@ using the API and in shell scripts.
If you plan to use Consul KV as part of your configuration management process
review the [Consul
-Template](https://learn.hashicorp.com/consul/developer-configuration/consul-template)
-guide on how to update configuration based on value updates in the KV. Consul
+Template](https://learn.hashicorp.com/tutorials/consul/consul-template)
+tutorial on how to update configuration based on value updates in the KV. Consul
Template is based on Go Templates and allows for a series of scripted actions
to be initiated on value changes to a Consul key.
@@ -89,10 +90,10 @@ increment to the `LockIndex` and the session value is updated to reflect the
session holding the lock. Review the session documentation for more information
on the [integration](/docs/internals/sessions#k-v-integration).
-Review the following guides to learn how to use Consul sessions for [application leader election](https://learn.hashicorp.com/consul/developer-configuration/elections) and
-to [build distributed semaphores](https://learn.hashicorp.com/consul/developer-configuration/semaphore).
+Review the following tutorials to learn how to use Consul sessions for [application leader election](https://learn.hashicorp.com/tutorials/consul/application-leader-elections) and
+to [build distributed semaphores](https://learn.hashicorp.com/tutorials/consul/distributed-semaphore).
### Vault
If you plan to use Consul KV as a backend for Vault, please review [this
-guide](https://learn.hashicorp.com/vault/operations/ops-vault-ha-consul).
+tutorial](https://learn.hashicorp.com/tutorials/vault/ha-with-consul).
diff --git a/website/pages/docs/internals/sessions.mdx b/website/pages/docs/dynamic-app-config/sessions.mdx
similarity index 99%
rename from website/pages/docs/internals/sessions.mdx
rename to website/pages/docs/dynamic-app-config/sessions.mdx
index dc259383b4..db5b464f17 100644
--- a/website/pages/docs/internals/sessions.mdx
+++ b/website/pages/docs/dynamic-app-config/sessions.mdx
@@ -140,7 +140,7 @@ the goal of Consul to protect against misbehaving clients.
The primitives provided by sessions and the locking mechanisms of the KV
store can be used to build client-side leader election algorithms.
-These are covered in more detail in the [Leader Election guide](https://learn.hashicorp.com/consul/developer-configuration/elections).
+These are covered in more detail in the [Leader Election guide](https://learn.hashicorp.com/tutorials/consul/application-leader-elections).
## Prepared Query Integration
diff --git a/website/pages/docs/agent/watches.mdx b/website/pages/docs/dynamic-app-config/watches.mdx
similarity index 98%
rename from website/pages/docs/agent/watches.mdx
rename to website/pages/docs/dynamic-app-config/watches.mdx
index a8cdce18f8..333a1b19f6 100644
--- a/website/pages/docs/agent/watches.mdx
+++ b/website/pages/docs/dynamic-app-config/watches.mdx
@@ -137,7 +137,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=key -key=foo/bar/baz /usr/bin/my-key-handler.sh
```
@@ -176,7 +176,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=keyprefix -prefix=foo/ /usr/bin/my-prefix-handler.sh
```
@@ -307,13 +307,13 @@ Or, using the watch command:
Single tag:
-```shell
+```shell-session
$ consul watch -type=service -service=redis -tag=bar /usr/bin/my-service-handler.sh
```
Multiple tag:
-```shell
+```shell-session
$ consul watch -type=service -service=redis -tag=bar -tag=foo /usr/bin/my-service-handler.sh
```
@@ -392,13 +392,13 @@ Or, using the watch command:
State:
-```shell
+```shell-session
$ consul watch -type=checks -state=passing /usr/bin/my-check-handler.sh -passing
```
Service:
-```shell
+```shell-session
$ consul watch -type=checks -service=redis /usr/bin/my-check-handler.sh -redis
```
@@ -440,7 +440,7 @@ Here is an example configuration:
Or, using the watch command:
-```shell
+```shell-session
$ consul watch -type=event -name=web-deploy /usr/bin/my-event-handler.sh -web-deploy
```
@@ -464,6 +464,6 @@ An example of the output of this command:
To fire a new `web-deploy` event the following could be used:
-```shell
+```shell-session
$ consul event -name=web-deploy 1609030
```
diff --git a/website/pages/docs/enterprise/audit-logging.mdx b/website/pages/docs/enterprise/audit-logging.mdx
new file mode 100644
index 0000000000..6839b46227
--- /dev/null
+++ b/website/pages/docs/enterprise/audit-logging.mdx
@@ -0,0 +1,19 @@
+---
+layout: docs
+page_title: Consul Enterprise Audit Logging
+sidebar_title: Audit Logging
+description: >-
+ Consul Enterprise provides the ability to write events of user behavior with Consulβs API so operations and security users can perform legal compliance auditing.
+---
+
+# Audit Logging
+
+
+ This feature requires Consul Enterprise with the Governance and Policy module.
+
+
+Consul Enterprise v1.8.0 adds audit logging as a feature that captures a clear and actionable log of authenticated events (both attempted and committed) that Consul processes and compiles them into a JSON format for easy export. These events contain a timestamp, the operation performed, and the user who initiated the action.
+
+Audit logging enables security and compliance teams within an organization to get greater insight into Consul access and usage patterns.
+
+For more details, review the [Consul Server Configuration](https://www.consul.io/docs/agent/options) documentation and the [Audit](https://www.consul.io/docs/agent/options#audit) configuration.
diff --git a/website/pages/docs/enterprise/backups.mdx b/website/pages/docs/enterprise/backups.mdx
index 2ce82f7262..5ca332eeb2 100644
--- a/website/pages/docs/enterprise/backups.mdx
+++ b/website/pages/docs/enterprise/backups.mdx
@@ -11,7 +11,8 @@ description: >-
# Automated Backups
- This feature is available in all versions of Consul Enterprise.
+ This feature is available in all versions of{' '}
+ Consul Enterprise.
Consul Enterprise enables you to run
@@ -33,6 +34,6 @@ datacenter backups include (but are not limited to):
- Namespaces
For more experience leveraging Consul's snapshot functionality, we suggest you look through our HashiCorp
-Learn guide for [Datacenter Backups in Consul](https://learn.hashicorp.com/consul/datacenter-deploy/backup).
+Learn tutorial for [Datacenter Backups in Consul](https://learn.hashicorp.com/tutorials/consul/backup-and-restore).
For detailed configuration information on configuring the Consul Enterprise's snapshot agent, review the
[Consul Snapshot Agent documentation](/docs/commands/snapshot/agent).
diff --git a/website/pages/docs/enterprise/federation.mdx b/website/pages/docs/enterprise/federation.mdx
index 44ef2ee0f3..ed338b4242 100644
--- a/website/pages/docs/enterprise/federation.mdx
+++ b/website/pages/docs/enterprise/federation.mdx
@@ -11,7 +11,9 @@ description: >-
# Consul Enterprise Advanced Federation
- This feature requires Consul Enterprise with the Global Visibility, Routing, and Scale module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Global Visibility, Routing, and Scale module.
Consul's core federation capability uses the same gossip mechanism that is used
@@ -23,7 +25,7 @@ desirable to have topologies like hub-and-spoke with central management
datacenters and "spoke" datacenters that can't interact with each other.
[Consul Enterprise](https://www.hashicorp.com/consul) offers a [network
-area mechanism](https://learn.hashicorp.com/consul/day-2-operations/advanced-federation) that allows operators to
+area mechanism](https://learn.hashicorp.com/tutorials/consul/federation-network-areas) that allows operators to
federate Consul datacenters together on a pairwise basis, enabling
partially-connected network topologies. Once a link is created, Consul agents
can make queries to the remote datacenter in service of both API and DNS
diff --git a/website/pages/docs/enterprise/index.mdx b/website/pages/docs/enterprise/index.mdx
index 5dc50cbd7e..37518712a2 100644
--- a/website/pages/docs/enterprise/index.mdx
+++ b/website/pages/docs/enterprise/index.mdx
@@ -1,7 +1,7 @@
---
layout: docs
-page_title: Consul Enterprise
-sidebar_title: Consul Enterprise
+page_title: Enterprise Features
+sidebar_title: Enterprise Features
description: >-
Consul Enterprise features a number of capabilities beyond the open source
offering that may be beneficial in certain workflows.
@@ -9,14 +9,11 @@ description: >-
# Consul Enterprise
-[Consul Enterprise](https://www.hashicorp.com/consul) features ease the complexity of operating Consul at
-organizational scale by automating common operator workflows. It introduces capabilities for expanding
-performance scalability, resiliency, and cluster lifecycle. It also adds support for application and service
-architectures across complex network topologies. If you have already purchased Consul Enterprise, please
-see the [licensing section](#licensing) below.
+[Consul Enterprise](https://www.hashicorp.com/consul) features address the organizational complexities of collaboration, operations, scale and governance. It includes capabilities that improve failure resilience, read scalability, and managing access in accordance with organizational policies. It also adds support for application and service architectures across complex network topologies. If you have already purchased Consul Enterprise, please see the [licensing section](#licensing) below.
Features include:
+- [Audit Logging](/docs/enterprise/audit-logging)
- [Automated Backups](/docs/enterprise/backups)
- [Automated Upgrades](/docs/enterprise/upgrades)
- [Enhanced Read Scalability](/docs/enterprise/read-scale)
diff --git a/website/pages/docs/enterprise/namespaces.mdx b/website/pages/docs/enterprise/namespaces.mdx
index ed3b14fc6c..938946bece 100644
--- a/website/pages/docs/enterprise/namespaces.mdx
+++ b/website/pages/docs/enterprise/namespaces.mdx
@@ -8,7 +8,9 @@ description: Consul Enterprise enables data isolation with Namespaces.
# Consul Enterprise Namespaces
- This feature requires Consul Enterprise with the Governance and Policy module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Governance and Policy module.
With Consul Enterprise v1.7.0, data for different users or teams
@@ -18,8 +20,8 @@ to provide self-service through delegation of administrative privileges.
For more information on how to use namespaces with Consul Enterprise please review the following HashiCorp Learn Guides:
-- [Register and Discover Services within Namespaces](https://learn.hashicorp.com/consul/namespaces/discovery-namespaces) - Register multiple services within different namespaces in Consul.
-- [Setup Secure Namespaces](https://learn.hashicorp.com/consul/namespaces/secure-namespaces) - Secure resources within a namespace and delegate namespace ACL rights via ACL tokens.
+- [Register and Discover Services within Namespaces](https://learn.hashicorp.com/tutorials/consul/namespaces-share-datacenter-access) - Register multiple services within different namespaces in Consul.
+- [Setup Secure Namespaces](https://learn.hashicorp.com/tutorials/consul/namespaces-secure-shared-access) - Secure resources within a namespace and delegate namespace ACL rights via ACL tokens.
## Namespace Definition
diff --git a/website/pages/docs/enterprise/network-segments.mdx b/website/pages/docs/enterprise/network-segments.mdx
index 88fe24ff75..209be69168 100644
--- a/website/pages/docs/enterprise/network-segments.mdx
+++ b/website/pages/docs/enterprise/network-segments.mdx
@@ -10,7 +10,9 @@ description: |-
# Network Segments
- This feature requires Consul Enterprise with the Global Visibility, Routing, and Scale module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Global Visibility, Routing, and Scale module.
Consul Network Segments enables operators to create separate LAN gossip segments
@@ -19,10 +21,10 @@ with other agents in it's network segment. This functionality is useful for
clusters that have multiple tenants that should not be able to communicate
with each other.
-To get started with network segments you can review the guide on HashiCorp Learn for
-[Network Segments](https://learn.hashicorp.com/consul/day-2-operations/network-segments).
+To get started with network segments you can review the tutorial on HashiCorp Learn for
+[Network Segments](https://learn.hashicorp.com/tutorials/consul/network-partition-datacenters).
-~> **Note:** Due to limitations in [Serf](/docs/internals/gossip), a Consul agent configured with too many network segments may not be able to start
+~> **Note:** Prior to Consul 1.7.3, a Consul agent configured with too many network segments may not be able to start due to [limitations](https://learn.hashicorp.com/tutorials/consul/network-partition-datacenters#network-segments-limitations) in Serf.
# Consul Networking Models
@@ -43,8 +45,8 @@ over the WAN. Consul clients make use of resources in federated clusters by
forwarding RPCs through the Consul servers in their local cluster, but they
never interact with remote Consul servers directly. There are currently two
inter-cluster network models which can be viewed on HashiCorp Learn:
-[WAN gossip (OSS)](https://learn.hashicorp.com/consul/security-networking/datacenters)
-and [Network Areas (Enterprise)](https://learn.hashicorp.com/consul/day-2-operations/advanced-federation).
+[WAN gossip (OSS)](https://learn.hashicorp.com/tutorials/consul/federarion-gossip-wan)
+and [Network Areas (Enterprise)](https://learn.hashicorp.com/tutorials/consul/federation-network-areas).
**LAN Gossip Pool**: A set of Consul agents that have full mesh connectivity
among themselves, and use Serf to maintain a shared view of the members of the
diff --git a/website/pages/docs/enterprise/read-scale.mdx b/website/pages/docs/enterprise/read-scale.mdx
index 90e46d7f13..a5bb4102f7 100644
--- a/website/pages/docs/enterprise/read-scale.mdx
+++ b/website/pages/docs/enterprise/read-scale.mdx
@@ -12,7 +12,9 @@ description: >-
# Enhanced Read Scalability with Non-Voting Servers
- This feature requires Consul Enterprise with the Global Visibility, Routing, and Scale module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Global Visibility, Routing, and Scale module.
Consul Enterprise provides the ability to scale clustered Consul servers
diff --git a/website/pages/docs/enterprise/redundancy.mdx b/website/pages/docs/enterprise/redundancy.mdx
index 1e37df95b2..433c1e1501 100644
--- a/website/pages/docs/enterprise/redundancy.mdx
+++ b/website/pages/docs/enterprise/redundancy.mdx
@@ -10,7 +10,9 @@ description: >-
# Redundancy Zones
- This feature requires Consul Enterprise with the Global Visibility, Routing, and Scale module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Global Visibility, Routing, and Scale module.
Consul Enterprise redundancy zones provide
@@ -27,6 +29,6 @@ for server nodes while also providing (and expanding) the capabilities of
[enhanced read scalability](/docs/enterprise/read-scale) by also including recovery
capabilities.
-For more information, review the HashiCorp Learn guide on
-[Redundancy Zones](https://learn.hashicorp.com/consul/day-2-operations/autopilot#redundancy-zones),
+For more information, review the HashiCorp Learn tutorial on
+[Redundancy Zones](https://learn.hashicorp.com/tutorials/consul/autopilot-datacenter-operations#redundancy-zones),
as well as the documentation for [Consul Autopilot](/docs/commands/operator/autopilot).
diff --git a/website/pages/docs/enterprise/sentinel.mdx b/website/pages/docs/enterprise/sentinel.mdx
index 96b892b5d4..a69cd48fc8 100644
--- a/website/pages/docs/enterprise/sentinel.mdx
+++ b/website/pages/docs/enterprise/sentinel.mdx
@@ -11,7 +11,9 @@ description: >-
# Sentinel in Consul
- This feature requires Consul Enterprise with the Governance and Policy module.
+ This feature requires{' '}
+ Consul Enterprise{' '}
+ with the Governance and Policy module.
Sentinel policies extend the ACL system in Consul beyond static "read", "write",
diff --git a/website/pages/docs/enterprise/upgrades.mdx b/website/pages/docs/enterprise/upgrades.mdx
index 9c4629da2e..c82ee5ab95 100644
--- a/website/pages/docs/enterprise/upgrades.mdx
+++ b/website/pages/docs/enterprise/upgrades.mdx
@@ -11,7 +11,8 @@ description: >-
# Automated Upgrades
- This feature is available in all versions of Consul Enterprise.
+ This feature is available in all versions of{' '}
+ Consul Enterprise.
Consul Enterprise enables the capability of automatically upgrading a cluster of Consul servers to a new
@@ -20,4 +21,4 @@ currently in a cluster. When an equal amount of new server nodes are joined runn
will be demoted to non voting members. Demotion of legacy server nodes will not occur until the voting members on the new version match.
Once this demotion occurs, the previous versioned servers can be removed from the cluster safely.
-You can review more information about this functionality in the [Consul operator autopilot](/docs/commands/operator/autopilot) documentation as well as on the HashiCorp Learn [Automated Upgrade](https://learn.hashicorp.com/consul/day-2-operations/autopilot#upgrade-migrations) guide.
+You can review more information about this functionality in the [Consul operator autopilot](/docs/commands/operator/autopilot) documentation as well as on the HashiCorp Learn [Automated Upgrade](https://learn.hashicorp.com/tutorials/consul/autopilot-datacenter-operations#upgrade-migrations) tutorial.
diff --git a/website/pages/docs/guides/acl-index.mdx b/website/pages/docs/guides/acl-index.mdx
index 644e999825..b54b0ea7e7 100644
--- a/website/pages/docs/guides/acl-index.mdx
+++ b/website/pages/docs/guides/acl-index.mdx
@@ -43,7 +43,7 @@ one of the guides, you will be directed to a new site.
### Bootstrapping the ACL System
-Learn how to control access to Consul resources with this step-by-step [guide](https://learn.hashicorp.com/consul/advanced/day-1-operations/acl-guide) on bootstrapping the ACL system in Consul 1.4.0 and newer. This guide also includes additional steps for configuring the anonymous token, setting up agent-specific default tokens, and creating tokens for Consul UI use.
+Learn how to control access to Consul resources with this step-by-step [tutorial](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production) on bootstrapping the ACL system in Consul 1.4.0 and newer. This guide also includes additional steps for configuring the anonymous token, setting up agent-specific default tokens, and creating tokens for Consul UI use.
### Securing Consul with ACLs
diff --git a/website/pages/docs/guides/acl-legacy.mdx b/website/pages/docs/guides/acl-legacy.mdx
index 0514a3ec19..575a4b782f 100644
--- a/website/pages/docs/guides/acl-legacy.mdx
+++ b/website/pages/docs/guides/acl-legacy.mdx
@@ -13,8 +13,8 @@ description: >-
# Deprecation Notice
The ACL system described here was Consul's original ACL implementation. In Consul 1.4.0
-the ACL system was rewritten and the legacy system was deprecated. The new ACL guide
-can be found [here](https://learn.hashicorp.com/consul/advanced/day-1-operations/acl-guide).
+the ACL system was rewritten and the legacy system was deprecated. The new ACL tutorial
+can be found [here](https://learn.hashicorp.com/tutorials/consul/access-control-setup-production).
# New ACL System Differences
@@ -187,7 +187,7 @@ as to whether they are set on servers, clients, or both.
| Configuration Option | Servers | Clients | Purpose |
| --------------------------------------------------------------------- | ---------- | ---------- | ----------------------------------------------------------------------------------------- |
| [`primary_datacenter`](/docs/agent/options#primary_datacenter) | `REQUIRED` | `REQUIRED` | Master control that enables ACLs by defining the authoritative Consul datacenter for ACLs |
-| [`acl_default_policy`](/docs/agent/options#acl_default_policy_legacy) | `OPTIONAL` | `N/A` | Determines allowlist or denylist mode |
+| [`acl_default_policy`](/docs/agent/options#acl_default_policy_legacy) | `OPTIONAL` | `N/A` | Determines allowlist or denylist mode |
| [`acl_down_policy`](/docs/agent/options#acl_down_policy_legacy) | `OPTIONAL` | `OPTIONAL` | Determines what to do when the ACL datacenter is offline |
| [`acl_ttl`](/docs/agent/options#acl_ttl_legacy) | `OPTIONAL` | `OPTIONAL` | Determines time-to-live for cached ACLs |
@@ -294,7 +294,7 @@ In Consul 0.9.1 and later, you can use the [/v1/acl/bootstrap API](/api/acl/acl#
to make the initial master token, so a token never needs to be placed into a configuration
file. To use this approach, omit `acl_master_token` from the above config and then call the API:
-```text
+```shell-session
$ curl \
--request PUT \
http://127.0.0.1:8500/v1/acl/bootstrap
@@ -325,7 +325,7 @@ own internal operations like updating its node information in the catalog and pe
[anti-entropy](/docs/internals/anti-entropy) syncing. We can create a token using the
ACL API, and the ACL master token we set in the previous step:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -355,7 +355,7 @@ configuration and restart the servers once more to apply it:
In Consul 0.9.1 and later you can also introduce the agent token using an API,
so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -390,7 +390,7 @@ with a configuration file that enables ACLs:
Similar to the previous example, in Consul 0.9.1 and later you can also introduce the
agent token using an API, so it doesn't need to be set in the configuration file:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -419,7 +419,7 @@ At this point ACLs are bootstrapped with ACL agent tokens configured, but there
other policies set up. Even basic operations like `consul members` will be restricted
by the ACL default policy of "deny":
-```
+```shell-session
$ consul members
```
@@ -429,7 +429,7 @@ see any nodes by default.
If we supply the token we created above we will be able to see a listing of nodes because
it has write privileges to an empty `node` prefix, meaning it has access to all nodes:
-```
+```shell-session
$ CONSUL_HTTP_TOKEN=fe3b8d40-0ee0-8783-6cc2-ab1aa9bb16c1 consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -442,7 +442,7 @@ configure Consul's behavior when no token is supplied. The anonymous token is ma
like any other ACL token, except that `anonymous` is used for the ID. In this example
we will give the anonymous token read privileges for all nodes:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -459,7 +459,7 @@ $ curl \
The anonymous token is implicitly used if no token is supplied, so now we can run
`consul members` without supplying a token and we will be able to see the nodes:
-```
+```shell-session
$ consul members
Node Address Status Type Build Protocol DC
node-1 127.0.0.1:8301 alive server 0.9.0dev 2 dc1
@@ -469,7 +469,7 @@ node-2 127.0.0.2:8301 alive client 0.9.0dev 2 dc1
The anonymous token is also used for DNS lookups since there's no way to pass a
token as part of a DNS request. Here's an example lookup for the "consul" service:
-```
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -495,7 +495,7 @@ consul. 0 IN SOA ns.consul. postmaster.consul. 14
Now we get an `NXDOMAIN` error because the anonymous token doesn't have access to the
"consul" service. Let's add that to the anonymous token's policy:
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -511,7 +511,7 @@ $ curl \
With that new policy in place, the DNS lookup will succeed:
-```
+```shell-session
$ dig @127.0.0.1 -p 8600 consul.service.consul
; <<>> DiG 9.8.3-P1 <<>> @127.0.0.1 -p 8600 consul.service.consul
@@ -561,7 +561,7 @@ not function fully using the anonymous ACL token. It is recommended
that a UI-specific ACL token is used, which can be set in the UI during the
web browser session to authenticate the interface.
-```text
+```shell-session
$ curl \
--request PUT \
--header "X-Consul-Token: b1gs33cr3t" \
@@ -651,7 +651,7 @@ of the rules section.
Here's a sample request using the HCL form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
@@ -664,7 +664,7 @@ $ curl \
Here's an equivalent request using the JSON form:
-```text
+```shell-session
$ curl \
--request PUT \
--data \
@@ -1069,9 +1069,7 @@ name that starts with "admin".
## Advanced Topics
-
-
-#### Outages and ACL Replication
+#### Outages and ACL Replication ((#replication))
The Consul ACL system is designed with flexible rules to accommodate for an outage
of the [`primary_datacenter`](/docs/agent/options#primary_datacenter) or networking
@@ -1133,9 +1131,7 @@ using a process like this:
4. Rolling restart the agents in other datacenters and change their `primary_datacenter`
configuration to the target datacenter.
-
-
-#### Complete ACL Coverage in Consul 0.8
+#### Complete ACL Coverage in Consul 0.8 ((#version_8_acls))
Consul 0.8 added many more ACL policy types and brought ACL enforcement to Consul
agents for the first time. To ease the transition to Consul 0.8 for existing ACL
diff --git a/website/pages/docs/guides/acl-replication.mdx b/website/pages/docs/guides/acl-replication.mdx
index e8540e875a..c6bd25d6cc 100644
--- a/website/pages/docs/guides/acl-replication.mdx
+++ b/website/pages/docs/guides/acl-replication.mdx
@@ -73,7 +73,7 @@ requests to the servers.
Finally, start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -103,7 +103,7 @@ service_prefix "" {
Now that you have the ACL rules defined, create a policy with those rules.
-```shell
+```shell-session
$ consul acl policy create -name replication -rules @replication-policy.hcl
ID: 240f1d01-6517-78d3-ec32-1d237f92ab58
Name: replication
@@ -117,7 +117,7 @@ service_prefix "" { policy = "read" intentions = "read" }
Finally, use your newly created policy to create the replication token.
-```shell
+```shell-session
$ consul acl token create description "replication token" -policy-name replication
AccessorID: 67d55dc1-b667-1835-42ab-64658d64a2ff
SecretID: fc48e84d-3f4d-3646-4b6a-2bff7c4aaffb
@@ -157,7 +157,7 @@ primary datacenter and `enable_token_replication` to true on all the servers.
Now you can start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -167,7 +167,7 @@ Repeat this process on all the servers.
Finally, apply the replication token to all the servers using the CLI.
-```shell
+```shell-session
$ consul acl set-agent-token replication
ACL token "replication" set successfully
```
@@ -201,7 +201,7 @@ name of your primary datacenter and `enable_token_replication` to true.
Now you can start the agent.
-```shell
+```shell-session
$ consul agent -config-file=server.json
```
@@ -213,7 +213,7 @@ first time, you will also need to [set the agent token](/consul/security-network
Now that you have set up ACL replication, you can use the [HTTP API](/api/acl#check-acl-replication) to check
the configuration.
-```shell
+```shell-session
$ curl http://localhost:8500/v1/acl/replication?pretty
{
"Enabled":true,
diff --git a/website/pages/docs/guides/connect-gateways.mdx b/website/pages/docs/guides/connect-gateways.mdx
index 6258e4b1ba..5451757444 100644
--- a/website/pages/docs/guides/connect-gateways.mdx
+++ b/website/pages/docs/guides/connect-gateways.mdx
@@ -114,7 +114,7 @@ upgrades](/docs/upgrading#standard-upgrades).
Stop the first server by running the following [leave
command](/docs/commands/leave).
-```text
+```shell-session
$ consul leave
```
@@ -184,7 +184,7 @@ Create a file named `mesh-gateway-policy.json` containing the following content.
Next, create and name a new ACL policy using the file you just made.
-```text
+```shell-session
$ consul acl policy create \
-name mesh-gateway \
-rules @mesh-gateway-policy.json
@@ -192,12 +192,12 @@ $ consul acl policy create \
Generate a token for each gateway from the new policy.
-```text
+```shell-session
$ consul acl token create -description "mesh-gateway primary datacenter token" \
-policy-name mesh-gateway
```
-```text
+```shell-session
$ consul acl token create \
-description "mesh-gateway secondary datacenter token" \
-policy-name mesh-gateway
@@ -210,7 +210,7 @@ Youβll apply those tokens when you deploy the gateways.
Register and start the gateway in your primary datacenter with the following
command.
-```text
+```shell-session
$ consul connect envoy -mesh-gateway -register \
-service-name "gateway-primary"
-address "" \
@@ -223,7 +223,7 @@ $ consul connect envoy -mesh-gateway -register \
Register and start the gateway in your secondary datacenter with the following
command.
-```text
+```shell-session
$ consul connect envoy -mesh-gateway -register \
-service-name "gateway-secondary"
-address "" \
@@ -250,7 +250,7 @@ following:
Write the centralized configuration you just created with the following command.
-```text
+```shell-session
$ consul config write proxy-defaults.json
```
@@ -299,27 +299,27 @@ if you are not using socat as an example.
Reload the client with the new or modified registration.
-```text
+```shell-session
$ consul reload
```
Then start Envoy specifying which service it will proxy.
-```text
+```shell-session
$ consul connect envoy -sidecar-for socat
```
If you are using socat as your example, start it now on the port you specified
in your registration by running the following command.
-```text
+```shell-session
$ socat -v tcp-l:8181,fork exec:"/bin/cat"
```
Check that the socat service is running by accessing it using netcat on the same
node. It will echo back anything you type.
-```text
+```shell-session
$ nc 127.0.0.1 8181
hello
hello
@@ -369,13 +369,13 @@ its name and the `8181` with its port.
Reload the client with the new or modified registration.
-```text
+```shell-session
$ consul reload
```
Then start Envoy and specify which service it will proxy.
-```text
+```shell-session
$ consul connect envoy -sidecar-for web
```
@@ -386,7 +386,7 @@ in order for them to communicate with each other. Add an intention to allow the
front end service to access the back end service. For web and socat the command
would look like this.
-```text
+```shell-session
$ consul intention create web socat
```
@@ -402,7 +402,7 @@ other. If you have been using the example web and socat services, from the node
and datacenter where you registered the web service, start netcat and type
something for it to echo.
-```text
+```shell-session
$ nc 127.0.0.1 8181
hello
hello
@@ -434,4 +434,4 @@ Kubernetes documentation](/docs/platform/k8s/helm)
Visit the Consul documentation for a full list of configurations for [Consul
Connect](/docs/connect), including [mesh gateway
-configuration options](/docs/connect/mesh_gateway).
+configuration options](/docs/connect/mesh-gateway).
diff --git a/website/pages/docs/guides/connect-services.mdx b/website/pages/docs/guides/connect-services.mdx
index db3542db92..802842c16a 100644
--- a/website/pages/docs/guides/connect-services.mdx
+++ b/website/pages/docs/guides/connect-services.mdx
@@ -49,7 +49,7 @@ the executables to follow along.
To ensure that Consul is running and accessible from the command line, use the
`consul members` command to verify your agent status.
-```shell
+```shell-session
$ consul members
Node Address Status Type Build Protocol DC Segment
hostname.local 127.0.0.1:8301 alive server 1.6.1 2 dc1
@@ -165,12 +165,12 @@ Finally, you can submit the service definitions to your Consul agent. If you
are using the JSON definitions, ensure that the filenames end in ".json"
instead of ".hcl".
-```shell
+```shell-session
$ consul services register counting.hcl
Registered service: counting
```
-```shell
+```shell-session
$ consul services register dashboard.hcl
Registered service: dashboard
```
@@ -183,7 +183,7 @@ register the services.
Now that you have registered your services and sidecar proxies, run `consul catalog services` to verify that they are present.
-```shell
+```shell-session
$ consul catalog services
consul
counting
@@ -208,7 +208,7 @@ service against changes to the implied permissions. For example, a change in
`default_policy` or the introduction of a global deny-all intention would
impact services without explicit intentions defined.
-```shell
+```shell-session
$ consul intention create dashboard counting
Created: dashboard => counting (allow)
```
@@ -223,7 +223,7 @@ shell session.
Run these commands to start the applications:
-```shell
+```shell-session
$ PORT=9002 COUNTING_SERVICE_URL="http://localhost:5000" ./dashboard-service &
$ PORT=9003 ./counting-service &
```
@@ -234,7 +234,7 @@ the service applications.
We are using the Consul Connect's built-in proxy for this guide. In a
production deployment, we recommend using Envoy instead.
-```shell
+```shell-session
$ consul connect proxy -sidecar-for counting > counting-proxy.log &
$ consul connect proxy -sidecar-for dashboard > dashboard-proxy.log &
```
@@ -264,7 +264,7 @@ traffic with an intention.
First, deny the Dashboard service access to the Counting service.
-```shell
+```shell-session
$ consul intention create -deny -replace dashboard counting
Created: dashboard => counting (deny)
```
@@ -282,7 +282,7 @@ numbers.][img-screenshot2]][img-screenshot2]
You can restore communication between the services by replacing the `deny`
intention with an `allow`.
-```shell
+```shell-session
$ consul intention create -allow -replace dashboard counting
```
@@ -297,14 +297,14 @@ running. This should automatically stop these processes.
Delete the intention from Consul.
-```shell
+```shell-session
$ consul intention delete dashboard counting
Intention deleted.
```
Deregister the services.
-```shell
+```shell-session
$ consul services deregister counting.hcl
Deregistered service: counting
@@ -365,7 +365,7 @@ extract the binary from the official Envoy Docker containers.
To do this, create a container named "envoy-extract" based on the
"envoyproxy/envoy" container.
-```shell
+```shell-session
$ docker create --name "envoy-extract" "envoyproxy/envoy"
docker create --name "envoy-extract" "envoyproxy/envoy"
Unable to find image 'envoyproxy/envoy:latest' locally
@@ -387,13 +387,13 @@ Status: Downloaded newer image for envoyproxy/envoy:latest
Use the `docker cp` command to copy the envoy file out of the container into
the current directory.
-```shell
+```shell-session
$ docker cp "envoy-extract:/usr/local/bin/envoy" "envoy"
```
Now that you have the binary, you can remove the "envoy-extract" container.
-```shell
+```shell-session
$ docker rm "envoy-extract"
envoy-extract
```
@@ -402,7 +402,7 @@ Once you have the binary extracted and in your path, Consul will automatically
use it when you run the `consul connect envoy` command. The following examples
demonstrate how to start the service sidecar proxies with Envoy.
-```shell
+```shell-session
$ consul connect envoy -sidecar-for counting > counting-proxy.log &
$ consul connect envoy -sidecar-for dashboard > dashboard-proxy.log &
```
@@ -423,7 +423,7 @@ environment.
[counting-1.json]: https://raw.githubusercontent.com/hashicorp/demo-consul-101/master/demo-config-localhost/counting-1.json
[dashboard service]: https://github.com/hashicorp/demo-consul-101/releases/download/0.0.2/dashboard-service_linux_amd64.zip
[dashboard.json]: https://raw.githubusercontent.com/hashicorp/demo-consul-101/master/demo-config-localhost/dashboard.json
-[default acl policy]: https://www.consul.io/docs/agent/options.html#acl_default_policy
+[default acl policy]: https://www.consul.io/docs/agent/options#acl_default_policy
[demo-consul-101 project]: https://github.com/hashicorp/demo-consul-101
[dev agent]: https://learn.hashicorp.com/consul/getting-started/agent
[docker guide]: https://learn.hashicorp.com/consul/day-0/containers-guide
@@ -432,11 +432,11 @@ environment.
[img-flow]: /static/img/consul/connect-getting-started/consul_connect_demo_service_flow.png
[img-screenshot1]: /static/img/consul/connect-getting-started/screenshot1.png
[img-screenshot2]: /static/img/consul/connect-getting-started/screenshot2.png
-[intention]: https://www.consul.io/docs/connect/intentions.html
-[services-api]: https://www.consul.io/api/agent/service.html#register-service
-[services-cli]: https://www.consul.io/docs/commands/services.html
-[services-config]: https://www.consul.io/docs/agent/services.html#service-definition
-[services-nomad]: https://www.nomadproject.io/docs/job-specification/service.html
+[intention]: https://www.consul.io/docs/connect/intentions
+[services-api]: https://www.consul.io/api/agent/service#register-service
+[services-cli]: https://www.consul.io/docs/commands/services
+[services-config]: https://www.consul.io/docs/agent/services#service-definition
+[services-nomad]: https://www.nomadproject.io/docs/job-specification/service
[sidecar]: https://docs.microsoft.com/en-us/azure/architecture/patterns/sidecar
-[sidecar_service]: https://www.consul.io/docs/connect/registration/sidecar-service.html
-[services-k8s]: https://www.consul.io/docs/platform/k8s/connect.html#installation-and-configuration
+[sidecar_service]: https://www.consul.io/docs/connect/registration/sidecar-service
+[services-k8s]: https://www.consul.io/docs/platform/k8s/connect#installation-and-configuration
diff --git a/website/pages/docs/guides/consul-f5.mdx b/website/pages/docs/guides/consul-f5.mdx
index b191a262df..c309c3dbee 100644
--- a/website/pages/docs/guides/consul-f5.mdx
+++ b/website/pages/docs/guides/consul-f5.mdx
@@ -52,7 +52,7 @@ Check your environment to ensure you have a healthy Consul datacenter by
checking your datacenter members. You can do this by running the `consul members` command on the machine where Consul is running, or by accessing the
Consul web UI at the IP address of your consul instances, on port 8500.
-```shell
+```shell-session
$ consul memberss
Node Address Status Type Build Protocol DC Segment
consul 10.0.0.100:8301 alive server 1.5.3 2 dc1
@@ -89,7 +89,7 @@ check for the web server so that Consul can monitor its health.
Reload the client to read the new service definition.
-```shell
+```shell-session
$ consul reload
```
@@ -110,7 +110,7 @@ First construct an authorization header to authenticate our API call with
BIG-IP. You will need to use a username and password for your instance. Below is
an example for username βadminβ, and password βpasswordβ.
-```shell
+```shell-session
$ echo -n 'admin:password' | base64
YWRtaW46YWRtaW4=
```
@@ -119,7 +119,7 @@ Now use cURL to send the authorized declaration to the BIG-IP Instance. Use the
value you created above for your BIG-IP instance in the authorization header.
Remember t o replace `` with the real IP address.
-```shell
+```shell-session
$ curl -X POST \
https:///mgmt/shared/appsvcs/declare \
-H 'authorization: Basic ' \
@@ -229,7 +229,7 @@ The above declaration does the following:
- A pool named web_pool monitored by the http health monitor.
- NGINX Pool members autodiscovered via Consul's [catalog HTTP API
- endpoint](https://www.consul.io/api/catalog.html#list-nodes-for-service).
+ endpoint](/api-docs/catalog#list-nodes-for-service).
For the `virtualAddresses` make sure to substitute your BIG-IP Virtual
Server.
@@ -249,7 +249,7 @@ You can read more about composing AS3 declarations in the [F5 documentation](htt
Use the `consul monitor` command on the consul agent specified in the AS3 URI to
verify that you are receiving catalog requests from the BIG-IP instance.
-```shell
+```shell-session
$ consul monitor -log-level=debug
2019/09/06 03:16:50 [DEBUG] http: Request GET /v1/catalog/service/nginx (103.796Β΅s) from=10.0.0.200:29487
2019/09/06 03:16:55 [DEBUG] http: Request GET /v1/catalog/service/nginx (104.95Β΅s) from=10.0.0.200:42079
@@ -279,7 +279,7 @@ documentation](https://support.f5.com/csp/article/K20448153#accessing%20map).
Now that you have a healthy virtual service, you can use it to access your web
server.
-```shell
+```shell-session
$ curl :8080
diff --git a/website/pages/docs/guides/consul-splitting.mdx b/website/pages/docs/guides/consul-splitting.mdx
index 9cfc55344e..a9b8cbfe3b 100644
--- a/website/pages/docs/guides/consul-splitting.mdx
+++ b/website/pages/docs/guides/consul-splitting.mdx
@@ -36,7 +36,7 @@ traffic slowly to the new version.
The steps in this guide use Consulβs service mesh feature, Consul Connect. If
you arenβt already familiar with Connect you can learn more by following [this
-guide](https://learn.hashicorp.com/consul/getting-started/connect).
+guide](https://learn.hashicorp.com/tutorials/consul/get-started-service-networking).
We created a demo environment for the steps we describe here. The environment
relies on Docker and Docker Compose. If you do not already have Docker and
@@ -58,7 +58,7 @@ in a canary deployment.
First clone the repo containing the source and examples for this guide.
-```shell
+```shell-session
$ git clone git@github.com:hashicorp/consul-demo-traffic-splitting.git
```
@@ -66,7 +66,7 @@ Change directories into the cloned folder, and start the demo environment with
`docker-compose up`. This command will run in the foreground, so youβll need to
open a new terminal window after you run it.
-```shell
+```shell-session
$ docker-compose up
Creating consul-demo-traffic-splitting_api_v1_1 ... done
@@ -135,7 +135,7 @@ version 1 of the API service, and a sidecar for the API service.
Curl the Web endpoint to make sure that the whole application is running. The
Web service will get a response from version 1 of the API service.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -178,15 +178,15 @@ contains the following.
To apply the configuration, you can either use the Consul CLI or the API. In
this example weβll use the CLI to write the configuration, providing the file location.
-```shell
+```shell-session
$ consul config write l7_config/api_service_defaults.json
```
Find more information on `service-defaults` configuration entries in the
-[documentation](https://www.consul.io/docs/agent/config-entries/service-defaults.html).
+[documentation](/docs/agent/config-entries/service-defaults).
-> **Automation Tip:** To automate interactions with configuration entries, use
-the HTTP API endpoint [`http://localhost:8500/v1/config`](https://www.consul.io/api/config.html).
+the HTTP API endpoint [`http://localhost:8500/v1/config`](/api/config).
### Configuring the Service Resolver
@@ -227,12 +227,12 @@ configuration.
Write the service resolver configuration entry using the CLI and providing the
location, just like in the previous example.
-```shell
+```shell-session
$ consul config write l7_config/api_service_resolver.json
```
Find more information about service resolvers in the
-[documentation](https://www.consul.io/docs/agent/config-entries/service-resolver.html).
+[documentation](/docs/agent/config-entries/service-resolver).
### Configure Service Splitting - 100% of traffic to Version 1
@@ -248,7 +248,7 @@ The configuration entry for service splitting has the `kind` of
act on. The `splits` field takes an array which defines the different splits; in
this example, there are only two splits; however, it is [possible to configure
multiple sequential
-splits](https://www.consul.io/docs/connect/l7-traffic-management.html#splitting).
+splits](/docs/connect/l7-traffic-management#splitting).
Each split has a `weight` which defines the percentage of traffic to distribute
to each service subset. The total weights for all splits must equal 100. For
@@ -278,7 +278,7 @@ configuration.
Write this configuration entry using the CLI as well.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_100_0.json
```
@@ -293,7 +293,7 @@ splitting. Start the service, register it, and start its connect sidecar with
the following command. This command will run in the foreground, so youβll need
to open a new terminal window after you run it.
-```shell
+```shell-session
$ docker-compose -f docker-compose-v2.yml up
```
@@ -333,7 +333,7 @@ contains the following.
Write the new configuration using the CLI.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_50_50.json
```
@@ -341,7 +341,7 @@ Now that youβve increased the percentage of traffic to v2, curl the web servic
again. Consul will equally distribute traffic across both of the service
subsets.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -381,14 +381,14 @@ configuration for a 100% split to version 2 contains the following.
Apply it with the CLI, providing the path to the configuration entry.
-```shell
+```shell-session
$ consul config write l7_config/api_service_splitter_0_100.json
```
Now when you curl the web service again. 100% of traffic goes to the version
2 subset.
-```hcl
+```shell-session
$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
@@ -423,7 +423,7 @@ environments in the opposite order that you created them in.
First youβll stop and remove the containers created for v2 of the API service.
-```shell
+```shell-session
$ docker-compose -f docker-compose-v2.yml down
Stopping consul-demo-traffic-splitting_api_proxy_v2_1 ... done
Stopping consul-demo-traffic-splitting_api_v2_1 ... done
@@ -436,7 +436,7 @@ Network consul-demo-traffic-splitting_vpcbr is external, skipping
Then, youβll stop and remove the containers and the network that you created in
the first docker compose command.
-```shell
+```shell-session
$ docker-compose down
Stopping consul-demo-traffic-splitting_api_proxy_v1_1 ... done
Stopping consul-demo-traffic-splitting_web_envoy_1 ... done
@@ -457,4 +457,4 @@ In this guide, we walked you through the steps required to perform Canary
deployments using traffic splitting and resolution.
Find out more about L7 traffic management settings in the
-[documentation](https://www.consul.io/docs/connect/l7-traffic-management.html).
+[documentation](/docs/connect/l7-traffic-management).
diff --git a/website/pages/docs/guides/containers-guide.mdx b/website/pages/docs/guides/containers-guide.mdx
index 66d27df6ce..59aa0794b2 100644
--- a/website/pages/docs/guides/containers-guide.mdx
+++ b/website/pages/docs/guides/containers-guide.mdx
@@ -24,7 +24,7 @@ By following this guide you will learn how to:
The guide is Docker-focused, but the principles you will learn apply to other container runtimes as well.
-!> Security Warning This guide is not for production use. Please refer to the [Consul Reference Architecture](https://learn.hashicorp.com/consul/datacenter-deploy/reference-architecture) for Consul best practices and the [Docker Documentation](https://docs.docker.com/) for Docker best practices.
+!> Security Warning This guide is not for production use. Please refer to the [Consul Reference Architecture](https://learn.hashicorp.com/tutorials/consul/reference-architecture) for Consul best practices and the [Docker Documentation](https://docs.docker.com/) for Docker best practices.
## Prerequisites
@@ -40,13 +40,13 @@ If you would like to interact with your containerized Consul agents using a loca
First, pull the latest image. You will use Consul's official Docker image in this guide.
-```shell
+```shell-session
$ docker pull consul
```
Check the image was downloaded by listing Docker images that match `consul`.
-```shell
+```shell-session
$ docker images -f 'reference=consul'
REPOSITORY TAG IMAGE ID CREATED SIZE
consul latest c836e84db154 4 days ago 107MB
@@ -56,7 +56,7 @@ consul latest c836e84db154 4 days ago 107MB
Next, you will use Docker command-line flags to start the agent as a server, configure networking, and bootstrap the datacenter when one server is up.
-```shell
+```shell-session
$ docker run \
-d \
-p 8500:8500 \
@@ -77,7 +77,7 @@ To avoid mounting volumes or copying files to the container you can also save [c
You can find the IP address of the Consul server by executing the `consul members` command inside of the `badger` container.
-```shell
+```shell-session
$ docker exec badger consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.4.4 2 dc1
@@ -87,7 +87,7 @@ server-1 172.17.0.2:8301 alive server 1.4.4 2 dc1
Next, deploy a containerized Consul client and instruct it to join the server by giving it the server's IP address. Do not use detached mode, so you can reference the client logs during later steps.
-```shell
+```shell-session
$ docker run \
--name=fox \
consul agent -node=client-1 -join=172.17.0.2
@@ -108,7 +108,7 @@ $ docker run \
In a new terminal, check that the client has joined by executing the `consul members` command again in the Consul server container.
-```shell
+```shell-session
$ docker exec badger consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.4.3 2 dc1
@@ -125,7 +125,7 @@ Start a service in a third container and register it with the Consul client. The
Pull the container and run it with port forwarding so that you can access it from your web browser by visiting [http://localhost:9001](http://localhost:9001).
-```shell
+```shell-session
$ docker pull hashicorp/counting-service:0.0.2
$ docker run \
-p 9001:9001 \
@@ -136,14 +136,14 @@ $ docker run \
Next, you will register the counting service with the Consul client by adding a service definition file called `counting.json` in the directory `consul/config`.
-```shell
+```shell-session
$ docker exec fox /bin/sh -c "echo '{\"service\": {\"name\": \"counting\", \"tags\": [\"go\"], \"port\": 9001}}' >> /consul/config/counting.json"
```
Since the Consul client does not automatically detect changes in the
configuration directory, you will need to issue a reload command for the same container.
-```shell
+```shell-session
$ docker exec fox consul reload
Configuration reload triggered
```
@@ -160,7 +160,7 @@ If you go back to the terminal window where you started the client, you should s
Now you can query Consul for the location of your service using the following dig command against Consul's DNS.
-```shell
+```shell-session
$ dig @127.0.0.1 -p 8600 counting.service.consul
; <<>> DiG 9.10.6 <<>> @127.0.0.1 -p 8600 counting.service.consul
@@ -202,7 +202,7 @@ You can access a containerized Consul datacenter in several different ways.
You can execute Consul commands directly inside of your Consul containers using `docker exec`.
-```shell
+```shell-session
$ docker exec consul members
Node Address Status Type Build Protocol DC Segment
server-1 172.17.0.2:8301 alive server 1.5.2 2 dc1
@@ -213,7 +213,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
You can also issue commands inside of your container by opening an interactive shell and using the Consul binary included in the container.
-```shell
+```shell-session
$ docker exec -it /bin/sh
/ # consul members
Node Address Status Type Build Protocol DC Segment
@@ -225,7 +225,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
If you have a local Consul binary in your PATH you can also export the `CONSUL_HTTP_ADDR` environment variable to point to the HTTP address of a remote Consul server. This will allow you to bypass `docker exec consul ` and use `consul ` directly.
-```shell
+```shell-session
$ export CONSUL_HTTP_ADDR=:8500
$ consul members
Node Address Status Type Build Protocol DC Segment
@@ -235,7 +235,7 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
In this guide, you are binding your containerized Consul server's client address to 0.0.0.0 which allows us to communicate with our Consul datacenter with a local Consul install. By default, the client address is bound to localhost.
-```shell
+```shell-session
$ which consul
/usr/local/bin/consul
$ consul members
@@ -248,19 +248,19 @@ client-1 172.17.0.3:8301 alive client 1.5.2 2 dc1
The official Consul container supports stopping, starting, and restarting. To stop a container, run `docker stop`.
-```shell
+```shell-session
$ docker stop
```
To start a container, run `docker start`.
-```shell
+```shell-session
$ docker start
```
To do an in-memory reload, send a SIGHUP to the container.
-```shell
+```shell-session
$ docker kill --signal=HUP
```
@@ -280,13 +280,13 @@ When a previously stopped server container is restarted using `docker start consul snapshot save backup.snap
```
This will leave the `backup.snap` snapshot file inside of your container. If you are not saving your snapshot to a [persistent volume](https://docs.docker.com/storage/volumes/) then you will need to use `docker cp` to move your snapshot to a location outside of your container.
-```shell
+```shell-session
$ docker cp :backup.snap ./
```
@@ -296,7 +296,7 @@ Users running the Consul Enterprise Docker containers can run the [consul snapsh
You can add configuration by passing the configuration JSON via the environment variable `CONSUL_LOCAL_CONFIG`.
-```shell
+```shell-session
$ docker run \
-d \
-e CONSUL_LOCAL_CONFIG='{
@@ -311,7 +311,7 @@ Setting `CONSUL_CLIENT_INTERFACE` or `CONSUL_BIND_INTERFACE` on `docker run` is
Setting the `CONSUL_ALLOW_PRIVILEGED_PORTS` runs setcap on the Consul binary, allowing it to bind to privileged ports. Note that not all Docker storage backends support this feature (notably AUFS).
-```shell
+```shell-session
$ docker run -d --net=host -e 'CONSUL_ALLOW_PRIVILEGED_PORTS=' consul -dns-port=53 -recursor=8.8.8.8
```
diff --git a/website/pages/docs/guides/discovery-namespaces.mdx b/website/pages/docs/guides/discovery-namespaces.mdx
index ae01022278..fc9f7ca64f 100644
--- a/website/pages/docs/guides/discovery-namespaces.mdx
+++ b/website/pages/docs/guides/discovery-namespaces.mdx
@@ -40,7 +40,7 @@ You should have at least one namespace configured. Review the [namespace
management]() documentation or execute the following command to create a
namespace.
-```shell
+```shell-session
$ consul namespace create app-team
```
@@ -76,7 +76,7 @@ service {
Next, register the service and its sidecar proxy using the Consul CLI by
specifying the registration file.
-```shell
+```shell-session
$ consul services register mysql.hcl
```
@@ -101,7 +101,7 @@ service {
Next register the service and its sidecar proxy.
-```shell
+```shell-session
$ consul services register wordpress.hcl -namespace app-team
```
@@ -116,7 +116,7 @@ To get a list of services in the default namespace use the `consul catalog` CLI
command. You do not need to add the flag any discover services in the `default`
namespace.
-```shell
+```shell-session
$ consul catalog services
consul
mysql
@@ -130,7 +130,7 @@ Add the `-namepsace` flag to discover services within a user-created namespace.
In the example below, you will use the `-namespace` flag with the CLI to
discover all services registered in the app-team namespace.
-```shell
+```shell-session
$ consul catalog services -namespace app-team
consul
wordpress
@@ -141,7 +141,7 @@ Notice that you do not see services that are registered in the default
namespace. To discover all services in the catalog, you will need to query all
Consul namespaces.
-```shell
+```shell-session
$ consul catalog services
consul
mysql
@@ -173,7 +173,7 @@ datacenter to the query, `service.namespace.datacenter.consul`.
To discover the location of service instances, you can use the DNS interface.
-```shell
+```shell-session
$ dig 127.0.0.1 -p 8500 wordpress.service.app-team.consul