This repo is me following along to the book Build an Orchestrator in Go by Tim Boring.
It's a simplistic implementation of an orchestrator, like Kubernetes, written in Go using Docker.
You'll need Go installed as well as Docker.
go mod installTo run the service and API:
CUBE_WORKER_HOST=localhost \
CUBE_WORKER_PORT=5556 \
CUBE_MANAGER_HOST=localhost \
CUBE_MANAGER_PORT=5555 \
go run .List tasks
curl -s localhost:5555/tasks | jqCreate task
curl -s --request POST \
--header 'Content-Type: application/json' \
--data '{"ID":"266592cd-960d-4091-981c-8c25c44b1018","State":2,"Task":{"State":1,"ID":"266592cd-960d-4091-981c-8c25c44b1018","Name":"test-chapter-5-1","Image":"timboring/echo-server:latest"}}' \
localhost:5555/tasks | jqcurl -s --request POST localhost:5555/tasks -d @sample_task.json | jqDelete task
curl -s --request DELETE "localhost:5555/tasks/266592cd-960d-4091-981c-8c25c44b1018" | jqGet stats
curl -s localhost:5555/stats | jq