Get Started with Bitnami Multi-Tier Solutions on AWS

Introduction

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.

Overview

WordPress is one of the most popular blogging platforms in the world, in use on over 60 million websites (according to Wikipedia). It's not hard to see why: WordPress is incredibly easy to use, comes with thousands of extensions and themes, and is completely free and 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.

Step 1: Register with Amazon Web Services (AWS)

At the end of this step, you will have signed up for Amazon Web Services. If you already have an Amazon Web Services account, you may skip this step.

Begin by creating an AWS account, by browsing to http://aws.amazon.com and clicking the "Sign Up" button at the top of the page. You will need an existing Amazon account to log in and sign up; if you don't have one, create one to proceed.

Once you've signed in to Amazon, sign up for AWS by providing some basic contact information and your mobile phone number.

AWS account creation

Once that's done, proceed to the next stage by entering your credit card information.

AWS account creation

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.

AWS account creation

Once your identity is verified, choose the "Basic" support plan (also free) and confirm your account.

AWS account creation

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.

AWS account creation

Step 2: Generate an AWS key pair

At the end of this step, you will have generated an SSH key pair to access your AWS servers.

This is also a good time to generate an SSH key pair, which you will need to log in to your AWS servers. To do this:

  • Log in to the AWS Console.

  • From the Amazon Web Services menu, select the EC2 service.

    AWS credentials creation

  • 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.

    AWS credentials creation

  • 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.

    AWS template deployment

  • 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.

    AWS template deployment

    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.
  • 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.

    AWS template deployment

  • 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.

    AWS template deployment

  • 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.

      AWS template deployment

  • 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.

    AWS template deployment

  • On the "Options" page, click "Next" to proceed.

    AWS template deployment

  • Review the details of the template. Click "Create" to proceed.

    AWS template deployment

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.

AWS template deployment

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:

    AWS template deployment

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.

AWS template deployment

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.

    WordPress credentials

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.

WordPress credentials

You can now add a new post using the following steps:

  • Select the "Posts -> Add New" menu option to create a new post.

    Add new WordPress 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.

    Add new WordPress post

And now, when you visit your blog's front page, you should see your new post.

WordPress post publishing

Congratulations! You now have a working, fully-functional WordPress blog in the cloud.

You can keep your WordPress installation up-to-date with the WordPress automatic update feature. To access this:

  • Log in to WordPress using the administrator account.
  • Select the "Dashboard -> Updates" menu item.

    WordPress update

  • 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.

    WordPress update

To learn more about the topics discussed in this tutorial, use the links below:

Watch the following video to learn in detail how to deploy the Bitnami WordPress Multi-Tier stack on AWS:

aws-templates