A Python agent for provisioning and deprovisioning Bare Metal servers.
Go to file
Paul Querna b3ee1d828c Merge pull request #11 from racker/tasks_for_doing_things
Tasks and Image Download
2013-11-07 13:49:38 -08:00
scripts Force upgrade. 2013-10-29 17:17:51 +00:00
teeth_agent give each task a unique id 2013-11-07 21:09:03 +00:00
twisted/plugins Use twisted application framework 2013-09-23 23:29:55 -07:00
.gitignore Add many test cases for the RPC protocol and start making a Task structure. 2013-09-26 23:53:07 -07:00
LICENSE add license file 2013-09-17 13:41:59 -07:00
Makefile default make target runs lint + tests 2013-10-05 15:41:26 -07:00
README.md add(docs): Document when autobuilds happen 2013-11-06 16:55:31 -08:00
dev-requirements.txt Add many test cases for the RPC protocol and start making a Task structure. 2013-09-26 23:53:07 -07:00
requirements.txt add basic tasks structure 2013-11-07 20:04:39 +00:00
setup.py Change setup.py to extract version without importing. 2013-09-20 17:09:14 +00:00

README.md

teeth-agent

An agent for rebuilding and controlling Teeth chassis.

Protocol

JSON. Line Delimitated. Bi-directional. Most messages contain:

  • version Message Version - String
  • id Message ID - String

Commands contain:

  • method Method - String
  • params Params - Hash of parameters to Method.

Success Responses contain:

  • id Original Message ID from Command - String
  • result Result from Command - Hash

Error Responses contain:

  • id Original Message ID from Command - String
  • error Result from Command - Hash, .msg contains human readable error. Other fields might come later.

Fatal Error:

  • fatal_error - String - Fatal error message; Connection should be closed.

Builders

Teeth Agent master builder: https://jenkins.t.k1k.me/job/teeth-agent-master/ Teeth Agent PR builder: https://jenkins.t.k1k.me/job/teeth-agent-pr/

Builds are automatically triggered on pushes to master, or upon opening a PR.

Commands

All Protocol Implementations.

  • ping: (All) Params are echo'ed back as results.

Agent specific Commands

  • log: (Agent->Server) Log a structured message from the Agent.
  • status: (Server->Agent) Uptime, version, and other fields reported.
  • task_status: (Agent->Server) Update status of a task. Task has an .task_id which was previously designated. Task has a .state, which is running, error or complete. running will additionally contain .eta and .percent, a measure of how much work estimated to remain in seconds and how much work is done. Once error or complete is sent, no more updates will be sent. error state includes an additional human readable .msg field.

Decommission

  • decom.disk_erase: (Server->Agent) Erase all attached block devices securely. Takes a task_id.
  • decom.firmware_secure: (Server->Agent) Update Firmwares/BIOS versions and settings. Takes a task_id.
  • decom.qc: (Server->Agent) Run quality control checks on chassis model. Includes sending specifications of chassis (cpu types, disks, etc). Takes a task_id.

Standbye

  • standbye.cache_images: (Server->Agent) Cache an set of image UUID on local storage. Ordered in priority, chassis may only cache a subset depending on local storage. Takes a task_id.
  • standbye.prepare_image: (Server->Agent) Prepare a image UUID to be ran. Takes a task_id.
  • standbye.run_image: (Server->Agent) Run an image UUID. Must include Config Drive Settings. Agent will write config drive, and setup grub. If the Agent can detect a viable kexec target it will kexec into it, otherwise reboot. Takes a task_id.