Creating your own custom images for EC2 is a quick and easy process. While there are many ways to create an EC2 image, this page will walk you through using [http://boxgrinder.org/ boxgrinder]. Boxgrinder is chosen here because the packages are in fedora, and it is a simple process that anyone can use. The Cloud SIG maintains basic appliance definition files in the [http://git.fedorahosted.org/git/?p=cloud-kickstarts.git cloud-kickstarts git repository] on fedorahosted.org

+

Creating your own custom images for EC2 is a quick and easy process. While there are many ways to create an EC2 image, this page will walk you through using [http://boxgrinder.org/ boxgrinder]. Boxgrinder is chosen here because the packages are in Fedora, and it is a simple process that anyone can use. The Cloud SIG maintains basic appliance definition files in the [http://git.fedorahosted.org/git/?p=cloud-kickstarts.git cloud-kickstarts git repository] on fedorahosted.org

== Local creation or EC2 based creation ==

== Local creation or EC2 based creation ==

−

For boxgrinder to generate images, you will need to have boxgrinder installed somewhere. Simple enough, though you have a couple of options here. Boxgrinder can be installed on your fedora host by running:

+

For boxgrinder to generate images, you will need to have boxgrinder installed somewhere. Simple enough, though you have a couple of options here. Boxgrinder can be installed on your existing Fedora host by running:

Or, if you would rather have the image creation and publish happen on AMI hosts, you can run boxgrinder in one of the project supported [http://boxgrinder.org/download/boxgrinder-build-meta-appliance/ meta-appliances].

+

Or, if you would rather have the image creation and publish happen on AMI hosts and save the upload time, you can run boxgrinder in one of the project supported [http://boxgrinder.org/download/boxgrinder-build-meta-appliance/ meta-appliances].

== Configuration ==

== Configuration ==

Line 32:

Line 32:

== Creation ==

== Creation ==

−

Actual image creation requires an appliance definition file to get started. The Cloud SIG maintains basic configuration files for current Fedora releases in [http://git.fedorahosted.org/git/?p=cloud-kickstarts.git cloud-kickstarts git repository] on fedorahosted.org. You can grab the configuration file from here, and add packages as necessary for your application. Once you have the configuration file you want, it is as simple as running a single command:

+

Actual image creation requires an appliance definition file to get started. The Cloud SIG maintains basic configuration files for current Fedora releases in [http://git.fedorahosted.org/git/?p=cloud-kickstarts.git cloud-kickstarts git repository] on fedorahosted.org. You can grab the configuration file from the boxgrinder directory here, and modify it add packages as necessary for your application. More advanced configuration instructions, including post install scripting, are available on [http://boxgrinder.org/tutorials/appliance-definition/ the boxgrinder website]. Once you have the configuration file you want, it is as simple as running a single command:

For an S3 backed image:

For an S3 backed image:

−

<pre>boxgrinder-build /path/to/your/fedora.appl -p ec2 -d AMI</pre>

+

<pre>boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ami</pre>

For an EBS backed image

For an EBS backed image

Latest revision as of 18:59, 2 September 2011

Contents

Intro

Creating your own custom images for EC2 is a quick and easy process. While there are many ways to create an EC2 image, this page will walk you through using boxgrinder. Boxgrinder is chosen here because the packages are in Fedora, and it is a simple process that anyone can use. The Cloud SIG maintains basic appliance definition files in the cloud-kickstarts git repository on fedorahosted.org

Local creation or EC2 based creation

For boxgrinder to generate images, you will need to have boxgrinder installed somewhere. Simple enough, though you have a couple of options here. Boxgrinder can be installed on your existing Fedora host by running:

yum install rubygem-boxgrinder-core rubygem-boxgrinder-build

Or, if you would rather have the image creation and publish happen on AMI hosts and save the upload time, you can run boxgrinder in one of the project supported meta-appliances.

BoxGrinder Build config file locationThe default location for this file is /root/.boxgrinder/config. You can put this file in different location by specifying BG_CONFIG_FILE environment variable.

Creation

Actual image creation requires an appliance definition file to get started. The Cloud SIG maintains basic configuration files for current Fedora releases in cloud-kickstarts git repository on fedorahosted.org. You can grab the configuration file from the boxgrinder directory here, and modify it add packages as necessary for your application. More advanced configuration instructions, including post install scripting, are available on the boxgrinder website. Once you have the configuration file you want, it is as simple as running a single command:

For an S3 backed image:

boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ami

For an EBS backed image

boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ebs

This will build your image, upload it, and register the AMI, though you will have to make it public yourself. Note that boxgrinder works through plugins, and everything is done in steps. If you want both S3 and EBS based images, run the commands in order, and the EBS image will use the output from the S3 backed to save considerable time. If you require any assistance, people are always willing to help on irc.freenode.net at #fedora-cloud, or on the fedora cloud sig email list.