Roll your own virtual server in the cloud – Part 1
Getting started with Amazon’s cloud platform to run websites and services, part 1.
Did you know there’s this place where you can grab a server and a copy of an enterprise-grade operating system, power it up and run any web service you can think of, for free, for a year?
I am of course referring to cloud computing services. They offer what is really an amazing set of real-world usable features, and Amazon’s offering (AWS), which is the topic here, is really free to use for a year for new subscribers (with some caveats, but nothing deal-breaking).
There are a lot of benefits to using AWS:
- The connection speed from your service to the rest of the world is excellent over a large portion of the internet
- The connection requirements from you to managing the service is very lightweight, so you can easily manage it even if you are on a slow connection
- You will learn a lot of real-world useful stuff if you do this. The building blocks are not hidden behind monolithic hosting or do-it-for-you cPanel tools, but are laid bare for you to manage and tinker with
- You get great management and monitoring tools for free, and service uptime is as good as 100%
Any downsides? Sure, there are at least two obvious ones:
- Cost. The service is free for one year, but not if you get a lot of traffic. With AWS, you pay per transferred amount of data from and to your service, after the first year and within limits, so if your service gets very popular, it will create proportional revenue! If it doesn’t, you have a problem.
- Steep learning curve. Getting started, especially if you have limited Linux and/or command line experience, can be intimidating and at times frustrating.
This article and the forthcoming part 2 and 3 is here to mitigate that last point.
Setting up your AWS account
Before you start setting up any virtual servers, you do of course need to set up your AWS account. You do this from http://console.aws.amazon.com/
Enter an email address and click on ‘I am a new user’, and follow the instructions and fill in the required information over the next couple of pages. You do need a valid and present phone (for verification in one of the steps), and a valid credit/debit card available. Although AWS will ask for your card details, your card will NOT be charged the first year.
When you have created and verified your account, sign in to your newly minted empty account.
The first thing you should do is to select a region (upper left corner). This will determine where your virtual servers and resources are created physically. I personally use Ireland, but the most important thing is that you stick to whatever you choose here – if you log in one fine day and find your virtual servers are nowhere to be found, don’t panic! Check the same region setting, it has probably just jumped to another region.
Creating a Key pair
You log in to the AWS management console with a (hopefully well-chosen) password, but the way you authenticate when you log in to your created server (EC2 instances in AWS lingo) is by the use of a private-public key pair. This both authenticates your log-in and encrypts the communication between you and the instances.
To create this key pair, go to the section of AWS where you manage your virtual EC2 instances (click on EC2). There find and click on ‘Key Pairs’ in the left side menu, then on ‘Create Key Pair’, which will instantaneously create a pair for you and download the private key to your computer. The public part will remain, and display, in the AWS console (which is how key pairs work).
The private key file that was downloaded you should move to a good, known folder on your computer, and keep secure and private. It is literally your key to your AWS playground.
Creating your first Linux instance
Time to actually create your virtual server and install an OS on it! This is done in AWS by choosing an OS image file (Amazon Machine Image, AMI) to use. AWS will create the instance and install the OS on it in one operation.
Click on ‘Instances’ in the left side menu, then ‘Launch Instance’. You’ll get to see a list of OS alternatives to use. I personally use CentOS (for historical reasons, your preference might be different. If you are an ardent fan of another Linux
variant, sorry distro, by all means go ahead). To get to the latest version of CentOS, click on the AWS Marketplace option to the left, then search for ‘CentOS’. This will show the alternative we will use, “CentOS 7 (x86_64) – with Updates HVM” as the top search result.
Click Select next to it. The next screen will show you alternatives for what kind of hardware you want to install the instance on. Yes, the servers might be virtual, but at the end of the day, they still run on one piece of actual hardware. The pre-selected alternative is the one we want, t2.micro. Your instance will then run on one CPU core with 1 GB RAM. This might not sound like much, but remember it is running a highly efficient server OS with minimal overhead. Believe me, it can do a lot of intense serving!
Go ahead and click on ‘Review and Launch’. You will see some warning about the ‘Security Group’. Ignore for now, and click ‘Launch’, then when prompted select the key pair you created (if you didn’t you can create a pair here). The pair you created should be pre-selected, so just click ‘Launch Instance’.
AWS will now set up the instance and install the OS on it. It might take a few minutes. You can wait while the page refreshes to show you what’s going on, or switch to the Instances monitoring page, where the status will show ‘Initializing’ until ready.
You are now finally ready to log in to your new server and start installing software on it. This will be covered in the next part. Stay tuned!
If you wish to attend and learn more please reserve your place by following the link, AWS Part 2. The training will be at Bongohive today from 18:00hrs to 20:00hrs.
2 thoughts on “Roll your own virtual server in the cloud – Part 1”
Thanks for sharing this- good stuff! Keep up the great work, we look forward to reading more from you in the future!
This is commonly completed if the news predicted a drastic marketplace adjust.
As prices vary depending on various factors for
example experience, a higher level technical expertise and reputation, it is
important to identify the most effective mobile computer repairs
Brisbane service remember your budget and exact requirement.
Not only does both heat and freezing temps suck living through
your battery, nevertheless it causes damage to your internal components.
Comments are closed.