mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix service and tasks API documentation
The documentation contained some outdated information on these endpoints. This change fixes those parts of the documentation Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
94bc2b1bc0
commit
d69409fd43
2 changed files with 221 additions and 285 deletions
|
@ -4404,7 +4404,8 @@ List services
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
|
@ -4414,26 +4415,36 @@ List services
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UpdateConfig": {
|
"UpdateConfig": {
|
||||||
"Parallelism": 1
|
"Parallelism": 1,
|
||||||
|
"FailureAction": "pause"
|
||||||
},
|
},
|
||||||
"EndpointSpec": {
|
"EndpointSpec": {
|
||||||
"Mode": "VIP",
|
"Mode": "vip",
|
||||||
"Ingress": "PUBLICPORT",
|
"Ports": [
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Endpoint": {
|
"Endpoint": {
|
||||||
"Spec": {},
|
"Spec": {
|
||||||
"ExposedPorts": [
|
"Mode": "vip",
|
||||||
|
"Ports": [
|
||||||
|
{
|
||||||
|
"Protocol": "tcp",
|
||||||
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Ports": [
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379,
|
"TargetPort": 6379,
|
||||||
"PublicPort": 30000
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VirtualIPs": [
|
"VirtualIPs": [
|
||||||
|
@ -4619,13 +4630,13 @@ image](#create-an-image) section for more details.
|
||||||
- **FailureAction** - Action to take if an updated task fails to run, or stops running during the
|
- **FailureAction** - Action to take if an updated task fails to run, or stops running during the
|
||||||
update. Values are `continue` and `pause`.
|
update. Values are `continue` and `pause`.
|
||||||
- **Networks** – Array of network names or IDs to attach the service to.
|
- **Networks** – Array of network names or IDs to attach the service to.
|
||||||
- **Endpoint** – Properties that can be configured to access and load balance a service.
|
- **EndpointSpec** – Properties that can be configured to access and load balance a service.
|
||||||
- **Spec** –
|
- **Mode** – The mode of resolution to use for internal load balancing
|
||||||
- **Mode** – The mode of resolution to use for internal load balancing
|
between tasks (`vip` or `dnsrr`). Defaults to `vip` if not provided.
|
||||||
between tasks (`vip` or `dnsrr`).
|
- **Ports** – List of exposed ports that this service is accessible on from
|
||||||
- **Ports** – Exposed ports that this service is accessible on from the outside, in the form
|
the outside, in the form of:
|
||||||
of: `"Ports": { "<port>/<tcp|udp>: {}" }`
|
`{"Protocol": <"tcp"|"udp">, "PublishedPort": <port>, "TargetPort": <port>}`.
|
||||||
- **VirtualIPs**
|
Ports can only be provided if `vip` resolution mode is used.
|
||||||
|
|
||||||
**Request Headers**:
|
**Request Headers**:
|
||||||
|
|
||||||
|
@ -4678,7 +4689,7 @@ Return information on the service `id`.
|
||||||
"UpdatedAt": "2016-06-07T21:10:20.276301259Z",
|
"UpdatedAt": "2016-06-07T21:10:20.276301259Z",
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"Name": "redis",
|
"Name": "redis",
|
||||||
"Task": {
|
"TaskTemplate": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
},
|
},
|
||||||
|
@ -4687,7 +4698,8 @@ Return information on the service `id`.
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
|
@ -4697,26 +4709,36 @@ Return information on the service `id`.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UpdateConfig": {
|
"UpdateConfig": {
|
||||||
"Parallelism": 1
|
"Parallelism": 1,
|
||||||
|
"FailureAction": "pause"
|
||||||
},
|
},
|
||||||
"EndpointSpec": {
|
"EndpointSpec": {
|
||||||
"Mode": "VIP",
|
"Mode": "vip",
|
||||||
"Ingress": "PUBLICPORT",
|
"Ports": [
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Endpoint": {
|
"Endpoint": {
|
||||||
"Spec": {},
|
"Spec": {
|
||||||
"ExposedPorts": [
|
"Mode": "vip",
|
||||||
|
"Ports": [
|
||||||
|
{
|
||||||
|
"Protocol": "tcp",
|
||||||
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Ports": [
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379,
|
"TargetPort": 6379,
|
||||||
"PublicPort": 30001
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VirtualIPs": [
|
"VirtualIPs": [
|
||||||
|
@ -4830,7 +4852,7 @@ image](#create-an-image) section for more details.
|
||||||
as part of this service.
|
as part of this service.
|
||||||
- **Condition** – Condition for restart (`none`, `on-failure`, or `any`).
|
- **Condition** – Condition for restart (`none`, `on-failure`, or `any`).
|
||||||
- **Delay** – Delay between restart attempts.
|
- **Delay** – Delay between restart attempts.
|
||||||
- **Attempts** – Maximum attempts to restart a given container before giving up (default value
|
- **MaxAttempts** – Maximum attempts to restart a given container before giving up (default value
|
||||||
is 0, which is ignored).
|
is 0, which is ignored).
|
||||||
- **Window** – Windows is the time window used to evaluate the restart policy (default value is
|
- **Window** – Windows is the time window used to evaluate the restart policy (default value is
|
||||||
0, which is unbounded).
|
0, which is unbounded).
|
||||||
|
@ -4841,13 +4863,13 @@ image](#create-an-image) section for more details.
|
||||||
parallelism).
|
parallelism).
|
||||||
- **Delay** – Amount of time between updates.
|
- **Delay** – Amount of time between updates.
|
||||||
- **Networks** – Array of network names or IDs to attach the service to.
|
- **Networks** – Array of network names or IDs to attach the service to.
|
||||||
- **Endpoint** – Properties that can be configured to access and load balance a service.
|
- **EndpointSpec** – Properties that can be configured to access and load balance a service.
|
||||||
- **Spec** –
|
- **Mode** – The mode of resolution to use for internal load balancing
|
||||||
- **Mode** – The mode of resolution to use for internal load balancing
|
between tasks (`vip` or `dnsrr`). Defaults to `vip` if not provided.
|
||||||
between tasks (`vip` or `dnsrr`).
|
- **Ports** – List of exposed ports that this service is accessible on from
|
||||||
- **Ports** – Exposed ports that this service is accessible on from the outside, in the form
|
the outside, in the form of:
|
||||||
of: `"Ports": { "<port>/<tcp|udp>: {}" }`
|
`{"Protocol": <"tcp"|"udp">, "PublishedPort": <port>, "TargetPort": <port>}`.
|
||||||
- **VirtualIPs**
|
Ports can only be provided if `vip` resolution mode is used.
|
||||||
|
|
||||||
**Query parameters**:
|
**Query parameters**:
|
||||||
|
|
||||||
|
@ -4866,7 +4888,7 @@ image](#create-an-image) section for more details.
|
||||||
- **200** – no error
|
- **200** – no error
|
||||||
- **404** – no such service
|
- **404** – no such service
|
||||||
- **500** – server error
|
- **500** – server error
|
||||||
|
|
||||||
## 3.10 Tasks
|
## 3.10 Tasks
|
||||||
|
|
||||||
**Note**: Task operations require the engine to be part of a swarm.
|
**Note**: Task operations require the engine to be part of a swarm.
|
||||||
|
@ -4892,7 +4914,6 @@ List tasks
|
||||||
},
|
},
|
||||||
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
||||||
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
||||||
"Name": "hopeful_cori",
|
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
|
@ -4902,21 +4923,24 @@ List tasks
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
||||||
"State": "FAILED",
|
"State": "running",
|
||||||
"Message": "execution failed",
|
"Message": "started",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
|
||||||
|
"PID": 677
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "running",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -4932,12 +4956,12 @@ List tasks
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -4948,14 +4972,14 @@ List tasks
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -4965,26 +4989,6 @@ List tasks
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ID": "1yljwbmlr8er2waf8orvqpwms",
|
"ID": "1yljwbmlr8er2waf8orvqpwms",
|
||||||
|
@ -5003,21 +5007,23 @@ List tasks
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:30.202183143Z",
|
"Timestamp": "2016-06-07T21:07:30.202183143Z",
|
||||||
"State": "FAILED",
|
"State": "shutdown",
|
||||||
"Message": "execution failed",
|
"Message": "shutdown",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "shutdown",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -5033,12 +5039,12 @@ List tasks
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5049,14 +5055,14 @@ List tasks
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5065,27 +5071,7 @@ List tasks
|
||||||
"10.255.0.5/16"
|
"10.255.0.5/16"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -5125,7 +5111,6 @@ Get details on a task
|
||||||
},
|
},
|
||||||
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
||||||
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
||||||
"Name": "hopeful_cori",
|
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
|
@ -5135,21 +5120,24 @@ Get details on a task
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
||||||
"State": "FAILED",
|
"State": "running",
|
||||||
"Message": "execution failed",
|
"Message": "started",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
|
||||||
|
"PID": 677
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "running",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -5165,12 +5153,12 @@ Get details on a task
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5181,14 +5169,14 @@ Get details on a task
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5197,27 +5185,7 @@ Get details on a task
|
||||||
"10.255.0.10/16"
|
"10.255.0.10/16"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
|
@ -4455,7 +4455,8 @@ List services
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
|
@ -4465,26 +4466,36 @@ List services
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UpdateConfig": {
|
"UpdateConfig": {
|
||||||
"Parallelism": 1
|
"Parallelism": 1,
|
||||||
|
"FailureAction": "pause"
|
||||||
},
|
},
|
||||||
"EndpointSpec": {
|
"EndpointSpec": {
|
||||||
"Mode": "VIP",
|
"Mode": "vip",
|
||||||
"Ingress": "PUBLICPORT",
|
"Ports": [
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Endpoint": {
|
"Endpoint": {
|
||||||
"Spec": {},
|
"Spec": {
|
||||||
"ExposedPorts": [
|
"Mode": "vip",
|
||||||
|
"Ports": [
|
||||||
|
{
|
||||||
|
"Protocol": "tcp",
|
||||||
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Ports": [
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379,
|
"TargetPort": 6379,
|
||||||
"PublicPort": 30000
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VirtualIPs": [
|
"VirtualIPs": [
|
||||||
|
@ -4670,13 +4681,13 @@ image](#create-an-image) section for more details.
|
||||||
- **FailureAction** - Action to take if an updated task fails to run, or stops running during the
|
- **FailureAction** - Action to take if an updated task fails to run, or stops running during the
|
||||||
update. Values are `continue` and `pause`.
|
update. Values are `continue` and `pause`.
|
||||||
- **Networks** – Array of network names or IDs to attach the service to.
|
- **Networks** – Array of network names or IDs to attach the service to.
|
||||||
- **Endpoint** – Properties that can be configured to access and load balance a service.
|
- **EndpointSpec** – Properties that can be configured to access and load balance a service.
|
||||||
- **Spec** –
|
- **Mode** – The mode of resolution to use for internal load balancing
|
||||||
- **Mode** – The mode of resolution to use for internal load balancing
|
between tasks (`vip` or `dnsrr`). Defaults to `vip` if not provided.
|
||||||
between tasks (`vip` or `dnsrr`).
|
- **Ports** – List of exposed ports that this service is accessible on from
|
||||||
- **Ports** – Exposed ports that this service is accessible on from the outside, in the form
|
the outside, in the form of:
|
||||||
of: `"Ports": { "<port>/<tcp|udp>: {}" }`
|
`{"Protocol": <"tcp"|"udp">, "PublishedPort": <port>, "TargetPort": <port>}`.
|
||||||
- **VirtualIPs**
|
Ports can only be provided if `vip` resolution mode is used.
|
||||||
|
|
||||||
**Request Headers**:
|
**Request Headers**:
|
||||||
|
|
||||||
|
@ -4729,7 +4740,7 @@ Return information on the service `id`.
|
||||||
"UpdatedAt": "2016-06-07T21:10:20.276301259Z",
|
"UpdatedAt": "2016-06-07T21:10:20.276301259Z",
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"Name": "redis",
|
"Name": "redis",
|
||||||
"Task": {
|
"TaskTemplate": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
},
|
},
|
||||||
|
@ -4738,7 +4749,8 @@ Return information on the service `id`.
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
|
@ -4748,26 +4760,36 @@ Return information on the service `id`.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"UpdateConfig": {
|
"UpdateConfig": {
|
||||||
"Parallelism": 1
|
"Parallelism": 1,
|
||||||
|
"FailureAction": "pause"
|
||||||
},
|
},
|
||||||
"EndpointSpec": {
|
"EndpointSpec": {
|
||||||
"Mode": "VIP",
|
"Mode": "vip",
|
||||||
"Ingress": "PUBLICPORT",
|
"Ports": [
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Endpoint": {
|
"Endpoint": {
|
||||||
"Spec": {},
|
"Spec": {
|
||||||
"ExposedPorts": [
|
"Mode": "vip",
|
||||||
|
"Ports": [
|
||||||
|
{
|
||||||
|
"Protocol": "tcp",
|
||||||
|
"TargetPort": 6379,
|
||||||
|
"PublishedPort": 30001
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Ports": [
|
||||||
{
|
{
|
||||||
"Protocol": "tcp",
|
"Protocol": "tcp",
|
||||||
"Port": 6379,
|
"TargetPort": 6379,
|
||||||
"PublicPort": 30001
|
"PublishedPort": 30001
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"VirtualIPs": [
|
"VirtualIPs": [
|
||||||
|
@ -4881,7 +4903,7 @@ image](#create-an-image) section for more details.
|
||||||
as part of this service.
|
as part of this service.
|
||||||
- **Condition** – Condition for restart (`none`, `on-failure`, or `any`).
|
- **Condition** – Condition for restart (`none`, `on-failure`, or `any`).
|
||||||
- **Delay** – Delay between restart attempts.
|
- **Delay** – Delay between restart attempts.
|
||||||
- **Attempts** – Maximum attempts to restart a given container before giving up (default value
|
- **MaxAttempts** – Maximum attempts to restart a given container before giving up (default value
|
||||||
is 0, which is ignored).
|
is 0, which is ignored).
|
||||||
- **Window** – Windows is the time window used to evaluate the restart policy (default value is
|
- **Window** – Windows is the time window used to evaluate the restart policy (default value is
|
||||||
0, which is unbounded).
|
0, which is unbounded).
|
||||||
|
@ -4892,13 +4914,13 @@ image](#create-an-image) section for more details.
|
||||||
parallelism).
|
parallelism).
|
||||||
- **Delay** – Amount of time between updates.
|
- **Delay** – Amount of time between updates.
|
||||||
- **Networks** – Array of network names or IDs to attach the service to.
|
- **Networks** – Array of network names or IDs to attach the service to.
|
||||||
- **Endpoint** – Properties that can be configured to access and load balance a service.
|
- **EndpointSpec** – Properties that can be configured to access and load balance a service.
|
||||||
- **Spec** –
|
- **Mode** – The mode of resolution to use for internal load balancing
|
||||||
- **Mode** – The mode of resolution to use for internal load balancing
|
between tasks (`vip` or `dnsrr`). Defaults to `vip` if not provided.
|
||||||
between tasks (`vip` or `dnsrr`).
|
- **Ports** – List of exposed ports that this service is accessible on from
|
||||||
- **Ports** – Exposed ports that this service is accessible on from the outside, in the form
|
the outside, in the form of:
|
||||||
of: `"Ports": { "<port>/<tcp|udp>: {}" }`
|
`{"Protocol": <"tcp"|"udp">, "PublishedPort": <port>, "TargetPort": <port>}`.
|
||||||
- **VirtualIPs**
|
Ports can only be provided if `vip` resolution mode is used.
|
||||||
|
|
||||||
**Query parameters**:
|
**Query parameters**:
|
||||||
|
|
||||||
|
@ -4943,7 +4965,6 @@ List tasks
|
||||||
},
|
},
|
||||||
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
||||||
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
||||||
"Name": "hopeful_cori",
|
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
|
@ -4953,21 +4974,24 @@ List tasks
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
||||||
"State": "FAILED",
|
"State": "running",
|
||||||
"Message": "execution failed",
|
"Message": "started",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
|
||||||
|
"PID": 677
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "running",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -4983,12 +5007,12 @@ List tasks
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -4999,14 +5023,14 @@ List tasks
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5016,26 +5040,6 @@ List tasks
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ID": "1yljwbmlr8er2waf8orvqpwms",
|
"ID": "1yljwbmlr8er2waf8orvqpwms",
|
||||||
|
@ -5054,21 +5058,23 @@ List tasks
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:30.202183143Z",
|
"Timestamp": "2016-06-07T21:07:30.202183143Z",
|
||||||
"State": "FAILED",
|
"State": "shutdown",
|
||||||
"Message": "execution failed",
|
"Message": "shutdown",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "shutdown",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -5084,12 +5090,12 @@ List tasks
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5100,14 +5106,14 @@ List tasks
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5116,27 +5122,7 @@ List tasks
|
||||||
"10.255.0.5/16"
|
"10.255.0.5/16"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -5176,7 +5162,6 @@ Get details on a task
|
||||||
},
|
},
|
||||||
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
"CreatedAt": "2016-06-07T21:07:31.171892745Z",
|
||||||
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
"UpdatedAt": "2016-06-07T21:07:31.376370513Z",
|
||||||
"Name": "hopeful_cori",
|
|
||||||
"Spec": {
|
"Spec": {
|
||||||
"ContainerSpec": {
|
"ContainerSpec": {
|
||||||
"Image": "redis"
|
"Image": "redis"
|
||||||
|
@ -5186,21 +5171,24 @@ Get details on a task
|
||||||
"Reservations": {}
|
"Reservations": {}
|
||||||
},
|
},
|
||||||
"RestartPolicy": {
|
"RestartPolicy": {
|
||||||
"Condition": "ANY"
|
"Condition": "any",
|
||||||
|
"MaxAttempts": 0
|
||||||
},
|
},
|
||||||
"Placement": {}
|
"Placement": {}
|
||||||
},
|
},
|
||||||
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
"ServiceID": "9mnpnzenvg8p8tdbtq4wvbkcz",
|
||||||
"Instance": 1,
|
"Slot": 1,
|
||||||
"NodeID": "24ifsmvkjbyhk",
|
"NodeID": "60gvrl6tm78dmak4yl7srz94v",
|
||||||
"ServiceAnnotations": {},
|
|
||||||
"Status": {
|
"Status": {
|
||||||
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
"Timestamp": "2016-06-07T21:07:31.290032978Z",
|
||||||
"State": "FAILED",
|
"State": "running",
|
||||||
"Message": "execution failed",
|
"Message": "started",
|
||||||
"ContainerStatus": {}
|
"ContainerStatus": {
|
||||||
|
"ContainerID": "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035",
|
||||||
|
"PID": 677
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"DesiredState": "SHUTDOWN",
|
"DesiredState": "running",
|
||||||
"NetworksAttachments": [
|
"NetworksAttachments": [
|
||||||
{
|
{
|
||||||
"Network": {
|
"Network": {
|
||||||
|
@ -5216,12 +5204,12 @@ Get details on a task
|
||||||
"com.docker.swarm.internal": "true"
|
"com.docker.swarm.internal": "true"
|
||||||
},
|
},
|
||||||
"DriverConfiguration": {},
|
"DriverConfiguration": {},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {},
|
"Driver": {},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5232,14 +5220,14 @@ Get details on a task
|
||||||
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
"com.docker.network.driver.overlay.vxlanid_list": "256"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IPAM": {
|
"IPAMOptions": {
|
||||||
"Driver": {
|
"Driver": {
|
||||||
"Name": "default"
|
"Name": "default"
|
||||||
},
|
},
|
||||||
"Configs": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Family": "UNKNOWN",
|
"Subnet": "10.255.0.0/16",
|
||||||
"Subnet": "10.255.0.0/16"
|
"Gateway": "10.255.0.1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5248,27 +5236,7 @@ Get details on a task
|
||||||
"10.255.0.10/16"
|
"10.255.0.10/16"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"Endpoint": {
|
|
||||||
"Spec": {},
|
|
||||||
"ExposedPorts": [
|
|
||||||
{
|
|
||||||
"Protocol": "tcp",
|
|
||||||
"Port": 6379,
|
|
||||||
"PublicPort": 30000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"VirtualIPs": [
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.2/16"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NetworkID": "4qvuz4ko70xaltuqbt8956gd1",
|
|
||||||
"Addr": "10.255.0.3/16"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
**Status codes**:
|
**Status codes**:
|
||||||
|
|
Loading…
Add table
Reference in a new issue