Update the CLI docs to display whether a root rotation is in progress

when viewing system info, and TLS info when displaying node info.

Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
Ying Li 2017-05-10 13:32:47 -07:00
parent f4349a77fd
commit 16c4b33774
3 changed files with 31 additions and 8 deletions

View File

@ -145,6 +145,7 @@ Swarm: active
Heartbeat Period: 5 seconds Heartbeat Period: 5 seconds
CA Configuration: CA Configuration:
Expiry Duration: 3 months Expiry Duration: 3 months
Root Rotation In Progress: false
Node Address: 172.16.66.128 172.16.66.129 Node Address: 172.16.66.128 172.16.66.129
Manager Addresses: Manager Addresses:
172.16.66.128:2477 172.16.66.128:2477

View File

@ -47,8 +47,8 @@ $ docker node inspect swarm-manager
"Version": { "Version": {
"Index": 10 "Index": 10
}, },
"CreatedAt": "2016-06-16T22:52:44.9910662Z", "CreatedAt": "2017-05-16T22:52:44.9910662Z",
"UpdatedAt": "2016-06-16T22:52:45.230878043Z", "UpdatedAt": "2017-05-16T22:52:45.230878043Z",
"Spec": { "Spec": {
"Role": "manager", "Role": "manager",
"Availability": "active" "Availability": "active"
@ -64,7 +64,7 @@ $ docker node inspect swarm-manager
"MemoryBytes": 1039843328 "MemoryBytes": 1039843328
}, },
"Engine": { "Engine": {
"EngineVersion": "1.12.0", "EngineVersion": "17.06.0-ce",
"Plugins": [ "Plugins": [
{ {
"Type": "Volume", "Type": "Volume",
@ -91,6 +91,11 @@ $ docker node inspect swarm-manager
"Name": "overlay" "Name": "overlay"
} }
] ]
},
"TLSInfo": {
"TrustRoot": "-----BEGIN CERTIFICATE-----\nMIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw\nEzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy\nNDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH\nA0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g\nAh8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB\nAf8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO\nPQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3\nzONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==\n-----END CERTIFICATE-----\n",
"CertIssuerSubject": "MBMxETAPBgNVBAMTCHN3YXJtLWNh",
"CertIssuerPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ=="
} }
}, },
"Status": { "Status": {
@ -116,7 +121,7 @@ false
$ docker node inspect --pretty self $ docker node inspect --pretty self
ID: e216jshn25ckzbvmwlnh5jr3g ID: e216jshn25ckzbvmwlnh5jr3g
Hostname: swarm-manager Hostname: swarm-manager
Joined at: 2016-06-16 22:52:44.9910662 +0000 utc Joined at: 2017-05-16 22:52:44.9910662 +0000 utc
Status: Status:
State: Ready State: Ready
Availability: Active Availability: Active
@ -134,7 +139,22 @@ Resources:
Plugins: Plugins:
Network: overlay, bridge, null, host, overlay Network: overlay, bridge, null, host, overlay
Volume: local Volume: local
Engine Version: 1.12.0 Engine Version: 17.06.0-ce
TLS Info:
TrustRoot:
-----BEGIN CERTIFICATE-----
MIIBazCCARCgAwIBAgIUOzgqU4tA2q5Yv1HnkzhSIwGyIBswCgYIKoZIzj0EAwIw
EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNTAyMDAyNDAwWhcNMzcwNDI3MDAy
NDAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
A0IABMbiAmET+HZyve35ujrnL2kOLBEQhFDZ5MhxAuYs96n796sFlfxTxC1lM/2g
Ah8DI34pm3JmHgZxeBPKUURJHKWjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
Af8EBTADAQH/MB0GA1UdDgQWBBS3sjTJOcXdkls6WSY2rTx1KIJueTAKBggqhkjO
PQQDAgNJADBGAiEAoeVWkaXgSUAucQmZ3Yhmx22N/cq1EPBgYHOBZmHt0NkCIQC3
zONcJ/+WA21OXtb+vcijpUOXtNjyHfcox0N8wsLDqQ==
-----END CERTIFICATE-----
Issuer Public Key: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExuICYRP4dnK97fm6OucvaQ4sERCEUNnkyHEC5iz3qfv3qwWV/FPELWUz/aACHwMjfimbcmYeBnF4E8pRREkcpQ==
Issuer Subject: MBMxETAPBgNVBAMTCHN3YXJtLWNh
``` ```
## Related commands ## Related commands

View File

@ -145,17 +145,19 @@ Placeholder | Description
`.Status` | Node status `.Status` | Node status
`.Availability` | Node availability ("active", "pause", or "drain") `.Availability` | Node availability ("active", "pause", or "drain")
`.ManagerStatus` | Manager status of the node `.ManagerStatus` | Manager status of the node
`.TLSStatus` | TLS status of the node ("Ready", or "Needs Rotation" has TLS certificate signed by an old CA)
When using the `--format` option, the `node ls` command will either When using the `--format` option, the `node ls` command will either
output the data exactly as the template declares or, when using the output the data exactly as the template declares or, when using the
`table` directive, includes column headers as well. `table` directive, includes column headers as well.
The following example uses a template without headers and outputs the The following example uses a template without headers and outputs the
`ID` and `Hostname` entries separated by a colon for all nodes: `ID`, `Hostname`, and `TLS Status` entries separated by a colon for all nodes:
```bash ```bash
$ docker node ls --format "{{.ID}}: {{.Hostname}}" $ docker node ls --format "{{.ID}}: {{.Hostname}} {{.TLSStatus}}"
e216jshn25ckzbvmwlnh5jr3g: swarm-manager1 e216jshn25ckzbvmwlnh5jr3g: swarm-manager1 Ready
35o6tiywb700jesrt3dmllaza: swarm-worker1 Needs Rotation
`` ``