Merge pull request #7092 - New Website
This commit is contained in:
commit
edf8907eae
65
.circleci/config.yml
generated
65
.circleci/config.yml
generated
|
@ -443,28 +443,29 @@ jobs:
|
|||
- GOTESTSUM_JUNITFILE: /tmp/test-reports/results.xml
|
||||
- NOMAD_SLOW_TEST: 1
|
||||
- PAGER: cat
|
||||
build-website:
|
||||
website-docker-image:
|
||||
docker:
|
||||
- image: hashicorp/middleman-hashicorp:0.3.35
|
||||
- image: circleci/buildpack-deps
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/project
|
||||
- restore_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
command: bundle check || bundle install --path vendor/bundle --retry=3
|
||||
name: install gems
|
||||
- save_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
paths:
|
||||
- ~/project/website/vendor/bundle
|
||||
command: |
|
||||
echo 'export PACKAGE_LOCK_CHANGED=$(git diff --name-only $(git log --pretty=format:'%h' -n1 HEAD~1)...HEAD | grep -c website/package-lock.json)' >> $BASH_ENV
|
||||
name: Diff package-lock.json
|
||||
- run:
|
||||
command: bundle exec middleman build
|
||||
name: middleman build
|
||||
- run:
|
||||
command: ./scripts/deploy.sh
|
||||
name: website deploy
|
||||
working_directory: ~/project/website
|
||||
command: |
|
||||
if [ "$CIRCLE_BRANCH" = "master" ] && [ $PACKAGE_LOCK_CHANGED -gt 0 ]; then
|
||||
cd website/
|
||||
docker build -t hashicorp/nomad-website:$CIRCLE_SHA1 .
|
||||
docker tag hashicorp/nomad-website:$CIRCLE_SHA1 hashicorp/nomad-website:latest
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker push hashicorp/nomad-website
|
||||
else
|
||||
echo "Not building a new website docker image - branch is not master and/or dependencies have not changed."
|
||||
fi
|
||||
name: Build Docker Image if Necessary
|
||||
test-other:
|
||||
machine:
|
||||
image: ubuntu-1604:201903-01
|
||||
|
@ -600,22 +601,6 @@ jobs:
|
|||
path: /tmp/test-reports
|
||||
- store_artifacts:
|
||||
path: /tmp/test-reports
|
||||
test-website:
|
||||
machine:
|
||||
image: ubuntu-1604:201903-01
|
||||
working_directory: ~/go/src/github.com/hashicorp/nomad
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: make test-website
|
||||
environment:
|
||||
- GIT_PAGER: cat
|
||||
- GOLANG_VERSION: 1.12.16
|
||||
- GOMAXPROCS: 1
|
||||
- GOPATH: /home/circleci/go
|
||||
- GOTESTSUM_JUNITFILE: /tmp/test-reports/results.xml
|
||||
- NOMAD_SLOW_TEST: 1
|
||||
- PAGER: cat
|
||||
test-docker:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
|
@ -919,18 +904,8 @@ workflows:
|
|||
ignore:
|
||||
- stable-website
|
||||
- /^docs-.*/
|
||||
- test-website:
|
||||
filters:
|
||||
branches:
|
||||
ignore:
|
||||
- /^.-ui\b.*/
|
||||
- /^docs-.*/
|
||||
- stable-website
|
||||
website:
|
||||
jobs:
|
||||
- build-website:
|
||||
filters:
|
||||
branches:
|
||||
only: stable-website
|
||||
- website-docker-image:
|
||||
context: static-sites
|
||||
version: 2
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# setting the working_directory along with the checkout path allows us to not have
|
||||
# to cd into the website/ directory for commands
|
||||
working_directory: ~/project/website
|
||||
docker:
|
||||
- image: hashicorp/middleman-hashicorp:0.3.35
|
||||
steps:
|
||||
- checkout:
|
||||
path: ~/project
|
||||
|
||||
# restores gem cache
|
||||
- restore_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
|
||||
- run:
|
||||
name: install gems
|
||||
command: bundle check || bundle install --path vendor/bundle --retry=3
|
||||
|
||||
# saves gem cache if we have changed the Gemfile
|
||||
- save_cache:
|
||||
key: static-site-gems-v1-{{ checksum "Gemfile.lock" }}
|
||||
paths:
|
||||
- ~/project/website/vendor/bundle
|
||||
|
||||
- run:
|
||||
name: middleman build
|
||||
command: bundle exec middleman build
|
||||
|
||||
- run:
|
||||
name: website deploy
|
||||
command: ./scripts/deploy.sh
|
|
@ -1,4 +0,0 @@
|
|||
executor: go-machine-recent
|
||||
steps:
|
||||
- checkout
|
||||
- run: make test-website
|
22
.circleci/config/jobs/website-docker-image.yml
Normal file
22
.circleci/config/jobs/website-docker-image.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
docker:
|
||||
- image: circleci/buildpack-deps
|
||||
shell: /usr/bin/env bash -euo pipefail -c
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Diff package-lock.json
|
||||
command: |
|
||||
echo 'export PACKAGE_LOCK_CHANGED=$(git diff --name-only $(git log --pretty=format:'%h' -n1 HEAD~1)...HEAD | grep -c website/package-lock.json)' >> $BASH_ENV
|
||||
- run:
|
||||
name: Build Docker Image if Necessary
|
||||
command: |
|
||||
if [ "$CIRCLE_BRANCH" = "master" ] && [ $PACKAGE_LOCK_CHANGED -gt 0 ]; then
|
||||
cd website/
|
||||
docker build -t hashicorp/nomad-website:$CIRCLE_SHA1 .
|
||||
docker tag hashicorp/nomad-website:$CIRCLE_SHA1 hashicorp/nomad-website:latest
|
||||
docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker push hashicorp/nomad-website
|
||||
else
|
||||
echo "Not building a new website docker image - branch is not master and/or dependencies have not changed."
|
||||
fi
|
|
@ -66,5 +66,3 @@ jobs:
|
|||
ignore:
|
||||
- stable-website
|
||||
- /^docs-.*/
|
||||
- test-website:
|
||||
filters: *backend_branches_filter
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
jobs:
|
||||
- build-website:
|
||||
- website-docker-image:
|
||||
context: static-sites
|
||||
filters:
|
||||
branches:
|
||||
only: stable-website
|
||||
|
|
|
@ -316,10 +316,6 @@ static-assets: ## Compile the static routes to serve alongside the API
|
|||
@go-bindata-assetfs -pkg agent -prefix ui -modtime 1480000000 -tags ui -o bindata_assetfs.go ./ui/dist/...
|
||||
@mv bindata_assetfs.go command/agent
|
||||
|
||||
.PHONY: test-website
|
||||
test-website: ## Run Website Link Checks
|
||||
@cd website && make test
|
||||
|
||||
.PHONY: test-ui
|
||||
test-ui: ## Run Nomad UI test suite
|
||||
@echo "--> Installing JavaScript assets"
|
||||
|
|
18
website/.editorconfig
Normal file
18
website/.editorconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
|
||||
[{*.md,*.json}]
|
||||
max_line_length = null
|
4
website/.eslintrc.js
Normal file
4
website/.eslintrc.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
...require('@hashicorp/nextjs-scripts/.eslintrc.js'),
|
||||
ignorePatterns: ['public/']
|
||||
}
|
5
website/.gitignore
vendored
Normal file
5
website/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
node_modules
|
||||
.DS_Store
|
||||
.next
|
||||
out
|
||||
.mdx-data
|
8
website/.npm-upgrade.json
Normal file
8
website/.npm-upgrade.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ignore": {
|
||||
"marked": {
|
||||
"versions": "0.8.0",
|
||||
"reason": "Broken IE"
|
||||
}
|
||||
}
|
||||
}
|
7
website/Dockerfile
Normal file
7
website/Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
FROM node:10.16.3-alpine
|
||||
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev
|
||||
|
||||
COPY ./package.json /website/package.json
|
||||
COPY ./package-lock.json /website/package-lock.json
|
||||
WORKDIR /website
|
||||
RUN npm install
|
|
@ -1,3 +0,0 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "middleman-hashicorp", "0.3.41"
|
|
@ -1,161 +0,0 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (4.2.11.1)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
autoprefixer-rails (9.6.1)
|
||||
execjs
|
||||
bootstrap-sass (3.4.1)
|
||||
autoprefixer-rails (>= 5.2.1)
|
||||
sassc (>= 2.0.0)
|
||||
builder (3.2.3)
|
||||
capybara (2.4.4)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
chunky_png (1.3.11)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
compass-core (~> 1.0.2)
|
||||
compass-import-once (~> 1.0.5)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
sass (>= 3.3.13, < 3.5)
|
||||
compass-core (1.0.3)
|
||||
multi_json (~> 1.0)
|
||||
sass (>= 3.3.0, < 3.5)
|
||||
compass-import-once (1.0.5)
|
||||
sass (>= 3.2, < 3.5)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
ffi (1.11.1)
|
||||
haml (5.1.2)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
hike (1.2.3)
|
||||
hooks (0.4.1)
|
||||
uber (~> 0.0.14)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.7.0)
|
||||
json (2.2.0)
|
||||
kramdown (1.17.0)
|
||||
listen (3.0.8)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
middleman (3.4.1)
|
||||
coffee-script (~> 2.2)
|
||||
compass (>= 1.0.0, < 2.0.0)
|
||||
compass-import-once (= 1.0.5)
|
||||
execjs (~> 2.0)
|
||||
haml (>= 4.0.5)
|
||||
kramdown (~> 1.2)
|
||||
middleman-core (= 3.4.1)
|
||||
middleman-sprockets (>= 3.1.2)
|
||||
sass (>= 3.4.0, < 4.0)
|
||||
uglifier (~> 2.5)
|
||||
middleman-core (3.4.1)
|
||||
activesupport (~> 4.1)
|
||||
bundler (~> 1.1)
|
||||
capybara (~> 2.4.4)
|
||||
erubis
|
||||
hooks (~> 0.3)
|
||||
i18n (~> 0.7.0)
|
||||
listen (~> 3.0.3)
|
||||
padrino-helpers (~> 0.12.3)
|
||||
rack (>= 1.4.5, < 2.0)
|
||||
thor (>= 0.15.2, < 2.0)
|
||||
tilt (~> 1.4.1, < 2.0)
|
||||
middleman-hashicorp (0.3.41)
|
||||
bootstrap-sass (~> 3.3)
|
||||
builder (~> 3.2)
|
||||
middleman (~> 3.4)
|
||||
middleman-livereload (~> 3.4)
|
||||
middleman-syntax (~> 3.0)
|
||||
redcarpet (~> 3.3)
|
||||
turbolinks (~> 5.0)
|
||||
middleman-livereload (3.4.6)
|
||||
em-websocket (~> 0.5.1)
|
||||
middleman-core (>= 3.3)
|
||||
rack-livereload (~> 0.3.15)
|
||||
middleman-sprockets (3.5.0)
|
||||
middleman-core (>= 3.3)
|
||||
sprockets (~> 2.12.1)
|
||||
sprockets-helpers (~> 1.1.0)
|
||||
sprockets-sass (~> 1.3.0)
|
||||
middleman-syntax (3.2.0)
|
||||
middleman-core (>= 3.2)
|
||||
rouge (~> 3.2)
|
||||
mime-types (3.2.2)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2019.0331)
|
||||
mini_portile2 (2.4.0)
|
||||
minitest (5.11.3)
|
||||
multi_json (1.13.1)
|
||||
nokogiri (1.10.4)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
padrino-helpers (0.12.9)
|
||||
i18n (~> 0.6, >= 0.6.7)
|
||||
padrino-support (= 0.12.9)
|
||||
tilt (>= 1.4.1, < 3)
|
||||
padrino-support (0.12.9)
|
||||
activesupport (>= 3.1)
|
||||
rack (1.6.11)
|
||||
rack-livereload (0.3.17)
|
||||
rack
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.0)
|
||||
ffi (~> 1.0)
|
||||
redcarpet (3.5.0)
|
||||
rouge (3.9.0)
|
||||
sass (3.4.25)
|
||||
sassc (2.1.0-x86_64-linux)
|
||||
ffi (~> 1.9)
|
||||
sprockets (2.12.5)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-helpers (1.1.0)
|
||||
sprockets (~> 2.0)
|
||||
sprockets-sass (1.3.1)
|
||||
sprockets (~> 2.0)
|
||||
tilt (~> 1.1)
|
||||
temple (0.8.1)
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (1.4.1)
|
||||
turbolinks (5.2.0)
|
||||
turbolinks-source (~> 5.2)
|
||||
turbolinks-source (5.2.0)
|
||||
tzinfo (1.2.5)
|
||||
thread_safe (~> 0.1)
|
||||
uber (0.0.15)
|
||||
uglifier (2.7.2)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
middleman-hashicorp (= 0.3.41)
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.3
|
|
@ -1,29 +1,56 @@
|
|||
VERSION?="0.3.41"
|
||||
|
||||
build:
|
||||
@echo "==> Starting build in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--volume "$(shell pwd):/website" \
|
||||
-e "ENV=production" \
|
||||
hashicorp/middleman-hashicorp:${VERSION} \
|
||||
bundle exec middleman build --verbose --clean
|
||||
|
||||
# Default: run this if working on the website locally to run in watch mode.
|
||||
website:
|
||||
@echo "==> Downloading latest Docker image..."
|
||||
@docker pull hashicorp/nomad-website
|
||||
@echo "==> Starting website in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--publish "4567:4567" \
|
||||
--publish "35729:35729" \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
hashicorp/middleman-hashicorp:${VERSION}
|
||||
--volume "/website/node_modules" \
|
||||
--publish "3000:3000" \
|
||||
hashicorp/nomad-website \
|
||||
npm start
|
||||
|
||||
test:
|
||||
@echo "==> Running website tests..."
|
||||
./scripts/test.sh ${VERSION}
|
||||
# This command will generate a static version of the website to the "out" folder.
|
||||
build:
|
||||
@echo "==> Downloading latest Docker image..."
|
||||
@docker pull hashicorp/nomad-website
|
||||
@echo "==> Starting build in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
--volume "/website/node_modules" \
|
||||
hashicorp/nomad-website \
|
||||
npm run static
|
||||
|
||||
.PHONY: build website
|
||||
# If you are changing node dependencies locally, run this to generate a new
|
||||
# local Docker image with the dependency changes included.
|
||||
build-image:
|
||||
@echo "==> Building Docker image..."
|
||||
@docker build -t hashicorp-nomad-website-local .
|
||||
|
||||
# Use this if you have run `build-image` to use the locally built image
|
||||
# rather than our CI-generated image to test dependency changes.
|
||||
website-local:
|
||||
@echo "==> Downloading latest Docker image..."
|
||||
@docker pull hashicorp/nomad-website
|
||||
@echo "==> Starting website in Docker..."
|
||||
@docker run \
|
||||
--interactive \
|
||||
--rm \
|
||||
--tty \
|
||||
--workdir "/website" \
|
||||
--volume "$(shell pwd):/website" \
|
||||
--volume "/website/node_modules" \
|
||||
--publish "3000:3000" \
|
||||
hashicorp-nomad-website-local \
|
||||
npm start
|
||||
|
||||
.DEFAULT_GOAL := website
|
||||
.PHONY: build build-image website website-local
|
||||
|
|
|
@ -1,21 +1,73 @@
|
|||
# Nomad Website
|
||||
|
||||
This subdirectory contains the entire source for the [Nomad Website][nomad].
|
||||
This is a [Middleman][middleman] project, which builds a static site from these
|
||||
source files.
|
||||
[![Netlify Status](https://img.shields.io/netlify/f7fa8963-0022-4a0e-9ccf-f5385355906b?style=flat-square)](https://app.netlify.com/sites/nomad-docs-platform/deploys)
|
||||
|
||||
This subdirectory contains the entire source for the [Nomad Website](https://nomadproject.io/). This is a [NextJS](https://nextjs.org/) project, which builds a static site from these source files.
|
||||
|
||||
## 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.
|
||||
If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in 🚀
|
||||
|
||||
## Running the Site Locally
|
||||
|
||||
Running the site locally is simple. Clone this repo and run `make website`.
|
||||
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. Also if you are a vim user, it's also worth noting that vim's swapfile usage can cause issues for the live reload functionality. In order to avoid these issues, make sure you have run `:set backupcopy=yes` within vim.
|
||||
|
||||
Then open up `http://localhost:4567`. Note that some URLs you may need to append
|
||||
".html" to make them work (in the navigation).
|
||||
### With Docker
|
||||
|
||||
[middleman]: https://www.middlemanapp.com
|
||||
[nomad]: https://www.nomadproject.io
|
||||
Running the site locally is simple. Provided you have Docker installed, clone this repo, run `make`, and then visit `http://localhost:3000`.
|
||||
|
||||
The docker image is pre-built with all the website dependencies installed, which is what makes it so quick and simple, but also means if you need to change dependencies and test the changes within Docker, you'll need a new image. If this is something you need to do, you can run `make build-image` to generate a local Docker image with updated dependencies, then `make website-local` to use that image and preview.
|
||||
|
||||
### With Node
|
||||
|
||||
If your local development environment has a supported version (v10.0.0+) of [node installed](https://nodejs.org/en/) you can run:
|
||||
|
||||
- `npm install`
|
||||
- `npm start`
|
||||
|
||||
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
|
||||
|
||||
Documentation content is written in [Markdown](https://www.markdownguide.org/cheat-sheet/) and you'll find all files listed under the `/pages` directory.
|
||||
|
||||
To create a new page with Markdown, create a file ending in `.mdx` in the `pages/` directory. The path in the pages directory will be the URL route. For example, `pages/hello/world.mdx` will be served from the `/hello/world` URL.
|
||||
|
||||
This file can be standard Markdown and also supports [YAML frontmatter](https://middlemanapp.com/basics/frontmatter/). YAML frontmatter is optional, there are defaults for all keys.
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: 'My Title'
|
||||
description: "A thorough, yet succinct description of the page's contents"
|
||||
---
|
||||
|
||||
```
|
||||
|
||||
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 docs** 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.
|
||||
|
||||
### 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.
|
||||
|
||||
### 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.
|
||||
|
|
369
website/_redirects
Normal file
369
website/_redirects
Normal file
|
@ -0,0 +1,369 @@
|
|||
/api/* /api-docs/:splat 200
|
||||
/docs/telemetry/overview /docs/telemetry
|
||||
|
||||
# Nomad Learn Redirects
|
||||
/intro/getting-started/install.html https://learn.hashicorp.com/nomad/getting-started/install
|
||||
/intro/getting-started/install https://learn.hashicorp.com/nomad/getting-started/install
|
||||
/intro/getting-started/running.html https://learn.hashicorp.com/nomad/getting-started/running
|
||||
/intro/getting-started/running https://learn.hashicorp.com/nomad/getting-started/running
|
||||
/intro/getting-started/jobs.html https://learn.hashicorp.com/nomad/getting-started/jobs
|
||||
/intro/getting-started/jobs https://learn.hashicorp.com/nomad/getting-started/jobs
|
||||
/intro/getting-started/cluster.html https://learn.hashicorp.com/nomad/getting-started/cluster
|
||||
/intro/getting-started/cluster https://learn.hashicorp.com/nomad/getting-started/cluster
|
||||
/intro/getting-started/ui.html https://learn.hashicorp.com/nomad/getting-started/ui
|
||||
/intro/getting-started/ui https://learn.hashicorp.com/nomad/getting-started/ui
|
||||
/intro/getting-started/next-steps.html https://learn.hashicorp.com/nomad/getting-started/next-steps
|
||||
/intro/getting-started/next-steps https://learn.hashicorp.com/nomad/getting-started/next-steps
|
||||
|
||||
/guides/load-balancing/fabio.html https://learn.hashicorp.com/nomad/load-balancing/fabio
|
||||
/guides/load-balancing/fabio https://learn.hashicorp.com/nomad/load-balancing/fabio
|
||||
/guides/load-balancing/nginx.html https://learn.hashicorp.com/nomad/load-balancing/nginx
|
||||
/guides/load-balancing/nginx https://learn.hashicorp.com/nomad/load-balancing/nginx
|
||||
/guides/load-balancing/haproxy.html https://learn.hashicorp.com/nomad/load-balancing/haproxy
|
||||
/guides/load-balancing/haproxy https://learn.hashicorp.com/nomad/load-balancing/haproxy
|
||||
/guides/load-balancing/traefik.html https://learn.hashicorp.com/nomad/load-balancing/traefik
|
||||
/guides/load-balancing/traefik https://learn.hashicorp.com/nomad/load-balancing/traefik
|
||||
|
||||
/guides/stateful-workloads/host-volumes.html https://learn.hashicorp.com/nomad/stateful-workloads/host-volumes
|
||||
/guides/stateful-workloads/host-volumes https://learn.hashicorp.com/nomad/stateful-workloads/host-volumes
|
||||
/guides/stateful-workloads/portworx.html https://learn.hashicorp.com/nomad/stateful-workloads/portworx
|
||||
/guides/stateful-workloads/portworx https://learn.hashicorp.com/nomad/stateful-workloads/portworx
|
||||
|
||||
/guides/web-ui/access.html https://learn.hashicorp.com/nomad/web-ui/access
|
||||
/guides/web-ui/accessing https://learn.hashicorp.com/nomad/web-ui/access
|
||||
/guides/web-ui/submitting-a-job.html https://learn.hashicorp.com/nomad/web-ui/ui-workload
|
||||
/guides/web-ui/submitting-a-jobops https://learn.hashicorp.com/nomad/web-ui/ui-workload
|
||||
/guides/web-ui/operating-a-job.html https://learn.hashicorp.com/nomad/web-ui/submit-job
|
||||
/guides/web-ui/operating-a-job https://learn.hashicorp.com/nomad/web-ui/submit-job
|
||||
/guides/web-ui/inspecting-the-cluster.html https://learn.hashicorp.com/nomad/web-ui/inspecting-the-cluster
|
||||
/guides/web-ui/inspecting-the-cluster https://learn.hashicorp.com/nomad/web-ui/inspecting-the-cluster
|
||||
/guides/web-ui/securing.html https://learn.hashicorp.com/nomad/web-ui/access
|
||||
/guides/web-ui/securing https://learn.hashicorp.com/nomad/web-ui/access
|
||||
|
||||
/guides/governance-and-policy/namespaces.html https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
|
||||
/guides/governance-and-policy/namespaces https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
|
||||
/guides/governance-and-policy/quotas.html https://learn.hashicorp.com/nomad/governance-and-policy/quotas
|
||||
/guides/governance-and-policy/quotas https://learn.hashicorp.com/nomad/governance-and-policy/quotas
|
||||
/guides/governance-and-policy/sentinel/sentinel-policy.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/governance-and-policy/sentinel/sentinel-policy https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/governance-and-policy/sentinel/job.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/governance-and-policy/sentinel/job https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
|
||||
# Website
|
||||
/community.html /resources
|
||||
/community /resources
|
||||
|
||||
# Docs
|
||||
/docs/index /docs
|
||||
/api/index /api
|
||||
/resources /resources
|
||||
/docs/agent/config.html /docs/configuration
|
||||
/docs/agent/config /docs/configuration
|
||||
/docs/jobops /guides/operating-a-job
|
||||
/docs/jobops/ /guides/operating-a-job
|
||||
/docs/jobops/index.html /guides/operating-a-job
|
||||
/docs/jobops/taskconfig.html /guides/operating-a-job/configuring-tasks
|
||||
/docs/jobops/taskconfig /guides/operating-a-job/configuring-tasks
|
||||
/docs/jobops/inspecting.html /guides/operating-a-job/inspecting-state
|
||||
/docs/jobops/inspecting /guides/operating-a-job/inspecting-state
|
||||
/docs/jobops/resources.html /guides/operating-a-job/resource-utilization
|
||||
/docs/jobops/resources /guides/operating-a-job/resource-utilization
|
||||
/docs/jobops/logs.html /guides/operating-a-job/accessing-logs
|
||||
/docs/jobops/logs /guides/operating-a-job/accessing-logs
|
||||
/docs/jobops/updating.html /guides/operating-a-job/update-strategies
|
||||
/docs/jobops/updating /guides/operating-a-job/update-strategies
|
||||
/docs/jobops/servicediscovery.html /guides/operations/consul-integration
|
||||
/docs/jobops/servicediscovery /guides/operations/consul-integration
|
||||
/docs/jobspec /docs/job-specification
|
||||
/docs/jobspec/ /docs/job-specification
|
||||
/docs/jobspec/index.html /docs/job-specification
|
||||
/docs/jobspec/interpreted.html /docs/runtime/interpolation
|
||||
/docs/jobspec/interpreted /docs/runtime/interpolation
|
||||
/docs/jobspec/json.html /api/json-jobs
|
||||
/docs/jobspec/json /api/json-jobs
|
||||
/docs/jobspec/environment.html /docs/runtime/environment
|
||||
/docs/jobspec/environment /docs/runtime/environment
|
||||
/docs/jobspec/schedulers.html /docs/schedulers
|
||||
/docs/jobspec/schedulers /docs/schedulers
|
||||
/docs/jobspec/servicediscovery.html /docs/job-specification/service
|
||||
/docs/jobspec/servicediscovery /docs/job-specification/service
|
||||
/docs/jobspec/networking.html /docs/job-specification/network
|
||||
/docs/jobspec/networking /docs/job-specification/network
|
||||
/docs/cluster/automatic.html /guides/operations/cluster/automatic
|
||||
/docs/cluster/automatic /guides/operations/cluster/automatic
|
||||
/docs/cluster/manual.html /guides/operations/cluster/manual
|
||||
/docs/cluster/manual /guides/operations/cluster/manual
|
||||
/docs/cluster/federation.html /guides/operations/federation
|
||||
/docs/cluster/federation /guides/operations/federation
|
||||
/docs/cluster/requirements.html /guides/operations/requirements
|
||||
/docs/cluster/requirements /guides/operations/requirements
|
||||
/docs/commands/operator-index.html /docs/commands/operator
|
||||
/docs/commands/operator-index /docs/commands/operator
|
||||
/docs/commands/operator-raft-list-peers.html /docs/commands/operator/raft-list-peers
|
||||
/docs/commands/operator-raft-list-peers /docs/commands/operator/raft-list-peers
|
||||
/docs/commands/operator-raft-remove-peer.html /docs/commands/operator/raft-remove-peer
|
||||
/docs/commands/operator-raft-remove-peer /docs/commands/operator/raft-remove-peer
|
||||
/docs/commands/job-dispatch.html /docs/commands/job/dispatch
|
||||
/docs/commands/job-dispatch /docs/commands/job/dispatch
|
||||
/docs/commands/alloc-status.html /docs/commands/alloc/status
|
||||
/docs/commands/alloc-status /docs/commands/alloc/status
|
||||
/docs/commands/fs.html /docs/commands/alloc/fs
|
||||
/docs/commands/fs /docs/commands/alloc/fs
|
||||
/docs/commands/logs.html /docs/commands/alloc/logs
|
||||
/docs/commands/logs /docs/commands/alloc/logs
|
||||
/docs/commands/init.html /docs/commands/job/init
|
||||
/docs/commands/init /docs/commands/job/init
|
||||
/docs/commands/inspect.html /docs/commands/job/inspect
|
||||
/docs/commands/inspect /docs/commands/job/inspect
|
||||
/docs/commands/run.html /docs/commands/job/run
|
||||
/docs/commands/run /docs/commands/job/run
|
||||
/docs/commands/stop.html /docs/commands/job/stop
|
||||
/docs/commands/stop /docs/commands/job/stop
|
||||
/docs/commands/plan.html /docs/commands/job/plan
|
||||
/docs/commands/plan /docs/commands/job/plan
|
||||
/docs/commands/validate.html /docs/commands/job/validate
|
||||
/docs/commands/validate /docs/commands/job/validate
|
||||
/docs/commands/client-config.html /docs/commands/node/config
|
||||
/docs/commands/client-config /docs/commands/node/config
|
||||
/docs/commands/node-drain.html /docs/commands/node/drain
|
||||
/docs/commands/node-drain /docs/commands/node/drain
|
||||
/docs/commands/node-status.html /docs/commands/node/status
|
||||
/docs/commands/node-status /docs/commands/node/status
|
||||
/docs/commands/keygen.html /docs/commands/operator/keygen
|
||||
/docs/commands/keygen /docs/commands/operator/keygen
|
||||
/docs/commands/keyring.html /docs/commands/operator/keyring
|
||||
/docs/commands/keyring /docs/commands/operator/keyring
|
||||
/docs/commands/server-force-leave.html /docs/commands/server/force-leave
|
||||
/docs/commands/server-force-leave /docs/commands/server/force-leave
|
||||
/docs/commands/server-join.html /docs/commands/server/join
|
||||
/docs/commands/server-join /docs/commands/server/join
|
||||
/docs/commands/server-members.html /docs/commands/server/members
|
||||
/docs/commands/server-members /docs/commands/server/members
|
||||
/docs/runtime/schedulers.html /docs/schedulers
|
||||
/docs/runtime/schedulers /docs/schedulers
|
||||
/docs/internals/scheduling.html /docs/internals/scheduling/scheduling
|
||||
/docs/internals/scheduling /docs/internals/scheduling/scheduling
|
||||
|
||||
# Moved /docs/operating-a-job/ -> /guides/operating-a-job/
|
||||
/docs/operating-a-job /guides/operating-a-job
|
||||
/docs/operating-a-job/ /guides/operating-a-job
|
||||
/docs/operating-a-job/index.html /guides/operating-a-job
|
||||
/docs/operating-a-job/accessing-logs.html /guides/operating-a-job/accessing-logs
|
||||
/docs/operating-a-job/inspecting-state.html /guides/operating-a-job/inspecting-state
|
||||
/docs/operating-a-job/resource-utilization.html /guides/operating-a-job/resource-utilization
|
||||
/docs/operating-a-job/configuring-tasks.html /guides/operating-a-job/configuring-tasks
|
||||
/docs/operating-a-job/submitting-jobs.html /guides/operating-a-job/submitting-jobs
|
||||
|
||||
/docs/operating-a-job/failure-handling-strategies /guides/operating-a-job/failure-handling-strategies
|
||||
/docs/operating-a-job/failure-handling-strategies/ /guides/operating-a-job/failure-handling-strategies
|
||||
/docs/operating-a-job/failure-handling-strategies/index.html /guides/operating-a-job/failure-handling-strategies
|
||||
/docs/operating-a-job/failure-handling-strategies/check-restart.html /guides/operating-a-job/failure-handling-strategies/check-restart
|
||||
/docs/operating-a-job/failure-handling-strategies/check-restart /guides/operating-a-job/failure-handling-strategies/check-restart
|
||||
/docs/operating-a-job/failure-handling-strategies/reschedule.html /guides/operating-a-job/failure-handling-strategies/reschedule
|
||||
/docs/operating-a-job/failure-handling-strategies/reschedule /guides/operating-a-job/failure-handling-strategies/reschedule
|
||||
/docs/operating-a-job/failure-handling-strategies/restart.html /guides/operating-a-job/failure-handling-strategies/restart
|
||||
/docs/operating-a-job/failure-handling-strategies/restart /guides/operating-a-job/failure-handling-strategies/restart
|
||||
|
||||
/docs/operating-a-job/update-strategies /guides/operating-a-job/update-strategies/
|
||||
/docs/operating-a-job/update-strategies/ /guides/operating-a-job/update-strategies/
|
||||
/docs/operating-a-job/update-strategies/index.html /guides/operating-a-job/update-strategies/
|
||||
/docs/operating-a-job/update-strategies/blue-green-and-canary-deployments.html /guides/operating-a-job/update-strategies/blue-green-and-canary-deployments
|
||||
/docs/operating-a-job/update-strategies/blue-green-and-canary-deployments /guides/operating-a-job/update-strategies/blue-green-and-canary-deployments
|
||||
/docs/operating-a-job/update-strategies/handling-signals.html /guides/operating-a-job/update-strategies/handling-signals
|
||||
/docs/operating-a-job/update-strategies/handling-signals /guides/operating-a-job/update-strategies/handling-signals
|
||||
/docs/operating-a-job/update-strategies/rolling-upgrades.html /guides/operating-a-job/update-strategies/rolling-upgrades
|
||||
/docs/operating-a-job/update-strategies/rolling-upgrades /guides/operating-a-job/update-strategies/rolling-upgrades
|
||||
|
||||
# Moved /docs/agent/configuration/ -> /docs/configuration/
|
||||
|
||||
/docs/agent/configuration /docs/configuration
|
||||
/docs/agent/configuration/ /docs/configuration
|
||||
/docs/agent/configuration/index.html /docs/configuration
|
||||
/docs/agent/configuration/acl.html /docs/configuration/acl
|
||||
/docs/agent/configuration/acl /docs/configuration/acl
|
||||
/docs/agent/configuration/autopilot.html /docs/configuration/autopilot
|
||||
/docs/agent/configuration/autopilot /docs/configuration/autopilot
|
||||
/docs/agent/configuration/client.html /docs/configuration/client
|
||||
/docs/agent/configuration/client /docs/configuration/client
|
||||
/docs/agent/configuration/consul.html /docs/configuration/consul
|
||||
/docs/agent/configuration/consul /docs/configuration/consul
|
||||
/docs/agent/configuration/sentinel.html /docs/configuration/sentinel
|
||||
/docs/agent/configuration/sentinel /docs/configuration/sentinel
|
||||
/docs/agent/configuration/server.html /docs/configuration/server
|
||||
/docs/agent/configuration/server /docs/configuration/server
|
||||
/docs/agent/configuration/server_join.html /docs/configuration/server_join
|
||||
/docs/agent/configuration/server_join /docs/configuration/server_join
|
||||
/docs/agent/configuration/telemetry.html /docs/configuration/telemetry
|
||||
/docs/agent/configuration/telemetry /docs/configuration/telemetry
|
||||
/docs/agent/configuration/tls.html /docs/configuration/tls
|
||||
/docs/agent/configuration/tls /docs/configuration/tls
|
||||
/docs/agent/configuration/vault.html /docs/configuration/vault
|
||||
/docs/agent/configuration/vault /docs/configuration/vault
|
||||
|
||||
# Moved guide-like docs to /guides
|
||||
/docs/agent /guides/operations/agent
|
||||
/docs/agent/ /guides/operations/agent
|
||||
/docs/agent/index.html /guides/operations/agent
|
||||
/docs/agent/cloud_auto_join.html /guides/operations/cluster/cloud_auto_join
|
||||
/docs/agent/cloud_auto_join /guides/operations/cluster/cloud_auto_join
|
||||
/docs/agent/telemetry.html /guides/operations/monitoring/telemetry
|
||||
/docs/agent/telemetry /guides/operations/monitoring/telemetry
|
||||
/docs/agent/encryption.html /guides/security/encryption
|
||||
/docs/agent/encryption /guides/security/encryption
|
||||
/docs/install /guides/operations/install
|
||||
/docs/install/ /guides/operations/install
|
||||
/docs/install/index.html /guides/operations/install
|
||||
/docs/upgrade /guides/operations/upgrade
|
||||
/docs/upgrade/ /guides/operations/upgrade
|
||||
/docs/upgrade/index.html /guides/operations/upgrade
|
||||
/docs/upgrade/upgrade-specific.html /guides/operations/upgrade/upgrade-specific
|
||||
/docs/upgrade/upgrade-specific /guides/operations/upgrade/upgrade-specific
|
||||
/docs/service-discovery /guides/operations/consul-integration
|
||||
/docs/service-discovery/ /guides/operations/consul-integration
|
||||
/docs/service-discovery/index.html /guides/operations/consul-integration
|
||||
|
||||
# Redirect old LXC driver doc to new one in /docs/external
|
||||
/docs/drivers/lxc.html /docs/drivers/external/lxc
|
||||
/docs/drivers/lxc /docs/drivers/external/lxc
|
||||
|
||||
# API
|
||||
/docs/http/index.html /api/index
|
||||
/docs/http/json-jobs.html /api/json-jobs
|
||||
/docs/http/json-jobs /api/json-jobs
|
||||
/docs/http/job.html /api/jobs
|
||||
/docs/http/job /api/jobs
|
||||
/docs/http/jobs.html /api/jobs
|
||||
/docs/http/jobs /api/jobs
|
||||
/docs/http/node.html /api/nodes
|
||||
/docs/http/node /api/nodes
|
||||
/docs/http/nodes.html /api/nodes
|
||||
/docs/http/nodes /api/nodes
|
||||
/docs/http/alloc.html /api/allocations
|
||||
/docs/http/alloc /api/allocations
|
||||
/docs/http/allocs.html /api/allocations
|
||||
/docs/http/allocs /api/allocations
|
||||
/docs/http/eval.html /api/evaluations
|
||||
/docs/http/eval /api/evaluations
|
||||
/docs/http/evals.html /api/evaluations
|
||||
/docs/http/evals /api/evaluations
|
||||
/docs/http/agent-self.html /api/agent
|
||||
/docs/http/agent-self /api/agent
|
||||
/docs/http/agent-join.html /api/agent
|
||||
/docs/http/agent-join /api/agent
|
||||
/docs/http/agent-members.html /api/agent
|
||||
/docs/http/agent-members /api/agent
|
||||
/docs/http/agent-force-leave.html /api/agent
|
||||
/docs/http/agent-force-leave /api/agent
|
||||
/docs/http/agent-servers.html /api/agent
|
||||
/docs/http/agent-servers /api/agent
|
||||
/docs/http/client-fs.html /api/client
|
||||
/docs/http/client-fs /api/client
|
||||
/docs/http/client-stats.html /api/client
|
||||
/docs/http/client-stats /api/client
|
||||
/docs/http/client-allocation-stats.html /api/client
|
||||
/docs/http/client-allocation-stats /api/client
|
||||
/docs/http/regions.html /api/regions
|
||||
/docs/http/regions /api/regions
|
||||
/docs/http/status.html /api/status
|
||||
/docs/http/status /api/status
|
||||
/docs/http/operator.html /api/operator
|
||||
/docs/http/operator /api/operator
|
||||
/docs/http/system.html /api/system
|
||||
/docs/http/system /api/system
|
||||
|
||||
# Guides
|
||||
|
||||
# Reorganized Guides by Persona
|
||||
/guides/autopilot.html /guides/operations/autopilot
|
||||
/guides/autopilot /guides/operations/autopilot
|
||||
/guides/cluster/automatic.html /guides/operations/cluster/automatic
|
||||
/guides/cluster/automatic /guides/operations/cluster/automatic
|
||||
/guides/cluster/bootstrapping.html /guides/operations/cluster
|
||||
/guides/cluster/bootstrapping /guides/operations/cluster
|
||||
/guides/operations/cluster/bootstrapping.html /guides/operations/cluster
|
||||
/guides/operations/cluster/bootstrapping /guides/operations/cluster
|
||||
/guides/cluster/manual.html /guides/operations/cluster/manual
|
||||
/guides/cluster/manual /guides/operations/cluster/manual
|
||||
/guides/cluster/federation /guides/operations/federation
|
||||
/guides/cluster/requirements /guides/operations/requirements
|
||||
/guides/nomad-metrics.html /guides/operations/monitoring/nomad-metrics
|
||||
/guides/nomad-metrics /guides/operations/monitoring/nomad-metrics
|
||||
/guides/node-draining.html /guides/operations/node-draining
|
||||
/guides/node-draining /guides/operations/node-draining
|
||||
/guides/outage.html /guides/operations/outage
|
||||
/guides/outage /guides/operations/outage
|
||||
/guides/acl.html /guides/security/acl
|
||||
/guides/acl /guides/security/acl
|
||||
/guides/namespaces.html https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
|
||||
/guides/namespaces https://learn.hashicorp.com/nomad/governance-and-policy/namespaces
|
||||
/guides/quotas.html https://learn.hashicorp.com/nomad/governance-and-policy/quotas
|
||||
/guides/quotas https://learn.hashicorp.com/nomad/governance-and-policy/quotas
|
||||
/guides/securing-nomad.html /guides/security/securing-nomad
|
||||
/guides/securing-nomad /guides/security/securing-nomad
|
||||
/guides/sentinel-policy.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/sentinel-policy https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/sentinel/job.html https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
/guides/sentinel/job https://learn.hashicorp.com/nomad/governance-and-policy/sentinel
|
||||
|
||||
/guides/analytical-workloads/spark/spark.html /guides/analytical-workloads/spark
|
||||
/guides/analytical-workloads/spark/spark /guides/analytical-workloads/spark
|
||||
/guides/spark /guides/analytical-workloads/spark
|
||||
/guides/spark/ /guides/analytical-workloads/spark
|
||||
/guides/spark/index.html /guides/analytical-workloads/spark
|
||||
/guides/spark/spark.html /guides/analytical-workloads/spark
|
||||
/guides/spark/spark /guides/analytical-workloads/spark
|
||||
/guides/spark/pre.html /guides/analytical-workloads/spark/pre
|
||||
/guides/spark/pre /guides/analytical-workloads/spark/pre
|
||||
/guides/security/namespaces.html /guides/governance-and-policy/namespaces
|
||||
/guides/security/namespaces /guides/governance-and-policy/namespaces
|
||||
/guides/security/quotas.html /guides/governance-and-policy/quotas
|
||||
/guides/security/quotas /guides/governance-and-policy/quotas
|
||||
/guides/security/sentinel/job.html /guides/governance-and-policy/sentinel/job
|
||||
/guides/security/sentinel/job /guides/governance-and-policy/sentinel/job
|
||||
/guides/security/sentinel-policy.html /guides/governance-and-policy/sentinel/sentinel-policy
|
||||
/guides/security/sentinel-policy /guides/governance-and-policy/sentinel/sentinel-policy
|
||||
/guides/operations/install/index.html /guides/install/index
|
||||
/guides/operations/install/index /guides/install/index
|
||||
/guides/operations/deployment-guide.html /guides/install/production/deployment-guide
|
||||
/guides/operations/deployment-guide /guides/install/production/deployment-guide
|
||||
/guides/operations/agent/index.html /guides/install/production/nomad-agent
|
||||
/guides/operations/reference-architecture.html /guides/install/production/reference-architecture
|
||||
/guides/operations/reference-architecture /guides/install/production/reference-architecture
|
||||
/guides/operations/requirements.html /guides/install/production/requirements
|
||||
/guides/operations/requirements /guides/install/production/requirements
|
||||
/guides/operations/consul-integration/index.html /guides/integrations/consul-integration
|
||||
/guides/operations/vault-integration/index.html /guides/integrations/vault-integration
|
||||
/guides/advanced-scheduling/ /guides/operating-a-job/advanced-scheduling/
|
||||
/guides/external /guides/operating-a-job/external
|
||||
/guides/external/ /guides/operating-a-job/external
|
||||
/guides/external/index.html /guides/operating-a-job/external
|
||||
/guides/external/lxc.html /guides/operating-a-job/external/lxc
|
||||
/guides/external/lxc /guides/operating-a-job/external/lxc
|
||||
/guides/operations/upgrade /guides/upgrade
|
||||
/guides/operations/upgrade/ /guides/upgrade
|
||||
/guides/operations/upgrade/index.html /guides/upgrade
|
||||
/guides/operations/upgrade/upgrade-specific.html /guides/upgrade/upgrade-specific
|
||||
/guides/operations/upgrade/upgrade-specific /guides/upgrade/upgrade-specific
|
||||
|
||||
# Multi-part UI guides
|
||||
/guides/ui.html https://learn.hashicorp.com/nomad?track=web-ui#web-ui
|
||||
/guides/ui https://learn.hashicorp.com/nomad?track=web-ui#web-ui
|
||||
|
||||
# Enterprise
|
||||
|
||||
# Reorganized Enterprise into single pager
|
||||
/docs/enterprise/namespaces /docs/enterprise#namespaces
|
||||
/docs/enterprise/namespaces/ /docs/enterprise#namespaces
|
||||
/docs/enterprise/namespaces/index.html /docs/enterprise#namespaces
|
||||
/docs/enterprise/quotas /docs/enterprise#resource-quotas
|
||||
/docs/enterprise/quotas/ /docs/enterprise#resource-quotas
|
||||
/docs/enterprise/quotas/index.html /docs/enterprise#resource-quotas
|
||||
/docs/enterprise/preemption /docs/enterprise#preemption
|
||||
/docs/enterprise/preemption/ /docs/enterprise#preemption
|
||||
/docs/enterprise/preemption/index.html /docs/enterprise#preemption
|
||||
/docs/enterprise/sentinel /docs/enterprise#sentinel-policies
|
||||
/docs/enterprise/sentinel/ /docs/enterprise#sentinel-policies
|
||||
/docs/enterprise/sentinel/index.html /docs/enterprise#sentinel-policies
|
||||
/docs/enterprise/autopilot /docs/enterprise#nomad-enterprise-platform
|
||||
/docs/enterprise/autopilot/ /docs/enterprise#nomad-enterprise-platform
|
||||
/docs/enterprise/autopilot/index.html /docs/enterprise#nomad-enterprise-platform
|
4
website/babel.config.js
Normal file
4
website/babel.config.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins: ['import-glob-array']
|
||||
}
|
42
website/components/default-head-tags/index.jsx
Normal file
42
website/components/default-head-tags/index.jsx
Normal file
|
@ -0,0 +1,42 @@
|
|||
import Head from 'next/head'
|
||||
|
||||
export default function DefaultHeadTags() {
|
||||
return (
|
||||
<Head>
|
||||
<title key="title">Nomad by HashiCorp</title>
|
||||
<meta charSet="utf-8" />
|
||||
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
|
||||
{/* ref: https://www.phpied.com/minimum-viable-sharing-meta-tags/ */}
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta
|
||||
property="og:site_name"
|
||||
content="Nomad by HashiCorp"
|
||||
key="og-name"
|
||||
/>
|
||||
<meta name="twitter:site" content="@HashiCorp" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta
|
||||
property="article:publisher"
|
||||
content="https://www.facebook.com/HashiCorp/"
|
||||
/>
|
||||
<meta
|
||||
name="description"
|
||||
property="og:description"
|
||||
content="Nomad is a highly available, distributed, data-center aware cluster and application scheduler designed to support the modern datacenter with support for long-running services, batch jobs, and much more."
|
||||
key="description"
|
||||
/>
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://www.nomadproject.io/img/og-image.png"
|
||||
key="image"
|
||||
/>
|
||||
<link type="image/png" rel="icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/css/nprogress.css"></link>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
</Head>
|
||||
)
|
||||
}
|
1
website/components/docs-page/img/github-icon.svg
Normal file
1
website/components/docs-page/img/github-icon.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg width="23" height="22" xmlns="http://www.w3.org/2000/svg"><path d="M11.608.342C5.535.342.61 5.162.61 11.108c0 4.757 3.152 8.792 7.523 10.215.55.1.751-.233.751-.518 0-.256-.01-.933-.015-1.831-3.06.65-3.705-1.444-3.705-1.444-.5-1.243-1.222-1.574-1.222-1.574-.998-.668.076-.655.076-.655 1.104.076 1.685 1.11 1.685 1.11.981 1.645 2.575 1.17 3.201.894.1-.695.385-1.17.699-1.439-2.443-.271-5.011-1.195-5.011-5.32 0-1.176.429-2.137 1.132-2.89-.113-.272-.49-1.367.108-2.849 0 0 .924-.289 3.025 1.104.877-.24 1.819-.358 2.754-.363.934.005 1.875.124 2.754.363 2.1-1.393 3.022-1.104 3.022-1.104.6 1.482.222 2.577.11 2.85.705.752 1.13 1.713 1.13 2.888 0 4.136-2.572 5.046-5.022 5.313.394.332.746.99.746 1.994 0 1.438-.013 2.6-.013 2.953 0 .288.198.623.756.518 4.368-1.427 7.516-5.46 7.516-10.215 0-5.946-4.925-10.766-11-10.766" fill="#161514" fill-rule="evenodd"/></svg>
|
After Width: | Height: | Size: 863 B |
129
website/components/docs-page/index.jsx
Normal file
129
website/components/docs-page/index.jsx
Normal file
|
@ -0,0 +1,129 @@
|
|||
import { useEffect } from 'react'
|
||||
import DocsSidenav from '@hashicorp/react-docs-sidenav'
|
||||
import Content from '@hashicorp/react-content'
|
||||
import InlineSvg from '@hashicorp/react-inline-svg'
|
||||
import githubIcon from './img/github-icon.svg?include'
|
||||
import Link from 'next/link'
|
||||
import Head from 'next/head'
|
||||
|
||||
export default function DocsPage({
|
||||
children,
|
||||
path,
|
||||
orderData,
|
||||
frontMatter,
|
||||
category,
|
||||
pageMeta
|
||||
}) {
|
||||
// TEMPORARY (https://app.asana.com/0/1100423001970639/1160656182754009)
|
||||
useEffect(() => {
|
||||
const node = document.querySelector('#inner')
|
||||
if (!node) return
|
||||
return temporary_injectJumpToSection(node)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div id="p-docs">
|
||||
<Head>
|
||||
<title key="title">{pageMeta.page_title} | Nomad by HashiCorp</title>
|
||||
{pageMeta.description && (
|
||||
<meta
|
||||
name="description"
|
||||
property="og:description"
|
||||
content={pageMeta.description}
|
||||
key="description"
|
||||
/>
|
||||
)}
|
||||
</Head>
|
||||
<div className="content-wrap g-container">
|
||||
<div id="sidebar" role="complementary">
|
||||
<div className="nav docs-nav">
|
||||
<DocsSidenav
|
||||
currentPage={path}
|
||||
category={category}
|
||||
order={orderData}
|
||||
data={frontMatter}
|
||||
Link={Link}
|
||||
product="nomad"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="inner" role="main">
|
||||
<Content product="nomad" content={children} />
|
||||
</div>
|
||||
</div>
|
||||
<div id="edit-this-page" className="g-container">
|
||||
<a
|
||||
href={`https://github.com/hashicorp/vault/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||
>
|
||||
<InlineSvg src={githubIcon} />
|
||||
<span>Edit this page</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export async function getInitialProps({ asPath }) {
|
||||
return { path: asPath }
|
||||
}
|
||||
|
||||
// This is terrible, very non-idiomatic code. It is here temporarily to enable this feature
|
||||
// while the team works on a more permanent solution. Please do not ever write code like this.
|
||||
// Ticket to fix this: https://app.asana.com/0/1100423001970639/1160656182754009
|
||||
function temporary_injectJumpToSection(node) {
|
||||
const root = node.children[0]
|
||||
const firstH1 = root.querySelector('h1')
|
||||
const otherH2s = [].slice.call(root.querySelectorAll('h2')) // NodeList -> array
|
||||
|
||||
// if there's no h1 or less than 3 h2s, don't render jump to section
|
||||
if (!firstH1) return
|
||||
if (otherH2s.length < 3) return
|
||||
|
||||
const headlines = otherH2s.map(h2 => {
|
||||
// slice removes the anchor link character
|
||||
return { id: h2.id, text: h2.innerText.slice(1) }
|
||||
})
|
||||
|
||||
// build the html
|
||||
const html = `
|
||||
<span class="trigger g-type-label">
|
||||
Jump to Section
|
||||
<svg width="9" height="5" xmlns="http://www.w3.org/2000/svg"><path d="M8.811 1.067a.612.612 0 0 0 0-.884.655.655 0 0 0-.908 0L4.5 3.491 1.097.183a.655.655 0 0 0-.909 0 .615.615 0 0 0 0 .884l3.857 3.75a.655.655 0 0 0 .91 0l3.856-3.75z" fill-rule="evenodd"/></svg>
|
||||
</span>
|
||||
<ul class="dropdown">
|
||||
${headlines
|
||||
.map(h => `<li><a href="#${h.id}">${h.text}</a></li>`)
|
||||
.join('')}
|
||||
</ul>`
|
||||
const el = document.createElement('div')
|
||||
el.innerHTML = html
|
||||
el.id = 'jump-to-section'
|
||||
|
||||
// attach event listeners to make the dropdown work
|
||||
const trigger = el.querySelector('.trigger')
|
||||
const dropdown = el.querySelector('.dropdown')
|
||||
const body = document.body
|
||||
const triggerEvent = e => {
|
||||
e.stopPropagation()
|
||||
dropdown.classList.toggle('active')
|
||||
}
|
||||
const clickOutsideEvent = () => dropdown.classList.remove('active')
|
||||
const clickInsideDropdownEvent = e => e.stopPropagation()
|
||||
trigger.addEventListener('click', triggerEvent)
|
||||
body.addEventListener('click', clickOutsideEvent)
|
||||
dropdown.addEventListener('click', clickInsideDropdownEvent)
|
||||
|
||||
// inject the html after the first h1
|
||||
firstH1.parentNode.insertBefore(el, firstH1.nextSibling)
|
||||
|
||||
// adjust the h1 margin
|
||||
firstH1.classList.add('has-jts')
|
||||
|
||||
// cleanup function removes listeners on unmount
|
||||
return function cleanup() {
|
||||
trigger.removeEventListener('click', triggerEvent)
|
||||
body.removeEventListener('click', clickOutsideEvent)
|
||||
dropdown.removeEventListener('click', clickInsideDropdownEvent)
|
||||
}
|
||||
}
|
120
website/components/docs-page/style.css
Normal file
120
website/components/docs-page/style.css
Normal file
|
@ -0,0 +1,120 @@
|
|||
#p-docs {
|
||||
& .content-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
flex: 1 0 auto;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
@media (min-width: 940px) {
|
||||
flex-direction: row;
|
||||
margin-top: 72px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
& #inner {
|
||||
margin: 64px 0;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
|
||||
@media (min-width: 940px) {
|
||||
flex: 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& .g-content {
|
||||
@media (max-width: 939px) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
& > h1:first-child {
|
||||
margin-top: 0;
|
||||
|
||||
&.has-jts {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .g-section-header {
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
/* TODO: this should be applied in global styles, temporary override here */
|
||||
& pre,
|
||||
& code {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
& pre code {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
& #edit-this-page {
|
||||
margin-bottom: 48px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
& a {
|
||||
color: var(--gray-1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
opacity: 0.5;
|
||||
transition: opacity 0.4s ease;
|
||||
padding-right: 32px;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
& > div {
|
||||
margin-right: 9px;
|
||||
width: 23px;
|
||||
height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& table tr.warning td {
|
||||
background: #fcf8e3;
|
||||
}
|
||||
|
||||
& #jump-to-section {
|
||||
margin-bottom: 20px;
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
user-select: none;
|
||||
|
||||
& .trigger {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
& svg {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
& .dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background: white;
|
||||
width: 500px;
|
||||
z-index: 2;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0 0 0 30px;
|
||||
box-shadow: 0 5px 8px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 3px;
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
42
website/components/placement-table/index.jsx
Normal file
42
website/components/placement-table/index.jsx
Normal file
|
@ -0,0 +1,42 @@
|
|||
import { Fragment } from 'react'
|
||||
|
||||
export default function PlacementTable({ groups = [] }) {
|
||||
return (
|
||||
<table className="g-placement-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="120" className="head">
|
||||
Placement
|
||||
</td>
|
||||
<td>
|
||||
{Array.isArray(groups[0]) ? (
|
||||
groups.map(subgroup => {
|
||||
return (
|
||||
<Fragment key={subgroup.join('')}>
|
||||
<code
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: wrapLastItem(subgroup, 'strong').join(' -> ')
|
||||
}}
|
||||
/>
|
||||
<br />
|
||||
</Fragment>
|
||||
)
|
||||
})
|
||||
) : (
|
||||
<code
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: wrapLastItem(groups, 'strong').join(' -> ')
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
)
|
||||
}
|
||||
|
||||
function wrapLastItem(arr, wrapper) {
|
||||
arr[arr.length - 1] = `<${wrapper}>${arr[arr.length - 1]}</${wrapper}>`
|
||||
return arr
|
||||
}
|
13
website/components/placement-table/style.css
Normal file
13
website/components/placement-table/style.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
.g-placement-table {
|
||||
box-sizing: border-box;
|
||||
|
||||
& td,
|
||||
& th {
|
||||
padding: 8px 20px;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
& .head {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
1
website/components/subnav/img/carat.svg
Normal file
1
website/components/subnav/img/carat.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg width="8" height="5" fill="none"><path stroke="#000" d="M1 1l3 3 3-3"/></svg>
|
After Width: | Height: | Size: 82 B |
1
website/components/subnav/img/download.svg
Normal file
1
website/components/subnav/img/download.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg width="14" height="16"><path d="M6.734 11.047a.667.667 0 00.944 0l2.666-2.666a.666.666 0 10-.943-.943L7.873 8.967V1.243a.666.666 0 10-1.334 0v7.724L5.011 7.438a.666.666 0 10-.943.943l2.666 2.666zm7.139.196v2c0 1.102-.897 2-2 2H2.54c-1.103 0-2-.898-2-2v-2a.666.666 0 111.333 0v2c0 .367.299.666.667.666h9.333a.667.667 0 00.667-.666v-2a.666.666 0 111.333 0z"/></svg>
|
After Width: | Height: | Size: 368 B |
1
website/components/subnav/img/github.svg
Normal file
1
website/components/subnav/img/github.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg width="20" height="20"><path d="M9.97.271C4.464.271 0 4.736 0 10.241c0 4.404 2.875 8.134 6.789 9.48.49.061.673-.245.673-.49V17.52c-2.753.612-3.364-1.345-3.364-1.345-.428-1.162-1.101-1.468-1.101-1.468-.917-.612.061-.612.061-.612.979.061 1.53 1.04 1.53 1.04.917 1.529 2.323 1.1 2.874.856a2.13 2.13 0 01.611-1.345C5.872 14.4 3.547 13.544 3.547 9.69c0-1.1.367-1.957 1.04-2.69-.061-.184-.428-1.224.122-2.57 0 0 .857-.244 2.753 1.04.795-.244 1.651-.306 2.507-.306.857 0 1.713.123 2.508.306 1.896-1.284 2.752-1.04 2.752-1.04.55 1.346.184 2.386.123 2.63a3.956 3.956 0 011.04 2.692c0 3.853-2.325 4.648-4.527 4.893.367.305.673.917.673 1.834v2.753c0 .244.184.55.673.489A9.98 9.98 0 0020 10.241C19.939 4.736 15.474.27 9.97.27z"/></svg>
|
After Width: | Height: | Size: 728 B |
203
website/components/subnav/index.jsx
Normal file
203
website/components/subnav/index.jsx
Normal file
|
@ -0,0 +1,203 @@
|
|||
import React, { Component } from 'react'
|
||||
import Link from 'next/link'
|
||||
import LinkWrap from '@hashicorp/react-link-wrap'
|
||||
import InlineSvg from '@hashicorp/react-inline-svg'
|
||||
import caratIcon from './img/carat.svg?include'
|
||||
import downloadIcon from './img/download.svg?include'
|
||||
import githubIcon from './img/github.svg?include'
|
||||
|
||||
class ProductSubnav extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {
|
||||
fixNav: true,
|
||||
menuOpen: false
|
||||
}
|
||||
|
||||
this.toggleMenu = this.toggleMenu.bind(this)
|
||||
this.openSubmenu = this.openSubmenu.bind(this)
|
||||
this.closeSubmenu = this.closeSubmenu.bind(this)
|
||||
}
|
||||
|
||||
toggleMenu() {
|
||||
this.setState({ menuOpen: !this.state.menuOpen })
|
||||
}
|
||||
|
||||
openSubmenu(e) {
|
||||
const dropdown = e.currentTarget.nextElementSibling
|
||||
dropdown && dropdown.classList.add('open')
|
||||
}
|
||||
|
||||
closeSubmenu(e) {
|
||||
e.currentTarget.parentElement.classList.remove('open')
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
rootUrl,
|
||||
buttonText,
|
||||
hideDownloadIcon,
|
||||
buttonExternal,
|
||||
links
|
||||
} = this.props
|
||||
const currentProduct = {
|
||||
slug: 'nomad',
|
||||
siteUrl: 'https://www.nomadproject.io',
|
||||
downloadUrl: '/downloads',
|
||||
githubUrl: 'https://github.com/hashicorp/nomad',
|
||||
colorLogo: {
|
||||
url: 'https://www.datocms-assets.com/2885/1537300284-nomad-color.svg',
|
||||
alt: 'Nomad Logo'
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`g-product-subnav ${currentProduct.slug}`}>
|
||||
<div className={`wrapper${this.state.fixed ? ' fixed' : ''}`}>
|
||||
<div className="g-container">
|
||||
<div className="logo-wrapper">
|
||||
<div className="logo">
|
||||
<Link href="/">
|
||||
<a
|
||||
data-ga-product-subnav={`Product logo | ${currentProduct.slug}`}
|
||||
>
|
||||
<img
|
||||
src={currentProduct.colorLogo.url}
|
||||
alt={currentProduct.colorLogo.alt}
|
||||
/>
|
||||
<h4>
|
||||
{currentProduct.slug.charAt(0).toUpperCase() +
|
||||
currentProduct.slug.slice(1)}
|
||||
</h4>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`toggle${currentProduct.downloadUrl ? ' center' : ''}${
|
||||
this.state.menuOpen ? ' open' : ''
|
||||
}`}
|
||||
>
|
||||
<span onClick={this.toggleMenu}>
|
||||
<InlineSvg src={caratIcon} />
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className={`links-wrapper${this.state.menuOpen ? ' open' : ''}`}
|
||||
>
|
||||
<div className="links g-type-body-small-strong">
|
||||
<ul>
|
||||
{links.map(link => {
|
||||
if (link.title === '|')
|
||||
return <li className="divider" key="divider" />
|
||||
return link.links ? (
|
||||
<li className="dropdown" key={link.title}>
|
||||
<span onClick={this.openSubmenu}>
|
||||
{link.title}
|
||||
<InlineSvg src={caratIcon} />
|
||||
</span>
|
||||
<ul>
|
||||
<li className="close" onClick={this.closeSubmenu}>
|
||||
<span>
|
||||
<InlineSvg src={caratIcon} /> Back
|
||||
</span>
|
||||
</li>
|
||||
<li className="name">{link.title}</li>
|
||||
{link.links.map(sublink => (
|
||||
<li key={sublink.title}>
|
||||
<LinkWrap
|
||||
Link={Link}
|
||||
href={resolveLocalUrl(rootUrl, sublink.url)}
|
||||
{...(sublink.external && {
|
||||
rel: 'noopener',
|
||||
target: '_blank'
|
||||
})}
|
||||
data-ga-product-subnav={`Subnav sublink | ${sublink.title}`}
|
||||
>
|
||||
{sublink.title}
|
||||
</LinkWrap>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</li>
|
||||
) : (
|
||||
<li key={link.url}>
|
||||
<LinkWrap
|
||||
Link={Link}
|
||||
href={resolveLocalUrl(rootUrl, link.url)}
|
||||
onClick={this.toggleMenu}
|
||||
{...(link.external && {
|
||||
rel: 'noopener',
|
||||
target: '_blank'
|
||||
})}
|
||||
data-ga-product-subnav={`Subnav link | ${link.title}`}
|
||||
>
|
||||
{link.title}
|
||||
</LinkWrap>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
<div className="ctas-mobile">
|
||||
{currentProduct.githubUrl && (
|
||||
<a className="github g-btn" href={currentProduct.githubUrl}>
|
||||
<InlineSvg src={githubIcon} /> GitHub
|
||||
</a>
|
||||
)}
|
||||
{currentProduct.downloadUrl && (
|
||||
<LinkWrap
|
||||
Link={Link}
|
||||
className="download g-btn variant-primary brand-nomad background-light"
|
||||
href={resolveLocalUrl(
|
||||
rootUrl,
|
||||
currentProduct.downloadUrl
|
||||
)}
|
||||
data-ga-product-subnav={`Download mobile | ${currentProduct.slug}`}
|
||||
{...(buttonExternal && {
|
||||
rel: 'noopener',
|
||||
target: '_blank'
|
||||
})}
|
||||
>
|
||||
{!hideDownloadIcon && <InlineSvg src={downloadIcon} />}
|
||||
<span>{buttonText || 'Download'}</span>
|
||||
</LinkWrap>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="ctas">
|
||||
{currentProduct.githubUrl && (
|
||||
<a className="github" href={currentProduct.githubUrl}>
|
||||
<InlineSvg src={githubIcon} />
|
||||
</a>
|
||||
)}
|
||||
{currentProduct.downloadUrl && (
|
||||
<LinkWrap
|
||||
Link={Link}
|
||||
className="download g-btn variant-primary brand-nomad background-light"
|
||||
href={resolveLocalUrl(rootUrl, currentProduct.downloadUrl)}
|
||||
data-ga-product-subnav={`Download desktop | ${currentProduct.slug}`}
|
||||
{...(buttonExternal && { rel: 'noopener', target: '_blank' })}
|
||||
>
|
||||
{!hideDownloadIcon && <InlineSvg src={downloadIcon} />}
|
||||
<span>{buttonText || 'Download'}</span>
|
||||
</LinkWrap>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// This function ensures that if the root url is the same as the link's url,
|
||||
// we strip the root and resolve from a relative path, so as to not redirect
|
||||
// from the local dev environment to production unexpectedly.
|
||||
function resolveLocalUrl(rootUrl, url) {
|
||||
const urlRegex = new RegExp(`^(?:http(?:s)*://)?(?:www.)?${rootUrl}`)
|
||||
return url.replace(/\.html$/, '').replace(urlRegex, '')
|
||||
}
|
||||
|
||||
export default ProductSubnav
|
542
website/components/subnav/style.css
Normal file
542
website/components/subnav/style.css
Normal file
|
@ -0,0 +1,542 @@
|
|||
.g-product-subnav {
|
||||
position: relative;
|
||||
z-index: 75;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
font-family: var(--font-body);
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
& .wrapper {
|
||||
padding: 25px 0;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
background-color: var(--white);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&.fixed {
|
||||
@media (max-width: 1140px) {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .g-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
justify-content: space-between;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
height: 54px;
|
||||
}
|
||||
}
|
||||
|
||||
& .dropdown {
|
||||
cursor: pointer;
|
||||
|
||||
@media (min-width: 1140px) {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
&:hover ul {
|
||||
@media (min-width: 1140px) {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& ul {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
list-style: none;
|
||||
background: var(--white);
|
||||
color: var(--DEPRECATED-gray-1);
|
||||
box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.08);
|
||||
min-width: 180px;
|
||||
margin: 0 0 0 -18px;
|
||||
padding: 0;
|
||||
border-radius: 2px;
|
||||
z-index: 4;
|
||||
}
|
||||
}
|
||||
|
||||
& .logo {
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: -13px;
|
||||
margin-right: 32px;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
margin-right: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
& > a {
|
||||
align-items: center;
|
||||
color: var(--black);
|
||||
display: flex;
|
||||
|
||||
& > img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
& > svg {
|
||||
margin-left: 10px;
|
||||
|
||||
& path {
|
||||
stroke: var(--DEPRECATED-gray-5);
|
||||
}
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& h4 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: var(--font-klavika);
|
||||
font-size: 2.2rem;
|
||||
margin: 0;
|
||||
padding: 6px 0 6px 10px;
|
||||
font-weight: var(--font-weight-bold);
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .toggle {
|
||||
display: none;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
&.center {
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
|
||||
@media (max-width: 767px) {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
&.open svg {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
|
||||
& span {
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
& svg {
|
||||
width: 14px;
|
||||
height: 9px;
|
||||
transition: 0.25s ease;
|
||||
transition-property: transform;
|
||||
}
|
||||
|
||||
& path {
|
||||
stroke: var(--highlight-color);
|
||||
}
|
||||
}
|
||||
|
||||
& .links-wrapper {
|
||||
background-color: var(--white);
|
||||
margin-left: auto;
|
||||
margin-right: 32px;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
transition: 0.25s ease;
|
||||
transition-property: height;
|
||||
z-index: 4;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.open {
|
||||
@media (max-width: 1140px) {
|
||||
overflow-y: visible;
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .links {
|
||||
display: flex;
|
||||
font-weight: var(--font-weight-bold);
|
||||
position: relative;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 10px 24px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
& ul a,
|
||||
& ul span {
|
||||
color: inherit;
|
||||
padding: 0 0 8px;
|
||||
transition: 0.25s ease;
|
||||
transition-property: border-bottom-color;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
display: block;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--DEPRECATED-gray-9);
|
||||
}
|
||||
}
|
||||
|
||||
& span {
|
||||
@media (max-width: 1140px) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
& > ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
font-size: 1.125rem;
|
||||
line-height: 1.75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
& + ul {
|
||||
@media (min-width: 1140px) {
|
||||
border-left: 1px solid var(--DEPRECATED-gray-8);
|
||||
padding-left: 24px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
padding-left: 32px;
|
||||
margin-left: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
& > li {
|
||||
margin-right: 35px;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
margin-right: 28px;
|
||||
}
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@media (min-width: 1140px) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& > a,
|
||||
& > span {
|
||||
@media (min-width: 1140px) {
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
}
|
||||
|
||||
& .selected,
|
||||
& > a:hover {
|
||||
@media (min-width: 1140px) {
|
||||
border-bottom-color: var(--highlight-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .dropdown {
|
||||
& > span > div {
|
||||
margin: -2px 0 0 8px;
|
||||
float: right;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
display: inline-block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
transform: rotate(-90deg);
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
& path {
|
||||
stroke: var(--DEPRECATED-gray-6);
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
stroke: var(--DEPRECATED-gray-1);
|
||||
}
|
||||
}
|
||||
|
||||
& ul {
|
||||
transition: 0.25s ease;
|
||||
transition-property: left, opacity, visibility;
|
||||
margin: 6px 0 0 -23px;
|
||||
padding: 15px 29px 15px 24px;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 100%;
|
||||
padding: 10px 24px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&.open {
|
||||
@media (max-width: 1140px) {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& li {
|
||||
@media (min-width: 1140px) {
|
||||
margin: 9px 0;
|
||||
}
|
||||
|
||||
&.close,
|
||||
&.name {
|
||||
@media (min-width: 1140px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.close {
|
||||
& span {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
& div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
& svg {
|
||||
margin: 2px 12px 3px 0;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&.name {
|
||||
border: none;
|
||||
color: var(--DEPRECATED-gray-5);
|
||||
font-weight: var(--font-weight-bold);
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.03125rem;
|
||||
text-transform: uppercase;
|
||||
padding: 24px 0 12px;
|
||||
}
|
||||
|
||||
& a,
|
||||
& span {
|
||||
white-space: nowrap;
|
||||
|
||||
@media (min-width: 1140px) {
|
||||
border: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@media (min-width: 1140px) {
|
||||
color: var(--DEPRECATED-gray-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .divider {
|
||||
border-left: 1px solid #d2d4db;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
& .ctas-mobile,
|
||||
& .ctas {
|
||||
& .download,
|
||||
& .github {
|
||||
font-size: 0.875rem;
|
||||
border-radius: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > div {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& .download {
|
||||
color: var(--white);
|
||||
border: none;
|
||||
|
||||
& path {
|
||||
fill: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
& .github {
|
||||
border: 1px solid var(--DEPRECATED-gray-8);
|
||||
transition: 0.25s ease;
|
||||
transition-property: transform;
|
||||
color: inherit;
|
||||
|
||||
& path {
|
||||
fill: var(--DEPRECATED-gray-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .ctas {
|
||||
display: flex;
|
||||
|
||||
& .github {
|
||||
padding: 7px;
|
||||
height: 2.25rem;
|
||||
width: 2.25rem;
|
||||
|
||||
@media (max-width: 1140px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-1px);
|
||||
|
||||
& path {
|
||||
fill: var(--DEPRECATED-gray-3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .download {
|
||||
margin-left: 16px;
|
||||
padding: 10px 15px 10px 12px;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
@media (max-width: 1140px) {
|
||||
color: var(--DEPRECATED-gray-5);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
&:after {
|
||||
@media (max-width: 1140px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& div {
|
||||
margin-right: 8px;
|
||||
line-height: 0;
|
||||
|
||||
@media (max-width: 767px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
& path {
|
||||
fill: var(--white);
|
||||
}
|
||||
|
||||
& span {
|
||||
line-height: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .ctas-mobile {
|
||||
margin: 56px 0 28px;
|
||||
|
||||
@media (min-width: 1140px) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
& + a {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
&.github {
|
||||
padding: 13px;
|
||||
background: transparent;
|
||||
|
||||
& > div {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.download {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
& svg {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
set :base_url, "https://www.nomadproject.io/"
|
||||
|
||||
activate :hashicorp do |h|
|
||||
h.name = "nomad"
|
||||
h.version = "0.10.3"
|
||||
h.github_slug = "hashicorp/nomad"
|
||||
end
|
||||
|
||||
# Netlify redirects/headers
|
||||
proxy '_redirects', 'redirects.txt', ignore: true
|
||||
|
||||
helpers do
|
||||
# Returns a segment tracking ID such that local development is not
|
||||
# tracked to production systems.
|
||||
def segmentId()
|
||||
if (ENV['ENV'] == 'production')
|
||||
'qW11yxgipKMsKFKQUCpTVgQUYftYsJj0'
|
||||
else
|
||||
'0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the FQDN of the image URL.
|
||||
#
|
||||
# @param [String] path
|
||||
#
|
||||
# @return [String]
|
||||
def image_url(path)
|
||||
File.join(base_url, image_path(path))
|
||||
end
|
||||
|
||||
# Get the title for the page.
|
||||
#
|
||||
# @param [Middleman::Page] page
|
||||
#
|
||||
# @return [String]
|
||||
def title_for(page)
|
||||
if page && page.data.page_title
|
||||
return "#{page.data.page_title} - Nomad by HashiCorp"
|
||||
end
|
||||
|
||||
"Nomad by HashiCorp"
|
||||
end
|
||||
|
||||
# Get the description for the page
|
||||
#
|
||||
# @param [Middleman::Page] page
|
||||
#
|
||||
# @return [String]
|
||||
def description_for(page)
|
||||
description = (page.data.description || "")
|
||||
.gsub('"', '')
|
||||
.gsub(/\n+/, ' ')
|
||||
.squeeze(' ')
|
||||
|
||||
return escape_html(description)
|
||||
end
|
||||
|
||||
# This helps by setting the "active" class for sidebar nav elements
|
||||
# if the YAML frontmatter matches the expected value.
|
||||
def sidebar_current(expected)
|
||||
current = current_page.data.sidebar_current || ""
|
||||
if current.start_with?(expected)
|
||||
return " class=\"active\""
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the id for this page.
|
||||
# @return [String]
|
||||
def body_id_for(page)
|
||||
if !(name = page.data.sidebar_current).blank?
|
||||
return "page-#{name.strip}"
|
||||
end
|
||||
if page.url == "/" || page.url == "/index.html"
|
||||
return "page-home"
|
||||
end
|
||||
if !(title = page.data.page_title).blank?
|
||||
return title
|
||||
.downcase
|
||||
.gsub('"', '')
|
||||
.gsub(/[^\w]+/, '-')
|
||||
.gsub(/_+/, '-')
|
||||
.squeeze('-')
|
||||
.squeeze(' ')
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
# Returns the list of classes for this page.
|
||||
# @return [String]
|
||||
def body_classes_for(page)
|
||||
classes = []
|
||||
|
||||
if !(layout = page.data.layout).blank?
|
||||
classes << "layout-#{page.data.layout}"
|
||||
end
|
||||
|
||||
if !(title = page.data.page_title).blank?
|
||||
title = title
|
||||
.downcase
|
||||
.gsub('"', '')
|
||||
.gsub(/[^\w]+/, '-')
|
||||
.gsub(/_+/, '-')
|
||||
.squeeze('-')
|
||||
.squeeze(' ')
|
||||
classes << "page-#{title}"
|
||||
end
|
||||
|
||||
return classes.join(" ")
|
||||
end
|
||||
end
|
32
website/data/api-navigation.js
Normal file
32
website/data/api-navigation.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
// The root folder for this documentation category is `pages/api-docs`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category
|
||||
|
||||
export default [
|
||||
'libraries-and-sdks',
|
||||
'json-jobs',
|
||||
'-----------',
|
||||
'acl-policies',
|
||||
'acl-tokens',
|
||||
'agent',
|
||||
'allocations',
|
||||
'client',
|
||||
'deployments',
|
||||
'evaluations',
|
||||
'jobs',
|
||||
'namespaces',
|
||||
'nodes',
|
||||
'metrics',
|
||||
'operator',
|
||||
'quotas',
|
||||
'regions',
|
||||
'search',
|
||||
'sentinel-policies',
|
||||
'status',
|
||||
'system',
|
||||
'ui',
|
||||
'validate'
|
||||
]
|
191
website/data/docs-navigation.js
Normal file
191
website/data/docs-navigation.js
Normal file
|
@ -0,0 +1,191 @@
|
|||
// The root folder for this documentation category is `pages/docs`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category
|
||||
|
||||
export default [
|
||||
{
|
||||
category: 'internals',
|
||||
content: [
|
||||
'architecture',
|
||||
{ category: 'plugins', content: ['base', 'task-drivers', 'devices'] },
|
||||
{
|
||||
category: 'scheduling',
|
||||
content: ['scheduling', 'preemption']
|
||||
},
|
||||
'consensus',
|
||||
'gossip'
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'configuration',
|
||||
content: [
|
||||
'acl',
|
||||
'autopilot',
|
||||
'client',
|
||||
'consul',
|
||||
'plugin',
|
||||
'sentinel',
|
||||
'server',
|
||||
'server_join',
|
||||
'telemetry',
|
||||
'tls',
|
||||
'vault'
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'commands',
|
||||
content: [
|
||||
{
|
||||
category: 'acl',
|
||||
content: [
|
||||
'bootstrap',
|
||||
'policy-apply',
|
||||
'policy-delete',
|
||||
'policy-info',
|
||||
'policy-list',
|
||||
'token-create',
|
||||
'token-delete',
|
||||
'token-info',
|
||||
'token-list',
|
||||
'token-self',
|
||||
'token-update'
|
||||
]
|
||||
},
|
||||
'agent',
|
||||
'agent-info',
|
||||
{
|
||||
category: 'alloc',
|
||||
content: ['exec', 'fs', 'logs', 'restart', 'signal', 'status', 'stop']
|
||||
},
|
||||
|
||||
{
|
||||
category: 'deployment',
|
||||
content: ['fail', 'list', 'pause', 'promote', 'resume', 'status']
|
||||
},
|
||||
'eval-status',
|
||||
{
|
||||
category: 'job',
|
||||
content: [
|
||||
'deployments',
|
||||
'dispatch',
|
||||
'eval',
|
||||
'history',
|
||||
'init',
|
||||
'inspect',
|
||||
'plan',
|
||||
'periodic-force',
|
||||
'promote',
|
||||
'revert',
|
||||
'run',
|
||||
'status',
|
||||
'stop',
|
||||
'validate'
|
||||
]
|
||||
},
|
||||
'monitor',
|
||||
{
|
||||
category: 'namespace',
|
||||
content: ['apply', 'delete', 'inspect', 'list', 'status']
|
||||
},
|
||||
{
|
||||
category: 'node',
|
||||
content: ['config', 'drain', 'eligibility', 'status']
|
||||
},
|
||||
{
|
||||
category: 'operator',
|
||||
content: [
|
||||
'autopilot-get-config',
|
||||
'autopilot-set-config',
|
||||
'keygen',
|
||||
'keyring',
|
||||
'raft-list-peers',
|
||||
'raft-remove-peer'
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'quota',
|
||||
content: ['apply', 'delete', 'init', 'inspect', 'list', 'status']
|
||||
},
|
||||
{ category: 'sentinel', content: ['apply', 'delete', 'list', 'read'] },
|
||||
{ category: 'server', content: ['force-leave', 'join', 'members'] },
|
||||
'status',
|
||||
{ category: 'system', content: ['gc', 'reconcile-summaries'] },
|
||||
'ui',
|
||||
'version'
|
||||
]
|
||||
},
|
||||
'----------',
|
||||
{
|
||||
category: 'job-specification',
|
||||
content: [
|
||||
'artifact',
|
||||
'affinity',
|
||||
'check_restart',
|
||||
'connect',
|
||||
'constraint',
|
||||
'device',
|
||||
'dispatch_payload',
|
||||
'env',
|
||||
'ephemeral_disk',
|
||||
'group',
|
||||
'job',
|
||||
'logs',
|
||||
'meta',
|
||||
'migrate',
|
||||
'network',
|
||||
'parameterized',
|
||||
'periodic',
|
||||
'proxy',
|
||||
'reschedule',
|
||||
'resources',
|
||||
'restart',
|
||||
'service',
|
||||
'sidecar_service',
|
||||
'sidecar_task',
|
||||
'spread',
|
||||
'task',
|
||||
'template',
|
||||
'update',
|
||||
'upstreams',
|
||||
'vault',
|
||||
'volume',
|
||||
'volume_mount'
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'drivers',
|
||||
content: [
|
||||
'docker',
|
||||
'exec',
|
||||
'java',
|
||||
'qemu',
|
||||
'raw_exec',
|
||||
'rkt',
|
||||
{
|
||||
category: 'external',
|
||||
content: [
|
||||
'lxc',
|
||||
'podman',
|
||||
'singularity',
|
||||
'jail-task-driver',
|
||||
'pot',
|
||||
'firecracker-task-driver'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'devices',
|
||||
content: ['nvidia', 'community']
|
||||
},
|
||||
'schedulers',
|
||||
{ category: 'runtime', content: ['environment', 'interpolation'] },
|
||||
{ category: 'telemetry', content: ['metrics'] },
|
||||
{ category: 'vault-integration' },
|
||||
'------------',
|
||||
{ category: 'enterprise' },
|
||||
'faq'
|
||||
]
|
100
website/data/guides-navigation.js
Normal file
100
website/data/guides-navigation.js
Normal file
|
@ -0,0 +1,100 @@
|
|||
// The root folder for this documentation category is `pages/guides`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category
|
||||
|
||||
export default [
|
||||
{
|
||||
category: 'install',
|
||||
content: [
|
||||
{ category: 'quickstart' },
|
||||
{
|
||||
category: 'production',
|
||||
content: [
|
||||
'requirements',
|
||||
'nomad-agent',
|
||||
'reference-architecture',
|
||||
'deployment-guide'
|
||||
]
|
||||
},
|
||||
'windows-service'
|
||||
]
|
||||
},
|
||||
{ category: 'upgrade', content: ['upgrade-specific'] },
|
||||
{
|
||||
category: 'integrations',
|
||||
content: ['consul-integration', 'consul-connect', 'vault-integration']
|
||||
},
|
||||
'-----------',
|
||||
{
|
||||
category: 'operating-a-job',
|
||||
content: [
|
||||
'configuring-tasks',
|
||||
'submitting-jobs',
|
||||
'inspecting-state',
|
||||
'accessing-logs',
|
||||
'resource-utilization',
|
||||
{
|
||||
category: 'update-strategies',
|
||||
content: [
|
||||
'rolling-upgrades',
|
||||
'blue-green-and-canary-deployments',
|
||||
'handling-signals'
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'failure-handling-strategies',
|
||||
content: ['restart', 'check-restart', 'reschedule']
|
||||
},
|
||||
{
|
||||
category: 'advanced-scheduling',
|
||||
content: ['affinity', 'spread', 'preemption-service-batch']
|
||||
},
|
||||
{ category: 'external', content: ['lxc'] }
|
||||
]
|
||||
},
|
||||
{
|
||||
category: 'operations',
|
||||
content: [
|
||||
{
|
||||
category: 'cluster',
|
||||
content: ['manual', 'automatic', 'cloud_auto_join']
|
||||
},
|
||||
'federation',
|
||||
'node-draining',
|
||||
'outage',
|
||||
{ category: 'monitoring-and-alerting', content: ['prometheus-metrics'] },
|
||||
'autopilot'
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
category: 'security',
|
||||
content: ['encryption', 'acl', 'securing-nomad', 'vault-pki-integration']
|
||||
},
|
||||
{ category: 'stateful-workloads' },
|
||||
{
|
||||
category: 'analytical-workloads',
|
||||
content: [
|
||||
{
|
||||
category: 'spark',
|
||||
content: [
|
||||
'pre',
|
||||
'customizing',
|
||||
'resource',
|
||||
'dynamic',
|
||||
'submit',
|
||||
'hdfs',
|
||||
'monitoring',
|
||||
'configuration'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{ category: 'load-balancing' },
|
||||
{ category: 'governance-and-policy', content: [] },
|
||||
{ category: 'web-ui', content: [] }
|
||||
]
|
16
website/data/intro-navigation.js
Normal file
16
website/data/intro-navigation.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
// The root folder for this documentation category is `pages/intro`
|
||||
//
|
||||
// - A string refers to the name of a file
|
||||
// - A "category" value refers to the name of a directory
|
||||
// - All directories must have an "index.mdx" file to serve as
|
||||
// the landing page for the category
|
||||
|
||||
export default [
|
||||
'use-cases',
|
||||
'who-uses-nomad',
|
||||
{ category: 'vs', content: ['kubernetes', 'ecs', 'mesos', 'terraform'] },
|
||||
{
|
||||
category: 'getting-started',
|
||||
content: ['running', 'jobs', 'cluster', 'ui', 'next-steps']
|
||||
}
|
||||
]
|
12
website/data/subnav.js
Normal file
12
website/data/subnav.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
export default [
|
||||
{ title: 'Intro', url: '/intro/' },
|
||||
{ title: 'Guides', url: '/guides/' },
|
||||
{ title: 'Docs', url: '/docs' },
|
||||
{ title: 'API', url: '/api-docs' },
|
||||
{ title: '|' },
|
||||
{ title: 'Resources', url: '/resources' },
|
||||
{
|
||||
title: 'Enterprise',
|
||||
url: 'https://www.hashicorp.com/products/nomad/enterprise'
|
||||
}
|
||||
]
|
1
website/data/version.js
Normal file
1
website/data/version.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default '0.10.3'
|
23
website/layouts/api.jsx
Normal file
23
website/layouts/api.jsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import DocsPage, { getInitialProps } from '../components/docs-page'
|
||||
import orderData from '../data/api-navigation.js'
|
||||
import { frontMatter } from '../pages/api-docs/**/*.mdx'
|
||||
|
||||
function ApiLayoutWrapper(pageMeta) {
|
||||
function ApiLayout(props) {
|
||||
return (
|
||||
<DocsPage
|
||||
{...props}
|
||||
orderData={orderData}
|
||||
frontMatter={frontMatter}
|
||||
category="api-docs"
|
||||
pageMeta={pageMeta}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
ApiLayout.getInitialProps = getInitialProps
|
||||
|
||||
return ApiLayout
|
||||
}
|
||||
|
||||
export default ApiLayoutWrapper
|
29
website/layouts/docs.jsx
Normal file
29
website/layouts/docs.jsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
import DocsPage, { getInitialProps } from '../components/docs-page'
|
||||
import orderData from '../data/docs-navigation.js'
|
||||
import { frontMatter } from '../pages/docs/**/*.mdx'
|
||||
import { MDXProvider } from '@mdx-js/react'
|
||||
import Placement from '../components/placement-table'
|
||||
|
||||
const DEFAULT_COMPONENTS = { Placement }
|
||||
|
||||
function DocsLayoutWrapper(pageMeta) {
|
||||
function DocsLayout(props) {
|
||||
return (
|
||||
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||
<DocsPage
|
||||
{...props}
|
||||
orderData={orderData}
|
||||
frontMatter={frontMatter}
|
||||
category="docs"
|
||||
pageMeta={pageMeta}
|
||||
/>
|
||||
</MDXProvider>
|
||||
)
|
||||
}
|
||||
|
||||
DocsLayout.getInitialProps = getInitialProps
|
||||
|
||||
return DocsLayout
|
||||
}
|
||||
|
||||
export default DocsLayoutWrapper
|
23
website/layouts/guides.jsx
Normal file
23
website/layouts/guides.jsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import DocsPage, { getInitialProps } from '../components/docs-page'
|
||||
import orderData from '../data/guides-navigation.js'
|
||||
import { frontMatter } from '../pages/guides/**/*.mdx'
|
||||
|
||||
function GuidesLayoutWrapper(pageMeta) {
|
||||
function GuidesLayout(props) {
|
||||
return (
|
||||
<DocsPage
|
||||
{...props}
|
||||
orderData={orderData}
|
||||
frontMatter={frontMatter}
|
||||
category="guides"
|
||||
pageMeta={pageMeta}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
GuidesLayout.getInitialProps = getInitialProps
|
||||
|
||||
return GuidesLayout
|
||||
}
|
||||
|
||||
export default GuidesLayoutWrapper
|
23
website/layouts/intro.jsx
Normal file
23
website/layouts/intro.jsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import DocsPage, { getInitialProps } from '../components/docs-page'
|
||||
import orderData from '../data/intro-navigation.js'
|
||||
import { frontMatter } from '../pages/intro/**/*.mdx'
|
||||
|
||||
function IntroLayoutWrapper(pageMeta) {
|
||||
function IntroLayout(props) {
|
||||
return (
|
||||
<DocsPage
|
||||
{...props}
|
||||
orderData={orderData}
|
||||
frontMatter={frontMatter}
|
||||
category="intro"
|
||||
pageMeta={pageMeta}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
IntroLayout.getInitialProps = getInitialProps
|
||||
|
||||
return IntroLayout
|
||||
}
|
||||
|
||||
export default IntroLayoutWrapper
|
17
website/lib/bugsnag.js
Normal file
17
website/lib/bugsnag.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
import React from 'react'
|
||||
import bugsnag from '@bugsnag/js'
|
||||
import bugsnagReact from '@bugsnag/plugin-react'
|
||||
|
||||
const apiKey =
|
||||
typeof window === 'undefined'
|
||||
? 'fb2dc40bb48b17140628754eac6c1b11'
|
||||
: '07ff2d76ce27aded8833bf4804b73350'
|
||||
|
||||
const bugsnagClient = bugsnag({
|
||||
apiKey,
|
||||
releaseStage: process.env.NODE_ENV || 'development'
|
||||
})
|
||||
|
||||
bugsnagClient.use(bugsnagReact, React)
|
||||
|
||||
export default bugsnagClient
|
76
website/lib/consent-manager-config.js
Normal file
76
website/lib/consent-manager-config.js
Normal file
|
@ -0,0 +1,76 @@
|
|||
const isProd = process.env.NODE_ENV === 'production'
|
||||
|
||||
const segmentWriteKey = isProd
|
||||
? 'OdSFDq9PfujQpmkZf03dFpcUlywme4sC'
|
||||
: '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: '/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");`
|
||||
}
|
||||
]
|
||||
}
|
10
website/lib/polyfills.js
Normal file
10
website/lib/polyfills.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// If you run into issues with features missing in IE11, you likely need to
|
||||
// make additions to this file for those features.
|
||||
// See https://github.com/zloirock/core-js
|
||||
import 'core-js/fn/array'
|
||||
import 'core-js/fn/object/assign'
|
||||
import 'core-js/fn/string/ends-with'
|
||||
import 'core-js/fn/string/includes'
|
||||
import 'core-js/fn/string/repeat'
|
||||
import 'core-js/fn/string/starts-with'
|
||||
import 'core-js/fn/symbol'
|
13
website/netlify.toml
Normal file
13
website/netlify.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
# This file sets configuration for Netlify
|
||||
# ref: https://www.netlify.com/docs/netlify-toml-reference/
|
||||
|
||||
[build]
|
||||
publish = "out"
|
||||
command = "npm run static"
|
||||
|
||||
[context.production]
|
||||
environment = { HASHI_ENV = "production", NODE_ENV = "production"}
|
||||
|
||||
[context.deploy-preview]
|
||||
environment = { HASHI_ENV = "staging" }
|
40
website/next.config.js
Normal file
40
website/next.config.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
const withHashicorp = require('@hashicorp/nextjs-scripts')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = withHashicorp({
|
||||
defaultLayout: true,
|
||||
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
|
||||
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') }
|
||||
})({
|
||||
experimental: {
|
||||
css: true,
|
||||
granularChunks: true,
|
||||
rewrites: () => [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: '/api-docs/:path*'
|
||||
}
|
||||
]
|
||||
},
|
||||
exportTrailingSlash: true,
|
||||
webpack(config) {
|
||||
// Add polyfills
|
||||
const originalEntry = config.entry
|
||||
config.entry = async () => {
|
||||
const entries = await originalEntry()
|
||||
let polyEntry = entries['static/runtime/polyfills.js']
|
||||
if (polyEntry && !polyEntry.includes('./lib/polyfills.js')) {
|
||||
if (!Array.isArray(polyEntry)) {
|
||||
entries['static/runtime/polyfills.js'] = [polyEntry]
|
||||
}
|
||||
entries['static/runtime/polyfills.js'].unshift('./lib/polyfills.js')
|
||||
}
|
||||
return entries
|
||||
}
|
||||
|
||||
return config
|
||||
},
|
||||
env: {
|
||||
HASHI_ENV: process.env.HASHI_ENV
|
||||
}
|
||||
})
|
18785
website/package-lock.json
generated
Normal file
18785
website/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
66
website/package.json
Normal file
66
website/package.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"name": "nomad-docs-platform",
|
||||
"description": "Description of your website",
|
||||
"version": "0.0.1",
|
||||
"author": "HashiCorp",
|
||||
"dependencies": {
|
||||
"@bugsnag/js": "^6.5.2",
|
||||
"@bugsnag/plugin-react": "^6.5.0",
|
||||
"@hashicorp/nextjs-scripts": "^6.0.0-2",
|
||||
"@hashicorp/react-alert": "^2.0.0",
|
||||
"@hashicorp/react-button": "^2.1.4",
|
||||
"@hashicorp/react-case-study-slider": "^2.0.5",
|
||||
"@hashicorp/react-consent-manager": "^2.0.4",
|
||||
"@hashicorp/react-content": "^2.2.0",
|
||||
"@hashicorp/react-docs-sidenav": "^3.0.2",
|
||||
"@hashicorp/react-docs-sitemap": "^1.0.0",
|
||||
"@hashicorp/react-footer": "^3.1.7",
|
||||
"@hashicorp/react-global-styles": "^4.0.9",
|
||||
"@hashicorp/react-hero": "^3.0.1",
|
||||
"@hashicorp/react-image": "^2.0.1",
|
||||
"@hashicorp/react-inline-svg": "^1.0.0",
|
||||
"@hashicorp/react-mega-nav": "^4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "^2.4.0",
|
||||
"@hashicorp/react-section-header": "^2.0.0",
|
||||
"@hashicorp/react-text-and-content": "^4.0.2",
|
||||
"@hashicorp/react-use-cases": "^1.0.3",
|
||||
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||
"babel-plugin-import-glob-array": "^0.2.0",
|
||||
"highlight.js": "^9.18.1",
|
||||
"imagemin-mozjpeg": "^8.0.0",
|
||||
"imagemin-optipng": "^7.1.0",
|
||||
"imagemin-svgo": "^7.0.0",
|
||||
"isomorphic-unfetch": "^3.0.0",
|
||||
"marked": "^0.7.0",
|
||||
"next": "9.2.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"slugify": "^1.3.6",
|
||||
"stringify-object": "^3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dart-linkcheck": "^2.0.12",
|
||||
"glob": "^7.1.6",
|
||||
"husky": "^4.2.1",
|
||||
"inquirer": "^7.0.4",
|
||||
"prettier": "^1.19.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "next-hashicorp precommit"
|
||||
}
|
||||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "node --max-old-space-size=2048 ./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",
|
||||
"format": "next-hashicorp format",
|
||||
"generate:component": "next-hashicorp generate component",
|
||||
"lint": "next-hashicorp lint",
|
||||
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
|
||||
"static": "npm run build && npm run export && cp _redirects out/.",
|
||||
"linkcheck": "linkcheck https://www.nomadproject.io"
|
||||
}
|
||||
}
|
62
website/pages/_app.js
Normal file
62
website/pages/_app.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
import './style.css'
|
||||
import App from 'next/app'
|
||||
import NProgress from 'nprogress'
|
||||
import Router from 'next/router'
|
||||
import DefaultHeadTags from '../components/default-head-tags'
|
||||
import ProductSubnav from '../components/subnav'
|
||||
import MegaNav from '@hashicorp/react-mega-nav'
|
||||
import Footer from '@hashicorp/react-footer'
|
||||
import { ConsentManager, open } from '@hashicorp/react-consent-manager'
|
||||
import consentManagerConfig from '../lib/consent-manager-config'
|
||||
import bugsnagClient from '../lib/bugsnag'
|
||||
import Error from './_error'
|
||||
import subnavLinks from '../data/subnav'
|
||||
|
||||
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()
|
||||
})
|
||||
|
||||
// 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, path: ctx.asPath }
|
||||
}
|
||||
|
||||
render() {
|
||||
const { Component, pageProps, path } = this.props
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={Error}>
|
||||
<DefaultHeadTags />
|
||||
<MegaNav product="Nomad" />
|
||||
<ProductSubnav
|
||||
links={subnavLinks}
|
||||
currentPath={path}
|
||||
rootUrl="nomadproject.io"
|
||||
/>
|
||||
<Component {...pageProps} />
|
||||
<Footer openConsentManager={open} />
|
||||
<ConsentManager {...consentManagerConfig} />
|
||||
</ErrorBoundary>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default NextApp
|
29
website/pages/_document.js
Normal file
29
website/pages/_document.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
import Document, { Head, Main, NextScript } from 'next/document'
|
||||
|
||||
export default class MyDocument extends Document {
|
||||
static async getInitialProps(ctx) {
|
||||
const initialProps = await Document.getInitialProps(ctx)
|
||||
return { ...initialProps }
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<html>
|
||||
<Head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/nprogress.css" />
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
<script
|
||||
noModule
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-custom-properties.js"><\\x2fscript>');`
|
||||
}}
|
||||
/>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
}
|
13
website/pages/_error.jsx
Normal file
13
website/pages/_error.jsx
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from 'react'
|
||||
import ErrorPage from 'next/error'
|
||||
import bugsnagClient from '../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 || '¯\\_(ツ)_/¯'} />
|
||||
}
|
||||
}
|
|
@ -1,32 +1,31 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: ACL Policies - HTTP API
|
||||
sidebar_current: api-acl-policies
|
||||
description: |-
|
||||
The /acl/policy endpoints are used to configure and manage ACL policies.
|
||||
sidebar_title: ACL Policies
|
||||
description: The /acl/policy endpoints are used to configure and manage ACL policies.
|
||||
---
|
||||
|
||||
# ACL Policies HTTP API
|
||||
|
||||
The `/acl/policies` and `/acl/policy/` endpoints are used to manage ACL policies.
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl.html).
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl).
|
||||
|
||||
## List Policies
|
||||
|
||||
This endpoint lists all ACL policies. This lists the policies that have been replicated
|
||||
to the region, and may lag behind the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/acl/policies` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------- | ------------------ |
|
||||
| `GET` | `/acl/policies` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
| `YES` | `all` | `management` for all policies.<br>Output when given a non-management token will be limited to the policies on the token itself |
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `YES` | `all` | `management` for all policies.<br />Output when given a non-management token will be limited to the policies on the token itself |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -35,12 +34,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/acl/policies
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/acl/policies?prefix=prod
|
||||
```
|
||||
|
@ -53,7 +52,7 @@ $ curl \
|
|||
"Name": "foo",
|
||||
"Description": "",
|
||||
"CreateIndex": 12,
|
||||
"ModifyIndex": 13,
|
||||
"ModifyIndex": 13
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -63,17 +62,17 @@ $ curl \
|
|||
This endpoint creates or updates an ACL Policy. This request is always forwarded to the
|
||||
authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/acl/policy/:policy_name` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | -------------- |
|
||||
| `POST` | `/acl/policy/:policy_name` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -88,15 +87,15 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"Name": "my-policy",
|
||||
"Description": "This is a great policy",
|
||||
"Rules": ""
|
||||
"Name": "my-policy",
|
||||
"Description": "This is a great policy",
|
||||
"Rules": ""
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -108,22 +107,21 @@ $ curl \
|
|||
This endpoint reads an ACL policy with the given name. This queries the policy that have been
|
||||
replicated to the region, and may lag behind the authoritative region.
|
||||
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/acl/policy/:policy_name` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | ------------------ |
|
||||
| `GET` | `/acl/policy/:policy_name` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------------------------------------- |
|
||||
| `YES` | `all` | `management` or token with access to policy |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/acl/policy/foo
|
||||
```
|
||||
|
@ -145,17 +143,17 @@ $ curl \
|
|||
This endpoint deletes the named ACL policy. This request is always forwarded to the
|
||||
authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| -------- | ---------------------------- | -------------------------- |
|
||||
| `DELETE` | `/acl/policy/:policy_name` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | -------------------------- | -------------- |
|
||||
| `DELETE` | `/acl/policy/:policy_name` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -163,9 +161,8 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/acl/policy/foo
|
||||
```
|
||||
|
|
@ -1,37 +1,36 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: ACL Tokens - HTTP API
|
||||
sidebar_current: api-acl-tokens
|
||||
description: |-
|
||||
The /acl/token/ endpoints are used to configure and manage ACL tokens.
|
||||
sidebar_title: ACL Tokens
|
||||
description: The /acl/token/ endpoints are used to configure and manage ACL tokens.
|
||||
---
|
||||
|
||||
# ACL Tokens HTTP API
|
||||
|
||||
The `/acl/bootstrap`, `/acl/tokens`, and `/acl/token/` endpoints are used to manage ACL tokens.
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl.html).
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl).
|
||||
|
||||
## Bootstrap Token
|
||||
|
||||
This endpoint is used to bootstrap the ACL system and provide the initial management token.
|
||||
This request is always forwarded to the authoritative region. It can only be invoked once
|
||||
until a [bootstrap reset](/guides/security/acl.html#reseting-acl-bootstrap) is performed.
|
||||
until a [bootstrap reset](/guides/security/acl#reseting-acl-bootstrap) is performed.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/acl/bootstrap` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `POST` | `/acl/bootstrap` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `none` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `none` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/acl/bootstrap
|
||||
|
@ -41,15 +40,15 @@ $ curl \
|
|||
|
||||
```json
|
||||
{
|
||||
"AccessorID":"b780e702-98ce-521f-2e5f-c6b87de05b24",
|
||||
"SecretID":"3f4a0fcd-7c42-773c-25db-2d31ba0c05fe",
|
||||
"Name":"Bootstrap Token",
|
||||
"Type":"management",
|
||||
"Policies":null,
|
||||
"Global":true,
|
||||
"CreateTime":"2017-08-23T22:47:14.695408057Z",
|
||||
"CreateIndex":7,
|
||||
"ModifyIndex":7
|
||||
"AccessorID": "b780e702-98ce-521f-2e5f-c6b87de05b24",
|
||||
"SecretID": "3f4a0fcd-7c42-773c-25db-2d31ba0c05fe",
|
||||
"Name": "Bootstrap Token",
|
||||
"Type": "management",
|
||||
"Policies": null,
|
||||
"Global": true,
|
||||
"CreateTime": "2017-08-23T22:47:14.695408057Z",
|
||||
"CreateIndex": 7,
|
||||
"ModifyIndex": 7
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -58,13 +57,13 @@ $ curl \
|
|||
This endpoint lists all ACL tokens. This lists the local tokens and the global
|
||||
tokens which have been replicated to the region, and may lag behind the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/acl/tokens` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------- | ------------------ |
|
||||
| `GET` | `/acl/tokens` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
|
@ -79,12 +78,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/acl/tokens
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/acl/tokens?prefix=3da2ed52
|
||||
|
@ -112,17 +111,17 @@ $ curl \
|
|||
This endpoint creates an ACL Token. If the token is a global token, the request
|
||||
is forwarded to the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/acl/token` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------ | ------------------ |
|
||||
| `POST` | `/acl/token` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -138,16 +137,16 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"Name": "Readonly token",
|
||||
"Type": "client",
|
||||
"Policies": ["readonly"],
|
||||
"Global": false
|
||||
"Name": "Readonly token",
|
||||
"Type": "client",
|
||||
"Policies": ["readonly"],
|
||||
"Global": false
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -162,9 +161,7 @@ $ curl \
|
|||
"SecretID": "8176afd3-772d-0b71-8f85-7fa5d903e9d4",
|
||||
"Name": "Readonly token",
|
||||
"Type": "client",
|
||||
"Policies": [
|
||||
"readonly"
|
||||
],
|
||||
"Policies": ["readonly"],
|
||||
"Global": false,
|
||||
"CreateTime": "2017-08-23T23:25:41.429154233Z",
|
||||
"CreateIndex": 52,
|
||||
|
@ -178,17 +175,17 @@ This endpoint updates an existing ACL Token. If the token is a global token, the
|
|||
is forwarded to the authoritative region. Note that a token cannot be switched from global
|
||||
to local or visa versa.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/acl/token/:accessor_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------------ |
|
||||
| `POST` | `/acl/token/:accessor_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -204,16 +201,16 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"AccessorID": "aa534e09-6a07-0a45-2295-a7f77063d429",
|
||||
"Name": "Read-write token",
|
||||
"Type": "client",
|
||||
"Policies": ["readwrite"],
|
||||
"AccessorID": "aa534e09-6a07-0a45-2295-a7f77063d429",
|
||||
"Name": "Read-write token",
|
||||
"Type": "client",
|
||||
"Policies": ["readwrite"]
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -228,9 +225,7 @@ $ curl \
|
|||
"SecretID": "8176afd3-772d-0b71-8f85-7fa5d903e9d4",
|
||||
"Name": "Read-write token",
|
||||
"Type": "client",
|
||||
"Policies": [
|
||||
"readwrite"
|
||||
],
|
||||
"Policies": ["readwrite"],
|
||||
"Global": false,
|
||||
"CreateTime": "2017-08-23T23:25:41.429154233Z",
|
||||
"CreateIndex": 52,
|
||||
|
@ -243,21 +238,21 @@ $ curl \
|
|||
This endpoint reads an ACL token with the given accessor. If the token is a global token
|
||||
which has been replicated to the region it may lag behind the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/acl/token/:accessor_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------------ |
|
||||
| `GET` | `/acl/token/:accessor_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | -------------------------------------------------- |
|
||||
| `YES` | `all` | `management` or a SecretID matching the AccessorID |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/acl/token/aa534e09-6a07-0a45-2295-a7f77063d429
|
||||
```
|
||||
|
@ -270,9 +265,7 @@ $ curl \
|
|||
"SecretID": "8176afd3-772d-0b71-8f85-7fa5d903e9d4",
|
||||
"Name": "Read-write token",
|
||||
"Type": "client",
|
||||
"Policies": [
|
||||
"readwrite"
|
||||
],
|
||||
"Policies": ["readwrite"],
|
||||
"Global": false,
|
||||
"CreateTime": "2017-08-23T23:25:41.429154233Z",
|
||||
"CreateIndex": 52,
|
||||
|
@ -285,21 +278,21 @@ $ curl \
|
|||
This endpoint reads the ACL token given by the passed SecretID. If the token is a global token
|
||||
which has been replicated to the region it may lag behind the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/acl/token/self` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/acl/token/self` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------------- |
|
||||
| `YES` | `all` | Any valid ACL token |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--header "X-Nomad-Token: 8176afd3-772d-0b71-8f85-7fa5d903e9d4" \
|
||||
https://localhost:4646/v1/acl/token/self
|
||||
|
@ -313,9 +306,7 @@ $ curl \
|
|||
"SecretID": "8176afd3-772d-0b71-8f85-7fa5d903e9d4",
|
||||
"Name": "Read-write token",
|
||||
"Type": "client",
|
||||
"Policies": [
|
||||
"readwrite"
|
||||
],
|
||||
"Policies": ["readwrite"],
|
||||
"Global": false,
|
||||
"CreateTime": "2017-08-23T23:25:41.429154233Z",
|
||||
"CreateIndex": 52,
|
||||
|
@ -328,17 +319,17 @@ $ curl \
|
|||
This endpoint deletes the ACL token by accessor. This request is forwarded to the
|
||||
authoritative region for global tokens.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| -------- | ---------------------------- | -------------------------- |
|
||||
| `DELETE` | `/acl/token/:accessor_id` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | ------------------------- | -------------- |
|
||||
| `DELETE` | `/acl/token/:accessor_id` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -346,9 +337,8 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/acl/token/aa534e09-6a07-0a45-2295-a7f77063d429
|
||||
```
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Agent - HTTP API
|
||||
sidebar_current: api-agent
|
||||
sidebar_title: Agent
|
||||
description: |-
|
||||
The /agent endpoints interact with the local Nomad agent to interact with
|
||||
members and servers.
|
||||
|
@ -17,13 +17,13 @@ This endpoint queries the agent for the known peers in the gossip pool. This
|
|||
endpoint is only applicable to servers. Due to the nature of gossip, this is
|
||||
eventually consistent.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/members` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `GET` | `/agent/members` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -31,7 +31,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/members
|
||||
```
|
||||
|
@ -78,13 +78,13 @@ register themselves with these server addresses so that they may dequeue work.
|
|||
The servers endpoint can be used to keep this configuration up to date if there
|
||||
are changes in the cluster.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/servers` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `GET` | `/agent/servers` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -92,7 +92,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/servers
|
||||
```
|
||||
|
@ -100,9 +100,7 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
[
|
||||
"127.0.0.1:4647"
|
||||
]
|
||||
["127.0.0.1:4647"]
|
||||
```
|
||||
|
||||
## Update Servers
|
||||
|
@ -110,13 +108,13 @@ $ curl \
|
|||
This endpoint updates the list of known servers to the provided list. This
|
||||
**replaces** all previous server addresses with the new list.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/agent/servers` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | -------------- |
|
||||
| `POST` | `/agent/servers` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
|
@ -129,7 +127,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/agent/servers?address=1.2.3.4:4647&address=5.6.7.8:4647
|
||||
|
@ -139,13 +137,13 @@ $ curl \
|
|||
|
||||
This endpoint queries the state of the target agent (self).
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/self` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------- | ------------------ |
|
||||
| `GET` | `/agent/self` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -153,7 +151,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/self
|
||||
```
|
||||
|
@ -392,13 +390,13 @@ $ curl \
|
|||
This endpoint introduces a new member to the gossip pool. This endpoint is only
|
||||
eligible for servers.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/agent/join` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------- | ------------------ |
|
||||
| `POST` | `/agent/join` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -412,7 +410,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/agent/join?address=1.2.3.4&address=5.6.7.8
|
||||
|
@ -433,13 +431,13 @@ This endpoint forces a member of the gossip pool from the `"failed"` state to
|
|||
the `"left"` state. This allows the consensus protocol to remove the peer and
|
||||
stop attempting replication. This is only applicable for servers.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/agent/force-leave` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------- | ------------------ |
|
||||
| `POST` | `/agent/force-leave` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
|
@ -451,7 +449,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/agent/force-leave?node=client-ab2e23dc
|
||||
|
@ -465,13 +463,13 @@ is the endpoint Nomad will register for its own health checks.
|
|||
When the agent is unhealthy 500 will be returned along with JSON response
|
||||
containing an error message.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/health` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------- | ------------------ |
|
||||
| `GET` | `/agent/health` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -479,7 +477,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/health
|
||||
```
|
||||
|
@ -488,14 +486,14 @@ $ curl \
|
|||
|
||||
```json
|
||||
{
|
||||
"client": {
|
||||
"message": "ok",
|
||||
"ok": true
|
||||
},
|
||||
"server": {
|
||||
"message": "ok",
|
||||
"ok": true
|
||||
}
|
||||
"client": {
|
||||
"message": "ok",
|
||||
"ok": true
|
||||
},
|
||||
"server": {
|
||||
"message": "ok",
|
||||
"ok": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -503,26 +501,25 @@ $ curl \
|
|||
|
||||
This endpoint streams logs from the local agent until the connection is closed
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/monitor` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `GET` | `/agent/monitor` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `agent:read` |
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
- `log_level` `(string: "info")` - Specifies a text string containing a log level
|
||||
to filter on, such as `info`. Possible values include `trace`, `debug`,
|
||||
`info`, `warn`, `error`
|
||||
|
||||
- `json` `(bool: false)` - Specifies if the log format for streamed logs
|
||||
- `json` `(bool: false)` - Specifies if the log format for streamed logs
|
||||
should be JSON.
|
||||
|
||||
- `node_id` `(string: "a57b2adb-1a30-2dda-8df0-25abb0881952")` - Specifies a text
|
||||
|
@ -537,7 +534,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/agent/monitor?log_level=debug&server_id=leader
|
||||
|
||||
|
@ -546,6 +543,7 @@ $ curl \
|
|||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
"Offset": 0,
|
||||
|
@ -572,16 +570,16 @@ This endpoint is the equivalent of Go's /debug/pprof endpoint but is protected
|
|||
by ACLs and supports remote forwarding to a client node or server. See the
|
||||
[Golang documentation](https://golang.org/pkg/runtime/pprof/#Profile) for a list of available profiles.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------------------- | -------------------------- |
|
||||
| `GET` | `/agent/pprof/cmdline` | `text/plain` |
|
||||
| `GET` | `/agent/pprof/profile` | `application/octet-stream` |
|
||||
| `GET` | `/agent/pprof/trace` | `application/octet-stream` |
|
||||
| `GET` | `/agent/pprof/<pprof profile>`| `application/octet-stream` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------ | -------------------------- |
|
||||
| `GET` | `/agent/pprof/cmdline` | `text/plain` |
|
||||
| `GET` | `/agent/pprof/profile` | `application/octet-stream` |
|
||||
| `GET` | `/agent/pprof/trace` | `application/octet-stream` |
|
||||
| `GET` | `/agent/pprof/<pprof profile>` | `application/octet-stream` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
|
@ -592,21 +590,20 @@ The table below shows this endpoint's support for
|
|||
This endpoint is enabled whenever ACLs are enabled. Due to the potentially
|
||||
sensitive nature of data contained in profiles, as well as their significant
|
||||
performance impact, the agent/pprof endpoint is protected by a high level ACL:
|
||||
`agent:write`. For these reasons its recommended to leave [`enable_debug`](/docs/configuration/index.html#enable_debug)
|
||||
`agent:write`. For these reasons its recommended to leave [`enable_debug`](/docs/configuration#enable_debug)
|
||||
unset and only use the ACL-protected endpoints.
|
||||
|
||||
The following table explains when each endpoint is available:
|
||||
|
||||
| Endpoint | `enable_debug` | ACLs | **Available?** |
|
||||
|------------------|------------------|--------|------------------|
|
||||
| /v1/agent/pprof | unset | n/a | no |
|
||||
| /v1/agent/pprof | `true` | n/a | yes |
|
||||
| /v1/agent/pprof | `false` | n/a | no |
|
||||
| /v1/agent/pprof | unset | off | no |
|
||||
| /v1/agent/pprof | unset | on | **yes** |
|
||||
| /v1/agent/pprof | `true` | off | yes |
|
||||
| /v1/agent/pprof | `false` | on | **yes** |
|
||||
|
||||
| Endpoint | `enable_debug` | ACLs | **Available?** |
|
||||
| --------------- | -------------- | ---- | -------------- |
|
||||
| /v1/agent/pprof | unset | n/a | no |
|
||||
| /v1/agent/pprof | `true` | n/a | yes |
|
||||
| /v1/agent/pprof | `false` | n/a | no |
|
||||
| /v1/agent/pprof | unset | off | no |
|
||||
| /v1/agent/pprof | unset | on | **yes** |
|
||||
| /v1/agent/pprof | `true` | off | yes |
|
||||
| /v1/agent/pprof | `false` | on | **yes** |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -621,12 +618,12 @@ The following table explains when each endpoint is available:
|
|||
request for.
|
||||
|
||||
- `debug` `(int: 1)` - Specifies if a given pprof profile should be returned as
|
||||
human readable plain text instead of the pprof binary format. Defaults to 0,
|
||||
human readable plain text instead of the pprof binary format. Defaults to 0,
|
||||
setting to 1 enables human readable plain text.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl -O -J \
|
||||
--header "X-Nomad-Token: 8176afd3-772d-0b71-8f85-7fa5d903e9d4" \
|
||||
https://localhost:4646/v1/agent/pprof/goroutine?server_id=leader
|
||||
|
@ -645,4 +642,3 @@ $ curl -O -J \
|
|||
|
||||
go tool trace trace
|
||||
```
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Allocations - HTTP API
|
||||
sidebar_current: api-allocations
|
||||
description: |-
|
||||
The /allocation endpoints are used to query for and interact with allocations.
|
||||
sidebar_title: Allocations
|
||||
description: The /allocation endpoints are used to query for and interact with allocations.
|
||||
---
|
||||
|
||||
# Allocations HTTP API
|
||||
|
@ -14,13 +13,13 @@ The `/allocation` endpoints are used to query for and interact with allocations.
|
|||
|
||||
This endpoint lists all allocations.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/allocations` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/allocations` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -35,12 +34,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/allocations
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/allocations?prefix=a8198d79
|
||||
```
|
||||
|
@ -57,14 +56,14 @@ $ curl \
|
|||
"PreviousAllocation": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"NextAllocation": "cd13d9b9-4f97-7184-c88b-7b451981616b",
|
||||
"RescheduleTracker": {
|
||||
"Events": [
|
||||
{
|
||||
"PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e",
|
||||
"RescheduleTime": 1517434161192946200,
|
||||
"Delay":"5000000000"
|
||||
},
|
||||
]
|
||||
"Events": [
|
||||
{
|
||||
"PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e",
|
||||
"RescheduleTime": 1517434161192946200,
|
||||
"Delay": "5000000000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"JobID": "example",
|
||||
"TaskGroup": "cache",
|
||||
|
@ -165,13 +164,13 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific allocation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/allocation/:alloc_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | ------------------ |
|
||||
| `GET` | `/v1/allocation/:alloc_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -185,7 +184,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
```
|
||||
|
@ -201,14 +200,14 @@ $ curl \
|
|||
"PreviousAllocation": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"NextAllocation": "cd13d9b9-4f97-7184-c88b-7b451981616b",
|
||||
"RescheduleTracker": {
|
||||
"Events": [
|
||||
{
|
||||
"PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e",
|
||||
"RescheduleTime": 1517434161192946200,
|
||||
"Delay":"5000000000"
|
||||
},
|
||||
]
|
||||
"Events": [
|
||||
{
|
||||
"PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc",
|
||||
"PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e",
|
||||
"RescheduleTime": 1517434161192946200,
|
||||
"Delay": "5000000000"
|
||||
}
|
||||
]
|
||||
},
|
||||
"JobID": "example",
|
||||
"Job": {
|
||||
|
@ -219,9 +218,7 @@ $ curl \
|
|||
"Type": "service",
|
||||
"Priority": 50,
|
||||
"AllAtOnce": false,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"Datacenters": ["dc1"],
|
||||
"Constraints": null,
|
||||
"Affinities": null,
|
||||
"TaskGroups": [
|
||||
|
@ -255,10 +252,7 @@ $ curl \
|
|||
{
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
],
|
||||
"Tags": ["global", "cache"],
|
||||
"Checks": [
|
||||
{
|
||||
"Name": "alive",
|
||||
|
@ -501,90 +495,90 @@ $ curl \
|
|||
that have effected the state. `TaskState` objects contain the following
|
||||
fields:
|
||||
|
||||
- `State`: The task's current state. It can have one of the following
|
||||
values:
|
||||
- `State`: The task's current state. It can have one of the following
|
||||
values:
|
||||
|
||||
- `TaskStatePending` - The task is waiting to be run, either for the first
|
||||
time or due to a restart.
|
||||
- `TaskStatePending` - The task is waiting to be run, either for the first
|
||||
time or due to a restart.
|
||||
|
||||
- `TaskStateRunning` - The task is currently running.
|
||||
- `TaskStateRunning` - The task is currently running.
|
||||
|
||||
- `TaskStateDead` - The task is dead and will not run again.
|
||||
- `TaskStateDead` - The task is dead and will not run again.
|
||||
|
||||
- `StartedAt`: The time the task was last started at. Can be updated through
|
||||
restarts.
|
||||
- `StartedAt`: The time the task was last started at. Can be updated through
|
||||
restarts.
|
||||
|
||||
- `FinishedAt`: The time the task was finished at.
|
||||
- `FinishedAt`: The time the task was finished at.
|
||||
|
||||
- `LastRestart`: The last time the task was restarted.
|
||||
- `LastRestart`: The last time the task was restarted.
|
||||
|
||||
- `Restarts`: The number of times the task has restarted.
|
||||
- `Restarts`: The number of times the task has restarted.
|
||||
|
||||
- `Events` - An event contains metadata about the event. The latest 10 events
|
||||
are stored per task. Each event is timestamped (Unix nanoseconds) and has one
|
||||
of the following types:
|
||||
- `Events` - An event contains metadata about the event. The latest 10 events
|
||||
are stored per task. Each event is timestamped (Unix nanoseconds) and has one
|
||||
of the following types:
|
||||
|
||||
- `Setup Failure` - The task could not be started because there was a
|
||||
failure setting up the task prior to it running.
|
||||
- `Setup Failure` - The task could not be started because there was a
|
||||
failure setting up the task prior to it running.
|
||||
|
||||
- `Driver Failure` - The task could not be started due to a failure in the
|
||||
driver.
|
||||
- `Driver Failure` - The task could not be started due to a failure in the
|
||||
driver.
|
||||
|
||||
- `Started` - The task was started; either for the first time or due to a
|
||||
restart.
|
||||
- `Started` - The task was started; either for the first time or due to a
|
||||
restart.
|
||||
|
||||
- `Terminated` - The task was started and exited.
|
||||
- `Terminated` - The task was started and exited.
|
||||
|
||||
- `Killing` - The task has been sent the kill signal.
|
||||
- `Killing` - The task has been sent the kill signal.
|
||||
|
||||
- `Killed` - The task was killed by a user.
|
||||
- `Killed` - The task was killed by a user.
|
||||
|
||||
- `Received` - The task has been pulled by the client at the given timestamp.
|
||||
- `Received` - The task has been pulled by the client at the given timestamp.
|
||||
|
||||
- `Failed Validation` - The task was invalid and as such it didn't run.
|
||||
- `Failed Validation` - The task was invalid and as such it didn't run.
|
||||
|
||||
- `Restarting` - The task terminated and is being restarted.
|
||||
- `Restarting` - The task terminated and is being restarted.
|
||||
|
||||
- `Not Restarting` - the task has failed and is not being restarted because
|
||||
it has exceeded its restart policy.
|
||||
- `Not Restarting` - the task has failed and is not being restarted because
|
||||
it has exceeded its restart policy.
|
||||
|
||||
- `Downloading Artifacts` - The task is downloading the artifact(s)
|
||||
- specified in the task.
|
||||
- `Downloading Artifacts` - The task is downloading the artifact(s)
|
||||
- specified in the task.
|
||||
|
||||
- `Failed Artifact Download` - Artifact(s) specified in the task failed to
|
||||
download.
|
||||
- `Failed Artifact Download` - Artifact(s) specified in the task failed to
|
||||
download.
|
||||
|
||||
- `Restart Signaled` - The task was singled to be restarted.
|
||||
- `Restart Signaled` - The task was singled to be restarted.
|
||||
|
||||
- `Signaling` - The task was is being sent a signal.
|
||||
- `Signaling` - The task was is being sent a signal.
|
||||
|
||||
- `Sibling Task Failed` - A task in the same task group failed.
|
||||
- `Sibling Task Failed` - A task in the same task group failed.
|
||||
|
||||
- `Leader Task Dead` - The group's leader task is dead.
|
||||
- `Leader Task Dead` - The group's leader task is dead.
|
||||
|
||||
- `Driver` - A message from the driver.
|
||||
- `Driver` - A message from the driver.
|
||||
|
||||
- `Task Setup` - Task setup messages.
|
||||
- `Task Setup` - Task setup messages.
|
||||
|
||||
- `Building Task Directory` - Task is building its file system.
|
||||
- `Building Task Directory` - Task is building its file system.
|
||||
|
||||
Depending on the type the event will have applicable annotations.
|
||||
Depending on the type the event will have applicable annotations.
|
||||
|
||||
## Stop Allocation
|
||||
|
||||
This endpoint stops and reschedules a specific allocation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | -------------------------- |
|
||||
| `POST` / `PUT` | `/v1/allocation/:alloc_id/stop` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------------- | ------------------------------- | ------------------ |
|
||||
| `POST` / `PUT` | `/v1/allocation/:alloc_id/stop` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -594,7 +588,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl -X POST \
|
||||
https://localhost:4646/v1/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/stop
|
||||
```
|
||||
|
@ -612,17 +606,17 @@ $ curl -X POST \
|
|||
|
||||
This endpoint sends a signal to an allocation or task.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | -------------------------- |
|
||||
| `POST` / `PUT` | `/v1/client/allocation/:alloc_id/signal` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------------- | ---------------------------------------- | ------------------ |
|
||||
| `POST` / `PUT` | `/v1/client/allocation/:alloc_id/signal` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -641,7 +635,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl -X POST -d '{"Signal": "SIGUSR1" }' \
|
||||
https://localhost:4646/v1/client/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/signal
|
||||
```
|
||||
|
@ -656,17 +650,17 @@ $ curl -X POST -d '{"Signal": "SIGUSR1" }' \
|
|||
|
||||
This endpoint restarts an allocation or task in-place.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | -------------------------- |
|
||||
| `POST` / `PUT` | `/v1/client/allocation/:alloc_id/restart` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------------- | ----------------------------------------- | ------------------ |
|
||||
| `POST` / `PUT` | `/v1/client/allocation/:alloc_id/restart` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------- |
|
||||
| `NO` | `namespace:alloc-lifecycle` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -684,7 +678,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl -X POST -d '{"Task": "redis" }' \
|
||||
https://localhost:4646/v1/client/allocation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/restart
|
||||
```
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Client - HTTP API
|
||||
sidebar_current: api-client
|
||||
sidebar_title: Client
|
||||
description: |-
|
||||
The /client endpoints are used to access client statistics and inspect
|
||||
allocations running on a particular client.
|
||||
|
@ -27,13 +27,13 @@ This endpoint queries the actual resources consumed on a node. The API endpoint
|
|||
is hosted by the Nomad client and requests have to be made to the nomad client
|
||||
whose resource usage metrics are of interest.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/stats` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------- | ------------------ |
|
||||
| `GET` | `/client/stats` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -48,7 +48,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/stats
|
||||
```
|
||||
|
@ -152,13 +152,13 @@ $ curl \
|
|||
The client `allocation` endpoint is used to query the actual resources consumed
|
||||
by an allocation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------ | -------------------------- |
|
||||
| `GET` | `/client/allocation/:alloc_id/stats` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------ | ------------------ |
|
||||
| `GET` | `/client/allocation/:alloc_id/stats` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -172,7 +172,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/allocation/5fc98185-17ff-26bc-a802-0c74fa471c99/stats
|
||||
```
|
||||
|
@ -183,11 +183,7 @@ $ curl \
|
|||
{
|
||||
"ResourceUsage": {
|
||||
"CpuStats": {
|
||||
"Measured": [
|
||||
"Throttled Periods",
|
||||
"Throttled Time",
|
||||
"Percent"
|
||||
],
|
||||
"Measured": ["Throttled Periods", "Throttled Time", "Percent"],
|
||||
"Percent": 0.14159538847117795,
|
||||
"SystemMode": 0,
|
||||
"ThrottledPeriods": 0,
|
||||
|
@ -200,12 +196,7 @@ $ curl \
|
|||
"KernelMaxUsage": 0,
|
||||
"KernelUsage": 0,
|
||||
"MaxUsage": 4710400,
|
||||
"Measured": [
|
||||
"RSS",
|
||||
"Cache",
|
||||
"Swap",
|
||||
"Max Usage"
|
||||
],
|
||||
"Measured": ["RSS", "Cache", "Swap", "Max Usage"],
|
||||
"RSS": 1486848,
|
||||
"Swap": 0
|
||||
}
|
||||
|
@ -215,11 +206,7 @@ $ curl \
|
|||
"Pids": null,
|
||||
"ResourceUsage": {
|
||||
"CpuStats": {
|
||||
"Measured": [
|
||||
"Throttled Periods",
|
||||
"Throttled Time",
|
||||
"Percent"
|
||||
],
|
||||
"Measured": ["Throttled Periods", "Throttled Time", "Percent"],
|
||||
"Percent": 0.14159538847117795,
|
||||
"SystemMode": 0,
|
||||
"ThrottledPeriods": 0,
|
||||
|
@ -232,12 +219,7 @@ $ curl \
|
|||
"KernelMaxUsage": 0,
|
||||
"KernelUsage": 0,
|
||||
"MaxUsage": 4710400,
|
||||
"Measured": [
|
||||
"RSS",
|
||||
"Cache",
|
||||
"Swap",
|
||||
"Max Usage"
|
||||
],
|
||||
"Measured": ["RSS", "Cache", "Swap", "Max Usage"],
|
||||
"RSS": 1486848,
|
||||
"Swap": 0
|
||||
}
|
||||
|
@ -253,13 +235,13 @@ $ curl \
|
|||
|
||||
This endpoint reads the contents of a file in an allocation directory.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/cat/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/cat/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------- |
|
||||
|
@ -276,12 +258,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/cat/5fc98185-17ff-26bc-a802-0c74fa471c99
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/cat/5fc98185-17ff-26bc-a802-0c74fa471c99?path=alloc/file.json
|
||||
```
|
||||
|
@ -292,19 +274,18 @@ $ curl \
|
|||
(whatever was in the file...)
|
||||
```
|
||||
|
||||
|
||||
## Read File at Offset
|
||||
|
||||
This endpoint reads the contents of a file in an allocation directory at a
|
||||
particular offset and limit.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/readat/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/readat/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------- |
|
||||
|
@ -327,7 +308,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/readat/5fc98185-17ff-26bc-a802-0c74fa471c99?path=/alloc/foo&offset=1323&limit=19303
|
||||
```
|
||||
|
@ -342,13 +323,13 @@ $ curl \
|
|||
|
||||
This endpoint streams the contents of a file in an allocation directory.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/stream/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/stream/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------- |
|
||||
|
@ -373,7 +354,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/stream/5fc98185-17ff-26bc-a802-0c74fa471c99?path=/alloc/logs/redis.log
|
||||
```
|
||||
|
@ -381,7 +362,7 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
({
|
||||
"File": "alloc/logs/redis.log",
|
||||
"Offset": 3604480,
|
||||
"Data": "NTMxOTMyCjUzMTkzMwo1MzE5MzQKNTMx..."
|
||||
|
@ -389,7 +370,7 @@ $ curl \
|
|||
{
|
||||
"File": "alloc/logs/redis.log",
|
||||
"FileEvent": "file deleted"
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
#### Field Reference
|
||||
|
@ -410,13 +391,13 @@ fields:
|
|||
|
||||
This endpoint streams a task's stderr/stdout logs.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/logs/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/logs/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------------------------------- |
|
||||
|
@ -446,7 +427,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/logs/5fc98185-17ff-26bc-a802-0c74fa471c99
|
||||
```
|
||||
|
@ -454,7 +435,7 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
({
|
||||
"File": "alloc/logs/redis.stdout.0",
|
||||
"Offset": 3604480,
|
||||
"Data": "NTMxOTMyCjUzMTkzMwo1MzE5MzQKNTMx..."
|
||||
|
@ -462,7 +443,7 @@ $ curl \
|
|||
{
|
||||
"File": "alloc/logs/redis.stdout.0",
|
||||
"FileEvent": "file deleted"
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
#### Field Reference
|
||||
|
@ -483,13 +464,13 @@ fields:
|
|||
|
||||
This endpoint lists files in an allocation directory.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/ls/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/ls/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------- |
|
||||
|
@ -506,7 +487,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/ls/5fc98185-17ff-26bc-a802-0c74fa471c99
|
||||
```
|
||||
|
@ -536,13 +517,13 @@ $ curl \
|
|||
|
||||
This endpoint stats a file in an allocation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/fs/stat/:alloc_id` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------- | ------------ |
|
||||
| `GET` | `/client/fs/stat/:alloc_id` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------- |
|
||||
|
@ -559,7 +540,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/fs/stat/5fc98185-17ff-26bc-a802-0c74fa471c99
|
||||
```
|
||||
|
@ -581,13 +562,13 @@ $ curl \
|
|||
This endpoint forces a garbage collection of a particular, stopped allocation
|
||||
on a node.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------- | -------------------------- |
|
||||
| `GET` | `/client/allocation/:alloc_id/gc` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------- | ------------------ |
|
||||
| `GET` | `/client/allocation/:alloc_id/gc` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------------- |
|
||||
|
@ -601,7 +582,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://nomad.rocks/v1/client/allocation/5fc98185-17ff-26bc-a802-0c74fa471c99/gc
|
||||
```
|
||||
|
@ -610,13 +591,13 @@ $ curl \
|
|||
|
||||
This endpoint forces a garbage collection of all stopped allocations on a node.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/client/gc` | `text/plain` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------ | ------------ |
|
||||
| `GET` | `/client/gc` | `text/plain` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -631,7 +612,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/client/gc
|
||||
```
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Deployments - HTTP API
|
||||
sidebar_current: api-deployments
|
||||
description: |-
|
||||
The /deployment endpoints are used to query for and interact with deployments.
|
||||
sidebar_title: Deployments
|
||||
description: The /deployment endpoints are used to query for and interact with deployments.
|
||||
---
|
||||
|
||||
# Deployments HTTP API
|
||||
|
@ -14,13 +13,13 @@ The `/deployment` endpoints are used to query for and interact with deployments.
|
|||
|
||||
This endpoint lists all deployments.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------ | -------------------------- |
|
||||
| `GET` | `/v1/deployments` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/deployments` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -35,12 +34,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/deployments
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/deployments?prefix=25ba81c
|
||||
```
|
||||
|
@ -78,13 +77,13 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific deployment by ID.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/deployment/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/deployment/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -98,7 +97,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/deployment/70638f62-5c19-193e-30d6-f9d6e689ab8e
|
||||
```
|
||||
|
@ -135,13 +134,13 @@ $ curl \
|
|||
This endpoint lists the allocations created or modified for the given
|
||||
deployment.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/deployment/allocations/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/deployment/allocations/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -155,7 +154,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/deployment/allocations/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
```
|
||||
|
@ -271,13 +270,13 @@ cause a rollback to a previous job version. This endpoint only triggers a rollba
|
|||
if the most recent stable version of the job has a different specification than
|
||||
the job being reverted.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------------ | -------------------------- |
|
||||
| `POST` | `/v1/deployment/fail/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------ | ------------------ |
|
||||
| `POST` | `/v1/deployment/fail/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------------- |
|
||||
|
@ -291,7 +290,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/deployment/fail/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
|
@ -314,13 +313,13 @@ $ curl \
|
|||
This endpoint is used to pause or unpause a deployment. This is done to pause
|
||||
a rolling upgrade or resume it.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/deployment/pause/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/deployment/pause/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------------- |
|
||||
|
@ -341,11 +340,11 @@ The table below shows this endpoint's support for
|
|||
"DeploymentID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577",
|
||||
"Pause": true
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/deployment/pause/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
|
@ -368,13 +367,13 @@ This endpoint is used to promote task groups that have canaries for a
|
|||
deployment. This should be done when the placed canaries are healthy and the
|
||||
rolling upgrade of the remaining allocations should begin.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/deployment/promote/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/deployment/promote/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------------- |
|
||||
|
@ -398,18 +397,18 @@ The table below shows this endpoint's support for
|
|||
"DeploymentID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577",
|
||||
"All": true
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
```javascript
|
||||
{
|
||||
"DeploymentID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577",
|
||||
"Groups": ["web", "api-server"]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/deployment/promote/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
|
@ -437,13 +436,13 @@ will allow the rolling upgrade to proceed. Marking it as failed will cause the
|
|||
deployment to fail. This endpoint only triggers a rollback if the most recent stable
|
||||
version of the job has a different specification than the job being reverted.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/deployment/allocation-health/:deployment_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/deployment/allocation-health/:deployment_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------------- |
|
||||
|
@ -471,11 +470,11 @@ The table below shows this endpoint's support for
|
|||
"6584dad8-7ae3-360f-3069-0b4309711cc1"
|
||||
]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
https://localhost:4646/v1/deployment/allocation-health/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Evaluations - HTTP API
|
||||
sidebar_current: api-evaluations
|
||||
description: |-
|
||||
The /evaluation are used to query for and interact with evaluations.
|
||||
sidebar_title: Evaluations
|
||||
description: The /evaluation are used to query for and interact with evaluations.
|
||||
---
|
||||
|
||||
# Evaluations HTTP API
|
||||
|
@ -14,13 +13,13 @@ The `/evaluation` endpoints are used to query for and interact with evaluations.
|
|||
|
||||
This endpoint lists all evaluations.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------ | -------------------------- |
|
||||
| `GET` | `/v1/evaluations` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/evaluations` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -35,12 +34,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/evaluations
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/evaluations?prefix=25ba81
|
||||
```
|
||||
|
@ -82,13 +81,13 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific evaluation by ID.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/evaluation/:eval_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------------ |
|
||||
| `GET` | `/v1/evaluation/:eval_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -102,7 +101,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/evaluation/5456bd7a-9fc0-c0dd-6131-cbee77f57577
|
||||
```
|
||||
|
@ -143,13 +142,13 @@ $ curl \
|
|||
This endpoint lists the allocations created or modified for the given
|
||||
evaluation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/evaluation/:eval_id/allocations` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/evaluation/:eval_id/allocations` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
|
@ -163,7 +162,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/evaluation/5456bd7a-9fc0-c0dd-6131-cbee77f57577/allocations
|
||||
```
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: HTTP API
|
||||
sidebar_current: api-overview
|
||||
sidebar_title: Overview
|
||||
description: |-
|
||||
Nomad exposes a RESTful HTTP API to control almost every aspect of the
|
||||
Nomad agent.
|
||||
|
@ -37,7 +37,7 @@ The default port for the Nomad HTTP API is `4646`. This can be overridden via
|
|||
the Nomad configuration block. Here is an example curl request to query a Nomad
|
||||
server with the default configuration:
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl http://127.0.0.1:4646/v1/agent/members
|
||||
```
|
||||
|
||||
|
@ -55,7 +55,7 @@ There are five primary nouns in Nomad:
|
|||
- deployments
|
||||
- evaluations
|
||||
|
||||
[![Nomad Data Model](/assets/images/nomad-data-model.png)](/assets/images/nomad-data-model.png)
|
||||
[![Nomad Data Model](/img/nomad-data-model.png)](/img/nomad-data-model.png)
|
||||
|
||||
Jobs are submitted by users and represent a _desired state_. A job is a
|
||||
declarative description of tasks to run which are bounded by constraints and
|
||||
|
@ -76,7 +76,7 @@ administration.
|
|||
|
||||
Several endpoints in Nomad use or require ACL tokens to operate. The token are used to authenticate the request and determine if the request is allowed based on the associated authorizations. Tokens are specified per-request by using the `X-Nomad-Token` request header set to the `SecretID` of an ACL Token.
|
||||
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl.html).
|
||||
For more details about ACLs, please see the [ACL Guide](/guides/security/acl).
|
||||
|
||||
## Authentication
|
||||
|
||||
|
@ -84,7 +84,7 @@ When ACLs are enabled, a Nomad token should be provided to API requests using th
|
|||
|
||||
Here is an example using curl:
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--header "X-Nomad-Token: aa534e09-6a07-0a45-2295-a7f77063d429" \
|
||||
https://localhost:4646/v1/jobs
|
||||
|
@ -164,7 +164,7 @@ serviced by a server in the requested region.
|
|||
The HTTP API will gzip the response if the HTTP request denotes that the client
|
||||
accepts gzip compression. This is achieved by passing the accept encoding:
|
||||
|
||||
```
|
||||
```shell
|
||||
$ curl \
|
||||
--header "Accept-Encoding: gzip" \
|
||||
https://localhost:4646/v1/...
|
||||
|
@ -179,7 +179,7 @@ In general, clients should prefer a client-side parser like `jq` instead of
|
|||
server-formatted data. Asking the server to format the data takes away
|
||||
processing cycles from more important tasks.
|
||||
|
||||
```
|
||||
```shell
|
||||
$ curl https://localhost:4646/v1/page?pretty
|
||||
```
|
||||
|
||||
|
@ -203,9 +203,9 @@ the `GET` operation reads all jobs.
|
|||
Individual API's will contain further documentation in the case that more
|
||||
specific response codes are returned but all clients should handle the following:
|
||||
|
||||
* 200 and 204 as success codes.
|
||||
* 400 indicates a validation failure and if a parameter is modified in the
|
||||
- 200 and 204 as success codes.
|
||||
- 400 indicates a validation failure and if a parameter is modified in the
|
||||
request, it could potentially succeed.
|
||||
* 403 marks that the client isn't authenticated for the request.
|
||||
* 404 indicates an unknown resource.
|
||||
* 5xx means that the client should not expect the request to succeed if retried.
|
||||
- 403 marks that the client isn't authenticated for the request.
|
||||
- 404 indicates an unknown resource.
|
||||
- 5xx means that the client should not expect the request to succeed if retried.
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: JSON Job Specification - HTTP API
|
||||
sidebar_current: api-json-jobs
|
||||
sidebar_title: JSON Jobs
|
||||
description: |-
|
||||
Jobs can also be specified via the HTTP API using a JSON format. This guide
|
||||
discusses the job specification in JSON format.
|
||||
|
@ -22,115 +22,124 @@ Below is the JSON representation of the job outputted by `$ nomad init`:
|
|||
|
||||
```json
|
||||
{
|
||||
"Job": {
|
||||
"ID": "example",
|
||||
"Name": "example",
|
||||
"Type": "service",
|
||||
"Priority": 50,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"TaskGroups": [{
|
||||
"Name": "cache",
|
||||
"Count": 1,
|
||||
"Migrate": {
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 300000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000
|
||||
"Job": {
|
||||
"ID": "example",
|
||||
"Name": "example",
|
||||
"Type": "service",
|
||||
"Priority": 50,
|
||||
"Datacenters": ["dc1"],
|
||||
"TaskGroups": [
|
||||
{
|
||||
"Name": "cache",
|
||||
"Count": 1,
|
||||
"Migrate": {
|
||||
"HealthCheck": "checks",
|
||||
"HealthyDeadline": 300000000000,
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000
|
||||
},
|
||||
"Tasks": [
|
||||
{
|
||||
"Name": "redis",
|
||||
"Driver": "docker",
|
||||
"User": "",
|
||||
"Config": {
|
||||
"image": "redis:3.2",
|
||||
"port_map": [
|
||||
{
|
||||
"db": 6379
|
||||
}
|
||||
]
|
||||
},
|
||||
"Tasks": [{
|
||||
"Name": "redis",
|
||||
"Driver": "docker",
|
||||
"User": "",
|
||||
"Config": {
|
||||
"image": "redis:3.2",
|
||||
"port_map": [{
|
||||
"db": 6379
|
||||
}]
|
||||
"Services": [
|
||||
{
|
||||
"Id": "",
|
||||
"Name": "redis-cache",
|
||||
"Tags": ["global", "cache"],
|
||||
"Meta": {
|
||||
"meta": "for my service"
|
||||
},
|
||||
"Services": [{
|
||||
"PortLabel": "db",
|
||||
"AddressMode": "",
|
||||
"Checks": [
|
||||
{
|
||||
"Id": "",
|
||||
"Name": "redis-cache",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
],
|
||||
"Meta": {
|
||||
"meta": "for my service",
|
||||
},
|
||||
"PortLabel": "db",
|
||||
"AddressMode": "",
|
||||
"Checks": [{
|
||||
"Id": "",
|
||||
"Name": "alive",
|
||||
"Type": "tcp",
|
||||
"Command": "",
|
||||
"Args": null,
|
||||
"Header": {},
|
||||
"Method": "",
|
||||
"Path": "",
|
||||
"Protocol": "",
|
||||
"PortLabel": "",
|
||||
"Interval": 10000000000,
|
||||
"Timeout": 2000000000,
|
||||
"InitialStatus": "",
|
||||
"TLSSkipVerify": false,
|
||||
"CheckRestart": {
|
||||
"Limit": 3,
|
||||
"Grace": 30000000000,
|
||||
"IgnoreWarnings": false
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"Resources": {
|
||||
"CPU": 500,
|
||||
"MemoryMB": 256,
|
||||
"Networks": [{
|
||||
"Device": "",
|
||||
"CIDR": "",
|
||||
"IP": "",
|
||||
"MBits": 10,
|
||||
"DynamicPorts": [{
|
||||
"Label": "db",
|
||||
"Value": 0
|
||||
}]
|
||||
}]
|
||||
},
|
||||
"Leader": false
|
||||
}],
|
||||
"RestartPolicy": {
|
||||
"Interval": 1800000000000,
|
||||
"Attempts": 2,
|
||||
"Delay": 15000000000,
|
||||
"Mode": "fail"
|
||||
"Name": "alive",
|
||||
"Type": "tcp",
|
||||
"Command": "",
|
||||
"Args": null,
|
||||
"Header": {},
|
||||
"Method": "",
|
||||
"Path": "",
|
||||
"Protocol": "",
|
||||
"PortLabel": "",
|
||||
"Interval": 10000000000,
|
||||
"Timeout": 2000000000,
|
||||
"InitialStatus": "",
|
||||
"TLSSkipVerify": false,
|
||||
"CheckRestart": {
|
||||
"Limit": 3,
|
||||
"Grace": 30000000000,
|
||||
"IgnoreWarnings": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Resources": {
|
||||
"CPU": 500,
|
||||
"MemoryMB": 256,
|
||||
"Networks": [
|
||||
{
|
||||
"Device": "",
|
||||
"CIDR": "",
|
||||
"IP": "",
|
||||
"MBits": 10,
|
||||
"DynamicPorts": [
|
||||
{
|
||||
"Label": "db",
|
||||
"Value": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReschedulePolicy": {
|
||||
"Attempts": 10,
|
||||
"Delay": 30000000000,
|
||||
"DelayFunction": "exponential",
|
||||
"Interval": 0,
|
||||
"MaxDelay": 3600000000000,
|
||||
"Unlimited": true
|
||||
},
|
||||
"EphemeralDisk": {
|
||||
"SizeMB": 300
|
||||
}
|
||||
}],
|
||||
"Update": {
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000,
|
||||
"HealthyDeadline": 180000000000,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0
|
||||
"Leader": false
|
||||
}
|
||||
],
|
||||
"RestartPolicy": {
|
||||
"Interval": 1800000000000,
|
||||
"Attempts": 2,
|
||||
"Delay": 15000000000,
|
||||
"Mode": "fail"
|
||||
},
|
||||
"ReschedulePolicy": {
|
||||
"Attempts": 10,
|
||||
"Delay": 30000000000,
|
||||
"DelayFunction": "exponential",
|
||||
"Interval": 0,
|
||||
"MaxDelay": 3600000000000,
|
||||
"Unlimited": true
|
||||
},
|
||||
"EphemeralDisk": {
|
||||
"SizeMB": 300
|
||||
}
|
||||
}
|
||||
],
|
||||
"Update": {
|
||||
"MaxParallel": 1,
|
||||
"MinHealthyTime": 10000000000,
|
||||
"HealthyDeadline": 180000000000,
|
||||
"AutoRevert": false,
|
||||
"Canary": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The example JSON could be submitted as a job using the following:
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl -XPUT -d @example.json http://127.0.0.1:4646/v1/job/example
|
||||
{
|
||||
"EvalID": "5d6ded54-0b2a-8858-6583-be5f476dec9d",
|
||||
|
@ -206,53 +215,53 @@ The `Job` object supports the following keys:
|
|||
- `Type` - Specifies the job type and switches which scheduler
|
||||
is used. Nomad provides the `service`, `system` and `batch` schedulers,
|
||||
and defaults to `service`. To learn more about each scheduler type visit
|
||||
[here](/docs/schedulers.html)
|
||||
[here](/docs/schedulers)
|
||||
|
||||
- `Update` - Specifies an update strategy to be applied to all task groups
|
||||
within the job. When specified both at the job level and the task group level,
|
||||
the update blocks are merged with the task group's taking precedence. For more
|
||||
details on the update stanza, please see below.
|
||||
|
||||
- `Periodic` - `Periodic` allows the job to be scheduled at fixed times, dates
|
||||
or intervals. The periodic expression is always evaluated in the UTC
|
||||
timezone to ensure consistent evaluation when Nomad Servers span multiple
|
||||
time zones. The `Periodic` object is optional and supports the following attributes:
|
||||
- `Periodic` - `Periodic` allows the job to be scheduled at fixed times, dates
|
||||
or intervals. The periodic expression is always evaluated in the UTC
|
||||
timezone to ensure consistent evaluation when Nomad Servers span multiple
|
||||
time zones. The `Periodic` object is optional and supports the following attributes:
|
||||
|
||||
- `Enabled` - `Enabled` determines whether the periodic job will spawn child
|
||||
- `Enabled` - `Enabled` determines whether the periodic job will spawn child
|
||||
jobs.
|
||||
|
||||
- `TimeZone` - Specifies the time zone to evaluate the next launch interval
|
||||
against. This is useful when wanting to account for day light savings in
|
||||
various time zones. The time zone must be parsable by Golang's
|
||||
[LoadLocation](https://golang.org/pkg/time/#LoadLocation). The default is
|
||||
UTC.
|
||||
- `TimeZone` - Specifies the time zone to evaluate the next launch interval
|
||||
against. This is useful when wanting to account for day light savings in
|
||||
various time zones. The time zone must be parsable by Golang's
|
||||
[LoadLocation](https://golang.org/pkg/time/#LoadLocation). The default is
|
||||
UTC.
|
||||
|
||||
- `SpecType` - `SpecType` determines how Nomad is going to interpret the
|
||||
periodic expression. `cron` is the only supported `SpecType` currently.
|
||||
- `SpecType` - `SpecType` determines how Nomad is going to interpret the
|
||||
periodic expression. `cron` is the only supported `SpecType` currently.
|
||||
|
||||
- `Spec` - A cron expression configuring the interval the job is launched
|
||||
- `Spec` - A cron expression configuring the interval the job is launched
|
||||
at. Supports predefined expressions such as "@daily" and "@weekly" See
|
||||
[here](https://github.com/gorhill/cronexpr#implementation) for full
|
||||
documentation of supported cron specs and the predefined expressions.
|
||||
|
||||
- <a id="prohibit_overlap">`ProhibitOverlap`</a> - `ProhibitOverlap` can
|
||||
be set to true to enforce that the periodic job doesn't spawn a new
|
||||
instance of the job if any of the previous jobs are still running. It is
|
||||
defaulted to false.
|
||||
- <a id="prohibit_overlap">`ProhibitOverlap`</a> - `ProhibitOverlap` can
|
||||
be set to true to enforce that the periodic job doesn't spawn a new
|
||||
instance of the job if any of the previous jobs are still running. It is
|
||||
defaulted to false.
|
||||
|
||||
An example `periodic` block:
|
||||
An example `periodic` block:
|
||||
|
||||
```json
|
||||
{
|
||||
"Periodic": {
|
||||
"Spec": "*/15 - *",
|
||||
"TimeZone": "Europe/Berlin",
|
||||
"SpecType": "cron",
|
||||
"Enabled": true,
|
||||
"ProhibitOverlap": true
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Periodic": {
|
||||
"Spec": "*/15 - *",
|
||||
"TimeZone": "Europe/Berlin",
|
||||
"SpecType": "cron",
|
||||
"Enabled": true,
|
||||
"ProhibitOverlap": true
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
- `ReschedulePolicy` - Specifies a reschedule policy to be applied to all task groups
|
||||
within the job. When specified both at the job level and the task group level,
|
||||
|
@ -268,7 +277,7 @@ attributes:
|
|||
reference for more details.
|
||||
|
||||
- `Affinities` - This is a list of `Affinity` objects. See the affinity
|
||||
reference for more details.
|
||||
reference for more details.
|
||||
|
||||
- `Spreads` - This is a list of `Spread` objects. See the spread
|
||||
reference for more details.
|
||||
|
@ -329,7 +338,7 @@ The `Task` object supports the following keys:
|
|||
reference for more details.
|
||||
|
||||
- `Affinities` - This is a list of `Affinity` objects. See the affinity
|
||||
reference for more details.
|
||||
reference for more details.
|
||||
|
||||
- `Spreads` - This is a list of `Spread` objects. See the spread
|
||||
reference for more details.
|
||||
|
@ -341,23 +350,23 @@ The `Task` object supports the following keys:
|
|||
to. The file is written relative to the task's local directory.
|
||||
|
||||
- `Driver` - Specifies the task driver that should be used to run the
|
||||
task. See the [driver documentation](/docs/drivers/index.html) for what
|
||||
task. See the [driver documentation](/docs/drivers) for what
|
||||
is available. Examples include `docker`, `qemu`, `java`, and `exec`.
|
||||
|
||||
- `Env` - A map of key-value representing environment variables that
|
||||
will be passed along to the running process. Nomad variables are
|
||||
interpreted when set in the environment variable values. See the table of
|
||||
interpreted variables [here](/docs/runtime/interpolation.html).
|
||||
- `Env` - A map of key-value representing environment variables that
|
||||
will be passed along to the running process. Nomad variables are
|
||||
interpreted when set in the environment variable values. See the table of
|
||||
interpreted variables [here](/docs/runtime/interpolation).
|
||||
|
||||
For example the below environment map will be reinterpreted:
|
||||
For example the below environment map will be reinterpreted:
|
||||
|
||||
```json
|
||||
{
|
||||
"Env": {
|
||||
"NODE_CLASS" : "${nomad.class}"
|
||||
}
|
||||
```json
|
||||
{
|
||||
"Env": {
|
||||
"NODE_CLASS": "${nomad.class}"
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
- `KillSignal` - Specifies a configurable kill signal for a task, where the
|
||||
default is SIGINT. Note that this is only supported for drivers which accept
|
||||
|
@ -387,132 +396,129 @@ The `Task` object supports the following keys:
|
|||
Consul for service discovery. A `Service` object represents a routable and
|
||||
discoverable service on the network. Nomad automatically registers when a task
|
||||
is started and de-registers it when the task transitions to the dead state.
|
||||
[Click here](/guides/integrations/consul-integration/index.html#service-discovery) to learn more about
|
||||
[Click here](/guides/integrations/consul-integration#service-discovery) to learn more about
|
||||
services. Below is the fields in the `Service` object:
|
||||
|
||||
- `Name`: An explicit name for the Service. Nomad will replace `${JOB}`,
|
||||
`${TASKGROUP}` and `${TASK}` by the name of the job, task group or task,
|
||||
respectively. `${BASE}` expands to the equivalent of
|
||||
`${JOB}-${TASKGROUP}-${TASK}`, and is the default name for a Service.
|
||||
Each service defined for a given task must have a distinct name, so if
|
||||
a task has multiple services only one of them can use the default name
|
||||
and the others must be explicitly named. Names must adhere to
|
||||
[RFC-1123 §2.1](https://tools.ietf.org/html/rfc1123#section-2) and are
|
||||
limited to alphanumeric and hyphen characters (i.e. `[a-z0-9\-]`), and be
|
||||
less than 64 characters in length.
|
||||
- `Name`: An explicit name for the Service. Nomad will replace `${JOB}`,
|
||||
`${TASKGROUP}` and `${TASK}` by the name of the job, task group or task,
|
||||
respectively. `${BASE}` expands to the equivalent of
|
||||
`${JOB}-${TASKGROUP}-${TASK}`, and is the default name for a Service.
|
||||
Each service defined for a given task must have a distinct name, so if
|
||||
a task has multiple services only one of them can use the default name
|
||||
and the others must be explicitly named. Names must adhere to
|
||||
[RFC-1123 §2.1](https://tools.ietf.org/html/rfc1123#section-2) and are
|
||||
limited to alphanumeric and hyphen characters (i.e. `[a-z0-9\-]`), and be
|
||||
less than 64 characters in length.
|
||||
|
||||
- `Tags`: A list of string tags associated with this Service. String
|
||||
interpolation is supported in tags.
|
||||
|
||||
- `Meta`: A key-value map that annotates the Consul service with
|
||||
user-defined metadata. String interpolation is supported in meta.
|
||||
- `Tags`: A list of string tags associated with this Service. String
|
||||
interpolation is supported in tags.
|
||||
|
||||
- `CanaryTags`: A list of string tags associated with this Service while it
|
||||
is a canary. Once the canary is promoted, the registered tags will be
|
||||
updated to the set defined in the `Tags` field. String interpolation is
|
||||
supported in tags.
|
||||
- `Meta`: A key-value map that annotates the Consul service with
|
||||
user-defined metadata. String interpolation is supported in meta.
|
||||
|
||||
- `CanaryMeta`: A key-value map that annotates this Service while it
|
||||
is a canary. Once the canary is promoted, the registered meta will be
|
||||
updated to the set defined in the `Meta` field or removed if the `Meta`
|
||||
field is not set. String interpolation is supported in meta keys and
|
||||
values.
|
||||
- `CanaryTags`: A list of string tags associated with this Service while it
|
||||
is a canary. Once the canary is promoted, the registered tags will be
|
||||
updated to the set defined in the `Tags` field. String interpolation is
|
||||
supported in tags.
|
||||
|
||||
- `PortLabel`: `PortLabel` is an optional string and is used to associate
|
||||
a port with the service. If specified, the port label must match one
|
||||
defined in the resources block. This could be a label of either a
|
||||
dynamic or a static port.
|
||||
- `CanaryMeta`: A key-value map that annotates this Service while it
|
||||
is a canary. Once the canary is promoted, the registered meta will be
|
||||
updated to the set defined in the `Meta` field or removed if the `Meta`
|
||||
field is not set. String interpolation is supported in meta keys and
|
||||
values.
|
||||
|
||||
- `AddressMode`: Specifies what address (host or driver-specific) this
|
||||
service should advertise. This setting is supported in Docker since
|
||||
Nomad 0.6 and rkt since Nomad 0.7. Valid options are:
|
||||
- `PortLabel`: `PortLabel` is an optional string and is used to associate
|
||||
a port with the service. If specified, the port label must match one
|
||||
defined in the resources block. This could be a label of either a
|
||||
dynamic or a static port.
|
||||
|
||||
- `auto` - Allows the driver to determine whether the host or driver
|
||||
address should be used. Defaults to `host` and only implemented by
|
||||
Docker. If you use a Docker network plugin such as weave, Docker will
|
||||
automatically use its address.
|
||||
- `AddressMode`: Specifies what address (host or driver-specific) this
|
||||
service should advertise. This setting is supported in Docker since
|
||||
Nomad 0.6 and rkt since Nomad 0.7. Valid options are:
|
||||
|
||||
- `driver` - Use the IP specified by the driver, and the port specified
|
||||
in a port map. A numeric port may be specified since port maps aren't
|
||||
required by all network plugins. Useful for advertising SDN and
|
||||
overlay network addresses. Task will fail if driver network cannot be
|
||||
determined. Only implemented for Docker and rkt.
|
||||
- `auto` - Allows the driver to determine whether the host or driver
|
||||
address should be used. Defaults to `host` and only implemented by
|
||||
Docker. If you use a Docker network plugin such as weave, Docker will
|
||||
automatically use its address.
|
||||
|
||||
- `host` - Use the host IP and port.
|
||||
- `driver` - Use the IP specified by the driver, and the port specified
|
||||
in a port map. A numeric port may be specified since port maps aren't
|
||||
required by all network plugins. Useful for advertising SDN and
|
||||
overlay network addresses. Task will fail if driver network cannot be
|
||||
determined. Only implemented for Docker and rkt.
|
||||
|
||||
- `Checks`: `Checks` is an array of check objects. A check object defines a
|
||||
health check associated with the service. Nomad supports the `script`,
|
||||
`http` and `tcp` Consul Checks. Script checks are not supported for the
|
||||
qemu driver since the Nomad client doesn't have access to the file system
|
||||
of a task using the Qemu driver.
|
||||
- `host` - Use the host IP and port.
|
||||
|
||||
- `Type`: This indicates the check types supported by Nomad. Valid
|
||||
options are currently `script`, `http` and `tcp`.
|
||||
- `Checks`: `Checks` is an array of check objects. A check object defines a
|
||||
health check associated with the service. Nomad supports the `script`,
|
||||
`http` and `tcp` Consul Checks. Script checks are not supported for the
|
||||
qemu driver since the Nomad client doesn't have access to the file system
|
||||
of a task using the Qemu driver.
|
||||
|
||||
- `Name`: The name of the health check.
|
||||
- `Type`: This indicates the check types supported by Nomad. Valid
|
||||
options are currently `script`, `http` and `tcp`.
|
||||
|
||||
- `AddressMode`: Same as `AddressMode` on `Service`. Unlike services,
|
||||
checks do not have an `auto` address mode as there's no way for
|
||||
Nomad to know which is the best address to use for checks. Consul
|
||||
needs access to the address for any HTTP or TCP checks. Added in
|
||||
Nomad 0.7.1. Unlike `PortLabel`, this setting is *not* inherited
|
||||
from the `Service`.
|
||||
- `Name`: The name of the health check.
|
||||
|
||||
- `PortLabel`: Specifies the label of the port on which the check will
|
||||
be performed. Note this is the _label_ of the port and not the port
|
||||
number unless `AddressMode: "driver"`. The port label must match one
|
||||
defined in the Network stanza. If a port value was declared on the
|
||||
`Service`, this will inherit from that value if not supplied. If
|
||||
supplied, this value takes precedence over the `Service.PortLabel`
|
||||
value. This is useful for services which operate on multiple ports.
|
||||
`http` and `tcp` checks require a port while `script` checks do not.
|
||||
Checks will use the host IP and ports by default. In Nomad 0.7.1 or
|
||||
later numeric ports may be used if `AddressMode: "driver"` is set on
|
||||
the check.
|
||||
- `AddressMode`: Same as `AddressMode` on `Service`. Unlike services,
|
||||
checks do not have an `auto` address mode as there's no way for
|
||||
Nomad to know which is the best address to use for checks. Consul
|
||||
needs access to the address for any HTTP or TCP checks. Added in
|
||||
Nomad 0.7.1. Unlike `PortLabel`, this setting is _not_ inherited
|
||||
from the `Service`.
|
||||
|
||||
- `Header`: Headers for HTTP checks. Should be an object where the
|
||||
values are an array of values. Headers will be written once for each
|
||||
value.
|
||||
- `PortLabel`: Specifies the label of the port on which the check will
|
||||
be performed. Note this is the _label_ of the port and not the port
|
||||
number unless `AddressMode: "driver"`. The port label must match one
|
||||
defined in the Network stanza. If a port value was declared on the
|
||||
`Service`, this will inherit from that value if not supplied. If
|
||||
supplied, this value takes precedence over the `Service.PortLabel`
|
||||
value. This is useful for services which operate on multiple ports.
|
||||
`http` and `tcp` checks require a port while `script` checks do not.
|
||||
Checks will use the host IP and ports by default. In Nomad 0.7.1 or
|
||||
later numeric ports may be used if `AddressMode: "driver"` is set on
|
||||
the check.
|
||||
|
||||
- `Interval`: This indicates the frequency of the health checks that
|
||||
Consul will perform.
|
||||
- `Header`: Headers for HTTP checks. Should be an object where the values are an
|
||||
array of values. Headers will be written once for each value.
|
||||
|
||||
- `Timeout`: This indicates how long Consul will wait for a health
|
||||
check query to succeed.
|
||||
- `Interval`: This indicates the frequency of the health checks that
|
||||
Consul will perform.
|
||||
|
||||
- `Method`: The HTTP method to use for HTTP checks. Defaults to GET.
|
||||
- `Timeout`: This indicates how long Consul will wait for a health
|
||||
check query to succeed.
|
||||
|
||||
- `Path`: The path of the HTTP endpoint which Consul will query to query
|
||||
the health of a service if the type of the check is `http`. Nomad
|
||||
will add the IP of the service and the port, users are only required
|
||||
to add the relative URL of the health check endpoint. Absolute paths
|
||||
are not allowed.
|
||||
- `Method`: The HTTP method to use for HTTP checks. Defaults to GET.
|
||||
|
||||
- `Protocol`: This indicates the protocol for the HTTP checks. Valid
|
||||
options are `http` and `https`. We default it to `http`.
|
||||
- `Path`: The path of the HTTP endpoint which Consul will query to query
|
||||
the health of a service if the type of the check is `http`. Nomad
|
||||
will add the IP of the service and the port, users are only required
|
||||
to add the relative URL of the health check endpoint. Absolute paths
|
||||
are not allowed.
|
||||
|
||||
- `Command`: This is the command that the Nomad client runs for doing
|
||||
script based health check.
|
||||
- `Protocol`: This indicates the protocol for the HTTP checks. Valid
|
||||
options are `http` and `https`. We default it to `http`.
|
||||
|
||||
- `Args`: Additional arguments to the `command` for script based health
|
||||
checks.
|
||||
- `Command`: This is the command that the Nomad client runs for doing
|
||||
script based health check.
|
||||
|
||||
- `TLSSkipVerify`: If true, Consul will not attempt to verify the
|
||||
certificate when performing HTTPS checks. Requires Consul >= 0.7.2.
|
||||
- `Args`: Additional arguments to the `command` for script based health
|
||||
checks.
|
||||
|
||||
- `CheckRestart`: `CheckRestart` is an object which enables
|
||||
restarting of tasks based upon Consul health checks.
|
||||
- `TLSSkipVerify`: If true, Consul will not attempt to verify the
|
||||
certificate when performing HTTPS checks. Requires Consul >= 0.7.2.
|
||||
|
||||
- `Limit`: The number of unhealthy checks allowed before the
|
||||
service is restarted. Defaults to `0` which disables
|
||||
health-based restarts.
|
||||
- `CheckRestart`: `CheckRestart` is an object which enables
|
||||
restarting of tasks based upon Consul health checks.
|
||||
|
||||
- `Grace`: The duration to wait after a task starts or restarts
|
||||
before counting unhealthy checks count against the limit.
|
||||
Defaults to "1s".
|
||||
- `Limit`: The number of unhealthy checks allowed before the
|
||||
service is restarted. Defaults to `0` which disables health-based restarts.
|
||||
|
||||
- `IgnoreWarnings`: Treat checks that are warning as passing.
|
||||
Defaults to false which means warnings are considered unhealthy.
|
||||
- `Grace`: The duration to wait after a task starts or restarts
|
||||
before counting unhealthy checks count against the limit. Defaults to "1s".
|
||||
|
||||
- `IgnoreWarnings`: Treat checks that are warning as passing.
|
||||
Defaults to false which means warnings are considered unhealthy.
|
||||
|
||||
- `ShutdownDelay` - Specifies the duration to wait when killing a task between
|
||||
removing it from Consul and sending it a shutdown signal. Ideally services
|
||||
|
@ -556,25 +562,24 @@ The Device object supports the following keys:
|
|||
|
||||
- `Name` - Specifies the device required. The following inputs are valid:
|
||||
|
||||
* `<device_type>`: If a single value is given, it is assumed to be the device
|
||||
- `<device_type>`: If a single value is given, it is assumed to be the device
|
||||
type, such as "gpu", or "fpga".
|
||||
|
||||
* `<vendor>/<device_type>`: If two values are given separated by a `/`, the
|
||||
- `<vendor>/<device_type>`: If two values are given separated by a `/`, the
|
||||
given device type will be selected, constraining on the provided vendor.
|
||||
Examples include "nvidia/gpu" or "amd/gpu".
|
||||
|
||||
* `<vendor>/<device_type>/<model>`: If three values are given separated by a `/`, the
|
||||
- `<vendor>/<device_type>/<model>`: If three values are given separated by a `/`, the
|
||||
given device type will be selected, constraining on the provided vendor, and
|
||||
model name. Examples include "nvidia/gpu/1080ti" or "nvidia/gpu/2080ti".
|
||||
|
||||
* `Count` - The count of devices being requested per task. Defaults to 1.
|
||||
|
||||
- `Count` - The count of devices being requested per task. Defaults to 1.
|
||||
|
||||
- `Constraints` - A list to define constraints on which device can satisfy the
|
||||
* `Constraints` - A list to define constraints on which device can satisfy the
|
||||
request. See the constraint reference for more details.
|
||||
|
||||
- `Affinities` - A list to define preferences for which device should be
|
||||
chosen. See the affinity reference for more details.
|
||||
* `Affinities` - A list to define preferences for which device should be
|
||||
chosen. See the affinity reference for more details.
|
||||
|
||||
<a id="ephemeral_disk"></a>
|
||||
|
||||
|
@ -612,19 +617,19 @@ The `ReschedulePolicy` object supports the following keys:
|
|||
|
||||
- `DelayFunction` - Specifies the function that is used to calculate subsequent reschedule delays.
|
||||
The initial delay is specified by the `Delay` parameter. Allowed values for `DelayFunction` are listed below:
|
||||
- `constant` - The delay between reschedule attempts stays at the `Delay` value.
|
||||
- `exponential` - The delay between reschedule attempts doubles.
|
||||
- `fibonacci` - The delay between reschedule attempts is calculated by adding the two most recent
|
||||
delays applied. For example if `Delay` is set to 5 seconds, the next five reschedule attempts will be
|
||||
delayed by 5 seconds, 5 seconds, 10 seconds, 15 seconds, and 25 seconds respectively.
|
||||
|
||||
- `MaxDelay` - `MaxDelay` is an upper bound on the delay beyond which it will not increase. This parameter is used when
|
||||
`DelayFunction` is `exponential` or `fibonacci`, and is ignored when `constant` delay is used.
|
||||
- `constant` - The delay between reschedule attempts stays at the `Delay` value.
|
||||
- `exponential` - The delay between reschedule attempts doubles.
|
||||
- `fibonacci` - The delay between reschedule attempts is calculated by adding the two most recent
|
||||
delays applied. For example if `Delay` is set to 5 seconds, the next five reschedule attempts will be
|
||||
delayed by 5 seconds, 5 seconds, 10 seconds, 15 seconds, and 25 seconds respectively.
|
||||
|
||||
- `MaxDelay` - `MaxDelay` is an upper bound on the delay beyond which it will not increase. This parameter is used when
|
||||
`DelayFunction` is `exponential` or `fibonacci`, and is ignored when `constant` delay is used.
|
||||
|
||||
- `Unlimited` - `Unlimited` enables unlimited reschedule attempts. If this is set to true
|
||||
the `Attempts` and `Interval` fields are not used.
|
||||
|
||||
|
||||
<a id="restart_policy"></a>
|
||||
|
||||
### Restart Policy
|
||||
|
@ -641,14 +646,14 @@ The `RestartPolicy` object supports the following keys:
|
|||
- `Delay` - A duration to wait before restarting a task. It is specified in
|
||||
nanoseconds. A random jitter of up to 25% is added to the delay.
|
||||
|
||||
- `Mode` - `Mode` is given as a string and controls the behavior when the task
|
||||
fails more than `Attempts` times in an `Interval`. Possible values are listed
|
||||
below:
|
||||
- `Mode` - `Mode` is given as a string and controls the behavior when the task
|
||||
fails more than `Attempts` times in an `Interval`. Possible values are listed
|
||||
below:
|
||||
|
||||
- `delay` - `delay` will delay the next restart until the next `Interval` is
|
||||
reached.
|
||||
- `delay` - `delay` will delay the next restart until the next `Interval` is
|
||||
reached.
|
||||
|
||||
- `fail` - `fail` will not restart the task again.
|
||||
- `fail` - `fail` will not restart the task again.
|
||||
|
||||
### Update
|
||||
|
||||
|
@ -660,13 +665,13 @@ the task group's taking precedence. The `Update` object supports the following
|
|||
attributes:
|
||||
|
||||
- `MaxParallel` - `MaxParallel` is given as an integer value and specifies
|
||||
the number of tasks that can be updated at the same time.
|
||||
the number of tasks that can be updated at the same time.
|
||||
|
||||
- `HealthCheck` - Specifies the mechanism in which allocations health is
|
||||
determined. The potential values are:
|
||||
determined. The potential values are:
|
||||
|
||||
- "checks" - Specifies that the allocation should be considered healthy when
|
||||
all of its tasks are running and their associated [checks][] are healthy,
|
||||
all of its tasks are running and their associated checks are healthy,
|
||||
and unhealthy if any of the tasks fail or not all checks become healthy.
|
||||
This is a superset of "task_states" mode.
|
||||
|
||||
|
@ -675,7 +680,7 @@ determined. The potential values are:
|
|||
|
||||
- "manual" - Specifies that Nomad should not automatically determine health
|
||||
and that the operator will specify allocation health using the [HTTP
|
||||
API](/api/deployments.html#set-allocation-health-in-deployment).
|
||||
API](/api/deployments#set-allocation-health-in-deployment).
|
||||
|
||||
- `MinHealthyTime` - Specifies the minimum time the allocation must be in the
|
||||
healthy state before it is marked as healthy and unblocks further allocations
|
||||
|
@ -714,13 +719,13 @@ An example `Update` block:
|
|||
```json
|
||||
{
|
||||
"Update": {
|
||||
"MaxParallel": 3,
|
||||
"HealthCheck": "checks",
|
||||
"MinHealthyTime": 15000000000,
|
||||
"HealthyDeadline": 180000000000,
|
||||
"AutoRevert": false,
|
||||
"AutoPromote": false,
|
||||
"Canary": 1
|
||||
"MaxParallel": 3,
|
||||
"HealthCheck": "checks",
|
||||
"MinHealthyTime": 15000000000,
|
||||
"HealthyDeadline": 180000000000,
|
||||
"AutoRevert": false,
|
||||
"AutoPromote": false,
|
||||
"Canary": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -730,7 +735,7 @@ An example `Update` block:
|
|||
The `Constraint` object supports the following keys:
|
||||
|
||||
- `LTarget` - Specifies the attribute to examine for the
|
||||
constraint. See the table of attributes [here](/docs/runtime/interpolation.html#interpreted_node_vars).
|
||||
constraint. See the table of attributes [here](/docs/runtime/interpolation#interpreted_node_vars).
|
||||
|
||||
- `RTarget` - Specifies the value to compare the attribute against.
|
||||
This can be a literal value, another attribute or a regular expression if
|
||||
|
@ -745,29 +750,29 @@ The `Constraint` object supports the following keys:
|
|||
that should be contained in the LTarget's value.
|
||||
|
||||
- `distinct_hosts` - If set, the scheduler will not co-locate any task groups on the same
|
||||
machine. This can be specified as a job constraint which applies the
|
||||
constraint to all task groups in the job, or as a task group constraint which
|
||||
scopes the effect to just that group. The constraint may not be
|
||||
specified at the task level.
|
||||
machine. This can be specified as a job constraint which applies the
|
||||
constraint to all task groups in the job, or as a task group constraint which
|
||||
scopes the effect to just that group. The constraint may not be
|
||||
specified at the task level.
|
||||
|
||||
Placing the constraint at both the job level and at the task group level is
|
||||
redundant since when placed at the job level, the constraint will be applied
|
||||
to all task groups. When specified, `LTarget` and `RTarget` should be
|
||||
omitted.
|
||||
Placing the constraint at both the job level and at the task group level is
|
||||
redundant since when placed at the job level, the constraint will be applied
|
||||
to all task groups. When specified, `LTarget` and `RTarget` should be
|
||||
omitted.
|
||||
|
||||
- `distinct_property` - If set, the scheduler selects nodes that have a
|
||||
distinct value of the specified property. The `RTarget` specifies how
|
||||
many allocations are allowed to share the value of a property. The
|
||||
`RTarget` must be 1 or greater and if omitted, defaults to 1. This can
|
||||
be specified as a job constraint which applies the constraint to all
|
||||
task groups in the job, or as a task group constraint which scopes the
|
||||
effect to just that group. The constraint may not be specified at the
|
||||
task level.
|
||||
distinct value of the specified property. The `RTarget` specifies how
|
||||
many allocations are allowed to share the value of a property. The
|
||||
`RTarget` must be 1 or greater and if omitted, defaults to 1. This can
|
||||
be specified as a job constraint which applies the constraint to all
|
||||
task groups in the job, or as a task group constraint which scopes the
|
||||
effect to just that group. The constraint may not be specified at the
|
||||
task level.
|
||||
|
||||
Placing the constraint at both the job level and at the task group level is
|
||||
redundant since when placed at the job level, the constraint will be applied
|
||||
to all task groups. When specified, `LTarget` should be the property
|
||||
that should be distinct and `RTarget` should be omitted.
|
||||
Placing the constraint at both the job level and at the task group level is
|
||||
redundant since when placed at the job level, the constraint will be applied
|
||||
to all task groups. When specified, `LTarget` should be the property
|
||||
that should be distinct and `RTarget` should be omitted.
|
||||
|
||||
- Comparison Operators - `=`, `==`, `is`, `!=`, `not`, `>`, `>=`, `<`, `<=`. The
|
||||
ordering is compared lexically.
|
||||
|
@ -775,12 +780,12 @@ The `Constraint` object supports the following keys:
|
|||
### Affinity
|
||||
|
||||
Affinities allow operators to express placement preferences. More details on how they work
|
||||
are described in [affinities](/docs/job-specification/affinity.html)
|
||||
are described in [affinities](/docs/job-specification/affinity)
|
||||
|
||||
The `Affinity` object supports the following keys:
|
||||
|
||||
- `LTarget` - Specifies the attribute to examine for the
|
||||
affinity. See the table of attributes [here](/docs/runtime/interpolation.html#interpreted_node_vars).
|
||||
affinity. See the table of attributes [here](/docs/runtime/interpolation#interpreted_node_vars).
|
||||
|
||||
- `RTarget` - Specifies the value to compare the attribute against.
|
||||
This can be a literal value, another attribute or a regular expression if
|
||||
|
@ -795,13 +800,13 @@ The `Affinity` object supports the following keys:
|
|||
that should be contained in the LTarget's value.
|
||||
|
||||
- `set_contains_any` - Allows the `RTarget` to be a comma separated list of values
|
||||
any of which should be contained in the LTarget's value.
|
||||
any of which should be contained in the LTarget's value.
|
||||
|
||||
- Comparison Operators - `=`, `==`, `is`, `!=`, `not`, `>`, `>=`, `<`, `<=`. The
|
||||
ordering is compared lexically.
|
||||
|
||||
- `Weight` - A non zero weight, valid values are from -100 to 100. Used to express
|
||||
relative preference when there is more than one affinity.
|
||||
relative preference when there is more than one affinity.
|
||||
|
||||
### Log Rotation
|
||||
|
||||
|
@ -899,7 +904,7 @@ Path based style:
|
|||
{
|
||||
"Artifacts": [
|
||||
{
|
||||
"GetterSource": "https://my-bucket-example.s3-us-west-2.amazonaws.com/my_app.tar.gz",
|
||||
"GetterSource": "https://my-bucket-example.s3-us-west-2.amazonaws.com/my_app.tar.gz"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -911,7 +916,7 @@ or to override automatic detection in the URL, use the S3-specific syntax
|
|||
{
|
||||
"Artifacts": [
|
||||
{
|
||||
"GetterSource": "s3::https://my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz",
|
||||
"GetterSource": "s3::https://my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -923,7 +928,7 @@ Virtual hosted based style
|
|||
{
|
||||
"Artifacts": [
|
||||
{
|
||||
"GetterSource": "my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz",
|
||||
"GetterSource": "my-bucket-example.s3-eu-west-1.amazonaws.com/my_app.tar.gz"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -941,7 +946,6 @@ template can reference [Nomad's runtime environment variables][env]. For a full
|
|||
list of the API template functions, please refer to the [Consul Template
|
||||
README][ct].
|
||||
|
||||
|
||||
`Template` object supports following attributes:
|
||||
|
||||
- `ChangeMode` - Specifies the behavior Nomad should take if the rendered
|
||||
|
@ -958,7 +962,7 @@ README][ct].
|
|||
- `DestPath` - Specifies the location where the resulting template should be
|
||||
rendered, relative to the task directory.
|
||||
|
||||
- `EmbeddedTmpl` - Specifies the raw template to execute. One of `SourcePath`
|
||||
- `EmbeddedTmpl` - Specifies the raw template to execute. One of `SourcePath`
|
||||
or `EmbeddedTmpl` must be specified, but not both. This is useful for smaller
|
||||
templates, but we recommend using `SourcePath` for larger templates.
|
||||
|
||||
|
@ -1014,23 +1018,23 @@ README][ct].
|
|||
|
||||
Spread allow operators to target specific percentages of allocations based on
|
||||
any node attribute or metadata. More details on how they work are described
|
||||
in [spread](/docs/job-specification/spread.html).
|
||||
in [spread](/docs/job-specification/spread).
|
||||
|
||||
The `Spread` object supports the following keys:
|
||||
|
||||
- `Attribute` - Specifies the attribute to examine for the
|
||||
spread. See the [table of attributes](/docs/runtime/interpolation.html#interpreted_node_vars) for examples.
|
||||
spread. See the [table of attributes](/docs/runtime/interpolation#interpreted_node_vars) for examples.
|
||||
|
||||
- `SpreadTarget` - Specifies a list of attribute values and percentages. This is an optional field, when
|
||||
left empty Nomad will evenly spread allocations across values of the attribute.
|
||||
- `Value` - The value of a specific target attribute, like "dc1" for `${node.datacenter}`.
|
||||
- `Percent` - Desired percentage of allocations for this attribute value. The sum of
|
||||
all spread target percentages must add up to 100.
|
||||
|
||||
- `Value` - The value of a specific target attribute, like "dc1" for `${node.datacenter}`.
|
||||
- `Percent` - Desired percentage of allocations for this attribute value. The sum of
|
||||
all spread target percentages must add up to 100.
|
||||
|
||||
- `Weight` - A non zero weight, valid values are from -100 to 100. Used to express
|
||||
relative preference when there is more than one spread or affinity.
|
||||
relative preference when there is more than one spread or affinity.
|
||||
|
||||
|
||||
[ct]: https://github.com/hashicorp/consul-template "Consul Template by HashiCorp"
|
||||
[drain]: /docs/commands/node/drain.html
|
||||
[env]: /docs/runtime/environment.html "Nomad Runtime Environment"
|
||||
[ct]: https://github.com/hashicorp/consul-template 'Consul Template by HashiCorp'
|
||||
[drain]: /docs/commands/node/drain
|
||||
[env]: /docs/runtime/environment 'Nomad Runtime Environment'
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Libraries and SDKs - HTTP API
|
||||
sidebar_current: api-libraries-and-sdks
|
||||
sidebar_title: Libraries & SDKs
|
||||
description: |-
|
||||
There are many third-party libraries for interacting with Nomad's HTTP API.
|
||||
This page lists the HashiCorp and community-maintained Nomad HTTP API client
|
97
website/pages/api-docs/metrics.mdx
Normal file
97
website/pages/api-docs/metrics.mdx
Normal file
|
@ -0,0 +1,97 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Metrics - HTTP API
|
||||
sidebar_title: Metrics
|
||||
description: The /metrics endpoint is used to view metrics for Nomad
|
||||
---
|
||||
|
||||
# Metrics HTTP API
|
||||
|
||||
The `/metrics` endpoint returns metrics for the current Nomad process.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------- | ------------------ |
|
||||
| `GET` | `/v1/metrics` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `none` |
|
||||
|
||||
### Parameters
|
||||
|
||||
- `format` `(string: "")` - Specifies the metrics format to be other than the
|
||||
JSON default. Currently, only `prometheus` is supported as an alternative
|
||||
format. This is specified as a query string parameter.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell
|
||||
$ curl https://localhost:4646/v1/metrics
|
||||
```
|
||||
|
||||
```shell
|
||||
$ curl https://localhost:4646/v1/metrics?format=prometheus
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
"Counters": [
|
||||
{
|
||||
"Count": 11,
|
||||
"Labels": {},
|
||||
"Max": 1.0,
|
||||
"Mean": 1.0,
|
||||
"Min": 1.0,
|
||||
"Name": "nomad.nomad.rpc.query",
|
||||
"Stddev": 0.0,
|
||||
"Sum": 11.0
|
||||
}
|
||||
],
|
||||
"Gauges": [
|
||||
{
|
||||
"Labels": {
|
||||
"node_id": "cd7c3e0c-0174-29dd-17ba-ea4609e0fd1f",
|
||||
"datacenter": "dc1"
|
||||
},
|
||||
"Name": "nomad.client.allocations.blocked",
|
||||
"Value": 0.0
|
||||
},
|
||||
{
|
||||
"Labels": {
|
||||
"datacenter": "dc1",
|
||||
"node_id": "cd7c3e0c-0174-29dd-17ba-ea4609e0fd1f"
|
||||
},
|
||||
"Name": "nomad.client.allocations.migrating",
|
||||
"Value": 0.0
|
||||
}
|
||||
],
|
||||
"Samples": [
|
||||
{
|
||||
"Count": 20,
|
||||
"Labels": {},
|
||||
"Max": 0.03544100001454353,
|
||||
"Mean": 0.023678050097078084,
|
||||
"Min": 0.00956599973142147,
|
||||
"Name": "nomad.memberlist.gossip",
|
||||
"Stddev": 0.005445327799243976,
|
||||
"Sum": 0.4735610019415617
|
||||
},
|
||||
{
|
||||
"Count": 1,
|
||||
"Labels": {},
|
||||
"Max": 0.0964059978723526,
|
||||
"Mean": 0.0964059978723526,
|
||||
"Min": 0.0964059978723526,
|
||||
"Name": "nomad.nomad.client.update_status",
|
||||
"Stddev": 0.0,
|
||||
"Sum": 0.0964059978723526
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Namespace - HTTP API
|
||||
sidebar_current: api-namespaces
|
||||
description: |-
|
||||
The /namespace endpoints are used to query for and interact with namespaces.
|
||||
sidebar_title: Namespaces
|
||||
description: The /namespace endpoints are used to query for and interact with namespaces.
|
||||
---
|
||||
|
||||
# Namespace HTTP API
|
||||
|
@ -17,17 +16,17 @@ Nomad Enterprise. This is not present in the open source version of Nomad.
|
|||
|
||||
This endpoint lists all namespaces.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/namespaces` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `GET` | `/v1/namespaces` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `YES` | `namespace:*`<br>Any capability on the namespace authorizes the endpoint |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------------------------------------------------------------- |
|
||||
| `YES` | `namespace:*`<br />Any capability on the namespace authorizes the endpoint |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -36,12 +35,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespaces
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespaces?prefix=prod
|
||||
```
|
||||
|
@ -50,20 +49,20 @@ $ curl \
|
|||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"CreateIndex": 31,
|
||||
"Description": "Production API Servers",
|
||||
"ModifyIndex": 31,
|
||||
"Name": "api-prod",
|
||||
"Quota": ""
|
||||
},
|
||||
{
|
||||
"CreateIndex": 5,
|
||||
"Description": "Default shared namespace",
|
||||
"ModifyIndex": 5,
|
||||
"Name": "default",
|
||||
"Quota": ""
|
||||
}
|
||||
{
|
||||
"CreateIndex": 31,
|
||||
"Description": "Production API Servers",
|
||||
"ModifyIndex": 31,
|
||||
"Name": "api-prod",
|
||||
"Quota": ""
|
||||
},
|
||||
{
|
||||
"CreateIndex": 5,
|
||||
"Description": "Default shared namespace",
|
||||
"ModifyIndex": 5,
|
||||
"Name": "default",
|
||||
"Quota": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
@ -71,17 +70,17 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific namespace.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/namespace/:namespace` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------- | ------------------ |
|
||||
| `GET` | `/v1/namespace/:namespace` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `YES` | `namespace:*`<br>Any capability on the namespace authorizes the endpoint |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------------------------------------------------------------- |
|
||||
| `YES` | `namespace:*`<br />Any capability on the namespace authorizes the endpoint |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -89,7 +88,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
||||
```
|
||||
|
@ -98,12 +97,12 @@ $ curl \
|
|||
|
||||
```json
|
||||
{
|
||||
"CreateIndex": 31,
|
||||
"Description": "Production API Servers",
|
||||
"Quota": "",
|
||||
"Hash": "N8WvePwqkp6J354eLJMKyhvsFdPELAos0VuBfMoVKoU=",
|
||||
"ModifyIndex": 31,
|
||||
"Name": "api-prod"
|
||||
"CreateIndex": 31,
|
||||
"Description": "Production API Servers",
|
||||
"Quota": "",
|
||||
"Hash": "N8WvePwqkp6J354eLJMKyhvsFdPELAos0VuBfMoVKoU=",
|
||||
"ModifyIndex": 31,
|
||||
"Name": "api-prod"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -111,13 +110,13 @@ $ curl \
|
|||
|
||||
This endpoint is used to create or update a namespace.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ----------------------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/namespace/:namespace` <br> `/v1/namespace` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/namespace/:namespace` <br /> `/v1/namespace` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -141,18 +140,18 @@ The table below shows this endpoint's support for
|
|||
"Description": "Production API Servers",
|
||||
"Quota": "prod-quota"
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @namespace.json \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @namespace.json \
|
||||
|
@ -163,13 +162,13 @@ $ curl \
|
|||
|
||||
This endpoint is used to delete a namespace.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | -------------------------- | -------------------------- |
|
||||
| `DELETE` | `/v1/namespace/:namespace` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | -------------------------- | ------------------ |
|
||||
| `DELETE` | `/v1/namespace/:namespace` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -181,7 +180,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/namespace/api-prod
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Nodes - HTTP API
|
||||
sidebar_current: api-nodes
|
||||
description: |-
|
||||
The /node endpoints are used to query for and interact with client nodes.
|
||||
sidebar_title: Nodes
|
||||
description: The /node endpoints are used to query for and interact with client nodes.
|
||||
---
|
||||
|
||||
# Nodes HTTP API
|
||||
|
@ -14,13 +13,13 @@ The `/node` endpoints are used to query for and interact with client nodes.
|
|||
|
||||
This endpoint lists all nodes registered with Nomad.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/nodes` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------- | ------------------ |
|
||||
| `GET` | `/v1/nodes` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -35,12 +34,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
http://localhost:4646/v1/nodes
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
http://localhost:4646/v1/nodes?prefix=f7476465
|
||||
```
|
||||
|
@ -126,17 +125,17 @@ $ curl \
|
|||
|
||||
This endpoint queries the status of a client node.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/node/:node_id` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------- | ------------------ |
|
||||
| `GET` | `/v1/node/:node_id` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ----------------- |
|
||||
| `YES` | `node:read` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `YES` | `node:read` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -146,7 +145,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/f7476465-4d6e-c0de-26d0-e383c49be941
|
||||
```
|
||||
|
@ -383,17 +382,17 @@ $ curl \
|
|||
|
||||
## List Node Allocations
|
||||
|
||||
This endpoint lists all of the allocations for the given node. This can be used to
|
||||
This endpoint lists all of the allocations for the given node. This can be used to
|
||||
determine what allocations have been scheduled on the node, their current status,
|
||||
and the values of dynamically assigned resources, like ports.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/node/:node_id/allocations` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/node/:node_id/allocations` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------------------ |
|
||||
|
@ -407,7 +406,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/e02b6169-83bd-9df6-69bd-832765f333eb/allocations
|
||||
```
|
||||
|
@ -439,9 +438,7 @@ $ curl \
|
|||
"AllAtOnce": false,
|
||||
"Constraints": null,
|
||||
"CreateIndex": 2553,
|
||||
"Datacenters": [
|
||||
"dc1"
|
||||
],
|
||||
"Datacenters": ["dc1"],
|
||||
"ID": "webapp",
|
||||
"JobModifyIndex": 2553,
|
||||
"Meta": null,
|
||||
|
@ -494,10 +491,7 @@ $ curl \
|
|||
{
|
||||
"Artifacts": null,
|
||||
"Config": {
|
||||
"args": [
|
||||
"-text",
|
||||
"ok4"
|
||||
],
|
||||
"args": ["-text", "ok4"],
|
||||
"image": "hashicorp/http-echo:0.2.3",
|
||||
"port_map": [
|
||||
{
|
||||
|
@ -759,23 +753,23 @@ $ curl \
|
|||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
## Create Node Evaluation
|
||||
|
||||
This endpoint creates a new evaluation for the given node. This can be used to
|
||||
force a run of the scheduling logic.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/node/:node_id/evaluate` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | ------------------ |
|
||||
| `POST` | `/v1/node/:node_id/evaluate` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `node:write` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `node:write` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -785,7 +779,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
http://localhost:4646/v1/node/fb2170a8-257d-3c64-b14d-bc06cc94e34c/evaluate
|
||||
```
|
||||
|
@ -795,9 +789,7 @@ $ curl \
|
|||
```json
|
||||
{
|
||||
"EvalCreateIndex": 3671,
|
||||
"EvalIDs": [
|
||||
"4dfc2db7-b481-c53b-3072-14479aa44be3"
|
||||
],
|
||||
"EvalIDs": ["4dfc2db7-b481-c53b-3072-14479aa44be3"],
|
||||
"HeartbeatTTL": 0,
|
||||
"Index": 3671,
|
||||
"KnownLeader": false,
|
||||
|
@ -826,27 +818,26 @@ $ curl \
|
|||
}
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Drain Node
|
||||
|
||||
This endpoint toggles the drain mode of the node. When draining is enabled, no
|
||||
further allocations will be assigned to this node, and existing allocations will
|
||||
be migrated to new nodes. See the [Workload Migration
|
||||
Guide](/guides/operations/node-draining.html) for suggested usage.
|
||||
be migrated to new nodes. See the [Workload Migration
|
||||
Guide](/guides/operations/node-draining) for suggested usage.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/node/:node_id/drain` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------------ |
|
||||
| `POST` | `/v1/node/:node_id/drain` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `node:write` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `node:write` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -873,16 +864,16 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"DrainSpec": {
|
||||
"Deadline": 3600000000000,
|
||||
"IgnoreSystemJobs": true
|
||||
}
|
||||
"DrainSpec": {
|
||||
"Deadline": 3600000000000,
|
||||
"IgnoreSystemJobs": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
-XPOST \
|
||||
--data @drain.json \
|
||||
|
@ -905,17 +896,17 @@ $ curl \
|
|||
This endpoint purges a node from the system. Nodes can still join the cluster if
|
||||
they are alive.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/node/:node_id/purge` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------- | ------------------ |
|
||||
| `POST` | `/v1/node/:node_id/purge` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `node:write` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `node:write` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -925,7 +916,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
-XPOST http://localhost:4646/v1/node/f7476465-4d6e-c0de-26d0-e383c49be941/purge
|
||||
```
|
||||
|
@ -935,9 +926,7 @@ $ curl \
|
|||
```json
|
||||
{
|
||||
"EvalCreateIndex": 3817,
|
||||
"EvalIDs": [
|
||||
"71bad787-5ab1-9939-be02-4809441583cd"
|
||||
],
|
||||
"EvalIDs": ["71bad787-5ab1-9939-be02-4809441583cd"],
|
||||
"HeartbeatTTL": 0,
|
||||
"Index": 3816,
|
||||
"KnownLeader": false,
|
||||
|
@ -953,17 +942,17 @@ $ curl \
|
|||
|
||||
This endpoint toggles the scheduling eligibility of the node.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/node/:node_id/eligibility` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/node/:node_id/eligibility` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `node:write` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `node:write` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -977,13 +966,13 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"Eligibility": "ineligible"
|
||||
"Eligibility": "ineligible"
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
-XPOST \
|
||||
--data @eligibility.json \
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Operator - HTTP API
|
||||
sidebar_current: api-operator
|
||||
sidebar_title: Operator
|
||||
description: |-
|
||||
The /operator endpoints provides cluster-level tools for Nomad operators, such
|
||||
as interacting with the Raft subsystem.
|
||||
---
|
||||
|
||||
# /v1/operator
|
||||
|
||||
The `/operator` endpoint provides cluster-level tools for Nomad operators, such
|
||||
|
@ -14,23 +15,22 @@ as interacting with the Raft subsystem.
|
|||
~> Use this interface with extreme caution, as improper use could lead to a
|
||||
Nomad outage and even loss of data.
|
||||
|
||||
See the [Outage Recovery](/guides/operations/outage.html) guide for some examples of how
|
||||
See the [Outage Recovery](/guides/operations/outage) guide for some examples of how
|
||||
these capabilities are used. For a CLI to perform these operations manually,
|
||||
please see the documentation for the
|
||||
[`nomad operator`](/docs/commands/operator.html) command.
|
||||
|
||||
[`nomad operator`](/docs/commands/operator) command.
|
||||
|
||||
## Read Raft Configuration
|
||||
|
||||
This endpoint queries the status of a client node registered with Nomad.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/operator/raft/configuration` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/operator/raft/configuration` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -43,7 +43,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/raft/configuration
|
||||
```
|
||||
|
@ -95,13 +95,13 @@ $ curl \
|
|||
This endpoint removes a Nomad server with given address from the Raft
|
||||
configuration. The return code signifies success or failure.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| -------- | ---------------------------| -------------------------- |
|
||||
| `DELETE` | `/v1/operator/raft/peer` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | ------------------------ | ------------------ |
|
||||
| `DELETE` | `/v1/operator/raft/peer` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -117,7 +117,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/operator/raft/peer?address=1.2.3.4
|
||||
|
@ -127,13 +127,13 @@ $ curl \
|
|||
|
||||
This endpoint retrieves its latest Autopilot configuration.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/operator/autopilot/configuration` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------- |
|
||||
|
@ -141,7 +141,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/autopilot/configuration
|
||||
```
|
||||
|
@ -163,19 +163,19 @@ $ curl \
|
|||
```
|
||||
|
||||
For more information about the Autopilot configuration options, see the
|
||||
[agent configuration section](/docs/configuration/autopilot.html).
|
||||
[agent configuration section](/docs/configuration/autopilot).
|
||||
|
||||
## Update Autopilot Configuration
|
||||
|
||||
This endpoint updates the Autopilot configuration of the cluster.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------------------- | ------------------ |
|
||||
| `PUT` | `/v1/operator/autopilot/configuration` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------- |
|
||||
|
@ -218,7 +218,7 @@ The table below shows this endpoint's support for
|
|||
cluster. Only takes effect if all servers are running Raft protocol version 3
|
||||
or higher. Must be a duration value such as `30s`.
|
||||
|
||||
- `EnableRedundancyZones` `(bool: false)` - (Enterprise-only) Specifies whether
|
||||
- `EnableRedundancyZones` `(bool: false)` - (Enterprise-only) Specifies whether
|
||||
to enable redundancy zones.
|
||||
|
||||
- `DisableUpgradeMigration` `(bool: false)` - (Enterprise-only) Disables Autopilot's
|
||||
|
@ -226,20 +226,20 @@ The table below shows this endpoint's support for
|
|||
newer-versioned servers have been added to the cluster before promoting any of
|
||||
them to voters.
|
||||
|
||||
- `EnableCustomUpgrades` `(bool: false)` - (Enterprise-only) Specifies whether to
|
||||
- `EnableCustomUpgrades` `(bool: false)` - (Enterprise-only) Specifies whether to
|
||||
enable using custom upgrade versions when performing migrations.
|
||||
|
||||
## Read Health
|
||||
|
||||
This endpoint queries the health of the autopilot status.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/v1/operator/autopilot/health` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/operator/autopilot/health` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------- |
|
||||
|
@ -247,7 +247,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/autopilot/health
|
||||
```
|
||||
|
@ -326,28 +326,27 @@ $ curl \
|
|||
The HTTP status code will indicate the health of the cluster. If `Healthy` is true, then a
|
||||
status of 200 will be returned. If `Healthy` is false, then a status of 429 will be returned.
|
||||
|
||||
|
||||
## Read Scheduler Configuration
|
||||
|
||||
This endpoint retrieves the latest Scheduler configuration. This API was introduced in
|
||||
Nomad 0.9 and currently supports enabling/disabling preemption. More options may be added in
|
||||
the future.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------------------- | ------------------ |
|
||||
| `GET` | `/v1/operator/scheduler/configuration` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------- |
|
||||
| `NO` | `operator:read` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------- |
|
||||
| `NO` | `operator:read` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/operator/scheduler/configuration
|
||||
```
|
||||
|
@ -370,6 +369,7 @@ $ curl \
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Field Reference
|
||||
|
||||
- `Index` `(int)` - The `Index` value is the Raft commit index corresponding to this
|
||||
|
@ -378,13 +378,10 @@ $ curl \
|
|||
- `SchedulerConfig` `(SchedulerConfig)` - The returned `SchedulerConfig` object has configuration
|
||||
settings mentioned below.
|
||||
|
||||
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers.
|
||||
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
this defaults to true.
|
||||
- `BatchSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for batch jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled.
|
||||
- `ServiceSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for service jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled.
|
||||
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers. - `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
this defaults to true. - `BatchSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for batch jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled. - `ServiceSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for service jobs is enabled. Note that
|
||||
this defaults to false and must be explicitly enabled.
|
||||
- `CreateIndex` - The Raft index at which the config was created.
|
||||
- `ModifyIndex` - The Raft index at which the config was modified.
|
||||
|
||||
|
@ -392,17 +389,17 @@ $ curl \
|
|||
|
||||
This endpoint updates the scheduler configuration of the cluster.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `PUT`, `POST` | `/v1/operator/scheduler/configuration` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------------- | -------------------------------------- | ------------------ |
|
||||
| `PUT`, `POST` | `/v1/operator/scheduler/configuration` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------- |
|
||||
| `NO` | `operator:write` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ---------------- |
|
||||
| `NO` | `operator:write` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -423,9 +420,9 @@ The table below shows this endpoint's support for
|
|||
```
|
||||
|
||||
- `PreemptionConfig` `(PreemptionConfig)` - Options to enable preemption for various schedulers.
|
||||
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
if this is set to true, then system jobs can preempt any other jobs.
|
||||
- `BatchSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for batch jobs is enabled. Note that
|
||||
if this is set to true, then batch jobs can preempt any other jobs.
|
||||
- `ServiceSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for service jobs is enabled. Note that
|
||||
if this is set to true, then service jobs can preempt any other jobs.
|
||||
- `SystemSchedulerEnabled` `(bool: true)` - Specifies whether preemption for system jobs is enabled. Note that
|
||||
if this is set to true, then system jobs can preempt any other jobs.
|
||||
- `BatchSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for batch jobs is enabled. Note that
|
||||
if this is set to true, then batch jobs can preempt any other jobs.
|
||||
- `ServiceSchedulerEnabled` `(bool: false)` (Enterprise Only) - Specifies whether preemption for service jobs is enabled. Note that
|
||||
if this is set to true, then service jobs can preempt any other jobs.
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Quotas - HTTP API
|
||||
sidebar_current: api-quotas
|
||||
description: |-
|
||||
The /quota endpoints are used to query for and interact with quotas.
|
||||
sidebar_title: Quotas
|
||||
description: The /quota endpoints are used to query for and interact with quotas.
|
||||
---
|
||||
|
||||
# Quota HTTP API
|
||||
|
@ -17,17 +16,17 @@ Nomad Enterprise. This is not present in the open source version of Nomad.
|
|||
|
||||
This endpoint lists all quota specifications.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/quotas` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------ | ------------------ |
|
||||
| `GET` | `/v1/quotas` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `YES` | `quota:read`<br>`namespace:*` if namespace has quota attached|
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------------------------------------------- |
|
||||
| `YES` | `quota:read`<br />`namespace:*` if namespace has quota attached |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -36,12 +35,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quotas
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quotas?prefix=sha
|
||||
```
|
||||
|
@ -86,17 +85,17 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific quota specification.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------- | -------------------------- |
|
||||
| `GET` | `/v1/quota/:quota` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------ | ------------------ |
|
||||
| `GET` | `/v1/quota/:quota` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `YES` | `quota:read`<br>`namespace:*` if namespace has quota attached|
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------------------------------------------- |
|
||||
| `YES` | `quota:read`<br />`namespace:*` if namespace has quota attached |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -105,7 +104,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
|
@ -148,16 +147,16 @@ $ curl \
|
|||
|
||||
This endpoint is used to create or update a quota specification.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ----------------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/quota/:quota` <br> `/v1/quota` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------------- | ------------------ |
|
||||
| `POST` | `/v1/quota/:quota` <br /> `/v1/quota` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `NO` | `quota:write` |
|
||||
|
||||
### Body
|
||||
|
@ -191,14 +190,14 @@ object](https://github.com/hashicorp/nomad/blob/master/api/quota.go#L100-L131).
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @spec.json \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @spec.json \
|
||||
|
@ -209,16 +208,16 @@ $ curl \
|
|||
|
||||
This endpoint is used to delete a quota specification.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | -------------------------- | -------------------------- |
|
||||
| `DELETE` | `/v1/quota/:quota` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | ------------------ | ------------------ |
|
||||
| `DELETE` | `/v1/quota/:quota` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `NO` | `quota:write` |
|
||||
|
||||
### Parameters
|
||||
|
@ -228,7 +227,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
|
@ -238,17 +237,17 @@ $ curl \
|
|||
|
||||
This endpoint lists all quota usages.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ----------------- | ------------------ |
|
||||
| `GET` | `/v1/quota-usages` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------ | ------------------ |
|
||||
| `GET` | `/v1/quota-usages` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `YES` | `quota:read`<br>`namespace:*` if namespace has quota attached|
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------------------------------------------- |
|
||||
| `YES` | `quota:read`<br />`namespace:*` if namespace has quota attached |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -257,12 +256,12 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota-usages
|
||||
```
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota-usages?prefix=sha
|
||||
```
|
||||
|
@ -295,17 +294,17 @@ $ curl \
|
|||
|
||||
This endpoint reads information about a specific quota usage.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------- | -------------------------- |
|
||||
| `GET` | `/v1/quota/usage/:quota` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------ | ------------------ |
|
||||
| `GET` | `/v1/quota/usage/:quota` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `YES` | `quota:read`<br>`namespace:*` if namespace has quota attached|
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | --------------------------------------------------------------- |
|
||||
| `YES` | `quota:read`<br />`namespace:*` if namespace has quota attached |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -314,7 +313,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/quota/shared-quota
|
||||
```
|
37
website/pages/api-docs/regions.mdx
Normal file
37
website/pages/api-docs/regions.mdx
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Regions - HTTP API
|
||||
sidebar_title: Regions
|
||||
description: The /regions endpoints list all known regions.
|
||||
---
|
||||
|
||||
# Regions HTTP API
|
||||
|
||||
The `/regions` endpoints list all known regions.
|
||||
|
||||
## List Regions
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------- | ------------------ |
|
||||
| `GET` | `/regions` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `none` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/regions
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
["region1", "region2"]
|
||||
```
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Search - HTTP API
|
||||
sidebar_current: api-search
|
||||
description: |-
|
||||
The /search endpoint is used to search for Nomad objects
|
||||
sidebar_title: Search
|
||||
description: The /search endpoint is used to search for Nomad objects
|
||||
---
|
||||
|
||||
# Search HTTP API
|
||||
|
@ -13,13 +12,13 @@ context can be jobs, allocations, evaluations, nodes, or deployments. When using
|
|||
Nomad Enterprise, the allowed contexts include quotas and namespaces.
|
||||
Additionally, a prefix can be searched for within every context.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/search` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------ | ------------------ |
|
||||
| `POST` | `/v1/search` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------------------- |
|
||||
|
@ -50,7 +49,7 @@ job related results will not be returned. If the token is only valid for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -60,10 +59,9 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
{ "Matches": {
|
||||
"evals": [
|
||||
"abc2fdc0-e1fd-2536-67d8-43af8ca798ac"
|
||||
]
|
||||
{
|
||||
"Matches": {
|
||||
"evals": ["abc2fdc0-e1fd-2536-67d8-43af8ca798ac"]
|
||||
},
|
||||
"Truncations": {
|
||||
"evals": "false"
|
||||
|
@ -82,7 +80,7 @@ $ curl \
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -92,15 +90,12 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
{ "Matches": {
|
||||
{
|
||||
"Matches": {
|
||||
"allocs": [],
|
||||
"deployment": [],
|
||||
"evals": [
|
||||
"abc2fdc0-e1fd-2536-67d8-43af8ca798ac"
|
||||
],
|
||||
"jobs": [
|
||||
"abcde"
|
||||
],
|
||||
"evals": ["abc2fdc0-e1fd-2536-67d8-43af8ca798ac"],
|
||||
"jobs": ["abcde"],
|
||||
"nodes": []
|
||||
},
|
||||
"Truncations": {
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Sentinel Policies - HTTP API
|
||||
sidebar_current: api-sentinel-policies
|
||||
description: |-
|
||||
The /sentinel/policy/ endpoints are used to configure and manage Sentinel policies.
|
||||
sidebar_title: Sentinel Policies
|
||||
description: >-
|
||||
The /sentinel/policy/ endpoints are used to configure and manage Sentinel
|
||||
policies.
|
||||
---
|
||||
|
||||
# Sentinel Policies HTTP API
|
||||
|
@ -11,7 +12,7 @@ description: |-
|
|||
The `/sentinel/policies` and `/sentinel/policy/` endpoints are used to manage Sentinel policies.
|
||||
For more details about Sentinel policies, please see the [Sentinel Policy Guide](https://learn.hashicorp.com/nomad/governance-and-policy/sentinel).
|
||||
|
||||
Sentinel endpoints are only available when ACLs are enabled. For more details about ACLs, please see the [ACL Guide](/guides/security/acl.html).
|
||||
Sentinel endpoints are only available when ACLs are enabled. For more details about ACLs, please see the [ACL Guide](/guides/security/acl).
|
||||
|
||||
~> **Enterprise Only!** This API endpoint and functionality only exists in
|
||||
Nomad Enterprise. This is not present in the open source version of Nomad.
|
||||
|
@ -21,22 +22,21 @@ Nomad Enterprise. This is not present in the open source version of Nomad.
|
|||
This endpoint lists all Sentinel policies. This lists the policies that have been replicated
|
||||
to the region, and may lag behind the authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/sentinel/policies` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------- | ------------------ |
|
||||
| `GET` | `/sentinel/policies` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
| `YES` | `all` | `management` |
|
||||
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/sentinel/policies
|
||||
```
|
||||
|
@ -62,17 +62,17 @@ $ curl \
|
|||
This endpoint creates or updates an Sentinel Policy. This request is always forwarded to the
|
||||
authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `POST` | `/sentinel/policy/:policy_name` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | -------------- |
|
||||
| `POST` | `/sentinel/policy/:policy_name` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------------ |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -84,7 +84,7 @@ The table below shows this endpoint's support for
|
|||
- `Scope` `(string: <required>)` - Specifies the scope of when this policy applies. Only `submit-job` is currently supported.
|
||||
|
||||
- `EnforcementLevel` `(string: <required>)` - Specifies the enforcement level of the policy. Can be `advisory` which warns on failure,
|
||||
`hard-mandatory` which prevents an operation on failure, and `soft-mandatory` which is like `hard-mandatory` but can be overridden.
|
||||
`hard-mandatory` which prevents an operation on failure, and `soft-mandatory` which is like `hard-mandatory` but can be overridden.
|
||||
|
||||
- `Policy` `(string: <required>)` - Specifies the Sentinel policy itself.
|
||||
|
||||
|
@ -92,17 +92,17 @@ The table below shows this endpoint's support for
|
|||
|
||||
```json
|
||||
{
|
||||
"Name": "my-policy",
|
||||
"Description": "This is a great policy",
|
||||
"Scope": "submit-job",
|
||||
"EnforcementLevel": "advisory",
|
||||
"Policy": "main = rule { true }",
|
||||
"Name": "my-policy",
|
||||
"Description": "This is a great policy",
|
||||
"Scope": "submit-job",
|
||||
"EnforcementLevel": "advisory",
|
||||
"Policy": "main = rule { true }"
|
||||
}
|
||||
```
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @payload.json \
|
||||
|
@ -114,14 +114,13 @@ $ curl \
|
|||
This endpoint reads a Sentinel policy with the given name. This queries the policy that have been
|
||||
replicated to the region, and may lag behind the authoritative region.
|
||||
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/sentinel/policy/:policy_name` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------------------- | ------------------ |
|
||||
| `GET` | `/sentinel/policy/:policy_name` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries), [consistency modes](/api/index.html#consistency-modes) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries), [consistency modes](/api#consistency-modes) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | Consistency Modes | ACL Required |
|
||||
| ---------------- | ----------------- | ------------ |
|
||||
|
@ -129,7 +128,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/sentinel/policy/foo
|
||||
```
|
||||
|
@ -154,17 +153,17 @@ $ curl \
|
|||
This endpoint deletes the named Sentinel policy. This request is always forwarded to the
|
||||
authoritative region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| -------- | ---------------------------- | -------------------------- |
|
||||
| `DELETE` | `/sentinel/policy/:policy_name` | `(empty body)` |
|
||||
| Method | Path | Produces |
|
||||
| -------- | ------------------------------- | -------------- |
|
||||
| `DELETE` | `/sentinel/policy/:policy_name` | `(empty body)` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------- |
|
||||
| `NO` | `management` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -172,9 +171,8 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
https://localhost:4646/v1/sentinel/policy/foo
|
||||
```
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Status - HTTP API
|
||||
sidebar_current: api-status
|
||||
description: |-
|
||||
The /status endpoints query the Nomad system status.
|
||||
sidebar_title: Status
|
||||
description: The /status endpoints query the Nomad system status.
|
||||
---
|
||||
|
||||
# Status HTTP API
|
||||
|
@ -14,13 +13,13 @@ The `/status` endpoints query the Nomad system status.
|
|||
|
||||
This endpoint returns the address of the current leader in the region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/status/leader` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------- | ------------------ |
|
||||
| `GET` | `/status/leader` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -28,7 +27,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/status/leader
|
||||
```
|
||||
|
@ -43,13 +42,13 @@ $ curl \
|
|||
|
||||
This endpoint returns the set of raft peers in the region.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------- | -------------------------- |
|
||||
| `GET` | `/status/peers` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------- | ------------------ |
|
||||
| `GET` | `/status/peers` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -57,7 +56,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/status/peers
|
||||
```
|
||||
|
@ -65,7 +64,5 @@ $ curl \
|
|||
### Sample Response
|
||||
|
||||
```json
|
||||
[
|
||||
"127.0.0.1:4647"
|
||||
]
|
||||
["127.0.0.1:4647"]
|
||||
```
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: System - HTTP API
|
||||
sidebar_current: api-system
|
||||
description: |-
|
||||
The /system endpoints are used for system maintenance.
|
||||
sidebar_title: System
|
||||
description: The /system endpoints are used for system maintenance.
|
||||
---
|
||||
|
||||
# System HTTP API
|
||||
|
@ -16,13 +15,13 @@ necessary for most users.
|
|||
This endpoint initializes a garbage collection of jobs, evaluations, allocations, and
|
||||
nodes. This is an asynchronous operation.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | ---------------------------| -------------------------- |
|
||||
| `PUT` | `/v1/system/gc` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------- | ------------------ |
|
||||
| `PUT` | `/v1/system/gc` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
|
@ -30,7 +29,7 @@ The table below shows this endpoint's support for
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request PUT \
|
||||
https://localhost:4646/v1/system/gc
|
||||
|
@ -40,20 +39,21 @@ $ curl \
|
|||
|
||||
This endpoint reconciles the summaries of all registered jobs.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------ | --------------------------------- | -------------------------- |
|
||||
| `PUT` | `/v1/system/reconcile/summaries` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | -------------------------------- | ------------------ |
|
||||
| `PUT` | `/v1/system/reconcile/summaries` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | ------------ |
|
||||
| `NO` | `management` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
https://localhost:4646/v1/system/reconcile/summaries
|
||||
```
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: UI
|
||||
sidebar_current: ui
|
||||
description: |-
|
||||
The /ui namespace is used to access the Nomad web user interface.
|
||||
sidebar_title: UI
|
||||
description: The /ui namespace is used to access the Nomad web user interface.
|
||||
---
|
||||
|
||||
# Nomad Web UI
|
||||
|
@ -11,7 +10,6 @@ description: |-
|
|||
Starting in v0.7, the Nomad UI is accessible at `/ui`. It is not namespaced by version. A request to `/`
|
||||
will also redirect to `/ui`.
|
||||
|
||||
|
||||
## List Jobs
|
||||
|
||||
This page lists all known jobs in a paginated, searchable, and sortable table.
|
||||
|
@ -37,7 +35,6 @@ This page lists all known jobs in a paginated, searchable, and sortable table.
|
|||
- `page` `(int: 0)` - Specifies the page in the jobs list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
## Job Detail
|
||||
|
||||
This page shows an overview of a specific job. Details include name, status, type,
|
||||
|
@ -82,7 +79,6 @@ based on the type of job.
|
|||
- `page` `(int: 0)` - Specifies the page in the task groups list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
### Job Definition
|
||||
|
||||
This page shows the definition of a job as pretty-printed, syntax-highlighted, JSON.
|
||||
|
@ -91,17 +87,15 @@ This page shows the definition of a job as pretty-printed, syntax-highlighted, J
|
|||
| ----------------------------- | ----------- |
|
||||
| `/ui/jobs/:job_id/definition` | `text/html` |
|
||||
|
||||
|
||||
### Job Versions
|
||||
|
||||
This page lists all available versions for a job in a timeline view. Each version in
|
||||
the timeline can be expanded to show a pretty-printed, syntax-highlighted diff between
|
||||
job versions.
|
||||
|
||||
| Path | Produces |
|
||||
| ----------------------------- | ----------- |
|
||||
| `/ui/jobs/:job_id/versions` | `text/html` |
|
||||
|
||||
| Path | Produces |
|
||||
| --------------------------- | ----------- |
|
||||
| `/ui/jobs/:job_id/versions` | `text/html` |
|
||||
|
||||
### Job Deployments
|
||||
|
||||
|
@ -114,10 +108,9 @@ status. A table of task groups is also present in the detail view, which shows a
|
|||
metrics by task group. Lastly, each expanded deployment lists all associated allocations
|
||||
in a table to drill into for task events.
|
||||
|
||||
| Path | Produces |
|
||||
| -------------------------------- | ----------- |
|
||||
| `/ui/jobs/:job_id/deployments` | `text/html` |
|
||||
|
||||
| Path | Produces |
|
||||
| ------------------------------ | ----------- |
|
||||
| `/ui/jobs/:job_id/deployments` | `text/html` |
|
||||
|
||||
## Task Group Detail
|
||||
|
||||
|
@ -144,7 +137,6 @@ allocations.
|
|||
- `page` `(int: 0)` - Specifies the page in the allocations list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
## Allocation Detail
|
||||
|
||||
This page shows details and events for an allocation. Details include the job the allocation
|
||||
|
@ -165,7 +157,6 @@ description of the event.
|
|||
- `desc` `(boolean: false)` - Specifies whether or not the sort direction is descending
|
||||
or ascending. This is specified as a query string parameter.
|
||||
|
||||
|
||||
## Task Detail
|
||||
|
||||
This page shows details and events for a specific task. Details include when the task started
|
||||
|
@ -175,7 +166,6 @@ and stopped, all static and dynamic addresses, and all recent events.
|
|||
| -------------------------------------- | ----------- |
|
||||
| `/ui/allocations/:alloc_id/:task_name` | `text/html` |
|
||||
|
||||
|
||||
## Task Logs
|
||||
|
||||
This page streams `stdout` and `stderr` logs for a task. By default, `stdout` is tailed, but
|
||||
|
@ -186,7 +176,6 @@ to `stderr`.
|
|||
| ------------------------------------------- | ----------- |
|
||||
| `/ui/allocations/:alloc_id/:task_name/logs` | `text/html` |
|
||||
|
||||
|
||||
## Nodes List
|
||||
|
||||
This page lists all nodes in the Nomad cluster in a sortable, searchable, paginated
|
||||
|
@ -210,7 +199,6 @@ table.
|
|||
- `page` `(int: 0)` - Specifies the page in the client nodes list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
## Node Detail
|
||||
|
||||
This page shows the details of a node, including the node name, status, full ID,
|
||||
|
@ -234,7 +222,6 @@ address, port, datacenter, allocations, and attributes.
|
|||
- `page` `(int: 0)` - Specifies the page in the allocations list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
## Servers List
|
||||
|
||||
This page lists all servers in the Nomad cluster in a sortable table. Details for each
|
||||
|
@ -256,7 +243,6 @@ the leader.
|
|||
- `page` `(int: 0)` - Specifies the page in the server agents list that should be visible. This
|
||||
is specified as a query string parameter.
|
||||
|
||||
|
||||
## Server Detail
|
||||
|
||||
This page lists all tags associated with a server.
|
||||
|
@ -265,7 +251,6 @@ This page lists all tags associated with a server.
|
|||
| ------------------------ | ----------- |
|
||||
| `/ui/servers/:server_id` | `text/html` |
|
||||
|
||||
|
||||
## ACL Tokens
|
||||
|
||||
This page lets you enter an ACL token (both accessor ID and secret ID) to use with the UI.
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: api
|
||||
page_title: Validate - HTTP API
|
||||
sidebar_current: api-validate
|
||||
sidebar_title: Validate
|
||||
description: |-
|
||||
The /validate endpoints are used to validate object structs, fields, and
|
||||
types.
|
||||
|
@ -20,17 +20,17 @@ the job file locally but skips validating driver configurations.
|
|||
|
||||
~> This endpoint accepts a **JSON job file**, not an HCL job file.
|
||||
|
||||
| Method | Path | Produces |
|
||||
| ------- | ------------------------- | -------------------------- |
|
||||
| `POST` | `/v1/validate/job` | `application/json` |
|
||||
| Method | Path | Produces |
|
||||
| ------ | ------------------ | ------------------ |
|
||||
| `POST` | `/v1/validate/job` | `application/json` |
|
||||
|
||||
The table below shows this endpoint's support for
|
||||
[blocking queries](/api/index.html#blocking-queries) and
|
||||
[required ACLs](/api/index.html#acls).
|
||||
[blocking queries](/api#blocking-queries) and
|
||||
[required ACLs](/api#acls).
|
||||
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------------- |
|
||||
| `NO` | `namespace:read-job` |
|
||||
| Blocking Queries | ACL Required |
|
||||
| ---------------- | -------------------- |
|
||||
| `NO` | `namespace:read-job` |
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -44,7 +44,7 @@ There are no parameters, but the request _body_ contains the entire job file.
|
|||
|
||||
### Sample Request
|
||||
|
||||
```text
|
||||
```shell
|
||||
$ curl \
|
||||
--request POST \
|
||||
--data @my-job.nomad \
|
||||
|
@ -52,6 +52,7 @@ $ curl \
|
|||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
"DriverConfigValidated": true,
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl bootstrap"
|
||||
sidebar_current: "docs-commands-acl-bootstrap"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl bootstrap'
|
||||
sidebar_title: bootstrap
|
||||
description: |
|
||||
The bootstrap command is used to create the initial ACL token.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `acl bootstrap` command requires no arguments.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl"
|
||||
sidebar_current: "docs-commands-acl"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl'
|
||||
sidebar_title: acl
|
||||
description: |
|
||||
The acl command is used to interact with ACL policies and tokens.
|
||||
---
|
||||
|
||||
|
@ -28,13 +28,13 @@ subcommands are available:
|
|||
- [`acl token self`][tokenself] - Get info on self ACL token
|
||||
- [`acl token update`][tokenupdate] - Update existing ACL token
|
||||
|
||||
[bootstrap]: /docs/commands/acl/bootstrap.html
|
||||
[policyapply]: /docs/commands/acl/policy-apply.html
|
||||
[policydelete]: /docs/commands/acl/policy-delete.html
|
||||
[policyinfo]: /docs/commands/acl/policy-info.html
|
||||
[policylist]: /docs/commands/acl/policy-list.html
|
||||
[tokencreate]: /docs/commands/acl/token-create.html
|
||||
[tokenupdate]: /docs/commands/acl/token-update.html
|
||||
[tokendelete]: /docs/commands/acl/token-delete.html
|
||||
[tokeninfo]: /docs/commands/acl/token-info.html
|
||||
[tokenself]: /docs/commands/acl/token-self.html
|
||||
[bootstrap]: /docs/commands/acl/bootstrap
|
||||
[policyapply]: /docs/commands/acl/policy-apply
|
||||
[policydelete]: /docs/commands/acl/policy-delete
|
||||
[policyinfo]: /docs/commands/acl/policy-info
|
||||
[policylist]: /docs/commands/acl/policy-list
|
||||
[tokencreate]: /docs/commands/acl/token-create
|
||||
[tokenupdate]: /docs/commands/acl/token-update
|
||||
[tokendelete]: /docs/commands/acl/token-delete
|
||||
[tokeninfo]: /docs/commands/acl/token-info
|
||||
[tokenself]: /docs/commands/acl/token-self
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl policy apply"
|
||||
sidebar_current: "docs-commands-acl-policy-apply"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl policy apply'
|
||||
sidebar_title: policy apply
|
||||
description: |
|
||||
The policy apply command is used to create or update ACL policies.
|
||||
---
|
||||
|
||||
|
@ -21,7 +21,7 @@ to file. The policy can be read from stdin by setting the path to "-".
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Apply Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl policy delete"
|
||||
sidebar_current: "docs-commands-acl-policy-delete"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl policy delete'
|
||||
sidebar_title: policy delete
|
||||
description: |
|
||||
The policy delete command is used to delete an existing ACL policies.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `acl policy delete` command requires the policy name as an argument.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl policy info"
|
||||
sidebar_current: "docs-commands-acl-policy-info"
|
||||
layout: docs
|
||||
page_title: 'Commands: acl policy info'
|
||||
sidebar_title: policy info
|
||||
description: >
|
||||
The policy info command is used to fetch information on an existing ACL
|
||||
policy.
|
||||
|
@ -22,7 +22,7 @@ The `acl policy info` command requires the policy name.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl policy list"
|
||||
sidebar_current: "docs-commands-acl-policy-list"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl policy list'
|
||||
sidebar_title: policy list
|
||||
description: |
|
||||
The policy list command is used to list available ACL policies.
|
||||
---
|
||||
|
||||
|
@ -18,7 +18,7 @@ nomad acl policy list
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## List Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token create"
|
||||
sidebar_current: "docs-commands-acl-token-create"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token create'
|
||||
sidebar_title: token create
|
||||
description: |
|
||||
The token create command is used to create new ACL tokens.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `acl token create` command requires no arguments.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Create Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token delete"
|
||||
sidebar_current: "docs-commands-acl-token-delete"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token delete'
|
||||
sidebar_title: token delete
|
||||
description: |
|
||||
The token create command is used to delete existing ACL tokens.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `acl token delete` command requires an existing token's AccessorID.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token info"
|
||||
sidebar_current: "docs-commands-acl-token-info"
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token info'
|
||||
sidebar_title: token info
|
||||
description: >
|
||||
The token info command is used to fetch information about an existing ACL token.
|
||||
The token info command is used to fetch information about an existing ACL
|
||||
token.
|
||||
---
|
||||
|
||||
# Command: acl token info
|
||||
|
@ -20,7 +21,7 @@ The `acl token info` command requires an existing token's AccessorID.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token list"
|
||||
sidebar_current: "docs-commands-acl-token-list"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token list'
|
||||
sidebar_title: token list
|
||||
description: |
|
||||
The token list command is used to list existing ACL tokens.
|
||||
---
|
||||
|
||||
|
@ -18,7 +18,7 @@ nomad acl token list
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## List Options
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token self"
|
||||
sidebar_current: "docs-commands-acl-token-self"
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token self'
|
||||
sidebar_title: token self
|
||||
description: >
|
||||
The token self command is used to fetch information about the currently set
|
||||
ACL token.
|
||||
|
@ -20,7 +20,7 @@ nomad acl token self
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Examples
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: acl token update"
|
||||
sidebar_current: "docs-commands-acl-token-update"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: acl token update'
|
||||
sidebar_title: token update
|
||||
description: |
|
||||
The token update command is used to update existing ACL tokens.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `acl token update` command requires an existing token's accessor ID.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Create Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: agent-info"
|
||||
sidebar_current: "docs-commands-agent-info"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: agent-info'
|
||||
sidebar_title: agent-info
|
||||
description: |
|
||||
Display information and status of a running agent.
|
||||
---
|
||||
|
||||
|
@ -20,17 +20,17 @@ nomad agent-info [options]
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Output
|
||||
|
||||
Depending on the agent queried, information from different subsystems is
|
||||
returned. These subsystems are described below:
|
||||
|
||||
- client - Status of the local Nomad client
|
||||
- nomad - Status of the local Nomad server
|
||||
- serf - Gossip protocol metrics and information
|
||||
- raft - Status information about the Raft consensus protocol
|
||||
- client - Status of the local Nomad client
|
||||
- nomad - Status of the local Nomad server
|
||||
- serf - Gossip protocol metrics and information
|
||||
- raft - Status information about the Raft consensus protocol
|
||||
- runtime - Various metrics from the runtime environment
|
||||
|
||||
## Examples
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: agent"
|
||||
sidebar_current: "docs-commands-_agent" # Use "_" to break prefix match
|
||||
description: >
|
||||
The agent command is the main entrypoint to running a Nomad client
|
||||
or server.
|
||||
layout: docs
|
||||
page_title: 'Commands: agent'
|
||||
sidebar_title: agent
|
||||
description: |
|
||||
The agent command is the main entrypoint to running a Nomad client or server.
|
||||
---
|
||||
|
||||
# Command: agent
|
||||
|
@ -24,7 +23,7 @@ A subset of the available Nomad agent configuration can optionally be passed in
|
|||
via CLI arguments. The `agent` command accepts the following arguments:
|
||||
|
||||
- `-alloc-dir=<path>`: Equivalent to the Client [alloc_dir] config
|
||||
option.
|
||||
option.
|
||||
|
||||
- `-acl-enabled`: Equivalent to the ACL [enabled] config option.
|
||||
|
||||
|
@ -112,7 +111,7 @@ via CLI arguments. The `agent` command accepts the following arguments:
|
|||
- `-meta=<key=value>`: Equivalent to the Client [meta] config option.
|
||||
|
||||
- `-network-interface=<interface>`: Equivalent to the Client
|
||||
[network_interface] config option.
|
||||
[network_interface] config option.
|
||||
|
||||
- `-network-speed=<MBits>`: Equivalent to the Client
|
||||
[network_speed] config option.
|
||||
|
@ -182,45 +181,45 @@ via CLI arguments. The `agent` command accepts the following arguments:
|
|||
- `vault-tls-server-name=<name>`: Used to set the SNI host when connecting to
|
||||
Vault over TLS.
|
||||
|
||||
[address]: /docs/configuration/consul.html#address
|
||||
[address]: /docs/configuration/consul#address
|
||||
[alloc_dir]: #alloc_dir
|
||||
[auth]: /docs/configuration/consul.html#auth
|
||||
[auto_advertise]: /docs/configuration/consul.html#auto_advertise
|
||||
[auth]: /docs/configuration/consul#auth
|
||||
[auto_advertise]: /docs/configuration/consul#auto_advertise
|
||||
[bind_addr]: #bind_addr
|
||||
[bootstrap_expect]: #bootstrap_expect
|
||||
[ca_file]: /docs/configuration/consul.html#ca_file
|
||||
[cert_file]: /docs/configuration/consul.html#cert_file
|
||||
[checks_use_advertise]: /docs/configuration/consul.html#checks_use_advertise
|
||||
[client_auto_join]: /docs/configuration/consul.html#client_auto_join
|
||||
[client_http_check_name]: /docs/configuration/consul.html#client_http_check_name
|
||||
[client_service_name]: /docs/configuration/consul.html#client_service_name
|
||||
[Configuration]: /docs/configuration/index.html
|
||||
[data_dir]: /docs/configuration/index.html#data_dir
|
||||
[ca_file]: /docs/configuration/consul#ca_file
|
||||
[cert_file]: /docs/configuration/consul#cert_file
|
||||
[checks_use_advertise]: /docs/configuration/consul#checks_use_advertise
|
||||
[client_auto_join]: /docs/configuration/consul#client_auto_join
|
||||
[client_http_check_name]: /docs/configuration/consul#client_http_check_name
|
||||
[client_service_name]: /docs/configuration/consul#client_service_name
|
||||
[configuration]: /docs/configuration
|
||||
[data_dir]: /docs/configuration#data_dir
|
||||
[datacenter]: #datacenter
|
||||
[enabled]: /docs/configuration/acl.html#enabled
|
||||
[Encryption Overview]: /guides/security/encryption.html
|
||||
[key_file]: /docs/configuration/consul.html#key_file
|
||||
[log_json]: /docs/configuration/index.html#log_json
|
||||
[log_level]: /docs/configuration/index.html#log_level
|
||||
[enabled]: /docs/configuration/acl#enabled
|
||||
[encryption overview]: /guides/security/encryption
|
||||
[key_file]: /docs/configuration/consul#key_file
|
||||
[log_json]: /docs/configuration#log_json
|
||||
[log_level]: /docs/configuration#log_level
|
||||
[meta]: #meta
|
||||
[name]: #name
|
||||
[network_interface]: #network_interface
|
||||
[network_speed]: #network_speed
|
||||
[node_class]: #node_class
|
||||
[Nomad Agent]: /guides/install/production/nomad-agent.html
|
||||
[plugin_dir]: /docs/configuration/index.html#plugin_dir
|
||||
[nomad agent]: /guides/install/production/nomad-agent
|
||||
[plugin_dir]: /docs/configuration#plugin_dir
|
||||
[region]: #region
|
||||
[rejoin_after_leave]: #rejoin_after_leave
|
||||
[replication_token]: /docs/configuration/acl.html#replication_token
|
||||
[replication_token]: /docs/configuration/acl#replication_token
|
||||
[retry_interval]: #retry_interval
|
||||
[retry_max]: #retry_max
|
||||
[server_auto_join]: /docs/configuration/consul.html#server_auto_join
|
||||
[server_http_check_name]: /docs/configuration/consul.html#server_http_check_name
|
||||
[server_rpc_check_name]: /docs/configuration/consul.html#server_rpc_check_name
|
||||
[server_serf_check_name]: /docs/configuration/consul.html#server_serf_check_name
|
||||
[server_service_name]: /docs/configuration/consul.html#server_service_name
|
||||
[server_auto_join]: /docs/configuration/consul#server_auto_join
|
||||
[server_http_check_name]: /docs/configuration/consul#server_http_check_name
|
||||
[server_rpc_check_name]: /docs/configuration/consul#server_rpc_check_name
|
||||
[server_serf_check_name]: /docs/configuration/consul#server_serf_check_name
|
||||
[server_service_name]: /docs/configuration/consul#server_service_name
|
||||
[servers]: #servers
|
||||
[ssl]: /docs/configuration/consul.html#ssl
|
||||
[ssl]: /docs/configuration/consul#ssl
|
||||
[state_dir]: #state_dir
|
||||
[token]: /docs/configuration/consul.html#token
|
||||
[verify_ssl]: /docs/configuration/consul.html#verify_ssl
|
||||
[token]: /docs/configuration/consul#token
|
||||
[verify_ssl]: /docs/configuration/consul#verify_ssl
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc exec"
|
||||
sidebar_current: "docs-commands-alloc-exec"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc exec'
|
||||
sidebar_title: exec
|
||||
description: |
|
||||
Runs a command in a container.
|
||||
---
|
||||
|
||||
|
@ -23,14 +23,14 @@ The nomad exec command can be use to run commands inside a running task/allocati
|
|||
Use cases are for inspecting container state, debugging a failed application
|
||||
without needing ssh access into the node that's running the allocation.
|
||||
|
||||
This command executes the command in the given task in the allocation. If the
|
||||
This command executes the command in the given task in the allocation. If the
|
||||
allocation is only running a single task, the task name can be omitted.
|
||||
Optionally, the `-job` option may be used in which case a random allocation from
|
||||
the given job will be chosen.
|
||||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Exec Options
|
||||
|
||||
|
@ -119,7 +119,7 @@ convenient than looking up an allocation ID to use.
|
|||
|
||||
## Disabling remote execution
|
||||
|
||||
`alloc exec` is enabled by default to aid with debugging. Operators can disable
|
||||
`alloc exec` is enabled by default to aid with debugging. Operators can disable
|
||||
the feature by setting [`disable_remote_exec` client config
|
||||
option][disable_remote_exec_flag] on all clients, or a subset of clients that
|
||||
run sensitive workloads.
|
||||
|
@ -136,4 +136,4 @@ a1827f93$
|
|||
```
|
||||
|
||||
[heredoc]: http://tldp.org/LDP/abs/html/here-docs.html
|
||||
[disable_remote_exec_flag]: /docs/configuration/client.html#disable_remote_exec
|
||||
[disable_remote_exec_flag]: /docs/configuration/client#disable_remote_exec
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc fs"
|
||||
sidebar_current: "docs-commands-alloc-fs"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc fs'
|
||||
sidebar_title: fs
|
||||
description: |
|
||||
Introspect an allocation directory on a Nomad client
|
||||
---
|
||||
|
||||
|
@ -33,12 +33,12 @@ nomad alloc fs [options] <allocation> <path>
|
|||
|
||||
This command accepts a single allocation ID (unless the `-job` flag is
|
||||
specified, in which case an allocation is chosen from the given job) and a path.
|
||||
The path is relative to the root of the allocation directory. The path is
|
||||
The path is relative to the root of the allocation directory. The path is
|
||||
optional and it defaults to `/` of the allocation directory.
|
||||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Fs Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc"
|
||||
sidebar_current: "docs-commands-alloc"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc'
|
||||
sidebar_title: alloc
|
||||
description: |
|
||||
The alloc command is used to interact with allocations.
|
||||
---
|
||||
|
||||
|
@ -25,10 +25,10 @@ subcommands are available:
|
|||
- [`alloc status`][status] - Display allocation status information and metadata
|
||||
- [`alloc stop`][stop] - Stop and reschedule a running allocation
|
||||
|
||||
[exec]: /docs/commands/alloc/exec.html "Run a command in a running allocation"
|
||||
[fs]: /docs/commands/alloc/fs.html "Inspect the contents of an allocation directory"
|
||||
[logs]: /docs/commands/alloc/logs.html "Streams the logs of a task"
|
||||
[restart]: /docs/commands/alloc/restart.html "Restart a running allocation or task"
|
||||
[signal]: /docs/commands/alloc/signal.html "Signal a running allocation"
|
||||
[status]: /docs/commands/alloc/status.html "Display allocation status information and metadata"
|
||||
[stop]: /docs/commands/alloc/stop.html "Stop and reschedule a running allocation"
|
||||
[exec]: /docs/commands/alloc/exec 'Run a command in a running allocation'
|
||||
[fs]: /docs/commands/alloc/fs 'Inspect the contents of an allocation directory'
|
||||
[logs]: /docs/commands/alloc/logs 'Streams the logs of a task'
|
||||
[restart]: /docs/commands/alloc/restart 'Restart a running allocation or task'
|
||||
[signal]: /docs/commands/alloc/signal 'Signal a running allocation'
|
||||
[status]: /docs/commands/alloc/status 'Display allocation status information and metadata'
|
||||
[stop]: /docs/commands/alloc/stop 'Stop and reschedule a running allocation'
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc logs"
|
||||
sidebar_current: "docs-commands-alloc-logs"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc logs'
|
||||
sidebar_title: logs
|
||||
description: |
|
||||
Stream the logs of a task.
|
||||
---
|
||||
|
||||
|
@ -25,7 +25,7 @@ the given job will be chosen.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Logs Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc restart"
|
||||
sidebar_current: "docs-commands-alloc-restart"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc restart'
|
||||
sidebar_title: restart
|
||||
description: |
|
||||
Restart a running allocation or task
|
||||
---
|
||||
|
||||
|
@ -23,7 +23,7 @@ is optional and if omitted every task in the allocation will be restarted.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Restart Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc signal"
|
||||
sidebar_current: "docs-commands-alloc-signal"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc signal'
|
||||
sidebar_title: signal
|
||||
description: |
|
||||
Signal a running allocation or task
|
||||
---
|
||||
|
||||
|
@ -23,7 +23,7 @@ is optional and if omitted every task in the allocation will be signaled.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Signal Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc status"
|
||||
sidebar_current: "docs-commands-alloc-status"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc status'
|
||||
sidebar_title: status
|
||||
description: |
|
||||
Display status and metadata about existing allocations and their tasks.
|
||||
---
|
||||
|
||||
|
@ -27,7 +27,7 @@ allocations and information will be displayed.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Alloc Status Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: alloc stop"
|
||||
sidebar_current: "docs-commands-alloc-stop"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: alloc stop'
|
||||
sidebar_title: stop
|
||||
description: |
|
||||
Stop and reschedule a running allocation
|
||||
---
|
||||
|
||||
|
@ -22,20 +22,20 @@ prefix to stop. If there is an exact match based on the provided alloc ID or
|
|||
prefix, then the alloc will be stopped and rescheduled. Otherwise, a list of
|
||||
matching allocs and information will be displayed.
|
||||
|
||||
Stop will issue a request to stop and reschedule the allocation. An interactive
|
||||
Stop will issue a request to stop and reschedule the allocation. An interactive
|
||||
monitoring session will display log lines as the allocation completes shutting
|
||||
down. It is safe to exit the monitor early with ctrl-c.
|
||||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Stop Options
|
||||
|
||||
- `-detach`: Return immediately instead of entering monitor mode. After the
|
||||
stop command is submitted, a new evaluation ID is printed to the
|
||||
screen, which can be used to examine the rescheduling evaluation using the
|
||||
[eval status] command.
|
||||
stop command is submitted, a new evaluation ID is printed to the
|
||||
screen, which can be used to examine the rescheduling evaluation using the
|
||||
[eval status] command.
|
||||
|
||||
- `-verbose`: Display verbose output.
|
||||
|
||||
|
@ -54,4 +54,4 @@ $ nomad alloc stop -detach eb17e557
|
|||
8a91f0f3-9d6b-ac83-479a-5aa186ab7795
|
||||
```
|
||||
|
||||
[eval status]: /docs/commands/eval-status.html
|
||||
[eval status]: /docs/commands/eval-status
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: deployment fail"
|
||||
sidebar_current: "docs-commands-deployment-fail"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: deployment fail'
|
||||
sidebar_title: fail
|
||||
description: |
|
||||
The deployment fail command is used to manually fail a deployment.
|
||||
---
|
||||
|
||||
|
@ -24,7 +24,7 @@ prefix.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Fail Options
|
||||
|
||||
|
@ -60,4 +60,4 @@ Task Group Desired Placed Healthy Unhealthy
|
|||
cache 3 2 1 0
|
||||
```
|
||||
|
||||
[eval status]: /docs/commands/eval-status.html
|
||||
[eval status]: /docs/commands/eval-status
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: deployment"
|
||||
sidebar_current: "docs-commands-deployment"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: deployment'
|
||||
sidebar_title: deployment
|
||||
description: |
|
||||
The deployment command is used to interact with deployments.
|
||||
---
|
||||
|
||||
|
@ -24,9 +24,9 @@ subcommands are available:
|
|||
- [`deployment resume`][resume] - Resume a paused deployment
|
||||
- [`deployment status`][status] - Display the status of a deployment
|
||||
|
||||
[fail]: /docs/commands/deployment/fail.html "Manually fail a deployment"
|
||||
[list]: /docs/commands/deployment/list.html "List all deployments"
|
||||
[pause]: /docs/commands/deployment/pause.html "Pause a deployment"
|
||||
[promote]: /docs/commands/deployment/promote.html "Promote canaries in a deployment"
|
||||
[resume]: /docs/commands/deployment/resume.html "Resume a paused deployment"
|
||||
[status]: /docs/commands/deployment/status.html "Display the status of a deployment"
|
||||
[fail]: /docs/commands/deployment/fail 'Manually fail a deployment'
|
||||
[list]: /docs/commands/deployment/list 'List all deployments'
|
||||
[pause]: /docs/commands/deployment/pause 'Pause a deployment'
|
||||
[promote]: /docs/commands/deployment/promote 'Promote canaries in a deployment'
|
||||
[resume]: /docs/commands/deployment/resume 'Resume a paused deployment'
|
||||
[status]: /docs/commands/deployment/status 'Display the status of a deployment'
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: deployment list"
|
||||
sidebar_current: "docs-commands-deployment-list"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: deployment list'
|
||||
sidebar_title: list
|
||||
description: |
|
||||
The deployment list command is used to list deployments.
|
||||
---
|
||||
|
||||
|
@ -20,7 +20,7 @@ The `deployment list` command requires no arguments.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## List Options
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: deployment pause"
|
||||
sidebar_current: "docs-commands-deployment-pause"
|
||||
layout: docs
|
||||
page_title: 'Commands: deployment pause'
|
||||
sidebar_title: pause
|
||||
description: >
|
||||
The deployment pause command is used to pause a deployment and disallow new
|
||||
placements.
|
||||
|
@ -24,7 +24,7 @@ prefix.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Pause Options
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
layout: "docs"
|
||||
page_title: "Commands: deployment promote"
|
||||
sidebar_current: "docs-commands-deployment-promote"
|
||||
description: >
|
||||
layout: docs
|
||||
page_title: 'Commands: deployment promote'
|
||||
sidebar_title: promote
|
||||
description: |
|
||||
The deployment promote command is used to promote canaries in a deployment.
|
||||
---
|
||||
|
||||
|
@ -30,7 +30,7 @@ select particular groups to promote.
|
|||
|
||||
## General Options
|
||||
|
||||
<%= partial "docs/commands/_general_options" %>
|
||||
@include 'general_options.mdx'
|
||||
|
||||
## Promote Options
|
||||
|
||||
|
@ -220,5 +220,5 @@ ee8f972e 6240eed6 web 0 run running 07/25/17 18:37:08 UT
|
|||
0ee7800c 6240eed6 cache 0 stop complete 07/25/17 18:37:08 UTC
|
||||
```
|
||||
|
||||
[`job revert`]: /docs/commands/job/revert.html
|
||||
[eval status]: /docs/commands/eval-status.html
|
||||
[`job revert`]: /docs/commands/job/revert
|
||||
[eval status]: /docs/commands/eval-status
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue