Initial checkin of AWS web tutorial
This is the tutorial for creating and accessing a clear linux image on Amazon Web Services Signed-off-by: Tom Leavitt <30448839+tpleavitt@users.noreply.github.com>
@@ -0,0 +1,264 @@
|
||||
.. _aws-web:
|
||||
|
||||
Create and launch Clear Linux from Amazon Web Services
|
||||
######################################################
|
||||
|
||||
This tutorial walks you through creating and launching a |CL|
|
||||
:abbr:`AMI (Amazon Machine Image)` instance from the
|
||||
:abbr:`AWS (Amazon Web Services)` console. You will complete the following
|
||||
tasks:
|
||||
|
||||
#. Locate and select the |CL| OS Basic AMI in the AWS Marketplace.
|
||||
#. Create a new public and private key pair to allow you to connect to your
|
||||
|CL| instance securely.
|
||||
#. Launch the new |CL| instance and connect to it.
|
||||
#. Update your instance of |CL| using the :command:`swupd` command.
|
||||
#. Stop the |CL| instance.
|
||||
|
||||
Prerequisites
|
||||
*************
|
||||
|
||||
This tutorial assumes the following:
|
||||
* You are using a linux-based system to access AWS and can run :command:`SSH`
|
||||
to access the remote |CL| AWS image.
|
||||
* Your browser puts downloaded files in the :file:`$HOME/Downloads` directory.
|
||||
* You have already set up an AWS user account and logged in to the AWS
|
||||
console.
|
||||
|
||||
.. note::
|
||||
This tutorial uses a |CL| AMI t2.micro instance that is eligible for the
|
||||
AWS free tier. To learn more about AWS and setting up an account, visit the
|
||||
AWS website at http://aws.amazon.com.
|
||||
|
||||
Locate, select and launch the Clear Linux OS Basic AMI
|
||||
******************************************************
|
||||
|
||||
#. Start from your main AWS console, select :guilabel:`EC2` as shown in
|
||||
figure 1:
|
||||
|
||||
.. figure:: figures/aws-web-1.png
|
||||
:scale: 50 %
|
||||
:alt: AWS Console
|
||||
|
||||
Figure 1: :guilabel:`AWS Console`
|
||||
|
||||
This brings up your :guilabel:`EC2 Dashboard`.
|
||||
|
||||
#. To create a new |CL| instance from the :guilabel:`EC2 Dashboard` menu,
|
||||
select the :guilabel:`Launch Instance` as shown in figure 2:
|
||||
|
||||
.. figure:: figures/aws-web-2.png
|
||||
:scale: 50 %
|
||||
:alt: EC2 Dashboard
|
||||
|
||||
Figure 2: :guilabel:`EC2 Dashboard`
|
||||
|
||||
This takes you to the
|
||||
:guilabel:`Step 1: Choose an Amazon Machine Image (AMI)` menu.
|
||||
|
||||
#. To find the :guilabel:`|CL| OS Basic` AMI in the
|
||||
:guilabel:`Step 1: Choose an Amazon Machine Image (AMI)` menu, do the
|
||||
following:
|
||||
|
||||
#. In the lefthand navigation window, select the
|
||||
:guilabel:`AWS Marketplace` to bring up the search bar to
|
||||
:guilabel:`Search AWS Marketplace Products`.
|
||||
|
||||
#. In the search bar, type `clear linux os` and hit the :kbd:`Enter` key to
|
||||
search for and locate the :guilabel:`|CL| OS Basic` AMI.
|
||||
|
||||
#. Select the :guilabel:`|CL| OS Basic` AMI by clicking on the
|
||||
:guilabel:`Select` button as shown in figure 3:
|
||||
|
||||
.. figure:: figures/aws-web-3.png
|
||||
:scale: 50 %
|
||||
:alt: Step 1: Choose AMI
|
||||
|
||||
Figure 3: :guilabel:`Step 1: Choose AMI`
|
||||
|
||||
#. A pop-up dialog box appears showing you more information about the
|
||||
:guilabel:`|CL| OS Basic` AMI along with the pricing details for running
|
||||
|CL| on different platform configurations as shown in figure 4. Select
|
||||
the :guilabel:`Continue` button.
|
||||
|
||||
.. figure:: figures/aws-web-4.png
|
||||
:scale: 50 %
|
||||
:alt: Clear Linux OS Basic
|
||||
|
||||
Figure 4: :guilabel:`Clear Linux OS Basic`
|
||||
|
||||
#. The :guilabel:`Choose Instance Type` menu appears as shown in figure 5.
|
||||
|
||||
Select the :guilabel:`t2.micro` type by clicking the box on the left side
|
||||
of the instance and then select the :guilabel:`Review and Launch` button to
|
||||
move to the :guilabel:`Step 7: Review the Instance Launch` menu.
|
||||
|
||||
.. note::
|
||||
|
||||
You can configure the instance details, add additional storage, add tags
|
||||
and configure the security group before selecting the
|
||||
:guilabel:`Review and Launch` button if you want to further customize
|
||||
this |CL| instance.
|
||||
|
||||
.. figure:: figures/aws-web-5.png
|
||||
:scale: 50 %
|
||||
:alt: Choose an Instance Type
|
||||
|
||||
Figure 5: :guilabel:`Choose an Instance Type`
|
||||
|
||||
#. The :guilabel:`Step 7: Review the Instance Launch` menu allows you to
|
||||
:guilabel:`Cancel` the process, return to the :guilabel:`Previous` screen
|
||||
to change the configuration or :guilabel:`Launch` the instance defined.
|
||||
|
||||
.. figure:: figures/aws-web-6.png
|
||||
:scale: 50 %
|
||||
:alt: Step 7: Review the Instance Launch
|
||||
|
||||
Figure 6: :guilabel:`Step 7: Review the Instance Launch`
|
||||
|
||||
#. Select the :guilabel:`Launch` button. A dialog box pops appears, as
|
||||
shown in figure 7, asking you to
|
||||
:guilabel:`Select an existing key pair or create a new pair`.
|
||||
|
||||
.. figure:: figures/aws-web-7.png
|
||||
:scale: 50 %
|
||||
:alt: Select an existing key pair or create a new pair
|
||||
|
||||
figure 7: :guilabel:`Select an existing key pair or create a new pair`
|
||||
|
||||
#. Select the :guilabel:`Create a new key pair` option.
|
||||
#. For the :guilabel:`Key pair name`, enter `AWSClearTestKey`.
|
||||
#. Select the :guilabel:`Download Key Pair` button to download the
|
||||
:file:`AWSClearTestKey.pem` to your browser's defined
|
||||
:file:`Downloads` directory.
|
||||
#. When the file finishes downloading, select the
|
||||
:guilabel:`Launch Instances` to proceed to the :guilabel:`Launch
|
||||
Status` menu shown in figure 8.
|
||||
|
||||
.. figure:: figures/aws-web-8.png
|
||||
:scale: 50 %
|
||||
:alt: Launch Status
|
||||
|
||||
figure 8: :guilabel:`Launch Status`
|
||||
|
||||
#. Once the :guilabel:`Launch Status` page changes to what is shown in
|
||||
figure 9, select the :guilabel:`View Instances` button to view your
|
||||
:guilabel:`Instances` dashboard.
|
||||
|
||||
.. figure:: figures/aws-web-9.png
|
||||
:scale: 50 %
|
||||
:alt: View Instance
|
||||
|
||||
figure 9: :guilabel:`View Instance`
|
||||
|
||||
Connect to your Clear Linux OS Basic instance
|
||||
*********************************************
|
||||
|
||||
Your :guilabel:`Instances` Dashboard is shown in figure 10 with the new |CL|
|
||||
OS basic instance already selected and in the running state. If there are
|
||||
other instances available, they will also be listed but not selected.
|
||||
|
||||
|
||||
.. figure:: figures/aws-web-10.png
|
||||
:scale: 50 %
|
||||
:alt: Instance Dashboard
|
||||
|
||||
figure 10: :guilabel:`Instance Dashboard`
|
||||
|
||||
To connect to your running instance, click the :guilabel:`Connect` button
|
||||
located at the top of your dashboard. This will bring up the pop-up dialog
|
||||
box shown in figure 11 describing how to connect to your running instance.
|
||||
|
||||
.. figure:: figures/aws-web-11.png
|
||||
:scale: 50 %
|
||||
:alt: Connect to Your Instance
|
||||
|
||||
figure 11: :guilabel:`Connect to Your Instance`
|
||||
|
||||
#. Open a terminal on your system. You should be in your :file:`$HOME`
|
||||
directory.
|
||||
#. Copy the previously downloaded keyfile you created earlier from the
|
||||
:file:`Downloads` directory to the current directory.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
cp Downloads/AWSClearTestKey.pem .
|
||||
|
||||
#. Change the attributes of the :file:`AWSClearTestKey.pem` using the
|
||||
:command:`chmod` as instructed in the dialog box shown in figure 11.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
chmod 400 AWSClearTestKey.pem
|
||||
|
||||
#. Select the entire text highlighted in the :guilabel:`Example:` that is
|
||||
shown in figure 11 and paste it into your terminal and add the following
|
||||
text to the end of the command string: `-l clear`. Press the :kbd:`Enter`
|
||||
key to execute the command.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
ssh -i "AWSClearTestKey.pem" root@ec2-34-209-39-184.us-west-2.compute.amazonaws.com -l clear
|
||||
|
||||
#. A message will appear on the terminal the the authenticty of the host can't
|
||||
be established and prompts you with the message:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
The authenticity of host 'ec2-34-209-39-184.us-west-2.compute.amazonaws.com (34.209.39.184)' can't be established.
|
||||
ECDSA key fingerprint is SHA256:LrziT5Ar66iBTfia8qmiIsrfBUm/UGam76U8bDR6yJc.
|
||||
Are you sure you want to continue connecting (yes/no)?
|
||||
|
||||
#. type `yes` and hit the :kbd:`Enter` key. A warning will be printed to the
|
||||
terminal and you will be at the command prompt of your new instance.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Warning: Permanently added 'ec2-34-209-39-184.us-west-2.compute.amazonaws.com,34.209.39.184' (ECDSA) to the list of known hosts.
|
||||
clear@clr-96a8565d0ca54b0c80364a1e5e7b0f88 ~ $
|
||||
|
||||
Update the Clear Linux OS instance
|
||||
**********************************
|
||||
|
||||
With the command prompt sitting in the :file:`$HOME` directory of your new
|
||||
|CL| instance, run the :command:`sudo swupd update` to update the operating
|
||||
system as shown in figure 12:
|
||||
|
||||
.. figure:: figures/aws-web-12.png
|
||||
:scale: 50 %
|
||||
:alt: sudo swupd update
|
||||
|
||||
figure 12: :guilabel:`sudo swupd update`
|
||||
|
||||
In this example we updated from version 18940 to 19100.
|
||||
|
||||
Stop the Clear Linux OS instance
|
||||
********************************
|
||||
|
||||
When you are finished using your AWS |CL| instance you need to stop it from
|
||||
the :guilabel:`Instances` dashboard to stop accruing charges while it is
|
||||
running. With the current running instance highlighted:
|
||||
|
||||
#. Select the :guilabel:`Actions` button to bring up a pull-down menu.
|
||||
#. Select the :guilabel:`Instance State` to expand the options
|
||||
#. Select :guilabel:`Stop` to shut down the running instance
|
||||
|
||||
These steps are illustrated in figure 13.
|
||||
|
||||
.. figure:: figures/aws-web-13.png
|
||||
:scale: 50 %
|
||||
:alt: Stop Instance
|
||||
|
||||
figure 13: :guilabel:`Stop Instance`
|
||||
|
||||
#. A pop-up dialog box will appear warning you that an ephemeral storage of
|
||||
your instance will be lost. Select :guilabel:`Yes, Stop` to stop your |CL|
|
||||
instance.
|
||||
|
||||
.. figure:: figures/aws-web-14.png
|
||||
:scale: 50 %
|
||||
:alt: Stop Instances
|
||||
|
||||
figure 14: :guilabel:`Stop Instances`
|
||||
|
||||
That's it. You are up and running with |CL| on AWS!
|
||||
|
After Width: | Height: | Size: 255 KiB |
|
After Width: | Height: | Size: 213 KiB |
|
After Width: | Height: | Size: 307 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 221 KiB |
|
After Width: | Height: | Size: 275 KiB |
|
After Width: | Height: | Size: 295 KiB |
|
After Width: | Height: | Size: 161 KiB |
|
After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 272 KiB |
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 277 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 213 KiB |
@@ -15,4 +15,5 @@ specific |CLOSIA| use cases.
|
||||
azure
|
||||
multi-boot/multi-boot
|
||||
hadoop
|
||||
fmv
|
||||
fmv
|
||||
aws-web/aws-web
|
||||