Docker on several hosts
docker-hosts Runs apps as containers on several Docker hosts. Each app is placed on one host and stays there: a new app goes to the host with the most free memory that fits it. Pando reaches each host's apps through a forwarding agent it runs there, which accepts only Pando's certificate. Built images reach the hosts through the install's image registry.
Setup
Open each host's Docker API
- Install Docker Engine on each host. Use hosts of one CPU architecture.
- For a
tcp://host, follow Use TLS (HTTPS) to protect the Docker daemon socket to rundockerd --tlsverifyon port2376, and pasteca.pem,cert.pemandkey.pembelow. - For an
ssh://host, use rootful Docker: over SSH, Pando reaches only/var/run/docker.sock, not a rootless daemon's socket. - For an
ssh://host, runssh-keygen -t ed25519 -f pando-docker -N "". - On each
ssh://host, add a user to thedockergroup withsudo usermod -aG docker <user>and addpando-docker.pubto its~/.ssh/authorized_keys. - Paste
pando-dockerbelow.
List the hosts
- On each host, allow port
7443from the control host's address only. - On each host, let Docker pull from the install's image registry: trust its certificate, or list it under
insecure-registriesin/etc/docker/daemon.json. - Give each host a
nameand anendpoint:tcp://<host>:2376orssh://<user>@<host>. - Mark the host Pando runs on with
"control": trueand give it anagent_address, such as10.0.0.5:7443. - For each
ssh://host, setssh_host_keyto its line fromssh-keyscan -t ed25519 <host>.
- On each host, allow port
Create the agent certificate authority
- On the host Pando runs on, run
pando host-agent new-authority, ordocker compose exec pando pando host-agent new-authoritywith Docker Compose. - Paste its output below.
- On the host Pando runs on, run
Settings (9)
hostsHostsRequiredThe hosts as a JSON list. Each has a name; an endpoint (unix:///var/run/docker.sock, tcp://host:2376 with the Docker TLS credential, or ssh://user@host with the SSH key and the host's ssh_host_key); an agent_address where Pando reaches the host's agent; and optionally no_placement to keep new apps off it. Exactly one is "control": true, the host Pando runs on.
docker_tlsDocker TLS client certificateCredentialFor tcp:// hosts: the CA (ca.pem), the client certificate (cert.pem) and its key (key.pem), pasted together.
ssh_keySSH private keyCredentialFor ssh:// hosts: an unencrypted private key for a user in the docker group, or root.
agent_imageAgent imageAdvancedThe image of Pando each host's agent and each restricted app's egress gateway run. Every host must be able to pull it.
agent_portAgent portAdvancedThe one port each host publishes, for its agent. Restrict it to the control host's address with the host's firewall.
network_poolApp network rangeAdvancedThe IPv4 range each host's app networks take their addresses from. Each host uses the whole range for its own apps. Cannot be "off" here.
network_block_bitsApp network sizeAdvancedThe size of each app's private network, as a prefix length from 24 to 29.
oci_runtimeContainer runtimeAdvancedThe runtime every host's Docker starts apps with, by the name it is registered under in daemon.json, such as runsc.