Castles in the Sky
“A cold wind was blowing from the north, and it made the trees rustle like living things.”
― George R.R. Martin, A Game of Thrones
The rise of applications being built directly to the cloud is happening at a pretty fast pace recently. Many companies are throwing their Development and productions into cloud services due to the low cost of server buy in and pay for what you use services. In this article Im going to show you how to create a free Amazon AWS web server which uses WordPress site builder.
There are many benefits so far as Amazon, Azure etc as they have been buying white labeled servers and processors in huge bulk thereby saving a fortune in HW procurement. It’s actually affected the market in many ways since companies haven’t had purchase newer hardware. When cloud giant companies go to Chip makers and HW companies asking what the next generation units they are going to release are and then buys all of them you see giant markdowns. For instance if Intel doesn’t need to Market, discount VARs and pay sales commissions on their products you can see the deep level of discount they would receive.
What’s important to a growing IT organization? Innovation, being able to stay ahead of competitors, hi availability and fault tolerance both of which I write extensively about, web presence, scalability and one that most don’t refer to often and that’s predictability. Predictability comes from a firm understanding of the current market and how you believe things will adapt to change ; taking calculated risks into a market that the current standards are waiting for you to do because nobody wants to risk the security of their position do to many factors, what is the trend and how can I make the improvements;
Moving to the cloud or borrowed computing as I call it is a natural evolution for software that people want to see more fluidly. Cloud native architectures are becoming the defacto standard right now as they can accommodate the mobile trend. They have datacenters in multiple geographic areas so your US slow 4g phone can get the information at a quicker rate. Things built to scale as they say with stretchy words such as elastic, on demand, auto scale are all included with the click of a mouse.
Getting Started –
Use case – Say you have 2 current web servers in production that are load balancing your production workload why not use a third not tied to production as a testing or assurance server? A server that can be used to test prior to certain rollouts and updates plus be a third failover choice that’s outside of the scope of your internally hosted applications? You can accomplish it by adding it in a Tertiary DNS spot among your DNS for the website.
If you have an Amazon account a personal even works fine go to https://console.aws.amazon.com/console/ and sign up for Amazon Web Services
Go through the required steps until your finished and you will be greeted by a giant list of available services. We aren’t going to dive into all of that right now just getting a web server up and running.
1. The very first icon will be an EC2 (Virtual servers in the cloud) Icon click on that
2. Hit the blue Launch Instance button
3. You’ll see a host of operating systems to choose from Select the first which is Amazon Linux AMI xxx.xxx
4. For the purpose of this we want free so pick the T2.micro and Next configure instance details
5. Plenty of options here in Configure Instance but leave them as default and go to advanced details under user data choose As file and insert this bashscript then click Next Add storage
6. 8 GB of SSD storage is the default which is good hit Next Tag Instance
7. For the key name just use Webserver and Value type WordPressServer
8. Step 6 is Configure Security Group Choose the radio button Create new; name the Security group kickoff and now allow your ports as shown in mine
9. Choose the Review and launch
10. Take a final look and choose launch
11. You are presented with a key pair option. This is what you will use as a password file when connecting to your instance. Create it download and don’t lose it! Then launch your instance
12. You will be presented with a launch status screen go to View Instances to see the status
Congratulations, you have a running Linux Apache Webserver! Next we’ll create a MySQL database to store your websites data.
Create the MYSQL RDS service for your site.
1. Head back to services and find the blue RDS service under Database
2. Choose the Launch DB Instance
3. Here is where you pick the MySQL Engine and press select
4. Choose the middle option for DR purposes or just the Dev/Test to keep it free for the time being
5. Now we specify the Database settings and keep it FreeTier. For simplicity The user name and password needs to be handy when connecting the Web Server to the DB later.
6. Now we choose our default subnet and set the inbound and out bound permissions with the create new security group option
7. Creating your security group below is the screen shot for incoming rules after finishing with these settings go to out bound and make sure all traffic is allowed out
8. Now we name the database and choose launch
9. You will see a confirmation that its launching choose the view DB instance and give it around 10 minutes to setup
10. You will see the following once its ready to go and completed!
Connect your WordPress web server to the RDS Database
1. Head back over to your EC2 instances and your instance should have a Puplic IP address listed – copy that and place it into a browser
2. You will see the WordPress install screen Let’s go
3. Now is where we can connect to the RDS instance we created and fill out the DB info
4. Once your connection is successful you can get started
5. You will have to copy and paste your config file data manually; So copy the text
6. Connect into your server via Putty (see my article here) and Create the file
7. Once your new file is open in VI, hit the insert key and paste in your data
8. Verify your data is correct and hit the Esc key then :wq to save your new file
9. Go back to your site and you should see this
You are now up and running! Kindof….
So even after I did everything correct I couldn’t install plugins or modify certain things in WorPress The error states “To Perform the requested action, WordPress needs to access your Webserver. Please enter your FTP credentials to proceed.”
The fix is done by Puttying back into the HTML directory of your Webserver and issuing the following commands:
Well now you’re up and running and can transfer in your Webservers info in and if you’d like Add the external IP address to your DNS settings.
Until next time.