google

Get Started with Bitnami Applications on Google Cloud Platform

Introduction

Google Cloud Platform is Google’s cloud-based hosting, storage and services platform. Built on the same infrastructure used by Google, it’s a great way to host simple websites as well as complex web applications in the cloud without worrying about security, scalability or performance.

If you’re looking to deploy applications in the Google cloud, the easiest way to get started is with Bitnami. Bitnami provides ready-to-use application images for Google Cloud Platform servers, so that you can get productive with your new application immediately. You can access and launch these images using the GCP Marketplace.

In this tutorial, I’ll walk you, step by step, through the process of using the GCP Marketplace to create and provision a Single-Tier on a Google Cloud Platform server. And since Google Cloud Platform currently offers a 60-day free trial, you’ll have plenty of time to experiment with your servers without worrying about being billed for usage.

Overview

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 cloud server with the Bitnami WordPress Stack, which gives you a pre-configured WordPress blog that you can start using right way. But WordPress is just an example: there are hundreds of other Bitnami applications to choose from, and they’re all equally easy to set up.

Here are the steps you’ll follow in this tutorial:

  • Register with Google Cloud Platform
  • Deploy WordPress on an Google Cloud Platform server
  • Configure SSH access
  • Obtain WordPress credentials
  • Log in and start using WordPress

The next sections will walk you through these steps in detail.

Step 1: Register with Google Cloud Platform

At the end of this step, you will have signed up for the Google Cloud Platform free trial. If you already have a Google Cloud Platform account, you may skip this step.

Begin by creating a Google Cloud Platform account, by browsing to https://cloud.google.com and choosing the “Start your free trial” option. You will need an existing Google account to log in and sign up for the free trial; if you don’t have one, you can create one here (remember to keep track of your account username and password, because you’ll need them in the next step).

Google account creation

Once you’ve signed in, provide Google with some personal information and your credit card details.

Google account creation

It’s important to note that you’re signing up for a free trial and your credit card won’t be billed unless you migrate to a paid account. The trial includes $300 of free credit, valid for 60 days. Once the trial ends, your account will automatically be paused and you’ll only be charged if you explicitly choose to upgrade to a paid account.

The Google elves will go away for a minute or so to verify your information and if all is well, you will be redirected to the Google Developers Console, which allows you to manage your billing account, create new projects and get support. You should see that your free trial is now active in the billing credits section.

Google account creation

You should also receive an account confirmation email, which tells you that your account is good to go.

Step 2: Deploy WordPress on an Google Cloud Platform server

At the end of this step, your WordPress blog will be running on an Google Cloud Platform server.

The next step is to launch a cloud server with WordPress running on it. The Google Cloud Console lets you do this in just a couple of clicks. Follow these steps:

  • Log in to the Google Cloud Console Launcher.
  • Search for the Bitnami WordPress Stack by entering the search term “bitnami wordpress” in the search bar at the top.
  • Select the stack in the list of search results.

    Google Console launcher

  • In the resulting screen, click “Launch on Compute Engine”. You will be presented with a configuration screen like the one below:

    Configure WordPress deployment

  • Configure the template using the information below:

    • Deployment name: Enter a unique identifier for the deployment.
    • Zone: Select the geographic region of the data center hosting the deployment.
    • Machine and disk type: Select the CPU, RAM and disk type appropriate to your requirements.
    • Disk size in GB: Select storage capacity after carefully considering your data storage requirements.
    • Firewall: Enable or disable basic firewall rules for HTTP and HTTPS traffic.
  • Click “Deploy” to proceed.

Step 3: Configure SSH access

At the end of this step, you will have configured the MongoDB server for use with an external SSH client.

The GCP Marketplace requires the user to manually add a public SSH key using the server administration page. It then uses the user@hostname comment at the end of the public SSH key to decide which user account on the server should be associated with the key.

The steps below walk you through the process of configuring the MongoDB server for use with an external SSH client. It assumes that you will be logging in as the bitnami user. The same process can be followed for other users and server nodes as well.

Follow the steps:

  • Prepare an SSH key pair for use.
  • Log in to the Google Cloud Console and select your project.
  • Navigate to the “Compute Engine -> VM Instances” page and select the WordPress instance you wish to connect to. Note the public IP address of the instance.

    Retrieve the external IP address

  • Click the “Edit” link in the top control bar.

  • On the resulting page, scroll down, click “+Add item”, and copy and paste your public SSH key into the “SSH Keys” field.

  • Update the user@hostname comment at the end of the SSH key content to bitnami. This will associate the SSH key with the bitnami user account that is already present on the server. The “Username” next to the form field will update accordingly.

    SSH configuration

  • Add more keys as needed by clicking the “Add Item” button. Once done, save the changes by clicking the “Save” button.

You should now be able to use any third-party SSH client and the corresponding private SSH key to log in to the server as the bitnami user. Learn how to connect to the server through SSH.

Connect to WordPress through SSH

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: