Changeset 223 for trunk/packages


Ignore:
Timestamp:
Oct 28, 2007, 4:19:52 AM (17 years ago)
Author:
price
Message:

new remctl command "install" to invoke autoinstaller

e.g.,

$ remctl black-mesa control moobarspam install etch /path/to/rootpasshash

The root password to be used is taken from a given file local to black-mesa...
probably this should be in the database or something, randomly generated
by the web interface, and available for reminders.

Location:
trunk/packages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/sipb-xen-database/client/etc/xen/sipb-database

    r146 r223  
    33from sipb_xen_database import connect
    44import re
     5import tempfile
     6from subprocess import call
    57
    68connect('postgres://sipb-xen@sipb-xen-dev.mit.edu/sipb_xen')
     
    6466    disk.append(dspec)
    6567
    66 if 'cdrom_image' in locals():
     68if 'installer' in locals():
     69    check(re.match('^[A-Za-z0-9][A-Za-z0-9_.-]*$', installer))
     70    tmptree = tempfile.mkdtemp('', 'auto-install.', '/tmp')
     71    call(['/usr/sbin/sipb-xen-make-iso', installer, tmptree]
     72         + installer_options.split(' '))
     73    disk.append('file:'+tmptree+'/install.iso,hdc:cdrom,r')
     74    boot = 'd'
     75   
     76elif 'cdrom_image' in locals():
    6777    check(re.match('^[A-Za-z0-9][A-Za-z0-9_.-]*$', cdrom_image))
    6878    disk.append('file:/srv/images/' + cdrom_image + '.iso,hdc:cdrom,r')
  • trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-vmcontrol

    r212 r223  
    1818        xm "$ACTION" "$MACHINE"
    1919        ;;
    20     create|reboot)
     20    install|create|reboot)
     21        ARG="$3"
     22        shift; shift; shift; MOREARGS="$*"
    2123        if [ "$ACTION" = "reboot" ]; then
    2224            xm destroy "$MACHINE" 2>/dev/null
    2325        else
    2426            xm list "$MACHINE" >/dev/null 2>/dev/null && echo "$MACHINE already exists" && exit 1
    25         fi     
    26         if [ -n "$3" ]; then
    27             xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$3"
     27        fi
     28        if [ "$ACTION" = "install" ]; then
     29            xm create sipb-database machine_name="$ORIGMACHINE" installer="$ARG" installer_options="$MOREARGS"
     30        elif [ -n "$3" ]; then
     31            xm create sipb-database machine_name="$ORIGMACHINE" cdrom_image="$ARG"
    2832        else
    2933            xm create sipb-database machine_name="$ORIGMACHINE"
Note: See TracChangeset for help on using the changeset viewer.