[cloud-guide] Added first section of https://fedoraproject.org/wiki/User:Gholms/EC2_Primer Thanks to Garrett Holms

Jared Smith jsmith at fedoraproject.org
Tue Oct 18 22:31:51 UTC 2011


commit 8b52514c7ef9dfb9f95ca97dad263dfc2d7a0e83
Author: Jared K. Smith <jsmith at fedoraproject.org>
Date:   Tue Oct 18 18:28:16 2011 -0400

    Added first section of https://fedoraproject.org/wiki/User:Gholms/EC2_Primer
    Thanks to Garrett Holmstrom for writing up this primer on the wiki

 en-US/AmazonEC2.xml |  186 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 174 insertions(+), 12 deletions(-)
---
diff --git a/en-US/AmazonEC2.xml b/en-US/AmazonEC2.xml
index 2179e26..c95a467 100644
--- a/en-US/AmazonEC2.xml
+++ b/en-US/AmazonEC2.xml
@@ -8,11 +8,146 @@
 	<para></para>
 	<section>
 		<title>Overview of EC2</title>
-		<para>The Amazon EC2 provides a place for anyone with an account to create and operate their own virtualized computing environment.  As one of the largest Infrastructure-as-a-Service (IaaS) providers, Amazon provides an almost unlimited </para>
+		<para>Amazon Web Services (commonly refered to as
+<acronym>AWS</acronym>) is a <emphasis>public cloud</emphasis>, a
+collection of computing services that allows one to build and run
+software services in Amazon's data centers.  Fedora publishes system
+images for AWS's virtual machine platform, <emphasis>Amazon Elastic
+Compute Cloud</emphasis> (or <acronym>EC2</acronym>), which allows one
+to create virtual machines in the Amazon cloud with very little effort.
+The objective of this section is to familiarize the reader with EC2's
+terminology and functionality.  For more detailed documentation, see the
+<ulink url="http://aws.amazon.com/">AWS website</ulink>.</para>
 	</section>
 	<section>
+		<title>EC2 concepts</title>
+		<para>What follows are some short explanations of EC2 terminology.
+For more detailed information, see the <ulink
+url="http://aws.amazon.com/documentation/ec2/">EC2
+documentation</ulink>.</para>
+		<section>
+			<title>Images and Instances</title>
+			<para>A <emphasis>machine image</emphasis> is a snapshot of a
+system (specifically its root filesystem) that provides the basis for a
+virtual machine in EC2.  When you run a new virtual machine in EC2 you
+choose a machine image to use as a template.  The new virtual machine is
+then an <emphasis>instance</emphasis> of that machine image that
+contains its own copy of everything in the image.  The instance keeps
+running until you stop or terminate it, or until it fails.  If an
+instance fails, you can launch a new one from the same image.  You can
+create multiple instances of a single machine image.  Each instance will
+be independent of the others.</para>
+
+			<para>You can use a single image or multiple images, depending
+on your needs.  From a single image, you can launch different types of
+instances.  An <emphasis>instance type</emphasis> defines what hardware
+the instance has, including the amount of memory, disk space, and CPU
+power.</para>
+
+			<para>Amazon, Fedora, other groups, and individuals publish
+images for public use.  You might only need to use images that reputable
+sources provide, and you can simply customize the resulting instances to
+suit your needs as you launch them.  You can also create your own
+machine images, but that is beyond the scope of this document.</para>
+
+			<para>Machine images in EC2 are sometimes referred to as
+<emphasis>AMIs</emphasis>.</para>
+
+			<para>Machine images have identifiers that begin with
+<literal>ami</literal>, such as <literal>ami-6ebe4507</literal>.
+Instances have identifiers that begin with the letter
+<literal>i</literal>, such as <literal>i-12459dbd</literal>.</para>
+		</section>
+		<section>
+			<title>Regions and Availability Zones</title>
+			<para>Amazon hosts datacenters many parts of the world.  Those
+from a particular part of the world make up a
+<emphasis>region</emphasis>.  Regions' names are based on their
+locations, such as in <literal>us-east-1</literal>.</para>
+
+			<para>Regions are broken up into <emphasis>availability
+zones</emphasis>, which are designed to isolate failures from one
+another but still provide faster communication than communication
+between regions.  Distributing a web application amongst several
+availability zones can help improve its reliability if an availability
+zone encounters problems.  Availability zones' names are based on the
+regions in which they reside, such as
+<literal>us-east-1a</literal>.</para>
+		</section>
+		<section>
+			<title>Storage</title>
+			<para>EC2 instances use one or more of three types of storage provided by AWS:</para>
+			<section>
+				<title>Simple Storage Service (S3)</title>
+				<para>Amazon Simple Storage Service (S3) is a web
+service-based storage system that is accessible inside EC2 and elsewhere
+on the Internet.  As this document will not focus on S3, see the
+<ulink url="http://aws.amazon.com/s3">Amazon S3</ulink> documentation
+for more details.</para>
+			</section>
+			<section>
+				<title>Elastic Block Store (EBS)</title>
+				<para>Amazon Elastic Block Store (EBS) provides instances
+with persistent, disk-like storage that you can attach to and detach
+from instances, similar to portable disk drives.  By creating EBS
+<emphasis>volumes</emphasis> and attaching them to instances you can
+store data that you wish to be portable to more than one instance in the
+event an instance fails or is replaced.  Since instances' root
+filesystem tend to have limited space, volumes also provide a simple way
+of adding additional disk capacity to instances.</para>
+
+				<para>Volumes have identifiers that begin with
+<literal>vol</literal>, such as <literal>vol-ffe93704</literal>.</para>
+
+				<para>You can create a backup <emphasis>snapshot</emphasis> of a volume.
+From the snapshot you can then create a new volume and attach it to
+another instance.  You can create multiple volumes from the same
+snapshot.  Each volume will be independent of the others.</para>
+
+				<para>Snapshots have identifiers that begin with
+<literal>snap</literal>, such as <literal>snap-773491a0</literal>.</para>
+			</section>
+			<section>
+				<title>Instance Storage</title>
+				<para>Some instance types have <emphasis>instance
+storage</emphasis>, scratch space that persists only as long as an
+instance runs.  Instance storage is destroyed when an instance stops,
+terminates, or fails.  For this reason, it is also referred to as
+ephemeral storage.</para>
+				<para>When EC2 was first introduced, all machine images were
+<emphasis role="strong">backed by instance storage</emphasis>, meaning that
+their instances' root filesystems were stored in instance storage.  Machine
+images can now also be <emphasis role="strong">backed by EBS</emphasis>,
+meaning that their instances' root filesystem instead reside on EBS
+volumes.</para>
+			</section>
+		</section>
+		<section>
+			<title>Security Groups</title>
+			<para> A <emphasis>security group</emphasis> defines
+firewall rules for your EC2 instances.  These rules specify which incoming
+network traffic should be delivered to an instance (e.g., accept web traffic on
+port <literal>80</literal> or SSH traffic on port <literal>22</literal>).  All
+other traffic is ignored.  By default, a security group has no rules, which
+causes it to block all incoming traffic.  You can modify the rules for a
+security group at any time.</para>
+
+			<para>Every instance runs inside of a security group.
+You can create your own security groups, or you can use the
+<literal>default</literal> security group that EC2 provides for you.  When you
+run a new instance it will run in the <literal>default</literal> security group
+unless you choose a different one.</para>
+
+		</section>
+	</section>
+
+	<section>
 		<title>Signing up for an EC2 account</title>
