Bitnami Drupal 8

Posted : admin On 1/26/2022

Bitnami Drupal Stack for Windows / Linux / macOS / OS X VM. Drupal is one of the most versatile open source content management systems in the world. It is pre-configured with the Ctools and Views modules, Drush and Let’s Encrypt auto-configuration support. Bitnami Drupal Stack Installers Bitnami native installers automate the setup of a Bitnami application stack on Windows, Mac OS and Linux. Each installer includes all of the software necessary to run out of the box (the stack). Drupal 8.9.14-0 64-bit 419 MB show Download for Linux 64-bit Download for Linux 64-bit: Drupal 7.80-0 64-bit 170 MB.

Getting started with Drupal 8 on Kubernetes

Drupal 8 on Kubernetes

Introduction

In this blog post, I am going to leverage on the experience I have gained in myprevious role — where I was managing the infrastructure and application layerfor a large Drupal platform in a multi-site architecture, and my current role asCloud Solution Engineer at Oracle.

Drupal is an open-source Content Management System (CMS)that is supported by a very large community, contributing (often for free) toimprove the product and enrich it with very useful functionalities.

Bitnami

The idea is to use Oracle Container Engine(OKE) and Helm toinstall a Drupal 8 Chart fromBitnami on a Kubernetes cluster runningin Oracle Cloud. This allows developers tohave a Cloud native Drupal development environment in seconds for testing newmodules, themes, or just testing bug fixes.

Prerequisites

As we are deploying a Drupal 8 website on a Kubernetes cluster, the mostimportant prerequisite is…to have a Kubernetes cluster! Make sure to follow theprevious tutorial I wrote to create a newcluster,install and configure kubectl. In addition, we need to install helm.

Kubernetes cluster created in Oracle Container Engine (OKE)

Installing and configuring Helm

Helm is like a “packet manager” for Kubernetes. It allowsto define, install, and configure even the most complex applications as Charts.Charts can be easily deployed on a Kubernetes cluster, where Tiller (the Helmserver-side component) is running, with a few simple commands.

There are several ways to install Helm on your machine and it depends mainly onwhich is your OS. I have used the following command on my Windows 10 machineusing Git Bash:

After a successful installation, we can simply initialize it using helm init--upgrade. The --upgrade flag will make sure to initialize Tiller running inthe Kubernetes cluster too.

You will receive a confirmation message similar to the below:

We can also verify Tiller is running in its own Pod by typing kubectl get pods--namespace kube-system:

Tiller is running in our Kubernetes cluster

Deploying Drupal Helm Chart

Now that we have Helm (and Tiller) installed and configured in our local machineand Kubernetes cluster, we can actually deploy the Drupal Helm Chart fromBitnami — the Chart source code can be accessedhere.

Deploying a new Drupal 8 website is as easy as running the following twocommands:

Helm will process the Chart and its dependencies, e.g. MariaDB as Drupal backenddatabase, and create all the components in our Kubernetes cluster as required.

Using the default values.yaml configuration file, the following maincomponents will be created in our cluster — as you can see from the image below:

Bitnami Drupal 8 Update

Helm will output a short description for all the components created in thecluster

Pdf
  1. A ConfigMap that contains the MariaDB configuration variables
  2. Two PersistentVolumeClain to allocate Block Storage volumes to persist Apacheconfiguration and Drupal assets
  3. Two Pods: one for Drupal and one for MariaDB. These will run in the actualcluster nodes created by OKE
  4. Two Secrets: these will contain the credentials for the Drupal admin user(needed to login in the site later) and the database admin user
  5. Two Services: this is an interesting topic. As you can see, d8cluster-drupalis a LoadBalancer type, which will result in a native Load Balancer created inthe Oracle Cloud Infrastructure, exposing ports 80 and 443 with a Public IP thatcan be accessed from the public Internet. This will be the entry point for ourwebsite and will dispatch the traffic to the Drupal pod in a private subnetaccordingly. The other Service, d8cluster-mariadb, is a ClusterIP type. Inthis case, it has a “private” Cluster IP that can be accessed by the clusterpods only and it’s not publicly exposed. It is important to mention that OKEwill also create and manage the necessary Security rules to allow trafficbetween the Load Balancer and the Pods. This can be also verified byinspecting the Security Lists on Oracle Cloud Infrastructure Web console
  6. A Deployment: this represents the Drupal application itself
  7. A StatefulSet: this is used to manage the lifecycle and consistency of theMariaDB pods in case we want to scale up/down this component

After a few minutes, the new Drupal 8 website will be ready to be accessed usingthe Load Balancer Public IP.

Accessing the Drupal 8 website

As mentioned in the previous paragraph, we need to retrieve the Load BalancerPublic IP. We can do it in several ways but the easiest way is to run thefollowing command:

The output will be something like:

Take note of the Load Balancer Public IP

The external IP can be entered in a browser to access the website:

Here is our brand new Drupal 8 site running on Kubernetes

Login as website Admin

The website Admin credentials have been created automatically during the Chartdeployment.

We can use the following command to retrieve the password and base64-decode it:

Now we can head to the usual Drupal login page, e.g. “/user/login” and log inusing “user” as username and the password just retrieved:

Login as Admin using the generated credentials

Accessing Drupal source code

After being able to access the Drupal website from the browser, you might beinterested to access the source code and edit it for development purposes. Ifyour Kubernetes nodes are in a private subnet, you need to create a *bastionhost *in a public subnet and use it to SSH into the cluster node as described inthis whitepaper.

Within the cluster node, it is possible to mount the Block Storage Volume thathas been attached by OKE during the Chart deployment, e.g.:

If we cd /bitnami/drupal, we will recognize the usual Drupal site folderstructure and can use our favorite IDE to start coding:

A usual Drupal site folder structure

Next steps

Now that we have a new Drupal site up and running, my goal is to secure it usinga Web Application Firewall (WAF). In the next blog post, I will demonstrate howto use the recently introduced Oracle CloudWAF toprotect our Drupal website.

Try it for free on Oracle Cloud

OKE is only one of the great services offered by Oracle Cloud. There are manyothers that can be explored to enhance your cloud-native applications.

You can try the steps I described in this tutorial by registering a free trialaccount here, and take the opportunity todiscover many other services offered by OCI.

Bitnami drupal 8 free

Luca Iannario @liannario

Bitnami Drupal 8

Developer Advocate at Oracle. When I am not on the clouds, I like travelling and taking pictures.

Related tutorials

×Bitnami drupal 8 pdf

Share

Share this tutorial with your community.