Skip to content
This repository was archived by the owner on Jul 5, 2021. It is now read-only.

Commit cad72e7

Browse files
TrishnaTrishna
authored andcommitted
EC2 Image Doc
1 parent a0aca6b commit cad72e7

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

docs/ec2_creation.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Creating EC2 Images with Boxgrinder
2+
===================================
3+
4+
Introduction
5+
------------
6+
7+
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 <http://boxgrinder.org/>`_. 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 <http://git.fedorahosted.org/git/?p=cloud-kickstarts.git/>`_ on fedorahosted.org.
8+
9+
Local creation or EC2 based creation
10+
------------------------------------
11+
12+
Install Boxgrinder on your existing Fedora host by running:
13+
14+
.. code-block:: bash
15+
16+
# dnf install -y rubygem-boxgrinder-core rubygem-boxgrinder-build
17+
18+
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 <http://boxgrinder.org/download/boxgrinder-build-meta-appliance/>`_.
19+
20+
Configuration
21+
-------------
22+
23+
First create a config file at ``/root/.boxgrinder/config`` using the following template. Insert appropriate values, see: http://boxgrinder.org/tutorials/boxgrinder-build-plugins/#S3_Delivery_Plugin, for more information.
24+
25+
.. code-block:: bash
26+
27+
plugins:
28+
s3:
29+
access_key: AWS_ACCESS_KEY # (required)
30+
secret_access_key: AWS_SECRET_ACCESS_KEY # (required)
31+
bucket: stormgrind-test # (required)
32+
account_number: 0000-0000-0000 # (required)
33+
path: /images # default: /
34+
cert_file: /home/a/cert-ABCD.pem # required only for ami type
35+
key_file: /home/a/pk-ABCD.pem # required only for ami type
36+
ebs:
37+
access_key: AWS_ACCESS_KEY # required
38+
secret_access_key: AWS_SECRET_ACCESS_KEY # required
39+
account_number: AWS_ACCOUNT_NUMBER # required
40+
delete_on_termination: false # default: true
41+
42+
Creation
43+
--------
44+
45+
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 <http://git.fedorahosted.org/git/?p=cloud-kickstarts.git/>`_ 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 <http://boxgrinder.org/tutorials/appliance-definition/>`_. Once you have the configuration file you want, it is as simple as running a single command:
46+
47+
For an S3 backed image:
48+
49+
.. code-block:: bash
50+
51+
# boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ami
52+
53+
For an EBS backed image:
54+
55+
.. code-block:: bash
56+
57+
# boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ebs
58+
59+
60+
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 in `#fedora-cloud <irc://irc.freenode.net/fedora-cloud/>`_, or on the `fedora-cloud-sig mailing list <https://admin.fedoraproject.org/mailman/listinfo/cloud/>`_.

docs/ec2_image.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Amazon Elastic Compute Cloud (EC2)
2+
==================================
3+
4+
Fedora's EC2 images follow the standard EC2 login conventions, meaning that root login is disabled, but sudo access is granted.
5+
6+
**The default username for the images is ec2-user**
7+
8+
Full documentation for interacting with EC2 is available from `Amazon Web Services <http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/>`_.
9+
10+
Currently supported EC2 Images
11+
------------------------------
12+
13+
Visit `getfedora/cloud <https://getfedora.org/en/cloud/download/>`_ to know about currently supported Base Cloud Images for Amazon Public Cloud EC2.
14+
15+
Custom Image Creation
16+
---------------------
17+
18+
Visit `Cloud_SIG/EC2Creation <https://fedoracloud.readthedocs.io/en/latest/ec2_creation.html/>`_ for instructions on how to build custiom versions of these images.

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Contents:
1919
atomiccommandcheatsheet
2020
base
2121
docker
22+
ec2_image
23+
ec2_creation
2224
contribute
2325

2426

0 commit comments

Comments
 (0)