{"id":3494,"date":"2018-08-26T14:49:00","date_gmt":"2018-08-26T19:49:00","guid":{"rendered":"https:\/\/dev.iachieved.it\/iachievedit\/?p=3494"},"modified":"2018-08-26T14:49:00","modified_gmt":"2018-08-26T19:49:00","slug":"ubuntu-18-04-on-aws","status":"publish","type":"post","link":"https:\/\/dev.iachieved.it\/iachievedit\/ubuntu-18-04-on-aws\/","title":{"rendered":"Ubuntu 18.04 on AWS"},"content":{"rendered":"<p>Ubuntu <a href=\"https:\/\/wiki.ubuntu.com\/BionicBeaver\/ReleaseNotes\/18.04\">18.04<\/a> Bionic Beaver was <a href=\"https:\/\/wiki.ubuntu.com\/BionicBeaver\/ReleaseSchedule\">released<\/a> several months ago now, and is currently (as of this writing) not available as a <em>Quick Start<\/em> AMI on AWS.  But that&#8217;s okay, it is easy to create your own AMI based on 18.04.  We&#8217;ll show you how!<\/p>\n<p>Some assumptions, though.  We&#8217;re going to assume you know your way around the AWS EC2 console, and have launched an instance or two in your time.  If you haven&#8217;t, AWS itself has a <a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/EC2_GetStarted.html\">Getting Started<\/a> guide just for you.<\/p>\n<h2>Starting with 16.04<\/h2>\n<p>First, create an Ubuntu Server 16.04 EC2 instance in AWS with <code>ami-0552e3455b9bc8d50<\/code>, which is found under the <em>Quick Start<\/em> menu.  A t2.micro instance is fine as we&#8217;re only going to be using it to build an 18.04 AMI.<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami.png\" alt=\"\" width=\"1076\" height=\"109\" class=\"aligncenter size-full wp-image-3495\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami.png 1076w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami-300x30.png 300w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami-768x78.png 768w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1604ami-1024x104.png 1024w\" sizes=\"(max-width: 1076px) 100vw, 1076px\" \/><\/a><\/p>\n<p>Once the instance is available, <code>ssh<\/code> to it.<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/login.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/login.png\" alt=\"\" width=\"585\" height=\"476\" class=\"aligncenter size-full wp-image-3496\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/login.png 585w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/login-300x244.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/a><\/p>\n<p>Notice that the OS is Ubuntu 16.04.5.  We&#8217;re now going to upgrade it to 18.04.1 with <a href=\"http:\/\/manpages.ubuntu.com\/manpages\/xenial\/man8\/do-release-upgrade.8.html\"><code>do-release-upgrade<\/code><\/a>.  First, run <code>sudo apt-get update<\/code>, followed by <code>sudo do-release-upgrade<\/code>.<\/p>\n<p>The upgrade script will detect that you are connected via an SSH session, and warn that performing an upgrade in such a manner is &#8220;risky.&#8221;  We&#8217;ll take the risk and type <code>y<\/code> at the prompt.<\/p>\n<p>[code lang=text]<br \/>\nThis session appears to be running under ssh. It is not recommended<br \/>\nto perform a upgrade over ssh currently because in case of failure it<br \/>\nis harder to recover.<\/p>\n<p>If you continue, an additional ssh daemon will be started at port<br \/>\n&#039;1022&#039;.<br \/>\nDo you want to continue?<\/p>\n<p>Continue [yN]<br \/>\n[\/code]<\/p>\n<p>You&#8217;ll get another warning about firewalls and iptables.  Continue here as well!<\/p>\n<p>[code lang=text]<br \/>\nTo continue please press [ENTER]<br \/>\n[\/code]<\/p>\n<p>Terrific, another warning!  We&#8217;re about to do some seriously downloading, and hopefully it won&#8217;t take 6 hours.<\/p>\n<p>[code lang=text]<br \/>\nYou have to download a total of 173 M. This download will take about<br \/>\n21 minutes with a 1Mbit DSL connection and about 6 hours with a 56k<br \/>\nmodem.<\/p>\n<p>Fetching and installing the upgrade can take several hours. Once the<br \/>\ndownload has finished, the process cannot be canceled.<\/p>\n<p> Continue [yN]  Details [d]<br \/>\n[\/code]<\/p>\n<p>Of course, press <code>y<\/code> to continue, and confirm that we also want to remove obselete packages.<\/p>\n<p>[code lang=text]<br \/>\nRemove obsolete packages?<\/p>\n<p>28 packages are going to be removed.<\/p>\n<p> Continue [yN]  Details [d]<br \/>\n[\/code]<\/p>\n<p>At this point the installation and upgrade of packages should actually begin.  There is a good chance that you&#8217;ll be interrupted with a couple screens requesting what version of GRUB and ssh configuration files you want to use.  I typically keep the <em>currently installed<\/em> version of a configuration file, as it is likely I&#8217;ve made edits (through Ansible of course) to a given file.  Rather than do diffs or merges at this point, I&#8217;ll wait until the upgrade is complete to review the files.<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/grub.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/grub.png\" alt=\"\" width=\"585\" height=\"476\" class=\"aligncenter size-full wp-image-3497\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/grub.png 585w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/grub-300x244.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><\/a><\/p>\n<p>Once the upgrade is completed you&#8217;ll be prompted to reboot.<\/p>\n<p>[code lang=text]<br \/>\nSystem upgrade is complete.<\/p>\n<p>Restart required<\/p>\n<p>To finish the upgrade, a restart is required.<br \/>\nIf you select &#039;y&#039; the system will be restarted.<\/p>\n<p>Continue [yN]<br \/>\n[\/code]<\/p>\n<p>After the reboot is completed, login (via <code>ssh<\/code>) and you should be greeted with<\/p>\n<p>[code lang=text]<br \/>\nWelcome to Ubuntu 18.04.1 LTS (GNU\/Linux 4.15.0-1020-aws x86_64)<br \/>\n[\/code]<\/p>\n<p>Terrific!  We have a pristine Ubuntu 18.04.1 LTS instance on Linux 4.15.  We&#8217;re going to use this instance to make a template (AMI) from which to create more.<\/p>\n<p>To start this process, stop the instance in the EC2 console.  Once the instance is stopped, right-click on it and under the <em>Image<\/em> menu, select <em>Create Image<\/em>.<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/create_image.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/create_image.png\" alt=\"\" width=\"687\" height=\"266\" class=\"aligncenter size-full wp-image-3500\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/create_image.png 687w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/create_image-300x116.png 300w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/a><\/p>\n<p>AWS will pop up a dialog indicating <em>Create Image request received.<\/em> with a link for viewing the pending image.  Click on this link, and at this point you can name the AMI, as well as refer to it by its AMI ID.<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/image.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/image.png\" alt=\"\" width=\"993\" height=\"115\" class=\"aligncenter size-full wp-image-3501\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/image.png 993w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/image-300x35.png 300w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/image-768x89.png 768w\" sizes=\"(max-width: 993px) 100vw, 993px\" \/><\/a><\/p>\n<p>Wait until the <em>Status<\/em> of the AMI is available before continuing!<\/p>\n<h2>Creating An 18.04.1 LTS Instance<\/h2>\n<p>Go back to the EC2 console and delete (terminate) the t2.micro instance we created, as it is no longer needed.  Then, click <em>Launch Instance<\/em> and select <em>My AMIs<\/em>.  You should see your new Ubuntu 18.04.1 LTS AMI.  Select it and configure your instance (type, storage, security groups, etc.) and launch it!<\/p>\n<p><a href=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1804ami.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1804ami.png\" alt=\"\" width=\"1007\" height=\"267\" class=\"aligncenter size-full wp-image-3502\" srcset=\"https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1804ami.png 1007w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1804ami-300x80.png 300w, https:\/\/dev.iachieved.it\/iachievedit\/wp-content\/uploads\/2018\/08\/1804ami-768x204.png 768w\" sizes=\"(max-width: 1007px) 100vw, 1007px\" \/><\/a><\/p>\n<p>Once your instance is available, <code>ssh<\/code> to it and see that you&#8217;ve just created an Ubuntu 18.04.1 Bionic Beaver server in AWS, and you have an AMI available to build as many as you like!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 18.04 Bionic Beaver was released several months ago now, and is currently (as of this writing) not available as a Quick Start AMI on AWS. But that&#8217;s okay, it is easy to create your own AMI based on 18.04. We&#8217;ll show you how! Some assumptions, though. We&#8217;re going to assume you know your way [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3505,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,71],"tags":[],"class_list":["post-3494","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3494"}],"collection":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/comments?post=3494"}],"version-history":[{"count":5,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3494\/revisions"}],"predecessor-version":[{"id":3507,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3494\/revisions\/3507"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media\/3505"}],"wp:attachment":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media?parent=3494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/categories?post=3494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/tags?post=3494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}