Declarative Ruby API for defining available actions • Actions assembled into timed groups called templates • Single API defines both user interface and behaviour Saturday, 1 June 13
Outage') do |action| action.param(:hosts, :string, :required => true) action.proc = lambda do |app, params| hosts = parse_hosts(params) `/opt/55/bin/update-opennms-outages sleep #{hosts.join(' ')}` end end end namespace :system do rcp_request_action(:sleep, :description => 'System Sleep') do |action| action.proc = lambda do |app, params| hosts = parse_hosts(params) hosts.each { |h| app[:arp_cache].update(h) } ::ShowControl::RCP::Request.command(RCP_CMD_ID_SYS_SLEEP) end end end Saturday, 1 June 13
the number of closed systems in your deployment • Be aware of the available tools for diagnosing problems at the lowest level necessary Saturday, 1 June 13
the number of closed systems in your deployment • Be aware of the available tools for diagnosing problems at the lowest level necessary • Build a degree of leniency into systems you develop for others to integrate with Saturday, 1 June 13
for all machines in the museum • 3rd party contractors required image to develop their interactives • Machines had to be interchangeable Saturday, 1 June 13
for all machines in the museum • 3rd party contractors required image to develop their interactives • Machines had to be interchangeable • Theory vs Reality Saturday, 1 June 13
role • Global XML file specifies roles by DNS name • Roles define which plists launchd should start on boot • world.xml retrieved from central at boot time Saturday, 1 June 13
“triage” them • All systems based on same image, so all had the same Bonjour hostname on boot • Map serial numbers to hostnames • Set hostname, bring image up to date, reboot Saturday, 1 June 13
module Apple def shutdown_at(time) sudo do unless exec("pmset schedule shutdown \"#{time}\"").success? logger.error("couldn't set poweroff time") return false end end true end end end; end; end Saturday, 1 June 13
half of Puppet • control multiple SSH hosts • CLI querying for operating on subset of hosts • built-in command DSL • migrations makitzo Saturday, 1 June 13
up scp_upload(local_migration_file("FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg.zip"), remote_migration_file("FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg.zip")) exec "cd #{remote_directory}; unzip FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg.zip" sudo { install_pkg remote_migration_file('FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg') } end end Saturday, 1 June 13