Drupal Oracle

Posted : admin On 1/26/2022

The goal of this group is to aggregate information, use cases, issues and foster collaboration for getting Drupal to work with the Oracle database platform. As Drupal starts to infect enterprise with its ease of use, scalability and security, we are seeing larger enterprises asking if Drupal can work with their current Oracle infrastructure. One of the first jobs that any Drupal developers need to do is to understand how Drupal works and become used to it. And creating a Drupal theme from scratch is a skill that they are in absolute need of. But drupal theming can be hard, and overwhelming, especially for new users who hold no experience in the subject. But don’t worry. Get the shadow off your mind as we are going to walk you. Drupal is rated 8.6, while Oracle WebCenter is rated 8.8. The top reviewer of Drupal writes 'A good product that helps me to manage complex digital solutions'. On the other hand, the top reviewer of Oracle WebCenter writes 'Has the ability to move workloads in between sub-servers but. Discover how to install Drupal in the Oracle Cloud using MySQL Database Service. The webinar will cover the entire installation steps and will demo how to mi.

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.

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

Oracle

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.

Drupal Oracle

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:

Drupal Oracle

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:

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

  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.

Luca Iannario @liannario

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

Related tutorials

×

Share

Share this tutorial with your community.

Wordpress Oracle Db

Running Drupal with Oracle MySQL Database Service

Event's main selling point description 1-3 LNs. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Ullamco laboris nisi ut aliquip ex ea com.

October 22, 2020
9:00 a.m. PT
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id enim rhoncus justo pretium aliquam vitae at dui. Quisque.
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id enim rhoncus justo pretium aliquam vitae at dui. Quisque.
  • Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id enim rhoncus justo pretium aliquam vitae at dui. Quisque.

Drupal 8 Oracle Database

Discover how to install Drupal in the Oracle Cloud using MySQL Database Service. The webinar will cover the entire installation steps and will demo how to migrate a running Drupal application to MDS with minimal maintenance time. You will learn how to use MDS, MySQL Shell Dump & Load and MDS Inbound Replication.

Featured speaker

Frederic Descamps

Drupal
MySQL Community Manager


Call

CloseDrupal oracle free

Contact Oracle

US Sales: +1.800.633.0738

Follow

Share