jenkins the definitive guide

(Jeff_L) #1

If you want the flexibility of a cloud-based CI architecture, but don’t want to externalize your hardware,
another option is to set up a Eucalyptus cloud. Eucalyptus is an open source tool that enables you to create
a local private cloud on existing hardware. Eucalyptus uses an API that is compatible with Amazon EC2
and S3, and works well with Jenkins.


11.6.1.1. Setting up your Amazon EC2 build farm


Amazon EC2 is probably the most popular and well-known commercial cloud computing service. To
use this service, you will need to create an EC2 account with Amazon if you do not already have one.
The process required to do this is well documented on the Amazon website, so we will not dwell on this
here. Once you have created your account, you will be able to create the virtual machines and machine
images that will make up your EC2-based build farm.


When using Amazon EC2, you create virtual machines, called instances, using the Amazon Web
Services (AWS) Management Console (see Figure 11.17, “You manage your EC2 instances using the
Amazon AWS Management Console”). This website is where you manage your running instances and
create new ones. You create these instances from predefined images, called Amazon Machine Images
(AMIs). There are many AMI images, both from Amazon and in the public domain, that you can use as
a starting point, covering most of the popular operating systems. Once you have created a new instance,
you can connect to it using either SSH (for unix machines) or Windows Remote Desktop Connection,
to configure it for your purposes.


Figure 11.17. You manage your EC2 instances using the Amazon AWS Management Console


To set up a build farm, you will also need to configure your have one, just go to the Key Pairs menu in
the Security build server to be able to access your EC2 instances. In particular, you will need to install
the Amazon EC2 API tools, set up the appropriate private/public keys, and allow SSH connections
from your server or network to your Amazon instances. Again, the details of how to do this are well
documented for all the major operating systems on the EC2 website.


You can use Amazon EC2 instances in two ways—either create slave machines on Amazon EC2 and
use them as remote machines, or have Jenkins create them for you dynamically on demand. Or you can
have a combination of the two. Both approaches have their uses, and we will discuss each of them in
the following sections.

Free download pdf