Skip to content
/ oadp Public

OpenShift APIs for Data Protection (OADP) Demo. It installs Wordpress with statefulsets and demonstrates backing up persistent volumes and restoring them.

Notifications You must be signed in to change notification settings

yortch/oadp

Repository files navigation

OpenShift APIs for Data Protection (OADP) Demo

This repo contains supporting files for OADP demo for this blog entry: Back up Kubernetes persistent volumes using OADP

Deploy sample application: WordPress

We need to deploy a Kubernetes application that uses persistent volumes. We will use WordPress, which uses the MySQL database. The instructions were based on this link.

  1. Download the MySQL deployment configuration file:
    curl -LO \
    https://raw.githubusercontent.com/yortch/oadp/main/mysql-deployment.yaml
    
  2. Download the WordPress configuration file:
    curl -LO \
    https://raw.githubusercontent.com/yortch/oadp/main/wordpress-deployment.yaml
    
  3. Export PASSWORD as an environment variable:
    PASSWORD=<YOUR_PASSWORD>
    
  4. Generate the following kustomization.yaml file:
    cat <<EOF >./kustomization.yaml
    secretGenerator:
    - name: mysql-pass
    literals:
    - password=${PASSWORD}
    resources:
    - mysql-deployment.yaml
    - wordpress-deployment.yaml
    EOF
    
  5. Create a new application project:
    oc new-project wordpress
    
  6. Apply the kustomization.yaml file:
    oc apply -n wordpress -k ./
    
  7. Next, expose the WordPress service:
    oc expose service wordpress -n wordpress
    
  8. Print the service URL and navigate to it from a browser.
    echo http://$(oc get route -n wordpress -o jsonpath='{.items[0].spec.host}')
    
  9. Proceed with the initial WordPress setup so that it is included in the backup.

About

OpenShift APIs for Data Protection (OADP) Demo. It installs Wordpress with statefulsets and demonstrates backing up persistent volumes and restoring them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published