Drupal Cloud is the same as OKD4 PaaS at its core
Thanks to this, developers used to working with PaaS applications and the oc
(or kubectl
) command line utility, or the OKD4 web console, can do the same for Drupal sites.
If you are a technical site administrator and would like to benefit from a command line workflow to interact with your Drupal site, follow this guide.
Prerequisites:
-
Ask the Drupal Infrastructure for elevated permissions on your website.
- we might not be able to give you our standard level of support if you encounter issues probably caused by your elevated privileges
- Note: you need to be a member of the project’s admin e-group
-
Install the
oc
command line client, or use thekubectl
utility onlxplus8.cern.ch
-
kubectl
does not offer a direct equivalent tooc login
. You will need to use a token.
-
- Access the Drupal cluster from inside CERN. The CERN firewall prevents you from connecting to the database while teleworking (workarounds are possible though)
Workflow:
- You can work on your project from:
- the Drupal OKD web console (GUI)
- the
oc
command line client
- If using
oc
, connect to the Drupal cluster:oc login --server=https://api.drupal.okd.cern.ch -u <USERNAME>
- You can connect to your Drupal server pod with:
- the web console, after selecting your project and navigating to the “Pods” tab. Note to use the “php-fpm” container.
- the
oc
client:oc -n <PROJECT_NAME> exec -it -c php-fpm deploy/<MYSITE> -- sh
- Inside this container, you will find your local modules in the path
/drupal-data/modules
.- this is the same directory that you access through WebDAV
- You also have access to the
drush
command line utility.
Similar instructions using the oc
client are How to access the site's database [Advanced, Unsupported] - #2