-		<para/>
+		<para> To use AWS you need to create an online account.  You can do this by following the steps below:</para>
+		<note>
+			<title>Amazon AWS is not free</title>
+			<para>AWS is designed as a pay-as-you-go online service.  Much of EC2 is free for new users; the rest is available for per-hour or per-month fees that are detailed on the <ulink url="http://aws.amazon.com/ec2/#pricing">EC2 Website</ulink>.  As such, Amazon requests a credit card number to keep on file with your new account.</para>
+		</note>
 		<procedure>
 			<step>
 				<title>Launch Web Browser</title>
@@ -111,17 +246,43 @@
 		</procedure>
 	</section>
 	<section>
-		<title>Access Identifiers</title>
-		<para/>
-	</section>
-	<section>
-		<title>AMIs and the available Fedora AMIs</title>
-		<para/>
-	</section>
-	<section>
-		<title>Connecting to EC2 via ElasticFox</title>
-		<para/>
+		<title>Connecting to EC2 using euca2ools</title>
+		<para>One can interact with EC2 through either a web-based <ulink url="https://console.aws.amazon.com/ec2/">management console</ulink> or via <application>euca2ools</application>, a suite of command line tools designed for services like EC2.  This tutorial will focus on using EC2 with euca2ools at the command line.</para>
+
+<para>To using the command line tools you first need to obtain access keys for
+your account.  You can find them by going to the AWS management console on the
+web, clicking your name on the top, followed by <emphasis>Security
+Credentials</emphasis>, and scrolling down to the section titled
+<emphasis>Access Credentials</emphasis>.  Make note of the <emphasis>Access Key
+ID</emphasis> and the <emphasis>Secret Access Key</emphasis> that appears
+beside it.  Both of them should be long sets of alphanumeric characters.
+Create a file called <filename>.iamrc</filename> in your home directory that
+contains those keys in this format:</para>
+
+<programlisting>
+AWSAccessKeyId=<replaceable>your_access_key_id</replaceable>
+AWSSecretKey=<replaceable>your_secret_key</replaceable>
+</programlisting>
+
+<para>Since euca2ools is designed to work with all AWS-compatible clouds, not just AWS itself, it needs to know which cloud to contact.  Create a file called <filename>.eucarc</filename> in your home directory with the following content to point it toward AWS:</para>
+
+<programlisting>
+export AWS_CREDENTIAL_FILE=~/.iamrc
+export EC2_URL=https://ec2.amazonaws.com/
+export S3_URL=https://s3.amazonaws.com/
+export EUARE_URL=https://iam.amazonaws.com/
+
+source "$AWS_CREDENTIAL_FILE"
+export EC2_ACCESS_KEY=$AWSAccessKeyId
+export EC2_SECRET_KEY=$AWSSecretKey
+export AWS_ACCESS_KEY=$AWSAccessKeyId
+export AWS_SECRET_ACCESS_KEY=$AWSSecretKey
+</programlisting>
+
+<para>Finally, add these settings to your shell's environment by running: <command><prompt>$ </prompt>source ~/.eucarc</command></para>
+
 	</section>
+<!--
 	<section>
 		<title>Connecting to EC2 via Amazon's Web Interface</title>
 		<para/>
@@ -130,4 +291,5 @@
 		<title>Connecting to EC2 via Python Boto</title>
 		<para/>
 	</section>
+-->
 </section>


More information about the docs-commits mailing list