Once you have your basic Resources in place, and you're logged into your console, you'll have a website up an running in minutes. The remaining documentation assumes you have signed up for Amazon Web Services and you're logged into the AWS console. Your screen should look similar to the following image:
Launching Your Instance
Ec2 is the basic computing service for AWS. It here where you create Ec2 instances, which for our purposes will mean this is where you create web servers.
To get started click "Ec2", then click "Launch Instance" on the following screen.
Step 1: Choose an AMI
Burris Builder is designed to run on Amazon's Linux. This is Amazon's own customized version of Linux, which arrives with certain tools and configurations which are optimized to run on the elastic framework. (Be sure "Quick Start" is selected on the tabs to the left to see the screen below)
In order to run the T2 instances, which are preferred instances for general purpose web servers, we'll need to run the "HVM" version of Amazon Linux. Click Select to the right.
Step 2: Choose an Instance Type
If you're running a free tier, you're choice is the t2.micro. If you're transitioning from shared or basic VPS hosting from other hosts, this is plenty of computing power for small websites, especially once other resources get separated, which will be covered here.
The most notable limitation for t2.micro is the amount of RAM available. This may be somewhat restrictive if you plan to run additional services on the same server such as Solr or redis. These instances may be created and recreated in a matter of minutes, however, so if you change your mind or your needs change, you may easily rebuild.
After selecting your instance, select "Configure Instance Details"
Step 3: Instance Details
This is the most important step in launching. Out of the number of options here, there are two important ones: IAM Role and Advanced Details
If you setup a role properly from the Resource Checklist section, you should have the role "Builder" role available in this drop down. Select it here.
Click on "Advanced Details" to fold down the user data section. This allows you to run scripts during the launch process, which allows a server to go from plain AWS Linux to Burris Builder. Click "Browse" to select the init script from your computer, then click "Add Storage" on the bottom right.
Notes on remaining options are as follows:
- Number of instances: You may launch multiple Burris Builder instances if your heart desires, but only one is recommended initially.
- Purchasing option: If you quickly need a cheaper instance this option may -or should- be explored, but it should not be used for persistent websites.
- Network: A VPC should already be selected for you here.
- Subnet: This will determine the zone your instance gets placed in, which should be noted if you're manually creating other resources
- Auto-assign Public IP: This should be set to enable in order for it to be publicly accessible. This may be adjusted or corrected post launch, however.
- Shutdown behavior: By default this is set to stop, which is the preferred behavior when an instance shuts down.
- Enable termination protection: If you plan on the server hosting stable websites, this should be checked.
- Monitoring: This is more useful for load balanced instances, it allows for more updated monitoring and charges will be applied if you select this box.
- Tenancy: Shared tenancy is preferred for all but special use scenarios. Additional charges will apply for dedicated tenancy.
- Network Interfaces: In some cases you may want more than one IP address per server, but these scenarios are outside the scope of this documentation.
Step 4: Storage
Some instances include ephemeral storage with their instances, which are physically attached to the servers. Ephemeral storage vanishes when the instance is stopped, however, so EBS is commonly used to provide more stable options.
For T2 instances, at least a root EBS volume is required to load your operating system. For the purpose of this documentation, you will only need a root volume. There are 3 adjustable options on this screen
- Size: For Burris Builder, this drive will only be used for the operating system, so it is not necessary to go much beyond the default 8GB size. 8GB-15GB is suitable for most scenarios, though you will want to monitor usage. Additionally, if you're trying to stay under the free tier target -currently 30GB at the time of this writing- you will want to consider additional will be added to this server in order to build websites.
- Volume Type: General Purpose SSD is recommended. For more information see.
- Delete on Termination: This will remove the EBS volume when the drive is terminated. This is generally the recommended option, as you will continue to get charged for the EBS allocation even after the web server has been terminated if your EBS volume remains.
Step 5: Instance Tagging
Tagging instances is useful for organizing numerous instances. They are not required, but it can be useful to provide a Name tag. You can make any tag you create visible in the management section of the console.
When finished, click "Configure Security Group" in the bottom right.
Step 6: Security
If this is not the first instance you have created and have already previously setup a security group, click on the "Select an existing security group" and select your security group. Otherwise you will need some configuration below.
Security groups work on a whitelist policy. All traffic is considered blocked until it is allowed with the policies designated in the security groups. It is highly recommended to not open anything to the public aside from standard web ports 80 and 443. Further we recommend creating a "Private" security group which keeps even web ports closed, and only opened to your IP address.
Name your security group and description according to your privacy. For instance, we recommend a "development" security group if you keep all ports private or a "production" name for security groups which open 80 and 443.
Remove the open SSH port
If your development environment is stable, it is recommended to remove the default SSH security group. This opens port 22 to allow for simplified login, but it leaves your most valuable port open to the public. However, be sure to add your access...
Add Your Access
The resources for Burris Builder span a variety of ports. In many cases, this was a deliberate design in order to more securely prevent outside access. Allowing yourself to access these resources can be done in 3 clicks.
- Click the "Add Rule" button.
- Select "All TCP" under the Type drop-down
- Select "My IP" under the Source drop-down
That's it for this section. When finished, click "Review and Launch," you're almost done.
Step 7: Launch
This page summarizes all options selected. If all steps were followed up to this point, just click "Launch" and decide on a private key.
Selecting a Private Key
The final modal window is for selecting how you will connect via SSH with a private key. If you have not created one before, you will create and download one here. The private key grants SSH access for your ec2-user and, as the name suggests, should be kept private.
Click launch, your server will be ready in a few minutes...
That status of your new server build can be seen in the "Ec2" section of your console. Two important columns designate your server state. "Instance State" will progress to "Running". Shortly afterward, the Status Check column should read a "2/2 checks passed." Once this is in place, your server is accessible.
Testing Your Setup
Your server is ready. To see if everything loaded correctly, select your new server using the section boxes on the left side of server list of the Ec2 dashboard. Highlight your "Public DNS" and copy. Open a new tab in your browser and past that address into address bar. You should see your new website, and HTML5BoilerPlate template. There is one more step to make this yours.
Connecting your Domain
While you can technically being accessing your instance with just an IP address or the PublicDNS provided by AWS, functionality is better overall if a domain name is attached to it. Remaining steps assume you have followed the steps from the Resource Checklist document.
Staying in the screen from the previous step, highlight and copy your Public IP.
Head over to the Route 53 dashboard, by selecting clicking the "Services" button then, Route 53. Once you're in your Route 53 dashboard, select the domain you setup in the Resource Checklist. For the purpose of your new web server, you'll need a single A record and possibly a catchall CNAME, depending on your preference.
Click "Create Record Set". On the right hand side of your screen, a panel will open with all the proper defaults selected for you. Paste your IP address into the "Value" box and click create.
Default TTL or time-to-live, is set to "300" or 5 minutes. This means you should be able to see the aforementioned "HTML5 Boilerplate" at your new domain in about 5 minutes or less.
You may also want to add an additional record for your "www" subdomain as well. Click "Create Record Set" once again, except this time, time "www" in the name field. Paste in your IP address, and click "Create"
Note: Your browser caches domain name resolution results. While the domain name may have updated, your browser may have a cached response. Clearing your browser content cache usually will not work to get the browser to retrieve a new domain resolution. Closing and opening all windows of your browser for windows, or "Command + Q" for Macs and reopening is the most reliable way to update domain name resolution.
You may also want to create a catchall CNAME record. This is optional, and some considerations for doing this are outlined below. To create this record, click "Crate Record Set" once again, except in the right panel, select "CNAME" under type. In the value field, type the domain name of the zone you're in.