1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00
Files
docs/support.md
Daniel Hiltgen 81f0fd6d80 Revamp support dump to be synchronous
It turns out that our support dump logic is *really* fast and compact.
Even on a large node (hundreds of containers and thousands of images)
it runs in ~10 seconds and weighs in at a few hundred K.  Since we're
running all the dumps in parallel, there's really no need for the added
complexity of saving them to a DB.

This change revamps and simplifies the support dump API.  Now you simply
POST to the API endpoint, and it will stream the full zip file containing
all the nodes payloads within.  If a node is unreachable, times out,
or has some other catastrophic problem, the contents for that node will
be an error message instead of the normal tar.gz bundle.

I've tested this with a swarm of multiple nodes, confirmed the dumps
match up to the hosts, and the system handles offline nodes, reporting
an error message within the bundle.  (it does take a long time in the
failure cases due to a bug in swarm that's slated to be fixed in 1.9,
but curl doesn't give up so this still works fine.)
2016-11-01 17:14:15 -07:00

46 lines
2.0 KiB
Markdown

# Orca Support Dumps
Orca supports generating support dumps across the entire swarm cluster, leveraging the
dsinfo container developed by Docker Support.
In this version of Orca, support dumps are only exposed via API, but this can be fairly
easily accessed with curl. The following example shows how to download a support bundle from your
Orca server.
This example leverages curl, which most customers should have, as well
as a handy utility called [jq](https://stedolan.github.io/jq/). If the
customer doesn't have jq or doesn't want to install it, they can manually
cut-and-paste the token output from the login command below.
```bash
# Replace with your Orca server IP or hostname
ORCA=https://192.68.1.2
echo -n "Please enter your admin password"
read -s PASSWORD
TOKEN=$(curl --insecure -s -X POST -d "{\"username\":\"admin\",\"password\":\"${PASSWORD}\"}" "${ORCA}/auth/login" | jq -r '.auth_token')
curl --insecure -s -H "X-Access-Token:admin:${TOKEN}" -X POST "${ORCA}/api/support" > dump.zip
```
Hints:
* The orca server doesn't like extra slashes at the beginning, so if you set your ORCA variable with a trailing slash, then you'll get a 301 (redirect)
* The token often has special characters in it, so if the user cuts and pastes, they may run into problems with the shell interpreting things like $
* If you want to avoid the --insecure, you'll have to install the Orca server's cert locally. See below...
## Trusting the Orca server
If you want to trust the orca servers certificates on the local system, you can use the following technique. Note that the paths are somewhat system specific and may vary from linux distro to distro.
Run the following when pointed at the machine the Orca server is running on (either locally, or via DOCKER\_HOST
```bash
sudo bash -c "docker run --rm -it \
--name orca-bootstrap \
-v /var/run/docker.sock:/var/run/docker.sock \
dockerorca/orca-bootstrap \
dump-certs > /usr/local/share/ca-certificates/orca.crt"
sudo update-ca-certificates
```