EC2 Luxrender – Part 1:
Ubuntu Server on EC2, ready for Luxrender

1 Comment
Posted 16 Dec 2011 in Information
Tags: , ,

Some days ago i posted an image rendered with Luxrender, an open source render engine. As always when rendering, i thought about buying a faster, better computer. As this is bad for the environment (and i do not have the money) i decided to use cloud computing. After some researching i found some pretty obscure instructions on how to use Amazon EC2 as a render farm. Fighting with these for quite along time i hope i can provide you a simple step by step guide on how to use Luxrender on Amazon EC2.

Amazon EC2 is a big bunch of servers, of which you can buy computing power as you need it. It is commercial, but as long as you don’t use it for really huge projects costs are quite low. Right now you can even test it a whole year for free, as long as you just use the smallest chunk of ressources that is available. During this guide i use the free ressources, so if you stick tightly to my instructions you should be able to avoid being charged anything. After setting everything the right way and get it running, you can easily switch to a big server to render your stuff blazingly fast.

To be able to use Luxrender on an EC2 Server i had to build it for a Server. The build instructions i found in the Luxrender Wiki are quite specific, but they are for the Desktop Ubuntu. There are quite a few things that are different on a server, but it is not too complicated. This post is about getting an Ubuntu server that later on can be used as a machine in our EC2 render farm.

Register for an Amazon EC2 account

You need a credit card for that. You won’t be charged anything, until you start using computing power. I will tell you when we reach that point, so you can drop out if you want to. Go to

Amazon EC2

and register. The process is quite straightforward, so i won’t describe it in detail. When you have an account, log in.

Set up an AMI (Amazon Machine Image)

To get a server running, the use of one of Canonicals Amazon AMIs is a good idea, as they are stripped down to the necessary minimum with just a few add ons for EC2. Go to

Alestic

where a good overview of the latest Ubuntu Machine Images available for EC2 is online. Here click on the zone you want to work in, ie.

eu-west-1

Now you get a list of the available Ubuntu AMI’s. I recommend using an Amazon t1.micro instance for experimenting with the instructions below, as you have 750 hours of micro instances for free each month in the first year. That way you still won’t be charged anything. The smaller (and cheaper or free) EC2 instances are 32bit, so i recommend using

Ubuntu 10.04 LTS Lucid, EBS Boot, server 32bit

Clicking on that link get’s you to the Amazon EC2 launch dialog for that machine. You still are not being charged anything, as you do not use computing power yet, even if you clicked on 64bit. Now choose your instance type – preferably

t1.micro

Go through the dialogs, you can safely skip the tags page. On the create keypair page choose

Create a new Key Pair

Enter a name and download the keypair – and remember where you safe that file!. Then proceed to the firewall tab.

Create a new Security Group

You need to add ports 22 and 18018 in your security group, as 18018 this is the port that Luxrender uses to communicate. Without port 22 you would not be able to talk to the server at all.

Create a new rule -> Custom TCP rule -> Port Range: 22 -> + Add Rule
Create a new rule -> Custom TCP rule -> Port Range: 18018 -> + Add Rule

When you have done this, proceed and you get to a summary of your setup. It should contain the following information:

Number of Instances: 1
Availability Zone: No Preference
Instance Type: Micro (t1.micro)
Instance Class: On Demand
Monitoring: Disabled
Termination Protection: Disabled
Tenancy: Default
Kernel ID: Use Default
Shutdown Behavior: Stop
RAM Disk ID: Use Default
Key Pair Name: your-key-pair-name
Security Group(s): your-security-group-code

 

You can still change this data, if you want to. If you are content, you can launch your instance now. Be aware that from now on Amazon will charge you with their current fees for the EC2 web service. Right now, Dec 2011, you won’t be charged anything if you just run a single t1.micro instance. That’s it. You have an Ubuntu server up and running, ready for being fed with Luxrender.

Stop your Instance

For now we take a break and stop the server to stop Amazon from earning money. Go to the Amazon AWS Console. In the block “My Ressources”  click on

Running Instances

and you get to an overview of your running instances. To stop one right-click it and select

Stop

Do not terminate your instance, as this would mean the whole instance would be deleted by AWS. You would not be able to restart it.


Important Notes:

Amazon EC2 charges fees, depending on computation power and storage space you use. The fees are pretty low, as long as you just use the service for a few hours, as needed for rendering. But they can sum up if you forget to stop or terminate your instances. A few hints to avoid that:

  • If you stop working, shut down your EC2 instance or stop it, using the Amazon AWS console. See the last paragraph above for how to do this.
  • If you start over with a new instance be sure to terminate your old one, as you will exceed the free storage limit if you build 2 instances simultaneously. This is not too expensive, it would cost a few cents up to a few euros, but intention here is to stay free until we really need power

Important Links:


1 Trackbacks/Pingbacks

  1. EC2 Luxrender – Part 3:Use Luxrender with EC2 /  marue 11 01 12

Add Your Comment

You must be logged into post a comment.