A public AMI ami-d8ff7bb1 lets you try Erlang on Xen with minimum effort. If you have Amazon EC2 API tools installed, just issue the following command:
ec2run ami-d8ff7bb1 --kernel aki-88aa75e1 (us-east-1 only)
Alternatively, you can use Amazon Management Console to launch the instance using the AMI. Do not forget to select aki-88aa75e1 as the kernel ID. Take additional care to open port 80 in the default security group or the security group you selected when launching the instance.
After a few seconds point your browser to http://<new-instance-public-dns-name>. Now you will be able to execute Erlang expressions in a way similar to the standard Erlang shell. For instance, type '2 + 2.' and press ENTER. More commands to try:
The AMI contains the Ling virtual machine v0.2.0, stdlib and kernel libraries, a cowboy web server, and a simple 'tryling' application that creates the shell-like experience. To discover the files included with the image use file:list_dir() and filelib:wildcard() functions.
Here is another neat trick. The instance can be mounted over the network using 9p protocol. Modern Linux kernels suport this 'out of the box'. Switch to superuser before issuing the following commands:
mkdir mnt mount -t 9p -o aname=/,version=9p2000.L <new-instance-ip-address> mnt # NB: ip address must be provided, domain name will not do cd mnt cat boot/app.config (more ls/cd/cat) cd .. umount mnt
The only way to boot a custom kernel on Amazon EC2 is to chain-boot it using a pv-grub kernel provided by Amazon. The two-stage boot process adds to the startup latency. Despite the suboptimal boot process, Erlang on Xen starts fast on Amazon EC2.
If you spotted a bug, you may go to issues.erlangonxen.org and file it directly into BugZilla. Please, supplement your bug report with the console output of the failed instance. Use 'ec2gcons <instance-id>' to retrieve it.
We are looking forward to hearing from you regarding your experiences with Erlang on Xen on Amazon EC2.