Quickstart Bitnami Moodle and Azure Database for MySQL

Moodle is a flexible and open source Learning Management System (LMS) which enables both educators and students to collaborate and share knowledge in a single online platform. Moodle is widely used by schools and universities worldwide. It is also a good choice for companies that want to offer a flexible and customizable system for professional training to their employees. Moodle is a cost-efficient solution to create and manage custom learning environments that allows users to work at their pace both online and offline.

Bitnami has partnered with Azure to provide the Moodle with Azure Database for MySQL Azure Resource Management (ARM) template. Moodle is one of the solutions that you can find in the Azure Marketplace with an Azure Managed DB. Now you can take advantage of a fully managed Azure Database to scale quickly and reach global distribution without worrying about costly downtime. Keep reading to discover how this application is built for your production needs, and how to get started quickly.

Why use Azure Database for MySQL?

MySQL is one of the most popular relational databases. It is ideal for heavy-loaded production applications, since it is designed for processing thousands of queries per second. When you deploy Moodle with Azure Database for MySQL, you can select the database server and storage capacity accord to your application needs. For example, you can start deploying the application on a small database and then, adjust its size once the traffic to your site increases. Besides, you can configure at deployment time both the backup redundancy options and retention days, leaving to Azure all the database maintenance tasks, including backups.

These are the benefits you will get from the very first moment you deploy the Moodle with Azure Database for MySQL template:

  • Managed database with built-in high availability.
  • Flexibility in scaling your compute and storage resources as you need.
  • Security and compliance with automatic patching and backups.

As a developer, all of these features give you the ability to develop faster since you don't need to be worried about the management, security, and maintenance of the database. As a Moodle administrator, you won't need to schedule periodical backups or worry about scaling up at times of high demand.

Default configuration of Bitnami Moodle with Azure Database for MySQL

Deploying Bitnami Moodle with Azure Database for MySQL from the Azure Portal is really easy; everything is declared in the ARM template that Bitnami provides for Moodle with Azure Database for MySQL. Bitnami designs ARM templates following the best practices of software providers. Thus, the application will run on an Azure server without issues. Let's take a quick look at the Bitnami Moodle with Azure Database for MySQL default configuration:

The Bitnami Moodle with Azure Database for MySQL template is comprised of two configurable servers:

  • A Moodle virtual machine, configured by default as a D1_v2 instance type with 1 vCPU, 3.5 GB of memory and 50 GB disk.
  • An Azure Managed MySQL server compatible with MySQL 5.7, configured by default as a general-purpose Gen5 instance with 2 vCores and 50 GB disk.
Azure Managed Database

On an initial startup of the Bitnami Moodle with Azure Database for MySQL template, you will also get:

  • Latest version of Moodle, PHP and Apache.
  • Safe authentication method: Set your application and database password and select the type of access you prefer for your server (SSH key or password) at deployment time.

Learn more about Azure Database for MySQL features in the official documentation.

Deploy the template on an Azure cloud server

Bitnami offers an excellent deployment experience by declaring all resources, objects, and parameters needed to run the solution on an Azure server in the ARM template. With a few clicks, you can deploy several resources together in a single unit, making your solution available in an Azure cloud service within minutes.

To start a new Bitnami Moodle with Azure Database for MySQL deployment on Microsoft Azure, follow the instructions below:

Moodle with Azure Database for MySQL
  • You will now be redirected to the Microsoft Azure management console. Log in if required.
  • On the resulting page, click the "Create" button to proceed.
Launching Moodle with Azure Managed DB
  • In the "Basics" tab, provide a name for the deployment and an application password. Set the database admin username and password. Also, select a subscription, a resource group, and the location. Click "OK" to continue.
Basic setup
  • In the "Environment Configuration" tab, enter an SSH public key or a password to connect to the server. Select the data and the virtual machine and data disk size. Click "OK".
Environment setup
  • In the "Database Server Configuration" tab, select the database SKU and storage capacity. Then, configure the backup retention days and redundancy. The MySQL version is pre-selected as the latest compatible version by default. Click "OK" to proceed.
Database Server configuration
  • In the "Summary" tab, verify the chosen settings. Click "OK" to proceed.
  • In the "Buy" tab, review the terms of use and click "Create" to proceed.

The Azure Marketplace will now begin spinning up the new server. A notification will appear indicating the current status. The process usually takes a few minutes.

Deployment in progress

Once the template has been provisioned, you will be notified. Click "Go to resource" to check the resource group you just create:

Moodle Resource groups

Notice that the resource group includes two virtual machines in total, one for the application and another for the managed database:

Moodle virtual machines

Access the Moodle dashboard and create your first course

To access the Moodle dashboard, it is necessary to retrieve the public IP address of the deployment and have the application username and password in hand. Follow these instructions to start using Moodle:

  • Navigate to the "Resource groups" section of the Microsoft Azure management console. From the resulting list, select the resource group associated with your deployment. You will see a list of all the resources that have been deployed.
  • Select the "Public IP address" resource as shown below:
Moodle IP address
  • From the resulting screen, copy the DNS name or the public IP address. As you can see in the image below, the public IP address of the deployment matches the public IP address of the master node (virtual machine 0).
Moodle copy IP address
  • Browse to the application by entering the server IP address directly into your browser's address bar. You should see the Moodle home page. To access the Moodle dashboard, click the "Log in" link in the upper right corner of the screen.
Moodle home page
  • Enter the username (user) and the password you specified at deployment time. Click "Log in".
Moodle log in

Congratulations! You have successfully deployed Moodle with Azure Database for MySQL on Azure. Follow these instructions to change the default front page and create your first course.

Access and configure Moodle

  • Once you access the dashboard, you will see a completely fresh installation of Moodle without any content. The first thing to do is to customize the site page. Click the "Customise this page" button.
Moodle dashboard
  • In the resulting screen, click on the configuration icon and select "Edit settings":
Moodle customise home page
  • In the "Front page settings" section, enter a full name and a short name for your site. Add a description in the "Front page summary" text box:
Moodle customise home page
  • Scrolling down the page, you can also edit the items that will be displayed on the site's front page, the maximum number of categories displayed, etc. In this example, a course search box has been added:
Moodle customise home page

Once you finish editing the front page, click "Save changes" to make the changes take effect. You should now see the Moodle front page updated with the recent changes:

Moodle custom home page
  • To create a course, click "Add a new course". In the resulting screen, enter a name and a description for your course. You can also upload images or configure the course format, appearance, the maximum upload size, and more. Click "Save and return" to finish the process.
Create a course

Now you should see your new course displayed on the front page. Start creating more courses and learning plans for your students and colleagues!

Points to remember

  • The Bitnami Moodle with Azure Database for MySQL template allows you to quickly deploy a complete Moodle environment with a powerful database.
  • The default architecture of Bitnami Moodle with Azure Database for MySQL comprises two virtual machines: one for the application, and another for the database. This configuration improves security and access control by separating data from code.
  • MySQL is an open source database able to process large amounts of data efficiently and reliably.
  • Azure databases are managed services that provide secure, enterprise-grade and highly-available data storage for your applications. Azure manages database backups, security patches, and database version updates for you.

What's next?

To improve your Bitnami Moodle with Azure Database for MySQL template deployment, it is highly recommended that you follow these next steps:

Useful links