Get Started with Bitnami Multi-Tier Solutions on AWS
Amazon Web Services or AWS is one of the world’s most popular and reliable cloud computing platforms. It provides a comprehensive set of compute, storage and delivery services to build, deploy and manage enterprise, mobile and Web applications in the cloud.
If you’re looking to deploy Multi-Tier or clustered applications in the AWS cloud, the easiest way to get started is with Bitnami. Bitnami provides production-ready Multi-Tier Solutions for AWS servers, so that you can get productive with your new application immediately. You can access and launch these Multi-Tier Solutions through the AWS Marketplace.
In this tutorial, I’ll walk you, step by step, through the process of using the AWS Marketplace to create and provision a Multi-Tier application on AWS.
If you’re interested in creating a personal or small business blog, chances are that you’re going to use WordPress. WordPress is one of the most popular blogging platforms in the world, used on over 60 million websites (according to Wikipedia). And it is not hard to see why: WordPress is very easy to use, comes with thousands of extensions and themes, is completely free, and is open source.
In this tutorial, I’ll launch a Multi-Tier Solution in the cloud with WordPress. This environment will consist of two cloud servers, one for the application and the other for the database, and you will be able to configure them further once launched. Of course, WordPress is just an example: there are many other Multi-Tier Solutions from Bitnami to choose from, and they’re all equally easy to set up.
Here are the steps you’ll follow in this tutorial:
- Register with Amazon Web Services (AWS)
- Generate an AWS key pair
- Deploy Multi-Tier WordPress on AWS
- Log in and start using WordPress
The next sections will walk you through these steps in detail. As an alternative, you can also watch the following video which demonstrates the same steps:
Step 1: Register with Amazon Web Services (AWS)
: At the end of this step, you will have signed up for the Amazon Web Services free tier. If you already have an Amazon Web Services account, you may skip this step.
You will need an existing Amazon account to log in and sign up. To create it, follow these steps:
Browse to http://aws.amazon.com and click the “Create an AWS account” button at the top of the page.
In the resulting page, enter an email address, a password, and an AWS account name. Then, click “Continue” to start the registration process.
Once you’ve signed in to Amazon, sign up for AWS by selecting the account type and providing some basic contact information and your mobile phone number.
Once that’s done, proceed to the next stage by entering your credit card information. Click the “Secure Submit” button to continue with the account creation.
If you’re worried about how much you’ll be billed for services, relax. When you first sign up for AWS, you get automatic access to the AWS Free Tier, which entitles you to 12 months of free usage up to certain limits. This includes 750 hours per month of free usage of Amazon EC2 micro servers, which are just right for development or low-traffic website hosting. So long as your usage falls within the limits of the free tier, your credit card will never be billed. However, Amazon still needs your credit card information for security purposes, to avoid service misuse and to confirm your identity.
IMPORTANT: You should fully understand the limits of the AWS free tier to avoid being unduly charged for service usage.
Amazon will now verify your identity, by making an automated call to your mobile phone number and prompting you to enter the PIN number displayed on the screen.
Once your identity is verified, choose the “Basic” support plan (also free) and confirm your account.
NOTE: At this point, make sure that you have subscribed a plan, even if you decide to register for the free tier or “Basic” support plan.
The AWS account registration machine will churn away for a minute or so, and you will then be redirected to a welcome page, which includes a link to the AWS management console. You should also receive an account confirmation email, which tells you that your account is good to go.
Step 2: Generate an AWS key pair
: At the end of this step, you will have generated an SSH key pair to access your EC2 instances. If you already have an SSH key pair for the AWS region you are operating in, you can skip this step.
To generate an SSH key pair, which you will need to log in to your EC2 instances, follow the steps below:
Log in to the AWS Console.
From the Amazon Web Services menu, select the EC2 service.
If required, use the region selector in the top right corner to switch to the region where your instance will be launched.
From the Amazon EC2 dashboard, select the “Key Pairs” option in the “Network & Security” menu.
Click the “Create Key Pair” button. In the resulting dialog box, enter a name for the new key pair and click the “Create” button.
A new key pair, consisting of an SSH public and private key, will be generated. You will be prompted to download the private SSH key to your computer.
NOTE: You will only be able to download the private SSH key once. Store it safely as you will not be able to log in to your AWS servers without it.
Step 3: Deploy Multi-Tier WordPress on AWS
: At the end of this step, your WordPress blog will be running on an AWS cloud server.
The next step is to launch a cloud server with Multi-Tier WordPress running on it. The AWS Marketplace lets you do this in just a couple of clicks. Follow these steps:
From the AWS Marketplace, search for “multi-tier wordpress bitnami”. Select the solution from the search results.
Review the details provided and click the “Continue” button to proceed.
Select the “Manual Launch” tab.
Configure the deployment as follows:
- Version: Select the latest available version
- Region: Select your preferred deployment region
- Deployment options: Select “CloudFormation template”
Click the “Launch with CloudFormation Console” button.
On the resulting page, ensure that the “Choose a template” -> “Specify an Amazon S3 template URL” option is selected. The URL should already be present and this should not be changed. Click “Next” to proceed.
On the “Specify Details” page, enter the login username and password for the application in the “Application Configuration” section. Update the instance type as needed.
In the “Networking Configuration” section,
Select the SSH key pair generated in Step 2 for server access. If you don’t have a key pair, refer to Step 2 for instructions.
To allow secure shell access from any IP address into the WordPress application, ensure that the “SSH Source” field is set to “0.0.0.0/0”. The default setting for the template is set to “127.0.0.1/32” which disables remote SSH access; you must change this value to be able to SSH into the application server.
To allow public access from any IP address to the WordPress application, ensure that the “Application Source” field is set to “0.0.0.0/0”. The default configuration is set to this, but if you would like to constrain access of the application to a specific IP range, please edit this value. Click “Next” to proceed.
Define an availability zone and secondary zone. Subnets can currently only be created in the following availability zones: us-east-1d, us-east-1a, us-east-1c, us-east-1e.
IMPORTANT: Before selecting an availability zone and secondary zone, ensure that a default VPC is configured for that availability zone. This may not be the case for older AWS accounts or there may be other conflicts related to availability zones which will cause deployment to fail. Read our FAQ for more information on how to select the availability zone for your deployment.
> NOTE: As a requirement, the Additional Availability Zone must be different from the Primary Availability Zone.
In the “Database Configuration” section, enter a password for the MariaDB database server. You will need this password in case you need to perform any operations directly on the database server.
On the “Options” page, click “Next” to proceed.
Review the details of the template. Click “Create” to proceed.
Amazon Web Services will now begin spinning up the servers. The process usually takes a few minutes, and you can use the CloudFormation dashboard to check the status of the server.
NOTE: In case deployment fails with an error like Value (us-east-1b) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: us-east-1d, us-east-1a, us-east-1c, us-east-1e, refer to our FAQ for troubleshooting information.
Once the servers have launched, you will be able to obtain their public IP addresses and public DNS names from the CloudFormation dashboard, as follows:
Select the stack and click the “Outputs” tab in the lower panel.
Obtain the server’s public IP address and public DNS name, as shown below:
At this point, you should be able to browse to the server, by entering the server IP address or DNS name directly into your browser’s address bar. You should now see your WordPress blog’s home page with a sample post, as shown below.
To get the administrator username and password, browse to the cloud server’s public IP address in your web browser to access your application, and log in with the username user. The password will be the one entered during the deployment process.
Step 4: Log in and start using WordPress
At the end of this step, you will have logged in to WordPress and created a new blog post.
To log in to the WordPress dashboard, follow these steps:
Browse to the WordPress dashboard, usually at the URL http://SERVER-IP/wp-admin.
Log in with the administrator credentials from the previous step.
You should now arrive at the WordPress dashboard, which allows you to manage posts, pages and comments; customize your blog with themes and plugins; import and export content; manage navigation menus; add or delete new user accounts; and much more.
Create your first post
You can now add a new post using the following steps:
Select the “Posts -> Add New” menu option to create a new post.
Enter a title and content for the post. You can use the formatting tools at the top of the content area to format your post and add hyperlinks or images.
Optionally, choose the format and category for your post.
Publish it immediately using the “Publish” button.
And now, when you visit your blog’s front page, you should see your new post.
Congratulations! You now have a working, fully-functional WordPress blog in the cloud.
Keep your WordPress installation up-to-date
You can keep your WordPress installation up-to-date with the WordPress update feature. To access this:
Log in to WordPress using the administrator account.
Select the “Dashboard -> Updates” menu item.
Review the resulting page to see if WordPress needs an update. If an update is available, you can install it by clicking the “Update Now” button. You can also re-install WordPress if needed with the “Re-install Now” button.
To learn more about the topics discussed in this tutorial, use the links below: