Wednesday, September 14, 2016

AWS Crash Course

It always starts this way...

I have been interviewing a lot lately, and one of the big things I've been lacking in my tool belt has been actual AWS experience.  My go-to response has been to point out that AWS is only a sort of VMWare for the cloud, and that given a short amount of time with some API documentation, and I'd be fine learning on my feet, etc.

I suppose you can't blame them for not having faith in my abilities to learn on my feet.  :)

So at this point, my intention is to document the trials and tribulations I encounter, cracking the AWS box open for the first time ever, with the intention of teaching myself the essentials, and perhaps helping anyone else who might be in need of this.

My gut tells me that it is going to be REALLY EASY, and that there will very likely be numerous SDK's out there that make the management of my little cloud via code even easier.

Let's see how this pans out.

First Impressions

Very easy to create a new account. It appears to be free, though that remains to be seen. 
I can already see that what AWS has to offer is pretty neat. 
It appears that the first thing I'm going to want to do is to launch an EC2 instance.

EC2

Since my goal is to begin at the beginning...

EC2 is the first service type I'm going to delve into.  It seems to be like a VM hosted "out there", so lets see if that hunch turns out to be correct.

Launch EC2 Instance

Wow, they really made this front-end easy to deal with. Not at all difficult to see that I can launch via a prefab AMI (Amazon Machine Image) of RHEL, SLES, and Ubuntu varieties, plus Amazon Linux (probably some CoreOS variant), and of course, Windows.
So I'm looking at this, and assuming that there is a direct analog through an API to do this very same selection of their canned variants, and I will likely be able to create my own variant via Dockerfile/etc.
I'm selecting an Ubuntu image, and (filtering by free tier eligibility) can see that they have created instance types suited for various different use-cases. 

Connecting To My Instance

A quick adjustment to the firewall rules to only allow my IP to the instance, and I'm connected.
They made it VERY EASY to connect to my instance.  A nice little helpful context-sensitive popup gave me exact connection instructions, specific to my instance.

Time to deploy an app.
I'll start manually, then ramp up to deployments via Chef, Docker, etc.

Manual Deployment

Easy first deploy:
    scp -i my.pem source.zip youser@myinstance.com:~/

I kick off my app on the instance, and am immediately able to use it, and with very little latency.
Since this is essentially a VM, I can interact with it in exactly the same manner, so CM with Puppet/Chef/Ansible//Salt/etc, could probably even install the Docker daemon and spawn as many containers I desire.

Next stop, digging up API documentation for AWS so I can do what I just did via python instead of mouse-clicks.



No comments:

Post a Comment