Run / Delayed Job¶
using | delayedjobs_ plus a thin queuing layer that ensures that only one task is | running on a node at any given time. For now, we limit ourselves to | having up to 10 tasks running in the background at any given time, | which should be enough for the immediate future until we come up with | proper tuning guidelines or auto-tuning code for significantly larger | clusters.
Postgresql 9.3:¶
it | immediatly obvious that sqlite is not at all suited to handling real | concurrency once we started doing multiple jig runs on different nodes | at a time. Postgresql is more than capable of handling our forseeable | concurrency and HA use cases, and gives us lots of scope for future | optimizations and scalability.
DHCP and DNS:¶
database | entries, and (in the case of DHCP) to control what enviroment a node | will PXE/UEFI boot into. This gives us back the abiliy to boot into | something besides Sledgehammer.
Deployment tree:¶
Provisioner Installing Ubuntu 12.04:¶
To install Ubuntu 12.04 on a node from the web UI:
- Create a new deployment, and add the provisioner-os-install roleto that deployment. In the future you will be able to edit thedeployment role information to change what the default OS for adeployment should be.
- Drag one of the non-admin nodes onto the provisioner-os-installrole. This will create a proposed noderole binding theprovisioner-os-install role to that node, and in the future youwould be able to change what OS would be installed on that nodeby editing that noderole before committing the deployment.
Commit the deployment. This will cause several things to happen:
- The freshly-bound noderoles will transition to TODO, which willtrigger an annealer pass on the noderoles.
- The annealer will grab all the provisioner-os-install roles thatare in TODO, set them in TRANSITION, and hand them off todelayedjobs_ via the queuing system.
- The delayed_jobs handlers will use the script jig to schedule areboot of the nodes for 60 seconds in the future and then return,which will transition the noderole to ACTIVE.
- In the crowbar framework, the provisioner-os-install role has anonactive hook_ which will change the boot environment of the
node | passed to it via the noderole to the appropriate os install state | for the OS we want to install, and mark the node as not alive so | that the annealer will ignore the node while it is being | installed.
- The provisioner-dhcp-database role has an onnode_change_
handler | that watches for changes in the boot environment of a node. It | will see the bootenv change, update the provisioner-dhcp-database | noderoles with the new bootenv for the node, and then enqueue a | run of all of the provisioner-dhcp-database roles.
- delayedjobs_ will see the enqueued runs, and run them in the
order | they were submitted. All the runs sholuld happen before the 60 | seconds has elapsed.
- When the nodes finally reboot, the DHCP databases should have beenupdated and the nodes will boot into the Uubntu OS installer,install, and then set their bootenv to local, which will tell theprovisioner (via the provisioner-dhcp-database
onnode_change_ | hook) to not PXE boot the node anymore.
- When the nodes reboot off their freshly-installed hard drive, theywill mark themselves as alive, and the annealer will rerun all ofthe usual discovery roles.