Friday, 27 October 2017

Single EC2 Instance Part 2 - The Client's Server

We will be creating an EC2 instance for our client. In this demo, we are creating a Plesk server. (You can use any method to create an EC2 instance, but the important point is that it must use an EBS volume. The EBS volume is a crucial part of the high-availability feature that we will be setting up later on.)

"Services", "EC2", "Launch instance".
"AWS Marketplace", type "plesk" in the search box.
We are looking for an image pre-installed with Plesk.
Select "Plesk Onyx on CentOS 7 (BYOL)".
"Continue".
Choose the instance type that the client is buying.
Click "Next: Configure Instance Details".
Specifically select a "Subnet", and remember the region of the subnet that was chosen.
In this case, it is "ap-southeast-2a".
(Later on, when we create the EC2 instance for the backup server, it has to be in the same region.
Click "Next: Add Storage".
Select what the client has bought. Click "Next: Add Tags".
Nothing to do here. Click "Next: Configure Security Group".
The defaults should work just fine (which opens up all the ports used by a typical Plesk server to the world).
Click "Review and Launch" (though it is not really going to launch anything yet).
"Launch" (but it is still not going to launch anything yet).
Select the key pair, tick the "I acknowledge..." and click "Launch instances".
If you have no idea what "key pair" is all about, stop, and read
http://queksignetique.blogspot.sg/2017/10/wordpress-aws-part-4-key-pairs.html.
This is important, because if you do not have the private key of the key pair, you will not be able to SSH into the EC2 instance to complete the Plesk configuration.
Launching in progress...
Go to "Services", "EC2", "Instances" and we should see the instance running.
The "Instance ID" is fixed, but we can give our instance a name by clicking on the pencil in the "Name" column. It is optional, but it makes it easier to distinguish which EC2 instance you are working on.
In this demo, we are renaming it "Plesk Server".
The EC2 instance is done. Next, we will be giving it an "Elastic IP", and then do some Plesk configuration.

Part 3 - Elastic IP

Single EC2 Instance - Table of Contents