<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Everyone,<div class=""><br class=""></div><div class="">After discussion with Felix last night, I am proposing the following:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Remote Power-Off for Ashera (and optionally other servers)</b></div><div class=""><br class=""></div><div class="">There was some discussion last night regarding the need to be able to remotely power down servers.</div><div class=""><br class=""></div><div class="">For Ashera, I have created a <a href="mailto:shutdown@ashera.ucc.asn.au" class="">shutdown@ashera.ucc.asn.au</a> account. Logging in to this account via ssh will cause the machine to immediately power down.</div><div class=""><br class=""></div><div class="">Note that there is no "confirmation prompt" and once the machine is powered down it must be physically restarted in the server room.</div><div class=""><br class=""></div><div class="">This was achieved by:</div><div class=""><br class=""></div><div class="">1. Creating the shutdown user and assigning group "operator".</div><div class=""><br class=""></div><div class="">2. Change Shell (chsh) to /usr/local/bin/bash&nbsp;</div><div class=""><br class=""></div><div class="">3. Placing the command "shutdown -P now" into the .bashrc file. This can also be done using the init file of any other shell of your choice.&nbsp;</div><div class=""><br class=""></div><div class="">I haven't set up SSH keys for the account yet, but could either use the standard SSH authorized_keys file for wheel, or preferably I could implement a command accessible to wheel that would cause ashera (and if desired, other servers) to shut down as needed.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">As Ashera is my own sever co-located at UCC, I've already implemented this feature.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><b class="">Making Remote Power-Off possible for UCC servers on command (apocalypse command)</b></div><div class=""><br class=""></div><div class="">If you are interested, I could also write a bash script that would respond to "apocalypse &lt;machine name&gt; &lt;time delay&gt;" by shutting down the appropriate machines. Access would be wheel only.</div><div class=""><br class=""></div><div class="">E.g.</div><div class=""><b class=""><br class=""></b></div><div class=""><b class=""><span class="Apple-tab-span" style="white-space:pre">        </span>apocalypse ashera now</b>&nbsp;</div><div class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>would shut down ashera inmmediately.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span><b class="">apocalypse &lt;group&gt; now</b></div><div class=""><span class="Apple-tab-span" style="font-weight: bold; white-space: pre;">                </span>would shut down any defined group of servers. (E.g. apocalypse VMs now, or &nbsp;apocalypse left-rack now).&nbsp;</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span><b class="">apocalypse * now</b></div><div class=""><span class="Apple-tab-span" style="font-weight: bold; white-space: pre;">                </span>would power down every server that is part of the system.</div><div class=""><br class=""></div><div class="">I could then write a script that could read a heat sensor in the server room and automatically begin to shut down machines in order of priority as heat increases past a critical point.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Let me know what you think.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,</div><div class=""><br class=""></div><div class="">Melissa</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>