{"id":2525,"date":"2018-07-17T04:25:14","date_gmt":"2018-07-17T04:25:14","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2525"},"modified":"2018-07-17T04:25:14","modified_gmt":"2018-07-17T04:25:14","slug":"create-and-launch-clear-linux-from-amazon-web-services","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2525","title":{"rendered":"Create and launch Clear Linux from Amazon Web Services"},"content":{"rendered":"<p>This tutorial walks you through creating and launching a Clear Linux\u00a0<abbr title=\"Amazon Machine Image\">AMI<\/abbr>\u00a0instance from the\u00a0<abbr title=\"Amazon Web Services\">AWS<\/abbr>\u00a0console and complete the following tasks:<\/p>\n<ol class=\"arabic simple\">\n<li>Locate and select the Clear Linux OS Basic AMI in the AWS Marketplace.<\/li>\n<li>Create a new public and private key pair to allow you to connect to your Clear Linux instance securely.<\/li>\n<li>Launch the new Clear Linux instance and connect to it.<\/li>\n<li>Update your instance of Clear Linux using the\u00a0<strong>swupd<\/strong>\u00a0command.<\/li>\n<li>Stop the Clear Linux instance.<\/li>\n<\/ol>\n<div id=\"prerequisites\" class=\"section\">\n<h2>Prerequisites<\/h2>\n<p>This tutorial assumes the following statements are true: * You are using a linux-based system to access AWS and can run\u00a0<strong>SSH<\/strong><\/p>\n<div>to access the remote Clear Linux AWS image.<\/div>\n<ul>\n<li>Your browser puts downloaded files in the\u00a0<span class=\"pre\">$HOME\/Downloads<\/span>\u00a0directory.<\/li>\n<li>You have already set up an AWS user account and logged into the AWS console.<\/li>\n<\/ul>\n<div class=\"admonition note\">\n<p class=\"first admonition-title\">Note<\/p>\n<p class=\"last\">This tutorial uses a Clear Linux 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\u00a0http:\/\/aws.amazon.com<span class=\"0\"><span class=\"element-invisible\">\u00a0<\/span><\/span>.<\/p>\n<\/div>\n<\/div>\n<div id=\"locate-select-and-launch-the-clear-linux-os-basic-ami\" class=\"section\">\n<h2>Locate, select, and launch the Clear Linux OS Basic AMI<\/h2>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">Start from your main AWS services console menu in your browser and select the\u00a0<em>EC2<\/em>\u00a0text as shown in figure 1:<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-1.png\" alt=\"AWS Console\" \/><\/p>\n<p class=\"caption\">Figure 1:\u00a0<em>AWS Console<\/em><\/p>\n<\/div>\n<p>This selection brings up your\u00a0<em>EC2 Dashboard<\/em>\u00a0menu.<\/li>\n<li>\n<p class=\"first\">To create a new Clear Linux instance from the\u00a0<em>EC2 Dashboard<\/em>\u00a0menu, select the\u00a0<em>Launch Instance<\/em>\u00a0button as shown in figure 2:<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-2.png\" alt=\"EC2 Dashboard\" \/><\/p>\n<p class=\"caption\">Figure 2:\u00a0<em>EC2 Dashboard<\/em><\/p>\n<\/div>\n<p>This selection takes you to the\u00a0<em>Step 1: Choose an Amazon Machine Image (AMI)<\/em>\u00a0menu.<\/li>\n<li>\n<p class=\"first\">To find the\u00a0<em>|CL| OS Basic<\/em>\u00a0AMI in the\u00a0<em>Step 1: Choose an Amazon Machine Image (AMI)<\/em>\u00a0menu, do the following:<\/p>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">In the lefthand navigation window, select the\u00a0<em>AWS Marketplace<\/em>\u00a0menu item to bring up the search bar to\u00a0<em>Search AWS Marketplace Products<\/em>.<\/p>\n<\/li>\n<li>\n<p class=\"first\">In the search bar, type clear linux os and hit the\u00a0<span class=\"pre\">Enter<\/span>\u00a0key to search for and locate the\u00a0<em>|CL| OS Basic<\/em>\u00a0AMI.<\/p>\n<\/li>\n<li>\n<p class=\"first\">Select the\u00a0<em>|CL| OS Basic<\/em>\u00a0AMI by clicking on the\u00a0<em>Select<\/em>\u00a0button as shown in figure 3:<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-3.png\" alt=\"Step 1: Choose AMI\" \/><\/p>\n<p class=\"caption\">Figure 3:\u00a0<em>Step 1: Choose AMI<\/em><\/p>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">A pop-up dialog box appears showing you more information about the\u00a0<em>|CL| OS Basic<\/em>\u00a0AMI along with the pricing details for running Clear Linux on different platform configurations as shown in figure 4. Select the\u00a0<em>Continue<\/em>\u00a0button.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-4.png\" alt=\"Clear Linux OS Basic\" \/><\/p>\n<p class=\"caption\">Figure 4:\u00a0<em>Clear Linux OS Basic<\/em><\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p class=\"first\">The\u00a0<em>Choose Instance Type<\/em>\u00a0menu appears as shown in figure 5.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-5.png\" alt=\"Choose an Instance Type\" \/><\/p>\n<p class=\"caption\">Figure 5:\u00a0<em>Choose an Instance Type<\/em><\/p>\n<\/div>\n<p>Select the\u00a0<em>t2.micro<\/em>\u00a0type by clicking the box on the left side of the instance and then select the\u00a0<em>Review and Launch<\/em>\u00a0button to move to the\u00a0<em>Step 7: Review the Instance Launch<\/em>\u00a0menu.<\/p>\n<div class=\"admonition note\">\n<p class=\"first admonition-title\">Note<\/p>\n<p class=\"last\">You can configure the instance details, add additional storage, add tags, and configure the security group before selecting the\u00a0<em>Review and Launch<\/em>\u00a0button if you want to further customize this Clear Linux instance.<\/p>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">The\u00a0<em>Step 7: Review the Instance Launch<\/em>\u00a0menu, shown in figure 6, allows you to\u00a0<em>Cancel<\/em>\u00a0the process, return to the\u00a0<em>Previous<\/em>screen to change the configuration or\u00a0<em>Launch<\/em>\u00a0the instance defined.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-6.png\" alt=\"Step 7: Review the Instance Launch\" \/><\/p>\n<p class=\"caption\">Figure 6:\u00a0<em>Step 7: Review the Instance Launch<\/em><\/p>\n<\/div>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">Select the\u00a0<em>Launch<\/em>\u00a0button. A dialog box appears, as shown in figure 7, asking you to\u00a0<em>Select an existing key pair or create a new pair<\/em>.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-7.png\" alt=\"Select an existing key pair or create a new pair\" \/><\/p>\n<p class=\"caption\">Figure 7:\u00a0<em>Select an existing key pair or create a new pair<\/em><\/p>\n<\/div>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">Select the\u00a0<em>Create a new key pair<\/em>\u00a0option.<\/p>\n<\/li>\n<li>\n<p class=\"first\">For the\u00a0<em>Key pair name<\/em>\u00a0field, enter AWSClearTestKey.<\/p>\n<\/li>\n<li>\n<p class=\"first\">Select the\u00a0<em>Download Key Pair<\/em>\u00a0button to download the\u00a0<span class=\"pre\">AWSClearTestKey.pem<\/span>\u00a0to your browser\u2019s defined\u00a0<span class=\"pre\">Downloads<\/span>directory.<\/p>\n<\/li>\n<li>\n<p class=\"first\">When the file finishes downloading, select the\u00a0<em>Launch Instances<\/em>\u00a0button to proceed to the\u00a0<em>Launch Status<\/em>\u00a0menu shown in figure 8.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-8.png\" alt=\"Launch Status\" \/><\/p>\n<p class=\"caption\">Figure 8:\u00a0<em>Launch Status<\/em><\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p class=\"first\">Once the\u00a0<em>Launch Status<\/em>\u00a0page changes to what is shown in figure 9, select the\u00a0<em>View Instances<\/em>\u00a0button to view your\u00a0<em>Instances<\/em>dashboard.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-9.png\" alt=\"View Instance\" \/><\/p>\n<p class=\"caption\">Figure 9:\u00a0<em>View Instance<\/em><\/p>\n<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/div>\n<div id=\"connect-to-your-clear-linux-os-basic-instance\" class=\"section\">\n<h2>Connect to your Clear Linux OS Basic instance<\/h2>\n<p>Your\u00a0<em>Instances<\/em>\u00a0Dashboard is shown in figure 10 with the new Clear Linux OS basic instance already selected and in the running state. If there are other instances available, they are also listed but not selected.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-10.png\" alt=\"Instance Dashboard\" \/><\/p>\n<p class=\"caption\">Figure 10:\u00a0<em>Instance Dashboard<\/em><\/p>\n<\/div>\n<ol class=\"arabic simple\">\n<li>To connect to your running instance, click the\u00a0<em>Connect<\/em>\u00a0button located at the top of your dashboard. AWS brings up the pop-up dialog box shown in figure 11 describing how to connect to your running instance.<\/li>\n<\/ol>\n<div id=\"fig-aws-web-11\" class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-11.png\" alt=\"Connect to Your Instance\" \/><\/p>\n<p class=\"caption\">Figure 11:\u00a0<em>Connect to Your Instance<\/em><\/p>\n<\/div>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">Open a terminal on your system. You should be in your\u00a0<span class=\"pre\">$HOME<\/span>\u00a0directory.<\/p>\n<\/li>\n<li>\n<p class=\"first\">Copy the previously downloaded keyfile from the\u00a0<span class=\"pre\">Downloads<\/span>\u00a0directory to the current directory.<\/p>\n<div class=\"highlight-console\">\n<div class=\"highlight\">\n<pre><span class=\"go\">cp Downloads\/AWSClearTestKey.pem .<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">Change the attributes of the\u00a0<span class=\"pre\">AWSClearTestKey.pem<\/span>\u00a0using the\u00a0<strong>chmod<\/strong>\u00a0command as instructed in the dialog box shown in figure 11.<\/p>\n<div class=\"highlight-console\">\n<div class=\"highlight\">\n<pre><span class=\"go\">chmod 400 AWSClearTestKey.pem<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">Copy the text highlighted in the\u00a0<em>Example:<\/em>\u00a0section that is shown in\u00a0<em>figure 11<\/em>. Paste the copied text into your terminal, change the text before the @ sign to the username clear, and press the\u00a0<span class=\"pre\">Enter<\/span>\u00a0key to execute the command.<\/p>\n<div class=\"highlight-console\">\n<div class=\"highlight\">\n<pre><span class=\"go\">ssh -i \"AWSClearTestKey.pem\" clear@ec2-34-209-39-184.us-west-2.compute.amazonaws.com<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">A message appears on the terminal stating the authenticty of the host can\u2019t be established and prompts you with the message:<\/p>\n<div class=\"highlight-console\">\n<div class=\"highlight\">\n<pre><span class=\"go\">The authenticity of host 'ec2-34-209-39-184.us-west-2.compute.amazonaws.com (34.209.39.184)' can't be established.<\/span>\r\n<span class=\"go\">ECDSA key fingerprint is SHA256:LrziT5Ar66iBTfia8qmiIsrfBUm\/UGam76U8bDR6yJc.<\/span>\r\n<span class=\"go\">Are you sure you want to continue connecting (yes\/no)?<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">Type yes and hit the\u00a0<span class=\"pre\">Enter<\/span>\u00a0key. Another warning is printed to the terminal and you are now at the command prompt of your new Clear Linux instance.<\/p>\n<div class=\"highlight-console\">\n<div class=\"highlight\">\n<pre><span class=\"go\">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.<\/span>\r\n<span class=\"go\">clear@clr-96a8565d0ca54b0c80364a1e5e7b0f88 ~ $<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<\/ol>\n<\/div>\n<div id=\"update-the-clear-linux-os-instance\" class=\"section\">\n<h2>Update the Clear Linux OS instance<\/h2>\n<p>Run the\u00a0<strong>sudo swupd update<\/strong>\u00a0command to update the operating system as shown in figure 12:<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-12.png\" alt=\"sudo swupd update\" \/><\/p>\n<p class=\"caption\">Figure 12:\u00a0<em>sudo swupd update<\/em><\/p>\n<\/div>\n<p>In this example we updated from version 18940 to 19100.<\/p>\n<\/div>\n<div id=\"stop-the-clear-linux-os-instance\" class=\"section\">\n<h2>Stop the Clear Linux OS instance<\/h2>\n<p>When you are finished using your AWS Clear Linux instance you need to stop it using the\u00a0<em>Instances<\/em>\u00a0dashboard to stop accruing charges. Complete the following steps from the\u00a0<em>Instances<\/em>\u00a0dashboard to stop your AWS Clear Linux instance from running.<\/p>\n<ol class=\"arabic\">\n<li>\n<p class=\"first\">Select the\u00a0<em>Actions<\/em>\u00a0button to bring up a pull-down menu.<\/p>\n<\/li>\n<li>\n<p class=\"first\">Select the\u00a0<em>Instance State<\/em>\u00a0menu item to expand the options.<\/p>\n<\/li>\n<li>\n<p class=\"first\">Select\u00a0<em>Stop<\/em>\u00a0menu item to shut down the running instance.<\/p>\n<p>Figure 13 illustrates these steps.<\/p>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-13.png\" alt=\"Stop Instance\" \/><\/p>\n<p class=\"caption\">Figure 13:\u00a0<em>Stop Instance<\/em><\/p>\n<\/div>\n<\/li>\n<li>\n<p class=\"first\">A pop-up dialog box appears warning you that any ephemeral storage of your instance will be lost. Select the\u00a0<em>Yes, Stop<\/em>\u00a0button to stop your Clear Linux instance.<\/p>\n<\/li>\n<\/ol>\n<div class=\"figure\"><img decoding=\"async\" src=\"https:\/\/clearlinux.org\/sites\/default\/files\/_images\/aws-web-14.png\" alt=\"Stop Instances\" \/><\/p>\n<p class=\"caption\">Figure 14:\u00a0<em>Stop Instances<\/em><\/p>\n<\/div>\n<p>Congratulations! You are up and running with Clear Linux on AWS.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial walks you through creating and launching a Clear Linux\u00a0AMI\u00a0instance from the\u00a0AWS\u00a0console and complete the following tasks: Locate and select the Clear Linux OS Basic AMI in the AWS Marketplace. Create a new public and private key pair to allow you to connect to your Clear Linux instance securely. Launch the new Clear Linux [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-2525","post","type-post","status-publish","format-standard","hentry","category-awsamazon-web-services-amazon"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2525"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2525\/revisions"}],"predecessor-version":[{"id":2526,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2525\/revisions\/2526"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}