WND-CHRM on the WEB Project Notes

From Colettapedia
Jump to: navigation, search

Good Web Resources

Setting up BOINC Server Virtual Appliance using VirtualBox

  1. key is to use File->Virtual Media Manager
  2. Load the appropriate vmdk file
  3. Create new VM and attach to the selected hard drive
  4. Save the initial state - take a snap shot so you can always revert to fresh out of the box
  5. boot up VM and login boincadm, password is boincadmpw
  6. su, with password rootpw
  7. rm /etc/udev/rules.d/z25_persistent-net.rules
  8. make the changes to /etc/network/interfaces and /etc/resolve.conf - I just use DHCP for simplicity
  9. make sure the ssh daemon is running (su -c '/usr/sbin/ssh')

ssh'ing into virtual machine

  • AIRPORT IS ABSOLUTELY USELESS FOR THIS TYPE OF THING. YOU HAVE TO HAVE YOUR MAC PHYSICALLY CONNECTED WITH AN ETHERNET CORD.
  • From VirtualBox manual: "On Macintosh hosts, functionality is limited when using AirPort (the Mac’s wireless networking) for bridged networking. Currently, VirtualBox supports only IPv4 over AirPort. For other protocols such as IPv6 and IPX, you must choose a wired interface."
  • Only those computers that are also physically conneted via ethernet cord will be able to ssh into the VM
  1. on host OS, you might need to adjust System Preferences -> Network -> Ethernet to ensure your host's access to the internet while your VM is running. I turned my VM on and my host OS's internet cut out. Must be a DHCP IP thing. I ran the network diagnostic tool in System Preferences and it fixed it for me.
  2. Virtual Machine Settings: Settings -> Network -> Attached to: BRIDGED ADAPTER. You HAVE TO CHOOSE eth0 - wired interface.
  3. Check what is the VM IP address is by starting the VM and typing "ifconfig" ... It's the IP address on the second line that comes after "inet addr:"
  4. ssh into the guest OS from the host OS by using the IP address from the previous step, e.g., "ssh boincadm@10.20.18.168"
  5. ssh into the host OS from the guest OS by running "ifconfig" on the host and getting the ip address that way. IMPORTANT: YOU MUST ENABLE SSH INTO YOU MACHINE USING SYSTEM PREFERENCES -> SHARING AND CHECK OFF "REMOTE LOGIN"

Setting Up a client machine

  1. Download ubuntu iso.
  2. Add the iso to the list in the virtual media manager
  3. Create a new ubuntu virtual machine, called something like "ubuntuclient"
  4. In ubuntuclient's settings, go to storage and change the CD/DVD settings to have the ubuntu iso that you loaded in step 2.
  5. Install Ubuntu on the virtual machine. username boincclient, password password, machine name boincclientmachine
  6. sudo apt-get install openssh-server - enable ssh on client
  7. sudo apt-get boinc-client boinc-manager boinc-dev - install boinc client

Create a test project

Set Up the server

  1. cd ~/boinc/tools
  2. ./make_project --url_base http://a.b.c.d --test_app test
  3. cd ~/projects/test
  4. Insert PROJECT_NAME.httpd.conf into /etc/apache/httpd.conf
su -c 'cat test.httpd.conf >> /etc/apache2/httpd.conf'
  1. su -c 'apache2ctl -k restart'
  2. Run crontab -e, and add an entry to run the project's cron script
crontab test.cronjob
  1. Run xadd to add platform and application records to the BOINC database. Information is read from an XML file project.xml in the project's root directory.
./bin/xadd
  1. The update_versions script releases new application versions. It creates database entries and copies files to the download directory.
./bin/update_versions
  1. ./bin/start

Create a work unit

Setting Up Billshit code to run as a oneoff on the client

  1. compile a hello world program on the server
  2. cd ~/projects/test
  3. html/ops/single_job_setup.php ~/boinc/samples
  4. type 'bin/update_versions', and answer 'y' to all questions.
  5. add the generated <daemon> code to the config.xml
  6. bin/stop
  7. bin/start

On the client

  1. boinccmd --create_account http://a.b.c.d/test/ email-addr password account-name

account key: XXX boinccmd --project_attach http://a.b.c.d/test/ XXX