bin/globalping jwt sign 2>/dev/null
# then make sure `JWT_TOKEN=<the_token>` is presented in the `.env` fileIf you don't have cfssl* binaries install, get it from github.com/cloudflare/cfssl, build and install them first.
git clone https://github.com/cloudflare/cfssl
cd cfssl
make
make installOnce you have cfssl* binaries installed, cd into the certs directory, generate certs:
cd confed/hub/manifests
jq -c -n --arg ca_cname cloudping-hub -f './ca.json.template' > ca.json
jq -c -n --argjson cname '"cloudping-hub"' --argjson hosts '[ "yourdomain.com", "cloudping-hub.example.com" ]' -f ./peer.json.template >peer.json
cd ../
./gen-ca.sh
./gen-cert-pair.sh manifests/peer.jsonThen, ca.pem, ca-key.pem, peer.pem and peer-key.pem would be in current working directory, you can move them the the directory dedicated for placing certs.
mv ca.pem ../../test/certs/ca.pem
mv peer.pem ../../test/certs/peer.pem
mv peer-key.pem ../../test/certs/peer-key.pem- Edit the hosts file (/etc/hosts) to make agent1.example.one and hub.example.com both points to 127.0.0.1 and ::1.
- Generate self-signed Root CA, server cert pairs, and client cert pairs as stated above.
- Invoke handy scripts in scripts/ folder, to launch hub, then the agent.
- Hub listens :8080 for accepting agents registration request, :8082 for serving public un-authenticated requests.
- Agent listens :8081 for serving requests, and the transport is an m-TLS protected, however the cert pairs generated above can both use at server-auth and client-auth, so it's fine.
Mainly three steps are involved:
- Generate a Root CA cert pair, the server's cert pair (for the hub), then generating peer cert pairs for each agent. Distribute the certs and keys to every nodes where is going to install globalping agent.
- Build multi-arch docker image, this is the easiest way for distributing projects to machines of various archs, launch the hub first, then launch agents on the nodes.
- We have an ansible playbook in the examples/ folder for refering, my instance of globalping is intended to be working at both the Internet and DN42, so I intentionally override docker container's default subnet (I use 192.168/16 as the replacement) so that they won't conflict with that of DN42's subnet.
- But what about the IPv6's connectivity? I reused my dn42 ipv6 allocation and routes for the agent containers and the hub container, for dn42's IPv6 connectivity, it routes fd00::/8 to another router container in the same host (which I configure this out-of-band), and clearnet's connectivity is expressed as a fallback route (default route), ::/0 via the host netns (connected by a pair of veth) since clearnet's IPv6 almost never use fd00::/8.
- Dual-Stack Networking (i.e. Both clearnet IPv4 and IPv6 reachable).
- At least 1GiB RAM.
- Docker.
- Python.