This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
EC2 Image Doc #17
Open
trishnaguha
wants to merge
1
commit into
fedora-cloud:master
Choose a base branch
from
trishnaguha:ec2-image
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
EC2 Image Doc #17
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Creating EC2 Images with Boxgrinder | ||
=================================== | ||
|
||
Introduction | ||
------------ | ||
|
||
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. | ||
|
||
Local creation or EC2 based creation | ||
------------------------------------ | ||
|
||
Install Boxgrinder on your existing Fedora host by running: | ||
|
||
.. code-block:: bash | ||
|
||
# dnf install -y 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 projects supported `meta-appliances <http://boxgrinder.org/download/boxgrinder-build-meta-appliance/>`_. | ||
|
||
Configuration | ||
------------- | ||
|
||
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. | ||
|
||
.. code-block:: none | ||
|
||
plugins: | ||
s3: | ||
access_key: AWS_ACCESS_KEY # (required) | ||
secret_access_key: AWS_SECRET_ACCESS_KEY # (required) | ||
bucket: stormgrind-test # (required) | ||
account_number: 0000-0000-0000 # (required) | ||
path: /images # default: / | ||
cert_file: /home/a/cert-ABCD.pem # required only for ami type | ||
key_file: /home/a/pk-ABCD.pem # required only for ami type | ||
ebs: | ||
access_key: AWS_ACCESS_KEY # required | ||
secret_access_key: AWS_SECRET_ACCESS_KEY # required | ||
account_number: AWS_ACCOUNT_NUMBER # required | ||
delete_on_termination: false # default: true | ||
|
||
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 <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: | ||
|
||
For an S3 backed image: | ||
|
||
.. code-block:: bash | ||
|
||
# boxgrinder-build /path/to/your/fedora.appl -p ec2 -d ami | ||
|
||
For an EBS backed image: | ||
|
||
.. code-block:: bash | ||
|
||
# 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 in `#fedora-cloud <irc://irc.freenode.net/fedora-cloud/>`_, or on the `fedora-cloud-sig mailing list <https://admin.fedoraproject.org/mailman/listinfo/cloud/>`_. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Amazon Elastic Compute Cloud (EC2) | ||
================================== | ||
|
||
Fedora's EC2 images follow the standard EC2 login conventions, meaning that root login is disabled, but sudo access is granted. | ||
|
||
**The default username for the images is ec2-user** | ||
|
||
Full documentation for interacting with EC2 is available from `Amazon Web Services <http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/>`_. | ||
|
||
Currently supported EC2 Images | ||
------------------------------ | ||
|
||
Visit `getfedora/cloud <https://getfedora.org/en/cloud/download/>`_ to know about currently supported Base Cloud Images for Amazon Public Cloud EC2. | ||
|
||
Custom Image Creation | ||
--------------------- | ||
|
||
Visit `Cloud_SIG/EC2Creation <https://fedoracloud.readthedocs.io/en/latest/ec2_creation.html/>`_ for instructions on how to build custiom versions of these images. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ Contents: | |
base | ||
docker | ||
irssi | ||
ec2_image | ||
ec2_creation | ||
contribute | ||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean S3 backend here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is S3 backed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool