Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cocoon-agent

In-VM exec agent for Cocoon-managed VMs. Listens on virtio-vsock and runs commands on behalf of host-side callers (vk-cocoon, the cocoon CLI, anything else with vsock access on the same node), replacing SSH for control-plane operations like kubectl exec. It also handles post-clone reseed — injecting host entropy into the guest CRNG and regenerating /etc/machine-id so cloned VMs don't stay correlated.

Documentation: cocoonstack.github.io/cocoon-agent (source in docs/).

Highlights

  • Linux and Windows guest exec with stdin, stdout, stderr, and exit-code forwarding.
  • Host access through cocoon vm exec; direct AF_VSOCK client for smoke tests.
  • Linux clone/restore reseed with optional machine-ID regeneration.

PTY mode is planned; see Roadmap.

Quick start

cocoon-agent client --cid 3 --port 1024 -- echo "hello from guest"

Full steps in Usage.

Related projects

  • cocoon — VM engine
  • vk-cocoon — virtual-kubelet provider; the primary consumer of cocoon-agent
  • cocoon-common — shared metadata / annotation contract

Development

make all          # tidy + fmt + lint + test + build
make build        # build the local binary
make test         # vet + tests with race detection and coverage
make lint         # golangci-lint on linux + darwin + windows
make fmt          # gofumpt + goimports
make fmt-check    # check formatting without changing files

License

MIT

About

In-VM exec agent for Cocoon: vsock-based command execution channel that replaces SSH for kubectl exec on Cocoon-managed VMs.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages