How do I set up BigAdv folding on Amazon EC2?
While folding on GPU hardware is a great way to earn Folding@Home points for protein research, if you do not have GPUs, or want to do a lot of folding, EC2 can be an alternate option to rack up those folding points.
For this tutorial, you need an amazon EC2 account, and a computer. This tutorial is done at a keyboard of a Windows computer. Linux and Mac OS X are extremely similar. This will be using the Oregon region. You can select other regions to test pricing. Each region requires the creation of a different private key.
Log in to your EC2 account. Click on “Request Spot Instance”.
Click “Select” for Ubuntu Server 14.04 LTS (PV). HVM will also work, but will perform about 1%-2% slower.
Choose the c3.8xlarge instance type (108 ECUs).
Enter the maximum per-hour price you are willing to pay. Make sure it is at least 25% greater than the above-shown “Current Price” options.
Click the “Launch” button.
Select “Create a new key pair” from the dropdown menu, then name your keypair, and click the “Download Key Pair” button. NOTE: if you have already set up one instance before, you can skip down to step 25, and just double-click on the saved instance.
After downloading the private key (.pem) file, click on “Request Spot Instance”.
Make sure that EC2 has successfully created your Spot Instance request (A green check-mark in a green confirmation box will appear, as shown). Then click on “View Spot Requests”.
Click on the “Instances” option, as shown below. At first, nothing will show up. Leave this window as is for now.
Download PuTTYGen from http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe, then open it up. Click on the “Load” button.
Change the file selector to “All Files (*.*)” to allow you to choose the .pem file you downloaded from Amazon. Then browse for and select the keyfile, and open it up.
You will get a message about the successful import. Click “Ok” to continue.
Inside of PuTTYGen, make sure the SSH-2 RSA radiobutton is selected (this is the default), and click on “Save Private Key”.
You will get a warning prompt about saving the private key without a password. This is fine, click “Yes”.
You will get a “Save As” prompt. Choose a place to save the keyfile, and name it something simple.
Download PuTTY from http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe and open it up. Then, click on the “Data” option under “Connection” on the left options pane.
On the “Auto-login username” box, enter “ubuntu”.
Click on the + sign next to “SSH” under “Connection” in the left options pane.
Click on the word “Auth” (not the plus) under “SSH” under “Connection” in the left options pane.
Click on the “Browse…” button next to the box for “Private key file for authentication”.
An “open file” dialog prompt will appear. Browse to and select the new keyfile (.ppk) that we generated with PuTTYGen. Click on the “Open” button.
Click on the text at the top labeled “Session” in the left options pane.
Type a name in the “Saved Sessions” box. Then, click the “Save” button.
Go back to the EC2 “Instances” page. You may need to click on the refresh button (either in the browser or on the page) in order to see your server. Note the IP.
Enter this IP address into PuTTY, under the “Host Name (or IP address)” box.
A new window will pop up. You may be asked about trusting a fingerprint, accept. Type into the window:
apt-get install htop
wget 1.curecoinmirror.com/config.xml -O /etc/fahclient/config.xml
Now, use the arrow keys to move through the file. Enter your passkey and username as shown below.
If you want to control the machine remotely, add the following lines to the file:
<!-- Remote Access --> <command-port v='36330'/> <command-allow v='ip address you wish to allow'/> <password v='password'/>
sudo dpkg -i --force-depends fahclient_7.4.4_amd64.deb
Press the “Enter” key on your keyboard to accept <Yes> for whether FAHClient should be automatically started.
Wait 30 seconds.
Press Control + v four times to scroll down the log. Get to where it shows your Project. If it is 8101, 8102, 8103, 8104, or 8105, you successfully got a BigAdv WU. Alternately, check that is says 0xa5 to the left of the colon. Press Control + X when you are done.
You are done setting up! However, to keep your folding@home account in good standing, always finish your WUs. If you want to shut down your EC2 server, type:
nc 127.0.0.1 36330 finish exit
You can look in the log again, and scroll all of the way to the bottom to see the current percentage:
Again, use Control + X to exit.
On average, each percentage point takes 14 minutes. It takes less for faster projects such as 8104 (averaging around 12 minutes), and longer for slower projects like 8101 (17 minutes).
You can type:
To see your current processor usage. When finished, all of the 32 cores will drop from full 100% utilization to near-zero. When you see this, it is safe to terminate your EC2 instance from the EC2 panel without losing any folding@home work.