Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kpl-deploy

Swarm deployment repository for the K-P2PLab control plane.

The file is written in Compose format, but it must be deployed with docker stack deploy because the Controller and Agents run across multiple Docker Engines.

Resulting placement

  • controller: one replica on the Swarm manager
  • agent: one global task on every Swarm worker
  • no agent is placed on the manager
  • kpl-control: Controller-Agent traffic
  • kpl-experiment: future peer-container traffic

Prerequisites

  1. One Swarm manager and one or more Swarm workers are already connected.
  2. Both images are pushed to a registry reachable by every Swarm node.
  3. Run deployment commands on the manager.

Deploy

cp .env.example .env
vi .env

chmod +x scripts/*.sh
./scripts/deploy.sh

Verify

./scripts/status.sh

curl http://127.0.0.1:8080/healthz
curl http://127.0.0.1:8080/api/v1/agents

The agent service uses mode: global with the constraint node.role == worker, so a newly joined worker automatically receives one agent task.

Remove

./scripts/remove.sh

The two external overlay networks are deliberately preserved because future standalone peer containers will attach to kpl-experiment.

About

K-P2PLab Deploy

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages