WND-CHRM on the WEB Project Notes
Good Web Resources
Setting up BOINC Server Virtual Appliance using VirtualBox
- key is to use File->Virtual Media Manager
- Load the appropriate vmdk file
- Create new VM and attach to the selected hard drive
- Save the initial state - take a snap shot so you can always revert to fresh out of the box
- boot up VM and login boincadm, password is boincadmpw
- su, with password rootpw
- rm /etc/udev/rules.d/z25_persistent-net.rules
- make the changes to /etc/network/interfaces and /etc/resolve.conf - I just use DHCP for simplicity
- 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
- 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.
- Virtual Machine Settings: Settings -> Network -> Attached to: BRIDGED ADAPTER. You HAVE TO CHOOSE eth0 - wired interface.
- 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:"
- ssh into the guest OS from the host OS by using the IP address from the previous step, e.g., "ssh firstname.lastname@example.org"
- 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
- Download ubuntu iso.
- Add the iso to the list in the virtual media manager
- Create a new ubuntu virtual machine, called something like "ubuntuclient"
- In ubuntuclient's settings, go to storage and change the CD/DVD settings to have the ubuntu iso that you loaded in step 2.
- Install Ubuntu on the virtual machine. username boincclient, password password, machine name boincclientmachine
- sudo apt-get install openssh-server - enable ssh on client
- sudo apt-get boinc-client boinc-manager boinc-dev - install boinc client
Create a test project
Set Up the server
- cd ~/boinc/tools
- ./make_project --url_base http://a.b.c.d --test_app test
- cd ~/projects/test
- Insert PROJECT_NAME.httpd.conf into /etc/apache/httpd.conf
su -c 'cat test.httpd.conf >> /etc/apache2/httpd.conf'
- su -c 'apache2ctl -k restart'
- Run crontab -e, and add an entry to run the project's cron script
- 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.
- The update_versions script releases new application versions. It creates database entries and copies files to the download directory.
Create a work unit
Setting Up Billshit code to run as a oneoff on the client
- compile a hello world program on the server
- cd ~/projects/test
- html/ops/single_job_setup.php ~/boinc/samples
- type 'bin/update_versions', and answer 'y' to all questions.
- add the generated <daemon> code to the config.xml
On the client
- 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