website: 1.8.x catchup (#8648)
* website: purge existing directory * website: bulk update from master with changes specific to the upcoming 1.9 release excluded * test: revert envoy_version to 1.14.2 for existing-ca-path golden file
|
@ -13,7 +13,7 @@
|
|||
"id": "test-proxy",
|
||||
"metadata": {
|
||||
"namespace": "default",
|
||||
"envoy_version": "1.15.0"
|
||||
"envoy_version": "1.14.2"
|
||||
}
|
||||
},
|
||||
"static_resources": {
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
...require('@hashicorp/nextjs-scripts/.stylelintrc.js'),
|
||||
rules: {
|
||||
'selector-pseudo-class-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: ['first', 'last'],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
|
@ -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.
|
||||
|
||||
<!--
|
||||
This readme file contains several blocks of generated text, to make it easier to share common information
|
||||
across documentation website readmes. To generate these blocks from their source, run `npm run generate:readme`
|
||||
|
||||
Any edits to the readme are welcome outside the clearly noted boundaries of the blocks. Alternately, a
|
||||
block itself can be safely "forked" from the central implementation simply by removing the "BEGIN" and
|
||||
"END" comments from around it.
|
||||
-->
|
||||
|
||||
## 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)
|
||||
|
||||
<!-- BEGIN: contributions -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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 🚀
|
||||
|
||||
<!-- END: contributions -->
|
||||
|
||||
<!-- BEGIN: local-development -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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
|
||||
<!-- END: local-development -->
|
||||
|
||||
<!-- BEGIN: editing-markdown -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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
|
||||
<ProductDownloader
|
||||
product="Consul"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
/>
|
||||
```
|
||||
|
||||
To add a prerelease, an extra `prerelease` property can be added to the component as such:
|
||||
|
||||
```jsx
|
||||
<ProductDownloader
|
||||
product="Consul"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
prerelease={{
|
||||
type: 'release candidate', // the type of prerelease: beta, release candidate, etc.
|
||||
name: 'v1.0.0', // the name displayed in text on the website
|
||||
version: '1.0.0-rc1', // the actual version tag that was pushed to releases.hashicorp.com
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
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 <a href='https://releases.hashicorp.com/consul/{{ 1.0.0-rc1 }}'>downloaded here</a>.
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="CLI command">
|
||||
<!-- Intentionally skipped line.. -->
|
||||
```shell-session
|
||||
$ command ...
|
||||
```
|
||||
<!-- Intentionally skipped line.. -->
|
||||
</Tab>
|
||||
<Tab heading="API call using cURL">
|
||||
|
||||
```shell-session
|
||||
$ curl ...
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
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
|
||||
|
||||
<EnterpriseAlert />
|
||||
|
||||
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
|
||||
|
||||
<EnterpriseAlert>
|
||||
My custom text here, and <a href="#">a link</a>!
|
||||
</EnterpriseAlert>
|
||||
|
||||
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 <EnterpriseAlert inline />
|
||||
|
||||
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
|
||||
```
|
||||
````
|
||||
|
||||
<!-- END: editing-markdown -->
|
||||
|
||||
<!-- BEGIN: editing-docs-sidebars -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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/<section>` 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.
|
||||
|
||||
<!-- END: editing-docs-sidebars -->
|
||||
|
||||
<!-- BEGIN: releases -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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
|
||||
<ProductDownloader
|
||||
product="<Product>"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
/>
|
||||
```
|
||||
|
||||
To add a prerelease, an extra `prerelease` property can be added to the component as such:
|
||||
|
||||
```jsx
|
||||
<ProductDownloader
|
||||
product="<Product>"
|
||||
version={VERSION}
|
||||
downloads={downloadData}
|
||||
community="/resources"
|
||||
prerelease={{
|
||||
type: 'release candidate', // the type of prerelease: beta, release candidate, etc.
|
||||
name: 'v1.0.0', // the name displayed in text on the website
|
||||
version: '1.0.0-rc1', // the actual version tag that was pushed to releases.hashicorp.com
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
This configuration would display something like the following text on the website, emphasis added to the configurable parameters:
|
||||
|
||||
```
|
||||
A {{ release candidate }} for <Product> {{ v1.0.0 }} is available! The release can be <a href='https://releases.hashicorp.com/<product>/{{ 1.0.0-rc1 }}'>downloaded here</a>.
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
<!-- END: releases -->
|
||||
|
||||
<!-- BEGIN: redirects -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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/<product>/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
|
||||
<!-- END: redirects -->
|
||||
|
||||
<!-- BEGIN: browser-support -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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+** |
|
||||
|
||||
<!-- END: browser-support -->
|
||||
|
||||
<!-- BEGIN: deployment -->
|
||||
<!-- Generated text, do not edit directly -->
|
||||
|
||||
## 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.
|
||||
|
||||
<!-- END: deployment -->
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 12l-6 6M4 12h16H4zm16 0l-6-6 6 6z" stroke="#76767D" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
After Width: | Height: | Size: 234 B |
|
@ -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 (
|
||||
<div className={`g-basic-hero ${backgroundImage ? 'has-background' : ''}`}>
|
||||
<div className="g-grid-container">
|
||||
<h1 className="g-type-display-1">{heading}</h1>
|
||||
{content && <p className="g-type-body-large">{content}</p>}
|
||||
{links && links.length > 0 && (
|
||||
<>
|
||||
<div className="links">
|
||||
{links.slice(0, 2).map((link, stableIdx) => {
|
||||
const buttonVariant = stableIdx === 0 ? 'primary' : 'secondary'
|
||||
const linkType = link.type || 'inbound'
|
||||
|
||||
return (
|
||||
<Button
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
key={stableIdx}
|
||||
linkType={linkType}
|
||||
theme={{
|
||||
variant: buttonVariant,
|
||||
brand,
|
||||
background: 'light',
|
||||
}}
|
||||
title={link.text}
|
||||
url={link.url}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
{links[2] && (
|
||||
<div className="third-link">
|
||||
<a
|
||||
href={links[2].url}
|
||||
>
|
||||
<span className="g-type-buttons-and-standalone-links">
|
||||
{links[2].text}
|
||||
</span>
|
||||
<span className="icon">
|
||||
<InlineSvg src={RightArrowIcon} />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
.g-basic-hero {
|
||||
padding: 88px 0;
|
||||
|
||||
& .g-type-display-1 {
|
||||
color: var(--gray-1);
|
||||
text-align: center;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 0;
|
||||
max-width: 14em;
|
||||
}
|
||||
|
||||
& .g-type-body-large {
|
||||
color: var(--gray-3);
|
||||
margin: 0 auto 0 auto;
|
||||
text-align: center;
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
& .links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
/*
|
||||
* Margins here compensate for extra 8px margin on buttons
|
||||
* which are needed to center and space properly regardless of whether
|
||||
* buttons are wrapping to multiple lines or not.
|
||||
*/
|
||||
margin-top: calc(32px - 8px);
|
||||
margin-bottom: -8px;
|
||||
@media (--large) {
|
||||
margin-top: calc(40px - 8px);
|
||||
}
|
||||
|
||||
& .g-btn {
|
||||
/*
|
||||
* This ensures 16px between buttons at all times, while maintaining proper centering
|
||||
* when buttons wrap to multiple lines.
|
||||
* There will be an extra 8px space on all sides of the button group.
|
||||
* The top and bottom are accounted for by the -8px adjustment on `.action` margins.
|
||||
* The left and right excess is left as is - it's needed for proper centering when wrapping.
|
||||
*/
|
||||
margin: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
& .third-link {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 32px;
|
||||
|
||||
& a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--gray-4);
|
||||
|
||||
& .icon {
|
||||
margin-left: 8px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.has-background {
|
||||
background-repeat: no-repeat;
|
||||
background-color: var(--gray-7);
|
||||
background-image: url(/img/hero/pattern-desktop.svg);
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
background-image: url(/img/hero/pattern-mobile.svg);
|
||||
}
|
||||
|
||||
& .g-btn {
|
||||
background: var(--gray-7);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
function BeforeAfterDiagram({
|
||||
beforeHeading,
|
||||
beforeSubTitle,
|
||||
beforeImage,
|
||||
beforeDescription,
|
||||
afterHeading,
|
||||
afterSubTitle,
|
||||
afterImage,
|
||||
afterDescription,
|
||||
}) {
|
||||
return (
|
||||
<div className="g-timeline">
|
||||
<div>
|
||||
<span className="line"></span>
|
||||
<span className="line">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="11"
|
||||
height="15"
|
||||
viewBox="0 0 11 15"
|
||||
>
|
||||
<path
|
||||
fill="#CA2171"
|
||||
d="M0 0v15l5.499-3.751L11 7.5 5.499 3.749.002 0z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<span className="dot"></span>
|
||||
<h3>{beforeHeading}</h3>
|
||||
<span className="sub-heading">{beforeSubTitle}</span>
|
||||
<img
|
||||
src={beforeImage}
|
||||
alt={beforeSubTitle}
|
||||
className="static-callout"
|
||||
/>
|
||||
{beforeDescription && <p>{beforeDescription}</p>}
|
||||
</div>
|
||||
<div>
|
||||
<span className="dot"></span>
|
||||
<h3>{afterHeading}</h3>
|
||||
<span className="sub-heading">{afterSubTitle}</span>
|
||||
<div id="index-dynamic-animation">
|
||||
<img
|
||||
src={afterImage}
|
||||
alt={afterSubTitle}
|
||||
className="static-callout"
|
||||
/>
|
||||
</div>
|
||||
{afterDescription && <p>{afterDescription}</p>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default BeforeAfterDiagram
|
|
@ -1,146 +0,0 @@
|
|||
.g-timeline {
|
||||
align-content: space-between;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin: 0 -15px;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
flex-direction: row;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.no-intro {
|
||||
margin-top: -30px;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
margin-top: -90px;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
margin-top: -116px;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
margin-left: 18px;
|
||||
padding: 40px 15px 0 42px;
|
||||
position: relative;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
margin-left: 0;
|
||||
padding-left: 15px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
& .dot {
|
||||
border-color: #ca2171;
|
||||
}
|
||||
}
|
||||
|
||||
& .line {
|
||||
background-image: linear-gradient(180deg, #d2d4dc 50%, #c82070 100%);
|
||||
height: calc(100% - 12px);
|
||||
left: 8px;
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
width: 2px;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
rgba(229, 230, 235, 0),
|
||||
#d2d4dc 0%,
|
||||
#c82070 100%
|
||||
);
|
||||
height: 2px;
|
||||
left: 50%;
|
||||
top: 8px;
|
||||
width: calc(100% - 34px);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
background-image: linear-gradient(
|
||||
180deg,
|
||||
rgba(229, 230, 235, 0) 5%,
|
||||
#dadce3 70%,
|
||||
#d2d4dc 100%
|
||||
);
|
||||
bottom: calc(100% - 45px);
|
||||
height: 60px;
|
||||
top: auto;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
rgba(229, 230, 235, 0) 5%,
|
||||
#dadce3 26%,
|
||||
#d2d4dc 100%
|
||||
);
|
||||
height: 2px;
|
||||
left: auto;
|
||||
right: 50%;
|
||||
top: 8px;
|
||||
width: calc(50% + 120px);
|
||||
}
|
||||
}
|
||||
|
||||
& svg {
|
||||
position: absolute;
|
||||
top: calc(100% - 8px);
|
||||
transform: rotate(90deg);
|
||||
left: -4px;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
left: auto;
|
||||
right: -10px;
|
||||
top: -6px;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& h2 {
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
& .sub-heading {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
|
||||
@media (min-width: 992px) {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
& .dot {
|
||||
background: #f7f8fa;
|
||||
border: 2px solid #d2d4dc;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
height: 18px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
width: 18px;
|
||||
z-index: 1;
|
||||
|
||||
@media (min-width: 768px) {
|
||||
margin: 0 0 0 -9px;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
& p {
|
||||
margin-top: 40px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import InlineSvg from '@hashicorp/react-inline-svg'
|
||||
import Image from '@hashicorp/react-image'
|
||||
import Button from '@hashicorp/react-button'
|
||||
import QuoteMarksIcon from './img/quote.svg?include'
|
||||
|
||||
export default function CaseStudySlide({
|
||||
caseStudy: { person, quote, company, caseStudyURL },
|
||||
}) {
|
||||
return (
|
||||
<blockquote className="g-grid-container case-slide">
|
||||
<InlineSvg className="quotes" src={QuoteMarksIcon} />
|
||||
<h4 className="case g-type-display-4">{quote}</h4>
|
||||
<div className="case-content">
|
||||
<div className="person-container">
|
||||
<Image
|
||||
className="person-photo"
|
||||
url={person.photo}
|
||||
aspectRatio={[1, 1]}
|
||||
alt={`${person.firstName} ${person.lastName}`}
|
||||
/>
|
||||
<div className="person-name">
|
||||
<h5 className="g-type-display-5">
|
||||
{person.firstName} {person.lastName}
|
||||
</h5>
|
||||
<p>
|
||||
{person.title}, {company.name}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Image className="company-logo" url={company.logo} alt={company.name} />
|
||||
</div>
|
||||
<Button
|
||||
title="Read more"
|
||||
url={caseStudyURL}
|
||||
theme={{
|
||||
variant: 'tertiary',
|
||||
brand: 'consul',
|
||||
background: 'light',
|
||||
}}
|
||||
linkType="outbound"
|
||||
/>
|
||||
</blockquote>
|
||||
)
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" r="4" fill="#333"/></svg>
|
After Width: | Height: | Size: 139 B |
|
@ -0,0 +1 @@
|
|||
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="4" cy="4" r="4" fill="#c4c4c4"/></svg>
|
After Width: | Height: | Size: 142 B |
|
@ -0,0 +1 @@
|
|||
<svg width="56" height="56" xmlns="http://www.w3.org/2000/svg"><g stroke="#323339" stroke-width="1.5" fill="none" fill-rule="evenodd"><path d="M.75 28c0 15.05 12.2 27.25 27.25 27.25S55.25 43.05 55.25 28 43.05.75 28 .75.75 12.95.75 28z" fill="#FFF"/><path d="M36 28H20M26 22l-6 6 6 6" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
|
After Width: | Height: | Size: 342 B |
|
@ -0,0 +1,3 @@
|
|||
<svg width="19" height="15" viewBox="0 0 19 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.15 0.5H3.95L0 14.35H6.95L9.15 0.5ZM18.7 0.5H13.45L9.55 14.35H16.5L18.7 0.5Z" fill="#CA2171"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 214 B |
|
@ -0,0 +1 @@
|
|||
<svg width="56" height="56" xmlns="http://www.w3.org/2000/svg"><g stroke="#323339" stroke-width="1.5" fill="none" fill-rule="evenodd"><path d="M55.25 28c0 15.05-12.2 27.25-27.25 27.25S.75 43.05.75 28 12.95.75 28 .75 55.25 12.95 55.25 28z" fill="#FFF"/><path d="M20 28h16M30 22l6 6-6 6" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
|
After Width: | Height: | Size: 344 B |
|
@ -0,0 +1,99 @@
|
|||
import { useState } from 'react'
|
||||
import { isIE } from 'react-device-detect'
|
||||
|
||||
import Carousel from 'nuka-carousel'
|
||||
import CaseSlide from './case-study-slide'
|
||||
import Image from '@hashicorp/react-image'
|
||||
import InlineSvg from '@hashicorp/react-inline-svg'
|
||||
import ActiveControlDot from './img/active-control-dot.svg?include'
|
||||
import InactiveControlDot from './img/inactive-control-dot.svg?include'
|
||||
import LeftArrow from './img/left-arrow-control.svg?include'
|
||||
import RightArrow from './img/right-arrow-control.svg?include'
|
||||
|
||||
export default function CaseStudyCarousel({
|
||||
caseStudies,
|
||||
title,
|
||||
logoSection = { grayBackground: false, featuredLogos: [] },
|
||||
}) {
|
||||
const [slideIndex, setSlideIndex] = useState(0)
|
||||
const { grayBackground, featuredLogos } = logoSection
|
||||
|
||||
const caseStudySlides = caseStudies.map((caseStudy) => (
|
||||
<CaseSlide key={caseStudy.quote} caseStudy={caseStudy} />
|
||||
))
|
||||
const logoRows = featuredLogos && Math.ceil(featuredLogos.length / 3)
|
||||
|
||||
function renderControls() {
|
||||
return (
|
||||
<div className="carousel-controls">
|
||||
{caseStudies.map((caseStudy, stableIdx) => {
|
||||
return (
|
||||
<button
|
||||
key={caseStudy.quote}
|
||||
className="carousel-controls-button"
|
||||
onClick={() => setSlideIndex(stableIdx)}
|
||||
>
|
||||
<InlineSvg
|
||||
src={
|
||||
slideIndex === stableIdx
|
||||
? ActiveControlDot
|
||||
: InactiveControlDot
|
||||
}
|
||||
/>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function sideControls(icon, direction) {
|
||||
return (
|
||||
<button className="side-control" onClick={direction}>
|
||||
<InlineSvg src={icon} />
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<section
|
||||
className={`g-case-carousel ${grayBackground ? 'has-background' : ''}`}
|
||||
style={{ '--background-height': `${300 + logoRows * 100}px` }}
|
||||
>
|
||||
<h2 className="g-type-display-2">{title}</h2>
|
||||
{!isIE ? (
|
||||
<Carousel
|
||||
cellAlign="left"
|
||||
wrapAround={true}
|
||||
heightMode="current"
|
||||
slideIndex={slideIndex}
|
||||
slidesToShow={1}
|
||||
autoGenerateStyleTag
|
||||
renderBottomCenterControls={() => renderControls()}
|
||||
renderCenterLeftControls={({ previousSlide }) => {
|
||||
return sideControls(LeftArrow, previousSlide)
|
||||
}}
|
||||
renderCenterRightControls={({ nextSlide }) => {
|
||||
return sideControls(RightArrow, nextSlide)
|
||||
}}
|
||||
afterSlide={(slideIndex) => setSlideIndex(slideIndex)}
|
||||
>
|
||||
{caseStudySlides}
|
||||
</Carousel>
|
||||
) : null}
|
||||
<div className="background-section">
|
||||
{featuredLogos && featuredLogos.length > 0 && (
|
||||
<div className="mono-logos">
|
||||
{featuredLogos.map((featuredLogo) => (
|
||||
<Image
|
||||
key={featuredLogo.url}
|
||||
url={featuredLogo.url}
|
||||
alt={featuredLogo.companyName}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,279 @@
|
|||
.g-case-carousel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
padding-top: 128px;
|
||||
|
||||
& h2 {
|
||||
margin-bottom: 30px;
|
||||
max-width: 600px;
|
||||
text-align: center;
|
||||
white-space: pre-wrap;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
margin-top: 64px;
|
||||
white-space: initial;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: var(--background-height);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
&.has-background {
|
||||
&::after {
|
||||
content: '';
|
||||
background: var(--gray-7);
|
||||
}
|
||||
|
||||
& .background-section {
|
||||
background: var(--gray-7);
|
||||
}
|
||||
}
|
||||
|
||||
& .background-section {
|
||||
width: 100%;
|
||||
|
||||
& .mono-logos {
|
||||
align-items: baseline;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
max-width: 750px;
|
||||
margin: 0 auto;
|
||||
margin-top: 70px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
& > img {
|
||||
height: 100%;
|
||||
max-height: 40px;
|
||||
width: 33.33%;
|
||||
padding: 0 30px;
|
||||
margin: 24px 0;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
padding: 0 20px;
|
||||
max-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
& > picture {
|
||||
max-height: 40px;
|
||||
width: 33.33%;
|
||||
padding: 0 30px;
|
||||
margin: 24px 0;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
padding: 0 20px;
|
||||
max-height: 28px;
|
||||
}
|
||||
|
||||
& > img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .slider-control-bottomcenter {
|
||||
bottom: -35px !important;
|
||||
}
|
||||
|
||||
/* Begin `nuka-carousel` styles */
|
||||
& .slider {
|
||||
max-width: 1200px;
|
||||
|
||||
&:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
width: calc(100% - 48px) !important;
|
||||
}
|
||||
|
||||
& .slider-list {
|
||||
margin-bottom: 50px !important;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
margin-bottom: 30px !important;
|
||||
}
|
||||
}
|
||||
|
||||
& .slider-frame:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
& .slider-slide:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* End `nuka-carousel` styles */
|
||||
|
||||
& .side-control {
|
||||
border: none;
|
||||
background: none;
|
||||
margin: 20px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:hover:not([disabled]) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& svg path {
|
||||
stroke: var(--gray-2);
|
||||
}
|
||||
|
||||
&:disabled svg path {
|
||||
stroke: var(--gray-5);
|
||||
}
|
||||
}
|
||||
|
||||
& .case-slide {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
background: var(--white);
|
||||
padding: 64px;
|
||||
box-shadow: 0 8px 22px #dedede;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
box-shadow: none;
|
||||
border: 1px solid var(--gray-6);
|
||||
padding: 48px;
|
||||
}
|
||||
|
||||
@media (--medium-up) {
|
||||
max-width: 750px;
|
||||
}
|
||||
|
||||
& button {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
& .quotes {
|
||||
display: flex;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
& h4 {
|
||||
margin: 0;
|
||||
|
||||
&.case {
|
||||
min-height: 130px;
|
||||
margin-bottom: 24px;
|
||||
color: var(--gray-2);
|
||||
|
||||
@media (max-width: 800px) {
|
||||
min-height: 155px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
@media (max-width: 650px) {
|
||||
min-height: 190px;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
font-size: 18px;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& a {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
& .case-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
& .person-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& picture {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
& .person-photo {
|
||||
border-radius: 50%;
|
||||
max-height: 72px;
|
||||
margin-right: 24px;
|
||||
}
|
||||
|
||||
& .person-name {
|
||||
& h5 {
|
||||
margin: 0;
|
||||
|
||||
@media (max-width: 400px) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
& p {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .company-logo {
|
||||
max-height: 40px;
|
||||
max-width: 180px;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
& .case {
|
||||
color: var(--gray-5);
|
||||
font-size: 24px;
|
||||
line-height: 31px; /* Called for within the design, no custom property seemed appropriate */
|
||||
}
|
||||
}
|
||||
|
||||
& .carousel-controls {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
|
||||
& .carousel-controls-button {
|
||||
height: 20px;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import Button from '@hashicorp/react-button'
|
||||
|
||||
export default function CloudOfferingsList({ offerings }) {
|
||||
return (
|
||||
<ul className="g-cloud-offerings-list">
|
||||
{offerings.map(offering => (
|
||||
<li key={offering.title}>
|
||||
<a
|
||||
href={offering.link.url}
|
||||
rel={offering.link.type === 'outbound' ? 'noopener' : undefined}
|
||||
target={offering.link.type === 'outbound' ? '_blank' : undefined}
|
||||
>
|
||||
<img src={offering.image} alt={offering.title}/>
|
||||
<span className="g-type-label-strong">{offering.eyebrow}</span>
|
||||
<h4>{offering.title}</h4>
|
||||
<p>{offering.description}</p>
|
||||
<Button
|
||||
title={offering.link.text}
|
||||
linkType={offering.link.type}
|
||||
theme={{ variant: 'tertiary' }}
|
||||
url={offering.link.url}
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
ul.g-cloud-offerings-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: -16px;
|
||||
display: flex;
|
||||
|
||||
@media (width < 769px) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
& li {
|
||||
flex-grow: 1;
|
||||
margin: 16px;
|
||||
background: var(--white);
|
||||
border: 1px solid var(--gray-6);
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
transition: box-shadow 0.25s, transform 0.25s, -webkit-transform 0.25s;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 16px 28px rgba(37, 38, 45, 0.12);
|
||||
transform: translateY(-4px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
& > a {
|
||||
display: block;
|
||||
padding: 32px;
|
||||
color: inherit;
|
||||
|
||||
& > img {
|
||||
display: block;
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
& > span {
|
||||
color: var(--gray-4);
|
||||
}
|
||||
|
||||
& > h4 {
|
||||
text-decoration: none;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
& > p {
|
||||
font-size: 19px;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
# Enterprise Alert Component
|
||||
|
||||
This component is an easy way to mark some content as only applicable to the enterprise version of consul. It can be used in any documentation pages in a variety of ways. The basic implementation is written as such, on its own line within a markdown file:
|
||||
|
||||
```jsx
|
||||
<EnterpriseAlert />
|
||||
```
|
||||
|
||||
And renders [like this](https://p176.p0.n0.cdn.getcloudapp.com/items/geuWOzkz/Screen%20Shot%202020-05-08%20at%204.17.34%20PM.png?v=2ace1c70f48cf1bbdd17f9ce96684453)
|
||||
|
||||
The default text can also be replaced with custom text as such:
|
||||
|
||||
```jsx
|
||||
<EnterpriseAlert>
|
||||
Custom text <a href="">with a link</a>
|
||||
</EnterpriseAlert>
|
||||
```
|
||||
|
||||
Which renders [as such](https://p176.p0.n0.cdn.getcloudapp.com/items/v1uDE2vQ/Screen%20Shot%202020-05-08%20at%204.18.22%20PM.png?v=3a45268830fac868be50047060bb4303)
|
||||
|
||||
Finally, it can be rendered inline as a "tag" to mark a section or option as enterprise only by adding the `inline` attribute:
|
||||
|
||||
```jsx
|
||||
<EnterpriseAlert inline>
|
||||
```
|
||||
|
||||
This is typically used after a list item, or after a headline. It renders [as such](https://p176.p0.n0.cdn.getcloudapp.com/items/KouqnrOm/Screen%20Shot%202020-05-08%20at%204.16.34%20PM.png?v=ac21328916aa98a1a853cde5989058bd)
|
|
@ -1,5 +0,0 @@
|
|||
import EnterpriseAlert from '@hashicorp/react-enterprise-alert'
|
||||
|
||||
export default function EnterpriseAlertConsul(props) {
|
||||
return <EnterpriseAlert product="consul" {...props} />
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<svg width="160" height="96" viewBox="0 0 160 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="90" cy="6" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="70" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="70" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="90" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="154" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="134" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="134" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="154" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="90" cy="70" r="6" fill="#CA2171"/>
|
||||
<circle cx="70" cy="70" r="6" fill="#CA2171"/>
|
||||
<circle cx="70" cy="90" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="90" cy="90" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="154" cy="70" r="6" fill="#CA2171"/>
|
||||
<circle cx="134" cy="70" r="6" fill="#CA2171"/>
|
||||
<circle cx="134" cy="90" r="6" fill="#CA2171"/>
|
||||
<circle cx="154" cy="90" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="26" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="6" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="6" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="26" cy="26" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="26" cy="70" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="6" cy="70" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="6" cy="90" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="26" cy="90" r="6" fill="#BDBEC2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1,10 @@
|
|||
<svg width="32" height="96" viewBox="0 0 32 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="26" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="6" cy="6" r="6" fill="#CA2171"/>
|
||||
<circle cx="6" cy="26" r="6" fill="#CA2171"/>
|
||||
<circle cx="26" cy="26" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="26" cy="70" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="6" cy="70" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="6" cy="90" r="6" fill="#BDBEC2"/>
|
||||
<circle cx="26" cy="90" r="6" fill="#BDBEC2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 472 B |
|
@ -0,0 +1,34 @@
|
|||
import EnterpriseComparison from '../../enterprise-comparison'
|
||||
|
||||
export default function ConsulEnterpriseComparison() {
|
||||
return (
|
||||
<EnterpriseComparison
|
||||
title="When to consider Consul Enterprise"
|
||||
itemOne={{
|
||||
title: 'Technical Complexity',
|
||||
label: 'Open Source',
|
||||
imageUrl: require('./img/consul-oss.svg?url'),
|
||||
description:
|
||||
'Consul Open Source enables individuals to discover services and securely manage connections between them across cloud, on-prem, and hybrid environments.',
|
||||
link: {
|
||||
text: 'View Open Source Features',
|
||||
url: 'https://www.hashicorp.com/products/consul/pricing/',
|
||||
type: 'outbound',
|
||||
},
|
||||
}}
|
||||
itemTwo={{
|
||||
title: 'Organizational Complexity',
|
||||
label: 'Enterprise',
|
||||
imageUrl: require('./img/consul-enterprise.svg?url'),
|
||||
description:
|
||||
'Consul Enterprise provides the foundation for organizations to build an enterprise-ready service networking environment for multiple teams by enabling governance capabilities.',
|
||||
link: {
|
||||
text: 'View Enterprise Features',
|
||||
url: 'https://www.hashicorp.com/products/consul/pricing/',
|
||||
type: 'outbound',
|
||||
},
|
||||
}}
|
||||
brand="consul"
|
||||
/>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="128" height="18" viewBox="0 0 128 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<line x1="1.14564e-07" y1="9" x2="127.277" y2="9.00001" stroke="#BDBEC2" stroke-width="2"/>
|
||||
<path d="M118 1L126.5 9L118 17" stroke="#BDBEC2" stroke-width="2"/>
|
||||
</svg>
|
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,52 @@
|
|||
import Image from '@hashicorp/react-image'
|
||||
import Button from '@hashicorp/react-button'
|
||||
import InlineSvg from '@hashicorp/react-inline-svg'
|
||||
import ArrowIcon from './img/arrow.svg?include'
|
||||
|
||||
export default function EnterpriseComparison({
|
||||
title,
|
||||
itemOne,
|
||||
itemTwo,
|
||||
brand,
|
||||
}) {
|
||||
return (
|
||||
<div className="g-enterprise-comparison">
|
||||
<div className="g-grid-container">
|
||||
<h2 className="g-type-display-2">{title}</h2>
|
||||
|
||||
<div className="content-container">
|
||||
<div className="item">
|
||||
<Image url={itemOne.imageUrl} />
|
||||
<div className="g-type-label-strong">{itemOne.label}</div>
|
||||
<h4 className="g-type-display-4">{itemOne.title}</h4>
|
||||
|
||||
<p className="g-type-body">{itemOne.description}</p>
|
||||
<Button
|
||||
url={itemOne.link.url}
|
||||
title={itemOne.link.text}
|
||||
linkType={itemOne.link.type}
|
||||
theme={{ variant: 'tertiary', brand }}
|
||||
/>
|
||||
</div>
|
||||
<div className="spacer">
|
||||
<div className="vertical-spacer"></div>
|
||||
<InlineSvg className="arrow" src={ArrowIcon} />
|
||||
</div>
|
||||
<div className="item">
|
||||
<Image url={itemTwo.imageUrl} />
|
||||
<div className="g-type-label-strong">{itemTwo.label}</div>
|
||||
<h4 className="g-type-display-4">{itemTwo.title}</h4>
|
||||
|
||||
<p className="g-type-body">{itemTwo.description}</p>
|
||||
<Button
|
||||
url={itemTwo.link.url}
|
||||
title={itemTwo.link.text}
|
||||
linkType={itemTwo.link.type}
|
||||
theme={{ variant: 'tertiary', brand }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
.g-enterprise-comparison {
|
||||
padding-top: 128px;
|
||||
padding-bottom: 128px;
|
||||
background: var(--gray-7);
|
||||
|
||||
& h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
padding-top: 64px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
& .content-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto 64px auto;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
& .item {
|
||||
flex-basis: 50%;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin-top: 64px;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
margin-top: 64px;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
& .g-type-label-strong {
|
||||
margin-top: 64px;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
margin-top: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
& h4 {
|
||||
white-space: pre;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
& picture {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
& img {
|
||||
max-width: 160px;
|
||||
max-height: 98px;
|
||||
}
|
||||
& p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 24px;
|
||||
|
||||
@media (max-width: 800px) {
|
||||
max-width: 600px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .spacer {
|
||||
& .vertical-spacer {
|
||||
height: 93px;
|
||||
}
|
||||
|
||||
& .arrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .more-features-link {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
padding: 25px 0 17px 0;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
border-top: 1px solid var(--gray-6);
|
||||
|
||||
& .g-container {
|
||||
display: flex;
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
import Button from '@hashicorp/react-button'
|
||||
|
||||
export default function LearnNomad({ headline, brand, items }) {
|
||||
return (
|
||||
<div className={`g-learn-callout brand-${brand ? brand : 'neutral'}`}>
|
||||
<div className="g-grid-container learn-container">
|
||||
<div className="column-container">
|
||||
{/* need this wrapper to flex center the .column-content */}
|
||||
<div>
|
||||
<div className="column-content">
|
||||
<h2 className="g-type-display-2">{headline}</h2>
|
||||
<Button
|
||||
className="desktop-button"
|
||||
title="Explore HashiCorp Learn"
|
||||
url={`https://learn.hashicorp.com/${brand}`}
|
||||
linkType="outbound"
|
||||
theme={{ variant: 'primary', brand }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{items.map((item) => {
|
||||
return (
|
||||
<a
|
||||
key={item.title}
|
||||
href={item.link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div className="course">
|
||||
<div className="image">
|
||||
<div className="g-type-label-strong time">{item.time}</div>
|
||||
<img src={item.image} alt={item.title} />
|
||||
</div>
|
||||
<div className="content">
|
||||
<div>
|
||||
<label className="g-type-label-strong category">
|
||||
{item.category}
|
||||
</label>
|
||||
<h4 className="g-type-display-4">{item.title}</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<Button
|
||||
className="mobile-button"
|
||||
title="Explore HashiCorp Learn"
|
||||
url={`https://learn.hashicorp.com/${brand}`}
|
||||
linkType="outbound"
|
||||
theme={{ variant: 'primary', brand }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
.g-learn-callout {
|
||||
padding-top: 88px;
|
||||
padding-bottom: 88px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
padding-top: 64px;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
|
||||
& .learn-container {
|
||||
@media (max-width: 1200px) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
& .mobile-button {
|
||||
@media (min-width: 1201px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .column-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 36px;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
margin: 0 -16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
& .column-content {
|
||||
& h2 {
|
||||
@media (max-width: 1200px) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .desktop-button {
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin: 0 16px;
|
||||
width: 33.333%;
|
||||
overflow: auto;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
text-align: center;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
& > a {
|
||||
margin: 0 16px;
|
||||
width: 33.333%;
|
||||
transition: box-shadow 0.25s, transform 0.25s, -webkit-transform 0.25s;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 16px 28px rgba(37, 38, 45, 0.12);
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
width: calc(50% - 32px);
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
width: 100%;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
& .course {
|
||||
border: 1px solid var(--gray-6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
|
||||
& > div {
|
||||
min-height: 200px;
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
& .image {
|
||||
background: var(--gray-7);
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
& img {
|
||||
max-width: 80px;
|
||||
max-height: 80px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
& h4 {
|
||||
color: var(--gray-2);
|
||||
}
|
||||
|
||||
& .time {
|
||||
color: var(--gray-4);
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
& .content {
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
@media (max-width: 768px) {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
& h4 {
|
||||
margin: 24px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.brand-consul {
|
||||
& .content label {
|
||||
color: var(--consul);
|
||||
}
|
||||
}
|
||||
|
||||
/* Brand -- Nomad */
|
||||
&.brand-nomad {
|
||||
& .content label {
|
||||
color: var(--nomad);
|
||||
}
|
||||
}
|
||||
|
||||
/* Brand -- Packer */
|
||||
&.brand-packer {
|
||||
& .content label {
|
||||
color: var(--packer);
|
||||
}
|
||||
}
|
||||
|
||||
/* Brand -- Terraform */
|
||||
&.brand-terraform {
|
||||
& .content label {
|
||||
color: var(--terraform);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import CallToAction from '@hashicorp/react-call-to-action'
|
||||
|
||||
export default function PrefooterCTA() {
|
||||
return (
|
||||
<CallToAction
|
||||
heading="Ready to get started?"
|
||||
content="Consul Open Source addresses the technical complexity of managing production services by providing a way to discover, automate, secure and connect applications and networking configurations across distributed infrastructure and clouds."
|
||||
brand="consul"
|
||||
links={[
|
||||
{
|
||||
text: 'Explore HashiCorp Learn',
|
||||
url: 'https://learn.hashicorp.com/consul',
|
||||
type: 'outbound',
|
||||
},
|
||||
{
|
||||
text: 'Explore Documentation',
|
||||
url: '/docs',
|
||||
type: 'inbound',
|
||||
},
|
||||
]}
|
||||
variant="compact"
|
||||
theme="light"
|
||||
/>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import Search from '@hashicorp/react-search'
|
||||
|
||||
export default function SearchBar() {
|
||||
return (
|
||||
<Search
|
||||
renderHitContent={({ hit, Highlight }) => (
|
||||
<>
|
||||
<span className="name">
|
||||
<Highlight attribute="page_title" hit={hit} tagName="span" />
|
||||
</span>
|
||||
<span className="description">
|
||||
<Highlight attribute="description" hit={hit} tagName="span" />
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
resolveHitLink={(hit) => ({
|
||||
href: {
|
||||
pathname: `/${transformIdtoUrl(hit.objectID)}`,
|
||||
},
|
||||
})}
|
||||
placeholder="Search Consul documentation"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function transformIdtoUrl(id) {
|
||||
return id.replace(/\/index$/, '')
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
.g-search {
|
||||
width: calc(100% - 2rem);
|
||||
max-width: 600px;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Tabs Component
|
||||
|
||||
> An MDX-compatible Tabs component
|
||||
|
||||
This React component renders tabbed content. [Example](https://p176.p0.n0.cdn.getcloudapp.com/items/E0ubRrlq/Screen%20Recording%202020-05-08%20at%2004.40%20PM.gif?v=a1f576d2c207f4312ca14adbce8a53ac)
|
||||
|
||||
## Usage
|
||||
|
||||
- Use the `<Tabs>` tag in your markdown file to begin a tabbed content section.
|
||||
- Use the `<Tab>` tag with a `heading` prop to separate your markdown
|
||||
|
||||
### Important
|
||||
|
||||
A line must be skipped between the `<Tab>` and your markdown (for both above and below said markdown). [This is a limitation of MDX also pointed out by the Docusaurus folks 🔗 ](https://v2.docusaurus.io/docs/markdown-features/#multi-language-support-code-blocks). There is work currently happening with the mdx parser to eliminate this issue.
|
||||
|
||||
### Example
|
||||
|
||||
```jsx
|
||||
<Tabs>
|
||||
<Tab heading="CLI command">
|
||||
{/* Intentionally skipped line.. */}
|
||||
### Content
|
||||
{/* Intentionally skipped line.. */}
|
||||
</Tab>
|
||||
<Tab heading="API call using cURL">### Content</Tab>
|
||||
</Tabs>
|
||||
```
|
||||
|
||||
### Component Props
|
||||
|
||||
`<Tabs>` can be provided any arbitrary `children` so long as the `heading` prop is present the React or HTML tag used to wrap markdown, that said, we provide the `<Tab>` component to separate your tab content without rendering extra, unnecessary markup.
|
||||
|
||||
This works:
|
||||
|
||||
```jsx
|
||||
<Tabs>
|
||||
<Tab heading="CLI command">### Content</Tab>
|
||||
....
|
||||
</Tabs>
|
||||
```
|
||||
|
||||
This _does not_ work, as the `<Tab>` element is missing a `heading` prop:
|
||||
|
||||
```jsx
|
||||
<Tabs>
|
||||
<Tab>### Content</Tab>
|
||||
....
|
||||
</Tabs>
|
||||
```
|
|
@ -1,20 +0,0 @@
|
|||
import ReactTabs from '@hashicorp/react-tabs'
|
||||
|
||||
export function Tabs({ children }) {
|
||||
if (!Array.isArray(children))
|
||||
throw new Error('Multiple <Tab> elements required')
|
||||
|
||||
return (
|
||||
<ReactTabs
|
||||
items={children.map((Block) => ({
|
||||
heading: Block.props.heading,
|
||||
// eslint-disable-next-line react/display-name
|
||||
tabChildren: () => Block,
|
||||
}))}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export function Tab({ children }) {
|
||||
return <>{children}</>
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
/* This is a CSS overwrite on top of the existing component styles to accommodate the Learn layout */
|
||||
.g-tabs {
|
||||
& .g-grid-container,
|
||||
& > .g-grid-container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
|
@ -3,6 +3,6 @@ export const ALERT_BANNER_ACTIVE = true
|
|||
// https://github.com/hashicorp/web-components/tree/master/packages/alert-banner
|
||||
export default {
|
||||
tag: 'Announcing',
|
||||
url: 'https://www.hashicorp.com/products/consul/service-on-azure',
|
||||
text: 'HashiCorp Consul Service on Azure Public Beta Available Now',
|
||||
url: 'https://www.hashicorp.com/blog/consul-service-on-azure-general-availability',
|
||||
text: 'HashiCorp Consul Service on Azure General Availability',
|
||||
}
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
export default [
|
||||
'index',
|
||||
{
|
||||
category: 'acl',
|
||||
content: [
|
||||
{
|
||||
category: 'auth-method',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
{
|
||||
category: 'binding-rule',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'bootstrap',
|
||||
{
|
||||
category: 'policy',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
{
|
||||
category: 'role',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'set-agent-token',
|
||||
{
|
||||
category: 'token',
|
||||
content: ['clone', 'create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'translate-rules',
|
||||
],
|
||||
},
|
||||
'agent',
|
||||
{ category: 'catalog', content: ['datacenters', 'nodes', 'services'] },
|
||||
{ category: 'config', content: ['delete', 'list', 'read', 'write'] },
|
||||
{ category: 'connect', content: ['ca', 'proxy', 'envoy', 'expose'] },
|
||||
'debug',
|
||||
'event',
|
||||
'exec',
|
||||
'force-leave',
|
||||
'info',
|
||||
{
|
||||
category: 'intention',
|
||||
content: ['check', 'create', 'delete', 'get', 'match'],
|
||||
},
|
||||
'join',
|
||||
'keygen',
|
||||
'keyring',
|
||||
{
|
||||
category: 'kv',
|
||||
content: ['delete', 'export', 'get', 'import', 'put'],
|
||||
},
|
||||
'leave',
|
||||
'license',
|
||||
'lock',
|
||||
'login',
|
||||
'logout',
|
||||
'maint',
|
||||
'members',
|
||||
'monitor',
|
||||
{
|
||||
category: 'namespace',
|
||||
content: ['create', 'delete', 'list', 'read', 'update', 'write'],
|
||||
},
|
||||
{
|
||||
category: 'operator',
|
||||
content: ['area', 'autopilot', 'raft'],
|
||||
},
|
||||
'reload',
|
||||
'rtt',
|
||||
{ category: 'services', content: ['register', 'deregister'] },
|
||||
{
|
||||
category: 'snapshot',
|
||||
content: ['agent', 'inspect', 'restore', 'save'],
|
||||
},
|
||||
{ category: 'tls', content: ['ca', 'cert'] },
|
||||
'validate',
|
||||
'version',
|
||||
'watch',
|
||||
]
|
|
@ -7,110 +7,162 @@
|
|||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
{ category: 'install', content: ['ports', 'bootstrapping', 'performance'] },
|
||||
{
|
||||
category: 'upgrading',
|
||||
content: ['compatibility', 'upgrade-specific'],
|
||||
},
|
||||
'glossary',
|
||||
{
|
||||
category: 'internals',
|
||||
content: [
|
||||
'architecture',
|
||||
'consensus',
|
||||
'gossip',
|
||||
'coordinates',
|
||||
'sessions',
|
||||
'anti-entropy',
|
||||
'security',
|
||||
'jepsen',
|
||||
'discovery-chain',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'commands',
|
||||
category: 'intro',
|
||||
content: [
|
||||
{
|
||||
category: 'acl',
|
||||
category: 'vs',
|
||||
content: [
|
||||
{
|
||||
category: 'auth-method',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
{
|
||||
category: 'binding-rule',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'bootstrap',
|
||||
{
|
||||
category: 'policy',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
{
|
||||
category: 'role',
|
||||
content: ['create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'set-agent-token',
|
||||
{
|
||||
category: 'token',
|
||||
content: ['clone', 'create', 'delete', 'list', 'read', 'update'],
|
||||
},
|
||||
'translate-rules',
|
||||
'zookeeper',
|
||||
'chef-puppet',
|
||||
'nagios-sensu',
|
||||
'skydns',
|
||||
'smartstack',
|
||||
'serf',
|
||||
'eureka',
|
||||
'istio',
|
||||
'proxies',
|
||||
'custom',
|
||||
],
|
||||
},
|
||||
'agent',
|
||||
{ category: 'catalog', content: ['datacenters', 'nodes', 'services'] },
|
||||
{ category: 'config', content: ['delete', 'list', 'read', 'write'] },
|
||||
{ category: 'connect', content: ['ca', 'proxy', 'envoy', 'expose'] },
|
||||
'debug',
|
||||
'event',
|
||||
'exec',
|
||||
'force-leave',
|
||||
'info',
|
||||
{
|
||||
category: 'intention',
|
||||
content: ['check', 'create', 'delete', 'get', 'match'],
|
||||
},
|
||||
'join',
|
||||
'keygen',
|
||||
'keyring',
|
||||
{
|
||||
category: 'kv',
|
||||
content: ['delete', 'export', 'get', 'import', 'put'],
|
||||
},
|
||||
'leave',
|
||||
'license',
|
||||
'lock',
|
||||
'login',
|
||||
'logout',
|
||||
'maint',
|
||||
'members',
|
||||
'monitor',
|
||||
{
|
||||
category: 'namespace',
|
||||
content: ['create', 'delete', 'list', 'read', 'update', 'write'],
|
||||
},
|
||||
{
|
||||
category: 'operator',
|
||||
content: ['area', 'autopilot', 'raft'],
|
||||
},
|
||||
'reload',
|
||||
'rtt',
|
||||
{ category: 'services', content: ['register', 'deregister'] },
|
||||
{
|
||||
category: 'snapshot',
|
||||
content: ['agent', 'inspect', 'restore', 'save'],
|
||||
},
|
||||
{ category: 'tls', content: ['ca', 'cert'] },
|
||||
'validate',
|
||||
'version',
|
||||
'watch',
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
category: 'install',
|
||||
content: [
|
||||
{ title: 'Consul Agent', href: '/docs/agent' },
|
||||
'glossary',
|
||||
'ports',
|
||||
'bootstrapping',
|
||||
'cloud-auto-join',
|
||||
'performance',
|
||||
{ title: 'Kubernetes', href: '/docs/k8s' },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'discovery',
|
||||
name: 'Service Discovery',
|
||||
content: ['services', 'dns', 'checks'],
|
||||
},
|
||||
|
||||
{
|
||||
category: 'connect',
|
||||
content: [
|
||||
'connect-internals',
|
||||
'configuration',
|
||||
{
|
||||
category: 'proxies',
|
||||
content: ['envoy', 'built-in', 'integrate'],
|
||||
},
|
||||
{
|
||||
category: 'registration',
|
||||
content: ['service-registration', 'sidecar-service'],
|
||||
},
|
||||
'intentions',
|
||||
'observability',
|
||||
{
|
||||
category: 'l7-traffic',
|
||||
content: ['discovery-chain'],
|
||||
},
|
||||
'connectivity-tasks',
|
||||
{
|
||||
category: 'gateways',
|
||||
content: [
|
||||
{
|
||||
category: 'mesh-gateway',
|
||||
content: ['wan-federation-via-mesh-gateways'],
|
||||
},
|
||||
|
||||
'ingress-gateway',
|
||||
'terminating-gateway',
|
||||
],
|
||||
},
|
||||
'nomad',
|
||||
{ title: 'Kubernetes', href: '/docs/k8s/connect' },
|
||||
{ category: 'native', content: ['go'] },
|
||||
{
|
||||
category: 'ca',
|
||||
content: ['consul', 'vault', 'aws'],
|
||||
},
|
||||
'dev',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'k8s',
|
||||
content: [
|
||||
{
|
||||
category: 'installation',
|
||||
name: 'Get Started',
|
||||
content: [
|
||||
'install',
|
||||
{
|
||||
category: 'platforms',
|
||||
name: 'Platform Guides',
|
||||
content: [
|
||||
{
|
||||
title: 'Minikube',
|
||||
href:
|
||||
'https://learn.hashicorp.com/consul/kubernetes/minikube?utm_source=consul.io&utm_medium=docs&utm_content=k8s&utm_term=mk',
|
||||
},
|
||||
{
|
||||
title: 'AKS (Azure)',
|
||||
href:
|
||||
'https://learn.hashicorp.com/consul/kubernetes/azure-k8s?utm_source=consul.io&utm_medium=docs&utm_content=k8s&utm_term=aks',
|
||||
},
|
||||
{
|
||||
title: 'EKS (AWS)',
|
||||
href:
|
||||
'https://learn.hashicorp.com/consul/kubernetes/aws-k8s?utm_source=consul.io&utm_medium=docs&utm_content=k8s&utm_term=eks',
|
||||
},
|
||||
{
|
||||
title: 'GKE (Google Cloud)',
|
||||
href:
|
||||
'https://learn.hashicorp.com/consul/kubernetes/google-cloud-k8s?utm_source=consul.io&utm_medium=docs&utm_content=k8s&utm_term=gke',
|
||||
},
|
||||
'self-hosted-kubernetes',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'deployment-configurations',
|
||||
name: 'Deployment Configurations',
|
||||
content: [
|
||||
'clients-outside-kubernetes',
|
||||
'servers-outside-kubernetes',
|
||||
'consul-enterprise',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'multi-cluster',
|
||||
content: ['kubernetes', 'vms-and-kubernetes'],
|
||||
},
|
||||
],
|
||||
},
|
||||
'tls-on-existing-cluster',
|
||||
{
|
||||
category: 'connect',
|
||||
content: [
|
||||
'ingress-gateways',
|
||||
'terminating-gateways',
|
||||
'connect-ca-provider',
|
||||
'ambassador',
|
||||
],
|
||||
},
|
||||
'service-sync',
|
||||
'dns',
|
||||
'upgrade',
|
||||
'uninstall',
|
||||
'helm',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'dynamic-app-config',
|
||||
name: 'Dynamic App Configuration',
|
||||
content: ['kv', 'sessions', 'watches'],
|
||||
},
|
||||
{
|
||||
category: 'agent',
|
||||
content: [
|
||||
'dns',
|
||||
'options',
|
||||
{
|
||||
category: 'config-entries',
|
||||
|
@ -124,101 +176,70 @@ export default [
|
|||
'terminating-gateway',
|
||||
],
|
||||
},
|
||||
'cloud-auto-join',
|
||||
'services',
|
||||
'checks',
|
||||
'kv',
|
||||
'sentinel',
|
||||
'encryption',
|
||||
'telemetry',
|
||||
'watches',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'acl',
|
||||
content: [
|
||||
'acl-system',
|
||||
'acl-rules',
|
||||
'acl-legacy',
|
||||
'acl-migrate-tokens',
|
||||
{ category: 'auth-methods', content: ['kubernetes', 'jwt', 'oidc']},
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'connect',
|
||||
content: [
|
||||
'configuration',
|
||||
'observability',
|
||||
'l7-traffic-management',
|
||||
'intentions',
|
||||
'connect-internals',
|
||||
{
|
||||
category: 'proxies',
|
||||
content: ['envoy', 'built-in', 'integrate'],
|
||||
},
|
||||
'mesh_gateway',
|
||||
'wan-federation-via-mesh-gateways',
|
||||
'ingress_gateway',
|
||||
'terminating_gateway',
|
||||
{
|
||||
category: 'registration',
|
||||
content: ['service-registration', 'sidecar-service'],
|
||||
},
|
||||
'security',
|
||||
{
|
||||
category: 'ca',
|
||||
content: ['consul', 'vault', 'aws'],
|
||||
},
|
||||
{ category: 'native', content: ['go'] },
|
||||
'dev',
|
||||
'nomad',
|
||||
{ title: 'Kubernetes', href: '/docs/k8s/connect' },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'k8s',
|
||||
category: 'security',
|
||||
content: [
|
||||
{
|
||||
category: 'installation',
|
||||
category: 'acl',
|
||||
content: [
|
||||
'aks',
|
||||
'eks',
|
||||
'gke',
|
||||
'minikube',
|
||||
'consul-enterprise',
|
||||
'clients-outside-kubernetes',
|
||||
'servers-outside-kubernetes',
|
||||
'predefined-pvcs',
|
||||
'acl-system',
|
||||
'acl-rules',
|
||||
'acl-legacy',
|
||||
'acl-migrate-tokens',
|
||||
{ category: 'auth-methods', content: ['kubernetes', 'jwt', 'oidc'] },
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'operations',
|
||||
name: 'Operations',
|
||||
content: ['upgrading', 'tls-on-existing-cluster', 'uninstalling'],
|
||||
},
|
||||
'dns',
|
||||
'service-sync',
|
||||
'connect',
|
||||
'ambassador',
|
||||
'helm',
|
||||
'encryption',
|
||||
],
|
||||
},
|
||||
'-------',
|
||||
'common-errors',
|
||||
'faq',
|
||||
'--------',
|
||||
'partnerships',
|
||||
{
|
||||
category: 'enterprise',
|
||||
content: [
|
||||
'audit-logging',
|
||||
'backups',
|
||||
'upgrades',
|
||||
'read-scale',
|
||||
{
|
||||
title: 'Single sign-on - OIDC',
|
||||
href: '/docs/security/acl/auth-methods/oidc',
|
||||
},
|
||||
'redundancy',
|
||||
'federation',
|
||||
'network-segments',
|
||||
'namespaces',
|
||||
'network-segments',
|
||||
'sentinel',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'architecture',
|
||||
content: ['anti-entropy', 'consensus', 'gossip', 'jepsen', 'coordinates'],
|
||||
},
|
||||
{
|
||||
category: 'integrate',
|
||||
name: 'Integrations',
|
||||
content: [
|
||||
'partnerships',
|
||||
{
|
||||
title: 'Ambassador Integration',
|
||||
href: '/docs/k8s/connect/ambassador',
|
||||
},
|
||||
{
|
||||
title: 'Proxy Integration',
|
||||
href: '/docs/connect/proxies/integrate',
|
||||
},
|
||||
],
|
||||
},
|
||||
'download-tools',
|
||||
{
|
||||
category: 'upgrading',
|
||||
content: ['compatibility', 'upgrade-specific'],
|
||||
},
|
||||
{
|
||||
category: 'troubleshoot',
|
||||
name: 'Troubleshoot',
|
||||
content: ['common-errors', 'faq'],
|
||||
},
|
||||
]
|
||||
|
|
|
@ -6,22 +6,4 @@
|
|||
// the landing page for the category, or a "name" property to
|
||||
// serve as the category title in the sidebar
|
||||
|
||||
export default [
|
||||
'index',
|
||||
{
|
||||
category: 'vs',
|
||||
content: [
|
||||
'zookeeper',
|
||||
'chef-puppet',
|
||||
'nagios-sensu',
|
||||
'skydns',
|
||||
'smartstack',
|
||||
'serf',
|
||||
'eureka',
|
||||
'istio',
|
||||
'proxies',
|
||||
'custom',
|
||||
],
|
||||
},
|
||||
'getting-started',
|
||||
]
|
||||
export default ['getting-started']
|
||||
|
|
|
@ -1,18 +1,31 @@
|
|||
export default [
|
||||
{ text: 'Overview', url: '/docs/intro' },
|
||||
{
|
||||
text: 'Use Cases',
|
||||
submenu: [
|
||||
{ text: 'Service Discovery', url: '/discovery' },
|
||||
{ text: 'Service Mesh', url: '/mesh' },
|
||||
{
|
||||
text: 'Service Discovery and Health Checking',
|
||||
url: '/use-cases/service-discovery-and-health-checking',
|
||||
},
|
||||
{
|
||||
text: 'Network Infrastructure Automation',
|
||||
url: '/use-cases/network-infrastructure-automation',
|
||||
},
|
||||
{
|
||||
text: 'Multi-Platform Service Mesh',
|
||||
url: '/use-cases/multi-platform-service-mesh',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Intro',
|
||||
url: '/intro',
|
||||
type: 'inbound',
|
||||
text: 'Enterprise',
|
||||
url:
|
||||
'https://www.hashicorp.com/products/consul/?utm_source=oss&utm_medium=header-nav&utm_campaign=consul',
|
||||
type: 'outbound',
|
||||
},
|
||||
'divider',
|
||||
{
|
||||
text: 'Learn',
|
||||
text: 'Tutorials',
|
||||
url: 'https://learn.hashicorp.com/consul',
|
||||
type: 'outbound',
|
||||
},
|
||||
|
@ -26,15 +39,14 @@ export default [
|
|||
url: '/api-docs',
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'CLI',
|
||||
url: '/commands',
|
||||
type: 'inbound,'
|
||||
},
|
||||
{
|
||||
text: 'Community',
|
||||
url: '/community',
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Enterprise',
|
||||
url:
|
||||
'https://www.hashicorp.com/products/consul/?utm_source=oss&utm_medium=header-nav&utm_campaign=consul',
|
||||
type: 'outbound',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/api-navigation.js'
|
||||
import { frontMatter as data } from '../pages/api-docs/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import EnterpriseAlert from '../components/enterprise-alert'
|
||||
import { Tabs, Tab } from '../components/tabs'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import { createMdxProvider } from '@hashicorp/nextjs-scripts/lib/providers/docs'
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import { SearchProvider } from '@hashicorp/react-search'
|
||||
import SearchBar from '../components/search-bar'
|
||||
import { frontMatter as data } from '../pages/api-docs/**/*.mdx'
|
||||
import order from '../data/api-navigation.js'
|
||||
|
||||
const DEFAULT_COMPONENTS = { EnterpriseAlert, Tabs, Tab }
|
||||
const MDXProvider = createMdxProvider({ product: 'consul' })
|
||||
|
||||
function ApiDocsLayoutWrapper(pageMeta) {
|
||||
function ApiDocsLayout(props) {
|
||||
const { children, ...propsWithoutChildren } = props
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<MDXProvider>
|
||||
<DocsPage
|
||||
{...props}
|
||||
{...propsWithoutChildren}
|
||||
product="consul"
|
||||
head={{
|
||||
is: Head,
|
||||
|
@ -27,10 +28,16 @@ function ApiDocsLayoutWrapper(pageMeta) {
|
|||
category: 'api-docs',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
disableFilter: true,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/consul/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
>
|
||||
<SearchProvider>
|
||||
<SearchBar />
|
||||
{children}
|
||||
</SearchProvider>
|
||||
</DocsPage>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/commands-navigation.js'
|
||||
import { frontMatter as data } from '../pages/commands/**/*.mdx'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import { createMdxProvider } from '@hashicorp/nextjs-scripts/lib/providers/docs'
|
||||
|
||||
const MDXProvider = createMdxProvider({ product: 'consul' })
|
||||
|
||||
function CommandsLayoutWrapper(pageMeta) {
|
||||
function CommandsLayout(props) {
|
||||
return (
|
||||
<MDXProvider>
|
||||
<DocsPage
|
||||
{...props}
|
||||
product="consul"
|
||||
head={{
|
||||
is: Head,
|
||||
title: `${pageMeta.page_title} | Consul by HashiCorp`,
|
||||
description: pageMeta.description,
|
||||
siteName: 'Consul by HashiCorp',
|
||||
}}
|
||||
sidenav={{
|
||||
Link,
|
||||
category: 'commands',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/consul/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
CommandsLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||
|
||||
return CommandsLayout
|
||||
}
|
||||
|
||||
export default CommandsLayoutWrapper
|
|
@ -1,20 +1,21 @@
|
|||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/docs-navigation.js'
|
||||
import { frontMatter as data } from '../pages/docs/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import EnterpriseAlert from '../components/enterprise-alert'
|
||||
import { Tabs, Tab } from '../components/tabs'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import { createMdxProvider } from '@hashicorp/nextjs-scripts/lib/providers/docs'
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import { SearchProvider } from '@hashicorp/react-search'
|
||||
import SearchBar from '../components/search-bar'
|
||||
import { frontMatter as data } from '../pages/docs/**/*.mdx'
|
||||
import order from '../data/docs-navigation.js'
|
||||
|
||||
const DEFAULT_COMPONENTS = { EnterpriseAlert, Tabs, Tab }
|
||||
const MDXProvider = createMdxProvider({ product: 'consul' })
|
||||
|
||||
function DocsLayoutWrapper(pageMeta) {
|
||||
function DocsLayout(props) {
|
||||
const { children, ...propsWithoutChildren } = props
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<MDXProvider>
|
||||
<DocsPage
|
||||
{...props}
|
||||
{...propsWithoutChildren}
|
||||
product="consul"
|
||||
head={{
|
||||
is: Head,
|
||||
|
@ -27,10 +28,16 @@ function DocsLayoutWrapper(pageMeta) {
|
|||
category: 'docs',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
disableFilter: true,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/consul/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
>
|
||||
<SearchProvider>
|
||||
<SearchBar />
|
||||
{children}
|
||||
</SearchProvider>
|
||||
</DocsPage>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import order from '../data/intro-navigation.js'
|
||||
import { frontMatter as data } from '../pages/intro/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import EnterpriseAlert from '../components/enterprise-alert'
|
||||
import { Tabs, Tab } from '../components/tabs'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import { createMdxProvider } from '@hashicorp/nextjs-scripts/lib/providers/docs'
|
||||
import DocsPage from '@hashicorp/react-docs-page'
|
||||
import { SearchProvider } from '@hashicorp/react-search'
|
||||
import SearchBar from '../components/search-bar'
|
||||
import { frontMatter as data } from '../pages/intro/**/*.mdx'
|
||||
import order from '../data/intro-navigation.js'
|
||||
|
||||
const DEFAULT_COMPONENTS = { EnterpriseAlert, Tabs, Tab }
|
||||
const MDXProvider = createMdxProvider({ product: 'consul' })
|
||||
|
||||
function IntroLayoutWrapper(pageMeta) {
|
||||
function IntroLayout(props) {
|
||||
const { children, ...propsWithoutChildren } = props
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<MDXProvider>
|
||||
<DocsPage
|
||||
{...props}
|
||||
{...propsWithoutChildren}
|
||||
product="consul"
|
||||
head={{
|
||||
is: Head,
|
||||
|
@ -27,10 +28,16 @@ function IntroLayoutWrapper(pageMeta) {
|
|||
category: 'intro',
|
||||
currentPage: props.path,
|
||||
data,
|
||||
disableFilter: true,
|
||||
order,
|
||||
}}
|
||||
resourceURL={`https://github.com/hashicorp/consul/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
/>
|
||||
>
|
||||
<SearchProvider>
|
||||
<SearchBar />
|
||||
{children}
|
||||
</SearchProvider>
|
||||
</DocsPage>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
import BasicHero from '../../components/basic-hero'
|
||||
import PrefooterCTA from '../../components/prefooter-cta'
|
||||
import ConsulEnterpriseComparison from '../../components/enterprise-comparison/consul'
|
||||
import Head from 'next/head'
|
||||
import HashiHead from '@hashicorp/react-head'
|
||||
|
||||
export default function UseCaseLayout({
|
||||
title,
|
||||
description,
|
||||
guideLink,
|
||||
children,
|
||||
}) {
|
||||
const pageTitle = `Consul ${title}`
|
||||
return (
|
||||
<>
|
||||
<HashiHead is={Head} title={pageTitle} description={description}>
|
||||
<meta name="og:title" property="og:title" content={pageTitle} />
|
||||
</HashiHead>
|
||||
|
||||
<div id="p-use-case">
|
||||
<BasicHero
|
||||
heading={title}
|
||||
content={description}
|
||||
brand="consul"
|
||||
links={[
|
||||
{
|
||||
text: 'Explore HashiCorp Learn',
|
||||
url: guideLink,
|
||||
type: 'outbound',
|
||||
},
|
||||
{
|
||||
text: 'Explore Documentation',
|
||||
url: '/docs',
|
||||
type: 'inbound',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div className="g-grid-container">
|
||||
<h2 className="g-type-display-2 features-header">Features</h2>
|
||||
</div>
|
||||
{children}
|
||||
<ConsulEnterpriseComparison />
|
||||
<PrefooterCTA />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
#p-use-case {
|
||||
& .features-header {
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Overriding the g-text-split component to have
|
||||
* a header size closer to a h3 than a h2, as within
|
||||
* the context of this page this text-split is more deeply
|
||||
* nested within the page than we normally have it.
|
||||
* */
|
||||
& .g-text-split {
|
||||
& h2 {
|
||||
font-size: 1.5rem;
|
||||
letter-spacing: -0.004em;
|
||||
line-height: 1.375em;
|
||||
|
||||
@media (--medium-up) {
|
||||
font-size: 1.75rem;
|
||||
line-height: 1.321em;
|
||||
}
|
||||
|
||||
@media (--large) {
|
||||
font-size: 2rem;
|
||||
letter-spacing: -0.006em;
|
||||
line-height: 1.313em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .with-border {
|
||||
& .g-text-split {
|
||||
& .children {
|
||||
border-width: 1px;
|
||||
border-color: rgba(174, 176, 183, 0.45);
|
||||
border-style: solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// If there is a hash in the url, this script will check whether the hash matches
|
||||
// the anchor link IDs for any element on the page and log it to our analytics.
|
||||
|
||||
export default function anchorLinkAnalytics() {
|
||||
if (
|
||||
typeof window === 'undefined' ||
|
||||
!window.requestIdleCallback ||
|
||||
!window.analytics
|
||||
)
|
||||
return
|
||||
|
||||
window.requestIdleCallback(() => {
|
||||
const hash = window.location.hash
|
||||
if (hash.length < 1) return
|
||||
|
||||
const targets = [].slice.call(
|
||||
document.querySelectorAll('.__target-lic, .__target-h')
|
||||
)
|
||||
const targetMatch = targets.find((t) => t.id === hash.replace(/^#/, ''))
|
||||
window.analytics.track('Anchor Link', { hash, hit: !!targetMatch })
|
||||
})
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
import React from 'react'
|
||||
import Bugsnag from '@bugsnag/js'
|
||||
import BugsnagReact from '@bugsnag/plugin-react'
|
||||
|
||||
const apiKey =
|
||||
typeof window === 'undefined'
|
||||
? 'be8ed0d0fc887d547284cce9e98e60e5' // server key
|
||||
: '01625078d856ef022c88f0c78d2364f1' // client key
|
||||
|
||||
if (!Bugsnag._client) {
|
||||
Bugsnag.start({
|
||||
apiKey,
|
||||
plugins: [new BugsnagReact(React)],
|
||||
otherOptions: { releaseStage: process.env.NODE_ENV || 'development' },
|
||||
})
|
||||
}
|
||||
|
||||
export default Bugsnag
|
|
@ -1,76 +0,0 @@
|
|||
const isProd = process.env.NODE_ENV === 'production'
|
||||
|
||||
const segmentWriteKey = isProd
|
||||
? 'IyzLrqXkox5KJ8XL4fo8vTYNGfiKlTCm'
|
||||
: '0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
|
||||
|
||||
// TODO: refactor into web components
|
||||
let utilityServerRoot = isProd
|
||||
? 'https://util.hashicorp.com'
|
||||
: 'https://hashicorp-web-util-staging.herokuapp.com'
|
||||
|
||||
if (process.env.UTIL_SERVER) {
|
||||
utilityServerRoot = process.env.UTIL_SERVER.replace(/\/$/, '')
|
||||
}
|
||||
|
||||
// Consent manager configuration
|
||||
export default {
|
||||
version: 3,
|
||||
container: '#consent-manager',
|
||||
companyName: 'HashiCorp',
|
||||
privacyPolicyLink: 'https://hashicorp.com/privacy',
|
||||
segmentWriteKey: segmentWriteKey,
|
||||
utilServerRoot: utilityServerRoot,
|
||||
segmentServices: [
|
||||
{
|
||||
key: 'googleanalytics',
|
||||
name: 'Google Analytics',
|
||||
description:
|
||||
'Google Analytics is a popular service for tracking web traffic. We use this data to determine what content our users find important so that we can dedicate more resources toward it.',
|
||||
category: 'Analytics',
|
||||
},
|
||||
{
|
||||
name: 'Hotjar',
|
||||
description:
|
||||
'Hotjar is a service that generates heatmaps of where users click on our sites. We use this information to ensure that our site is not confusing, and simple to use and navigate.',
|
||||
category: 'Analytics',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Insight Tag',
|
||||
description:
|
||||
'This small script allows us to see how effective our linkedin campaigns are by showing which users have clicked through to our site.',
|
||||
category: 'Analytics',
|
||||
},
|
||||
{
|
||||
name: 'Marketo V2',
|
||||
description:
|
||||
'Marketo is a marketing automation tool that allows us to segment users into different categories based off of their behaviors. We use this information to provide tailored information to users in our email campaigns.',
|
||||
},
|
||||
],
|
||||
categories: [
|
||||
{
|
||||
name: 'Functional',
|
||||
description:
|
||||
'Functional services provide a utility to the website, such as the ability to log in, or to get live support. Disabling any of these scripts will cause that utility to be missing from the site.',
|
||||
},
|
||||
{
|
||||
name: 'Analytics',
|
||||
description:
|
||||
'Analytics services keep track of page traffic and user behavior while browsing the site. We use this data internally to improve the usability and performance of the site. Disabling any of these scripts makes it more difficult for us to understand how our site is being used, and slower to improve it.',
|
||||
},
|
||||
{
|
||||
name: 'Email Marketing',
|
||||
description:
|
||||
'Email Marketing services track user behavior while browsing the site. We use this data internally in our marketing efforts to provide users contextually relevant information based off of their behaviors. Disabling any of these scripts makes it more difficult for us to provide you contextually relevant information.',
|
||||
},
|
||||
],
|
||||
additionalServices: [
|
||||
{
|
||||
name: 'OptinMonster',
|
||||
description:
|
||||
"OptinMonster is a service that we use to show a prompt to sign up for our newsletter if it's perceived that you are interested in our content.",
|
||||
category: 'Functional',
|
||||
body: `var om598c8e3a6e43d,om598c8e3a6e43d_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){om598c8e3a6e43d_poll(function(){if(window['om_loaded']){if(!om598c8e3a6e43d){om598c8e3a6e43d=new OptinMonsterApp();return om598c8e3a6e43d.init({"s":"35109.598c8e3a6e43d","staging":0,"dev":0,"beta":0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src="https://a.optnmstr.com/app/js/api.min.js",o.async=true,o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){try{d=om_loaded=true;om598c8e3a6e43d=new OptinMonsterApp();om598c8e3a6e43d.init({"s":"35109.598c8e3a6e43d","staging":0,"dev":0,"beta":0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(o)}(document,"script","omapi-script");`,
|
||||
},
|
||||
],
|
||||
}
|
|
@ -15,7 +15,11 @@ module.exports = withHashicorp({
|
|||
},
|
||||
],
|
||||
},
|
||||
// Note: These are meant to be public, it's not a mistake that they are here
|
||||
env: {
|
||||
HASHI_ENV: process.env.HASHI_ENV,
|
||||
HASHI_ENV: process.env.HASHI_ENV || 'development',
|
||||
SEGMENT_WRITE_KEY: 'IyzLrqXkox5KJ8XL4fo8vTYNGfiKlTCm',
|
||||
BUGSNAG_CLIENT_KEY: '01625078d856ef022c88f0c78d2364f1',
|
||||
BUGSNAG_SERVER_KEY: 'be8ed0d0fc887d547284cce9e98e60e5',
|
||||
},
|
||||
})
|
||||
|
|
|
@ -4,63 +4,45 @@
|
|||
"version": "0.0.1",
|
||||
"author": "HashiCorp",
|
||||
"dependencies": {
|
||||
"@bugsnag/js": "^7.0.1",
|
||||
"@bugsnag/plugin-react": "^7.0.1",
|
||||
"@hashicorp/mktg-assets": "^1.0.0-alpha.7",
|
||||
"@hashicorp/nextjs-scripts": "^6.1.0",
|
||||
"@hashicorp/react-alert": "^2.0.0",
|
||||
"@hashicorp/react-alert-banner": "^3.0.13",
|
||||
"@hashicorp/react-button": "^2.1.9",
|
||||
"@hashicorp/react-call-to-action": "^0.1.6",
|
||||
"@hashicorp/react-case-study-slider": "^2.0.13",
|
||||
"@hashicorp/react-code-block": "^1.2.7",
|
||||
"@hashicorp/react-consent-manager": "^2.0.9",
|
||||
"@hashicorp/react-content": "^3.0.0-0",
|
||||
"@hashicorp/react-docs-page": "^1.3.1",
|
||||
"@hashicorp/react-docs-sidenav": "^3.2.3",
|
||||
"@hashicorp/react-docs-sitemap": "^1.0.0",
|
||||
"@hashicorp/react-enterprise-alert": "^2.1.0",
|
||||
"@hashicorp/react-footer": "^3.1.14",
|
||||
"@hashicorp/react-global-styles": "^4.2.0",
|
||||
"@hashicorp/react-head": "^0.1.1",
|
||||
"@hashicorp/react-hero": "^3.0.7",
|
||||
"@hashicorp/react-image": "^2.0.1",
|
||||
"@hashicorp/react-inline-svg": "^1.0.0",
|
||||
"@hashicorp/react-logo-grid": "^2.0.11",
|
||||
"@hashicorp/react-mega-nav": "^4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "^3.1.2",
|
||||
"@hashicorp/react-section-header": "^2.0.0",
|
||||
"@hashicorp/react-subnav": "^3.1.1",
|
||||
"@hashicorp/react-tabs": "^0.4.0",
|
||||
"@hashicorp/react-text-and-content": "^4.0.9",
|
||||
"@hashicorp/react-text-split": "^0.2.6",
|
||||
"@hashicorp/react-text-split-with-code": "0.0.9",
|
||||
"@hashicorp/react-text-split-with-image": "^1.2.6",
|
||||
"@hashicorp/react-text-split-with-logo-grid": "^1.0.4",
|
||||
"@hashicorp/react-use-cases": "^1.0.4",
|
||||
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||
"babel-plugin-import-glob-array": "^0.2.0",
|
||||
"highlight.js": "^10.0.1",
|
||||
"imagemin-mozjpeg": "^8.0.0",
|
||||
"imagemin-optipng": "^7.1.0",
|
||||
"imagemin-svgo": "^7.1.0",
|
||||
"isomorphic-unfetch": "^3.0.0",
|
||||
"marked": "^0.7.0",
|
||||
"next": "9.3.5",
|
||||
"nprogress": "^0.2.0",
|
||||
"nuka-carousel": "^4.6.7",
|
||||
"react": "^16.13.1",
|
||||
"react-device-detect": "^1.12.0",
|
||||
"react-dom": "^16.13.1",
|
||||
"slugify": "^1.4.0",
|
||||
"stringify-object": "^3.3.0"
|
||||
"@hashicorp/nextjs-scripts": "11.1.1",
|
||||
"@hashicorp/react-alert": "2.0.3",
|
||||
"@hashicorp/react-alert-banner": "3.2.1",
|
||||
"@hashicorp/react-button": "2.2.4",
|
||||
"@hashicorp/react-call-to-action": "0.2.4",
|
||||
"@hashicorp/react-case-study-slider": "2.1.4",
|
||||
"@hashicorp/react-code-block": "1.2.9",
|
||||
"@hashicorp/react-content": "4.0.2",
|
||||
"@hashicorp/react-docs-page": "5.0.0",
|
||||
"@hashicorp/react-featured-slider": "1.1.4",
|
||||
"@hashicorp/react-global-styles": "4.4.2",
|
||||
"@hashicorp/react-head": "1.1.3",
|
||||
"@hashicorp/react-image": "2.0.3",
|
||||
"@hashicorp/react-inline-svg": "1.0.2",
|
||||
"@hashicorp/react-logo-grid": "2.1.4",
|
||||
"@hashicorp/react-mega-nav": "4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "4.1.1",
|
||||
"@hashicorp/react-product-features-list": "1.0.3",
|
||||
"@hashicorp/react-search": "^2.1.0",
|
||||
"@hashicorp/react-section-header": "2.0.2",
|
||||
"@hashicorp/react-subnav": "3.2.6",
|
||||
"@hashicorp/react-text-and-content": "4.1.4",
|
||||
"@hashicorp/react-text-split": "0.4.0",
|
||||
"@hashicorp/react-text-split-with-code": "0.2.0",
|
||||
"@hashicorp/react-text-split-with-image": "1.4.0",
|
||||
"@hashicorp/react-text-split-with-logo-grid": "1.3.0",
|
||||
"@hashicorp/react-use-cases": "1.0.6",
|
||||
"@hashicorp/react-vertical-text-block-list": "2.0.3",
|
||||
"babel-plugin-import-glob-array": "0.2.0",
|
||||
"next": "9.4.4",
|
||||
"nuka-carousel": "4.7.0",
|
||||
"react": "16.13.1",
|
||||
"react-device-detect": "1.13.1",
|
||||
"react-dom": "16.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dart-linkcheck": "^2.0.15",
|
||||
"glob": "^7.1.6",
|
||||
"husky": "^4.2.5",
|
||||
"inquirer": "^7.1.0",
|
||||
"prettier": "^2.0.5"
|
||||
"dart-linkcheck": "2.0.15",
|
||||
"husky": "4.2.5",
|
||||
"prettier": "2.0.5"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
@ -69,11 +51,12 @@
|
|||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "node --max-old-space-size=2048 ./node_modules/.bin/next build",
|
||||
"build": "node --max-old-space-size=4096 ./node_modules/.bin/next build",
|
||||
"dynamic": "NODE_ENV=production next build && next start",
|
||||
"export": "node --max-old-space-size=2048 ./node_modules/.bin/next export",
|
||||
"export": "node --max-old-space-size=4096 ./node_modules/.bin/next export",
|
||||
"format": "next-hashicorp format",
|
||||
"generate:component": "next-hashicorp generate component",
|
||||
"generate:readme": "next-hashicorp markdown-blocks README.md",
|
||||
"lint": "next-hashicorp lint",
|
||||
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
|
||||
"static": "npm run build && npm run export && cp _redirects out/.",
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
import Link from 'next/link'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export default function NotFound() {
|
||||
useEffect(() => {
|
||||
if (
|
||||
typeof window !== 'undefined' &&
|
||||
typeof window?.analytics?.track === 'function' &&
|
||||
typeof window?.document?.referrer === 'string' &&
|
||||
typeof window?.location?.href === 'string'
|
||||
)
|
||||
window.analytics.track(window.location.href, {
|
||||
category: '404 Response',
|
||||
label: window.document.referrer || 'No Referrer',
|
||||
})
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div id="p-404">
|
||||
<h1>Page Not Found</h1>
|
||||
<p>
|
||||
We‘re sorry but we can‘t find the page you‘re looking
|
||||
for.
|
||||
</p>
|
||||
<p>
|
||||
<Link href="/">
|
||||
<a>Back to Home</a>
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -1,100 +1,83 @@
|
|||
import './style.css'
|
||||
import App from 'next/app'
|
||||
import NProgress from 'nprogress'
|
||||
import '@hashicorp/nextjs-scripts/lib/nprogress/style.css'
|
||||
|
||||
import Router from 'next/router'
|
||||
import ProductSubnav from '../components/subnav'
|
||||
import Head from 'next/head'
|
||||
import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress'
|
||||
import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
||||
import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager'
|
||||
import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics'
|
||||
import HashiHead from '@hashicorp/react-head'
|
||||
import MegaNav from '@hashicorp/react-mega-nav'
|
||||
import Footer from '../components/footer'
|
||||
import AlertBanner from '@hashicorp/react-alert-banner'
|
||||
import { ConsentManager, open } from '@hashicorp/react-consent-manager'
|
||||
import consentManagerConfig from '../lib/consent-manager-config'
|
||||
import bugsnagClient from '../lib/bugsnag'
|
||||
import anchorLinkAnalytics from '../lib/anchor-link-analytics'
|
||||
import Footer from '../components/footer'
|
||||
import ProductSubnav from '../components/subnav'
|
||||
import alertBannerData, { ALERT_BANNER_ACTIVE } from '../data/alert-banner'
|
||||
import Error from './_error'
|
||||
import Head from 'next/head'
|
||||
import HashiHead from '@hashicorp/react-head'
|
||||
|
||||
Router.events.on('routeChangeStart', NProgress.start)
|
||||
Router.events.on('routeChangeError', NProgress.done)
|
||||
Router.events.on('routeChangeComplete', (url) => {
|
||||
setTimeout(() => window.analytics.page(url), 0)
|
||||
NProgress.done()
|
||||
NProgress({ Router })
|
||||
const { ConsentManager, openConsentManager } = createConsentManager({
|
||||
preset: 'oss',
|
||||
})
|
||||
|
||||
// Bugsnag
|
||||
const ErrorBoundary = bugsnagClient.getPlugin('react')
|
||||
|
||||
class NextApp extends App {
|
||||
static async getInitialProps({ 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 }
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
anchorLinkAnalytics()
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
anchorLinkAnalytics()
|
||||
}
|
||||
|
||||
render() {
|
||||
const { Component, pageProps } = this.props
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<HashiHead
|
||||
is={Head}
|
||||
title="Consul by HashiCorp"
|
||||
siteName="Consul by HashiCorp"
|
||||
description="Consul is a service networking solution to connect and secure services across any runtime platform and public or private cloud."
|
||||
image="https://www.consul.io/img/og-image.png"
|
||||
stylesheet={[
|
||||
{ href: '/css/nprogress.css' },
|
||||
{
|
||||
href:
|
||||
'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap',
|
||||
},
|
||||
]}
|
||||
icon={[{ href: '/favicon.ico' }]}
|
||||
preload={[
|
||||
{ href: '/fonts/klavika/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/light.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/book.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/semi-bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/dejavu/mono.woff2', as: 'font' },
|
||||
]}
|
||||
function App({ Component, pageProps }) {
|
||||
useAnchorLinkAnalytics()
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<HashiHead
|
||||
is={Head}
|
||||
title="Consul by HashiCorp"
|
||||
siteName="Consul by HashiCorp"
|
||||
description="Consul is a service networking solution to automate network configurations, discover services, and enable secure connectivity across any cloud or runtime."
|
||||
image="https://www.consul.io/img/og-image.png"
|
||||
icon={[{ href: '/favicon.ico' }]}
|
||||
preload={[
|
||||
{ href: '/fonts/klavika/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/light.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/medium.woff2', as: 'font' },
|
||||
{ href: '/fonts/gilmer/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/book.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/semi-bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/metro-sans/bold.woff2', as: 'font' },
|
||||
{ href: '/fonts/dejavu/mono.woff2', as: 'font' },
|
||||
]}
|
||||
>
|
||||
<meta
|
||||
name="og:title"
|
||||
property="og:title"
|
||||
content="Consul by HashiCorp"
|
||||
/>
|
||||
{ALERT_BANNER_ACTIVE && (
|
||||
<AlertBanner {...alertBannerData} theme="consul" />
|
||||
)}
|
||||
<MegaNav product="Consul" />
|
||||
<ProductSubnav />
|
||||
<div className="content">
|
||||
<Component {...pageProps} />
|
||||
</div>
|
||||
<Footer openConsentManager={open} />
|
||||
<ConsentManager {...consentManagerConfig} />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
</HashiHead>
|
||||
{ALERT_BANNER_ACTIVE && (
|
||||
<AlertBanner {...alertBannerData} theme="consul" />
|
||||
)}
|
||||
<MegaNav product="Consul" />
|
||||
<ProductSubnav />
|
||||
<div className="content">
|
||||
<Component {...pageProps} />
|
||||
</div>
|
||||
<Footer openConsentManager={openConsentManager} />
|
||||
<ConsentManager />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -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 <ErrorPage statusCode={this.props.statusCode || '¯\\_(ツ)_/¯'} />
|
||||
}
|
||||
function Error({ statusCode }) {
|
||||
console.log('this is working')
|
||||
return <NotFound statusCode={statusCode} />
|
||||
}
|
||||
|
||||
Error.getInitialProps = ({ res, err }) => {
|
||||
if (err) Bugsnag.notify(err)
|
||||
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
||||
return { statusCode }
|
||||
}
|
||||
|
||||
export default Error
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
<EnterpriseAlert> This is an enterprise only endpoint. This feature is currently in beta. </EnterpriseAlert>
|
||||
<EnterpriseAlert>
|
||||
{' '}
|
||||
This is an enterprise only endpoint. This feature is currently in beta.{' '}
|
||||
</EnterpriseAlert>
|
||||
|
||||
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: <required>)` - 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: <required>)` - See [Redirect
|
||||
- `RedirectURI` `(string: <required>)` - 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
|
||||
|
||||
<EnterpriseAlert> This is an enterprise only endpoint. This feature is currently in beta. </EnterpriseAlert>
|
||||
<EnterpriseAlert>
|
||||
{' '}
|
||||
This is an enterprise only endpoint. This feature is currently in beta.{' '}
|
||||
</EnterpriseAlert>
|
||||
|
||||
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: <required>)` - 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: <required>)` - 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 \
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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<NodeIdentity>)` - 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: "")` <EnterpriseAlert inline /> - 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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -38,10 +38,15 @@ The table below shows this endpoint's support for
|
|||
<sup>1</sup> The ACL required depends on the config entry kind being updated:
|
||||
</p>
|
||||
|
||||
| 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
|
|||
|
||||
<sup>1</sup> The ACL required depends on the config entry kind being read:
|
||||
|
||||
| Config Entry Kind | Required ACL |
|
||||
| ----------------- | -------------- |
|
||||
| service-defaults | `service:read` |
|
||||
| proxy-defaults | `<none>` |
|
||||
| Config Entry Kind | Required ACL |
|
||||
| ------------------- | -------------- |
|
||||
| ingress-gateway | `service:read` |
|
||||
| proxy-defaults | `<none>` |
|
||||
| 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
|
|||
|
||||
<sup>1</sup> The ACL required depends on the config entry kind being read:
|
||||
|
||||
| Config Entry Kind | Required ACL |
|
||||
| ----------------- | -------------- |
|
||||
| service-defaults | `service:read` |
|
||||
| proxy-defaults | `<none>` |
|
||||
| Config Entry Kind | Required ACL |
|
||||
| ------------------- | -------------- |
|
||||
| ingress-gateway | `service:read` |
|
||||
| proxy-defaults | `<none>` |
|
||||
| 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
|
|||
|
||||
<sup>1</sup> 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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -51,14 +51,14 @@ The table below shows this endpoint's support for
|
|||
service doesn't need to be registered.
|
||||
|
||||
- `SourceNS` `(string: "")` <EnterpriseAlert inline /> - The namespace for the
|
||||
`SourceName` parameter.
|
||||
`SourceName` parameter.
|
||||
|
||||
- `DestinationName` `(string: <required>)` - 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: "")` <EnterpriseAlert inline /> - The namespace for the
|
||||
`DestinationName` parameter.
|
||||
`DestinationName` parameter.
|
||||
|
||||
- `SourceType` `(string: <required>)` - 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",
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -90,7 +90,7 @@ The table below shows this endpoint's support for
|
|||
parameter.
|
||||
|
||||
- `OverrideMeshGateway` `(MeshGatewayConfig: <optional>)` - 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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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: <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 <consul token>" \
|
||||
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' \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -124,4 +124,8 @@ the community.
|
|||
<a href="https://github.com/rogerwelin/crystal-consul">crystal-consul</a> -
|
||||
Crystal client for the Consul HTTP API
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/adaptant-labs/consul-dart">consul-dart</a> -
|
||||
Dart client for the Consul HTTP API
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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' \
|
|
@ -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
|
||||
```
|
|
@ -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
|
||||
```
|
|
@ -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
|