mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 10:55:42 +03:00
Make example service name make sense
Switch from global-redis-check for the example job's service name to redis-cache. The former name is really confusing and someone finally called us out on it: https://groups.google.com/d/msg/nomad-tool/3RTh6CyYkWk/vEe_Sj7lAAAJ Also specifically mention that the `service.name` parameter is what is advertised in Consul.
This commit is contained in:
@@ -258,7 +258,7 @@ func TestJobs_Canonicalize(t *testing.T) {
|
||||
},
|
||||
Services: []*Service{
|
||||
{
|
||||
Name: "global-redis-check",
|
||||
Name: "redis-cache",
|
||||
Tags: []string{"global", "cache"},
|
||||
PortLabel: "db",
|
||||
Checks: []ServiceCheck{
|
||||
@@ -368,7 +368,7 @@ func TestJobs_Canonicalize(t *testing.T) {
|
||||
},
|
||||
Services: []*Service{
|
||||
{
|
||||
Name: "global-redis-check",
|
||||
Name: "redis-cache",
|
||||
Tags: []string{"global", "cache"},
|
||||
PortLabel: "db",
|
||||
AddressMode: "auto",
|
||||
|
||||
@@ -310,7 +310,7 @@ job "example" {
|
||||
# https://www.nomadproject.io/docs/job-specification/service.html
|
||||
#
|
||||
service {
|
||||
name = "global-redis-check"
|
||||
name = "redis-cache"
|
||||
tags = ["global", "cache"]
|
||||
port = "db"
|
||||
check {
|
||||
|
||||
@@ -160,8 +160,8 @@ function generateDiff(version) {
|
||||
{
|
||||
Annotations: null,
|
||||
Name: 'Name',
|
||||
New: 'global-redis-check',
|
||||
Old: 'global-redis-check',
|
||||
New: 'redis-cache',
|
||||
Old: 'redis-cache',
|
||||
Type: 'None',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -224,7 +224,7 @@ $ curl \
|
||||
"Env": null,
|
||||
"Services": [
|
||||
{
|
||||
"Name": "global-redis-check",
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"Tags": [
|
||||
"global",
|
||||
|
||||
@@ -141,7 +141,7 @@ The table below shows this endpoint's support for
|
||||
},
|
||||
"Services": [{
|
||||
"Id": "",
|
||||
"Name": "global-redis-check",
|
||||
"Name": "redis-cache",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
@@ -519,7 +519,7 @@ $ curl \
|
||||
"Env": null,
|
||||
"Services": [
|
||||
{
|
||||
"Name": "global-redis-check",
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"Tags": [
|
||||
"global",
|
||||
|
||||
@@ -45,7 +45,7 @@ Below is the JSON representation of the job outputted by `$ nomad init`:
|
||||
},
|
||||
"Services": [{
|
||||
"Id": "",
|
||||
"Name": "global-redis-check",
|
||||
"Name": "redis-cache",
|
||||
"Tags": [
|
||||
"global",
|
||||
"cache"
|
||||
|
||||
@@ -251,7 +251,7 @@ $ curl \
|
||||
"Env": null,
|
||||
"Services": [
|
||||
{
|
||||
"Name": "global-redis-check",
|
||||
"Name": "redis-cache",
|
||||
"PortLabel": "db",
|
||||
"AddressMode": "auto",
|
||||
"Tags": [
|
||||
|
||||
@@ -74,12 +74,13 @@ does not automatically enable service discovery.
|
||||
define multiple checks for the service. At this time, Nomad supports the
|
||||
`script`<sup><small>1</small></sup>, `http` and `tcp` checks.
|
||||
|
||||
- `name` `(string: "<job>-<group>-<task>")` - Specifies the name of this
|
||||
service. If not supplied, this will default to the name of the job, group, and
|
||||
task concatenated together with a dash, like `"docs-example-server"`. Each
|
||||
service must have a unique name within the cluster. 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
|
||||
- `name` `(string: "<job>-<group>-<task>")` - Specifies the name this service
|
||||
will be advertised as in Consul. If not supplied, this will default to the
|
||||
name of the job, group, and task concatenated together with a dash, like
|
||||
`"docs-example-server"`. Each service must have a unique name within the
|
||||
cluster. 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.
|
||||
|
||||
In addition to the standard [Nomad interpolation][interpolation], the
|
||||
|
||||
Reference in New Issue
Block a user