Implementing Project Registration

Hello,
My name is Jason Wright and I lead a group of web developers at Bridge
Worldwide. I have been working on the plans for implementing project
registration for the Beagle Board initiative. This is a very cool
idea. To help me move along, I'd like to set up a development
environment that mirrors the one that the site is running now. Can
you respond with some information about how you set up your
environment and your data store?

Thanks, and I look forward to working with you in the future.

Jason

Good timing. I think this procedure is hopefully ready to share.

First, you need to have an Amazon Web Services account with EC2 and
S3. EC2 allows you to run machine images (somewhat like VMWare or
QEMU) on Amazon machines. S3 provides you with storage for the
machine images.

Second, you need the EC2 command line tools (http://
developer.amazonwebservices.com/connect/entry.jspa?externalID=351)
that will allow you to invoke the machine images.

I've shared a beagleboard.org image at
https://s3.amazonaws.com:443/beagle/beagleboard-20080425.manifest.xml
(ami-a6789dcf). You'll need to register a keypair to be able to
login:

domU-12-31-38-00-9C-98 ~ # ec2-add-keypair my-ami-keypair > ~/secret/
my-ami-keypair.txt

This machine image can be invoked, after you setup your command line
tools and environment with your password information and registered
keypair, by using:

domU-12-31-38-00-9C-98 ~ # ec2-run-instances ami-a6789dcf -k my-ami-
keypair

You can check if the instance is running using:

domU-12-31-38-00-9D-E3 ~ # ec2-describe-instances
RESERVATION r-c9af54a0 283181587744 default
INSTANCE i-c8bd7fa1 ami-a6789dcf
pending my-ami-keypair 0 m1.small
2008-04-25T06:27:49+0000

With the above "pending", you can see that a machine has not been
assigned yet. It may take a 5 or so minutes. When it is running, it
will look like this:

domU-12-31-38-00-9D-E3 ~ # ec2-describe-instances
RESERVATION r-c9af54a0 283181587744 default
INSTANCE i-c8bd7fa1 ami-a6789dcf
ec2-75-101-224-136.compute-1.amazonaws.com
domU-12-31-38-00-95-95.compute-1.internal running my-ami-
keypair 0 m1.small 2008-04-25T06:27:49+0000

To login, use:

domU-12-31-38-00-9D-E3 ~ # ssh -i ~/secret/my-ami-keypair.txt
ec2-75-101-224-136.compute-1.amazonaws.com

You'll need to edit the server machine name in /etc/apache2/vhosts.d/
11_helma.conf so that Apache will point to Helma and start Apache:

domU-12-31-38-00-9D-E3 ~ # vim /etc/apache2/vhosts.d/11_helma.conf
domU-12-31-38-00-9D-E3 ~ # /etc/init.d/apache2 start

On this image, Helma should run at startup. Startup script for Helma
is /etc/init.d/helma. Helma documentation can be found at http://dev.helma.org.

Many of the individual steps I used to create the image are visible at
http://code.google.com/p/maemo-sdk-image/source/browse/trunk/build_maemo_ami.sh.
You should only need this if you are trying to reproduce the image
creation from scratch. There is a script to create a machine image
from the running image in /root/make_ami.sh within the machine image:

domU-12-31-38-00-9D-E3 ~ # mknod /dev/loop0 b 7 0
domU-12-31-38-00-9D-E3 ~ # ./make_ami.sh beagleboard-20080425

You can then share the image (making it public):

domU-12-31-38-00-9D-E3 ~ # source ~/secret/setup_env.sh
domU-12-31-38-00-9D-E3 ~ # ec2-modify-image-attribute ami-a6789dcf --
launch-permission --add all

To shut down a running instance:

domU-12-31-38-00-9D-E3 ~ # ec2-terminate-instances i-c8bd7fa1
INSTANCE i-c8bd7fa1 running shutting-down
domU-12-31-38-00-9D-E3 ~ # ec2-describe-instances
RESERVATION r-c9af54a0 283181587744 default
INSTANCE i-c8bd7fa1 ami-a6789dcf
ec2-75-101-224-136.compute-1.amazonaws.com
domU-12-31-38-00-95-95.compute-1.internal shutting-down my-ami-
keypair 0 m1.small 2008-04-25T06:27:49+0000

Running this image full-time costs about $75 a month ($0.10/hour +
storage and bandwidth)

Be aware that there is a bug with the OpenID login of the currently
running image that I haven't had time to track down. I have another
image prior to creating this bug, so I will be able to debug it at
some point.

You'll want to update the actual web app located in /root/beagle using
'git' from http://www.beagleboard.org/beagleboard.org.git. For now,
I'll leave that as an exercise for the reader.

You could also just create your own Helma installation and use git to
pull the web app, which is likely much easier. What you asked for is
a mirror of the whole development environment, which is why I've given
you the instructions on using the machine image. This is also very
important for me to document the backup/restore and test/deploy
processes.

Hi Jason Wright,

Will it be possible for you to give a tentative date by when you can add this support? as many of us have already started to work on different applications, it is becoming very important to have support for project registration at the earliest.

Thanks

Regards,
Khasim

For the time being, I recommend using code.google.com to register your
project. Simply label it with the tag 'beagleboard' and I will make
certain that http://beagleboard.org reflects the status of your
project as published on Google once this functionality is added.

For those looking for 'git', github.com and repo.or.cz offer free git
hosting. I recommend registering for hosting on those sites and then
creating a code.google.com entry as well. You can cross link them and
mirror the actual repository, which is on git, onto the
code.google.com site using 'git-svn dcommit'.