Changes between Version 3 and Version 4 of CloudServer


Ignore:
Timestamp:
Jan 28, 2009, 5:50:47 AM (16 years ago)
Author:
dkondo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CloudServer

    v3 v4  
    11= Deploying a BOINC server on the Amazon Elastic Computing Cloud =
     2
     3=== What is Cloud Computing? ===
     4
     5Cloud Computing is a form of computation and storage that
     6hides the complexity of hardware and software management
     7from a user.  Typically, cloud computing services allow you
     8to rent computing or storage services.  These services
     9charge on a pay-per-use basis (roughly, about 0.10 per CPU
     10hour or per GB/month).  Cloud computing services such as
     11Amazon's Elastic Compute Cloud (EC2) also allow one to
     12tailor a computing environment through the use of virtual
     13machines.  In addition, Amazon offers a Simple Storage
     14Service (S3) for enabling remote storage.
    215
    316=== Why use a Cloud? === #why
     
    720 * It's easier and faster to use an existing OS image with the BOINC server already installed than to compile and configure it on one's own.
    821
    9 === Quick Start === #start
     22=== How to use a Cloud for a BOINC server? ===
    1023
    11 This Quick Start guide assumes you already have some experience (and accounts) with Amazon's EC2 and S3. If not, see the detailed starting instructions.
     24We have created a custom virtual machine with a BOINC server
     25installed and configured.  This includes all server software
     26prerequisites and the correct permissions and accounts
     27already setup.  All you need to do is to deploy this virtual
     28machine image on the cloud and your server should be up and
     29running.  This guide describes how to deploy this Amazon
     30Machine Image (AMI) over Amazon's EC2 cloud. This can be
     31done in minutes.
    1232
    13 1. Download the server bundle.
     33=== Prerequisites ===
    1434
    15 2. Assuming you've extracted the archive to /tmp, upload the bundle to Amazon's S3:
     35[http://paulstamatiou.com/2008/04/05/how-to-getting-started-with-amazon-ec2 Create and setup an account with Amazon's EC2.]
    1636
    17 {{{ec2-upload-bundle -b boinc-debian-etch -m /tmp/boinc-debian-etch.manifest.xml -a $ACCESS_KEY -s $SECRET_KEY}}}
     37=== Deploying the BOINC Server Image ===
    1838
    19 where $ACCESS_KEY and $SECRET_KEY are your environment variables set to the corresponding keys.
     39Start the instance (ami-ab9374c2) with the BOINC server
     40(stable 6.3.14 JAN 28 2009) installed on Debian Etch:
    2041
    21 3. Register the uploaded image:
     42{{{  ec2-run-instances ami-ab9374c2 -k [key-pair] }}}
    2243
    23 {{{ec2-register boinc-debian-etch/boinc-debian-etch.manifest.xml}}}
     44Show the instance deployment status:
    2445
    25 This should output an Amazon instance id (ami-XXX).
     46{{{ ec2-describe-instances }}}
    2647
    27 4. Start an instance of the boinc server:
     48After the instance status goes from pending to running
     49(takes a few minutes), you
     50should see the hostname of the form
     51ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com.
    2852
    29 {{{ec2-run-instances ami-XXX}}}
    30  
    31 And voila, assuming you've opened port 80, you should now have a running BOINC server.
     53If you haven't already, open ports 22 and 80:
    3254
    33 === Detailed Start === #detailed
     55{{{ ec2-authorize default -p 22 }}}
     56{{{ ec2-authorize default -p 80 }}}
    3457
    35 1. [http://paulstamatiou.com/2008/04/05/how-to-getting-started-with-amazon-ec2 Create and setup account with Amazon's EC2 and S3.]
     58At this point, you should be able to access the web server
     59at the URL:
     60{{{http://ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com/}}}
    3661
    37 2. [http://developer.amazonwebservices.com/connect/entry.jspa?externalID=368 Install Amazon's AMI tools.]
     62Then login to the instance:
     63
     64{{{ ssh -i [private_key]  root@ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com }}}
     65
     66In the home directory is a README.txt file with important
     67information.
     68
     69=== Setting Up a Test Project ===
     70
     71Here we describe how to create a test project using the
     72uppercase application.
     73
     74As root,
     75
     76{{{sudo boincadm; cd}}}
     77
     78Create a test project uppercase:
     79
     80{{{~/boinc/tools/make_project --url_base http://ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com --test_app cplan}}}
     81
     82Answer yes to all questions.
     83
     84{{{ cd ~/projects/cplan}}}
     85
     86{{{{bin/xadd}}}
     87
     88{{{bin/update_version}}}
     89
     90{{{bin/start}}}
     91
     92To check that all daemons are running:
     93
     94{{{bin/status}}}
     95
     96Now any [http://boinc.berkeley.edu/download.php BOINC client] should be able to attach to the project and download
     97workunits.
     98
     99=== Technical Notes ===
     100
     101Below is not required reading, but we describe how and why
     102the image was built.
     103
     104==== Why Xen? ====
     105
     106The general approach was to build a Debian EC2 AMI from a
     107Xen image.  (The alternative approach was to use an existing
     108Debian AMI.)  However, we chose the Xen approach primarily
     109to be able to install and test things without having to
     110worry about EC2 hourly costs. As a side-effect, one can use
     111the Xen image either as a standalone server or over EC2 (as
     112it's Xen based).
     113
     114[http://jimmyg.org/2007/09/01/custom-debian-ec2-amis-from-xen-images/ This describes the setup involved.]
     115
     116If you would like to use the Xen image directly, you can
     117download the Xen image
     118[http://mescal.imag.fr/membres/derrick.kondo/disk.img.tgz disk.img.tgz (MB)] and
     119[http://mescal.imag.fr/membres/derrick.kondo/swap.img.tgz swap.img.tgz (MB)] and go from there.
     120
     121==== Configuration ====
     122
     123The hostname can change each time an instance is started.
     124As such, the start-up script {{{rc.local}}} was modified to query
     125Amazon for the hostname and to set it at each boot.
     126
     127{{{rc.local}}} is also configured to randomly change the root
     128password at each boot, and to download your ssh public key
     129and cat it to the authorized_keys file to allow remote
     130passwordless access.
     131
     132==== IP Address ====
     133
     134The IP address could change each time the instance is
     135created.  To associate a fixed address (regardless of the
     136instance), one should use
     137[http://aws.amazon.com/ec2/  Amazon's Elastic IP Addresses].
     138
     139In addition, one can configure the image to use dynamic DNS
     140to associate a domain name with the instance. See the following links.
     141[http://www.ioncannon.net/system-administration/120/dynamic-dns-with-ec2-and-zoneedit/ Dynamic DNS with ZoneEdit]
     142[http://blog.spaceprogram.com/2008/03/how-to-set-up-dynamic-dns-for-your.html Dynamic DNS Setup]
     143
     144=== To do ===
     145
     146 * Consider setting up dynamic DNS by default in the bundle
     147
     148=== Questions? ===
     149
     150Email Derrick Kondo (derrick.kondo :: inria fr)