This repository provides a simple setup to run the Apigee Drupal Kickstart in a Docker container.
This setup is intended for local development purposes only and is not recommended for a production environment. For production deployments, please refer to the Kubernetes Deployment section and the official Apigee documentation for installation, configuration, and hosting considerations.
- Prerequisites
- Features
- Docker Compose Usage
- Kubernetes Deployment
- Demo on Google Compute Engine
- Disclaimer
Before you begin, ensure you have the following installed:
- An Apigee Organization
- Docker
- Docker Compose
- Google Cloud SDK (for GCE demo)
- kubectl (for Kubernetes deployment)
- Kustomize (for Kubernetes deployment)
- Apigee Kickstart profile installed
- Drupal REST UI installed
- REST endpoints configured for Apigee Entities
This setup uses Docker Compose to run the Drupal portal and a MariaDB database in separate containers.
-
Configure your Apigee instance: Update the details of your Apigee Edge instance in the
apigee.envfile. Adjust the values of any other variables as needed. -
Choose a startup script:
-
./start.sh: This script will build the Docker image from theDockerfileand then start the containers. It sets theAUTO_INSTALL_PORTAL=trueenvironment variable, which will automatically install the Drupal site with the Apigee Kickstart profile. This is recommended for the first time you run the setup.# Build the image and run the containers with auto-install ./start.sh -
./run.sh: This script will use a pre-built Docker image fromghcr.io/apigee/docker-apigee-drupal-kickstartto start the containers. It setsAUTO_INSTALL_PORTAL=false, which means you will need to manually go through the Drupal installation wizard in your browser.# Run a pre-built image without auto-install ./run.sh
-
-
Access the portal: Once the containers are running, navigate to
http://localhost:8080in your web browser.If you used
./start.sh, you will see a fully installed Apigee Portal with demo content. The default admin credentials areadmin@example.comandpass(these can be changed inapigee.env).If you used
./run.sh, you will be guided through the Drupal installation wizard.
For a more robust and scalable deployment, you can use the provided Kubernetes manifests to deploy the Apigee Drupal Kickstart application to a Kubernetes cluster.
The kubernetes directory contains all the necessary files and instructions. It uses Kustomize to manage different configuration variants.
kubernetes/base: Contains the common Kubernetes manifests.kubernetes/overlays: Contains overlays for different deployment targets, such as a single-replica setup for development or a multi-replica setup for production on GCP with Cloud Filestore.
For detailed instructions on how to deploy to Kubernetes, please refer to the Kubernetes Deployment Guide.
This section provides a quick guide to deploying the Apigee Drupal Kickstart on a Google Compute Engine (GCE) VM.
-
Set up environment variables:
export PROJECT_NAME=your-gcp-project-id export ZONE=us-central1-a export VM_NAME=apigee-portal-server export FIREWALL_NAME=apigee-portal-server-fw
-
Create a GCE VM instance and firewall rule:
gcloud compute instances create $VM_NAME \ --project=$PROJECT_NAME \ --zone=$ZONE \ --machine-type=e2-medium \ --network-interface=subnet=default \ --image-family=cos-stable \ --image-project=cos-cloud \ --tags=drupal-server,http-server gcloud compute firewall-rules create $FIREWALL_NAME \ --project=$PROJECT_NAME \ --direction=INGRESS \ --priority=1000 \ --network=default \ --action=ALLOW \ --rules=tcp:80 \ --source-ranges=0.0.0.0/0 \ --target-tags=drupal-server
-
SSH into the VM:
gcloud compute ssh $VM_NAME --zone=$ZONE --project=$PROJECT_NAME
-
Run the startup script: On the GCE instance, run the following commands:
wget https://raw.githubusercontent.com/apigee/docker-apigee-drupal-kickstart/main/gce-startup.sh chmod +x gce-startup.sh ./gce-startup.sh
-
Access the installation wizard: Find the external IP of your GCE instance:
gcloud compute instances describe $VM_NAME \ --format='get(networkInterfaces[0].accessConfigs[0].natIP)' \ --zone=$ZONE --project=$PROJECT_NAME
Navigate to
http://<EXTERNAL_IP>in your browser and complete the Drupal installation. -
Clean up:
gcloud compute firewall-rules delete $FIREWALL_NAME --project=$PROJECT_NAME --quiet gcloud compute instances delete $VM_NAME --project=$PROJECT_NAME --zone=$ZONE --quiet
This is not an official Google Product.