Skip to content

jeffvance/openshift-ceph-ex

Repository files navigation

OpenShift Enterprise + MySQL + Ceph Persistent Volume

This repo contains examples showing how to run MySQL in the following environments:

  1. in a container launched directly from docker (see the mysql readme)
  2. via an openshift/kubernetes pod (examples 2 and 3)
  3. via an openshift application template (example 4)
  4. via the official openshift/mysql image, which differs in user ID from the docker mysql image, such that some security settings can be explored.

We'll use both local OSE-node storage and ceph-rbd block storage under an ext4 file system to persist the database.

The next few sections are common across almost all of the examples and are also shown below:

Environment:

The enviromnent used for all of the examples in this repo is described here.

Setting up Openshift Enterprise (OSE):

The steps needed to setup a simple OSE cluster with 1 master and 1 worker node are described here.

Setting up Ceph:

Most of the examples use ceph-rbd within a single container (AIO, all-in-one container), and the steps needed to setup ceph are described here.

Setting up MySQL:

Follow the instructions here to initialize and validate containerized mysql.

Specific Examples:

  1. mysql + local/host storage - mysql database lives on the OSE host where the pod is scheduled
  2. mysql + ceph plugin - mysql database resides in ceph, a rbd plugin is specfied
  3. mysql + ceph + pvc - mysql database resides in ceph, a Persistent Volume (PV) and Persistent Volume Claim (PVC) are used
  4. mysql + ceph + template -- same as the above example except the pod and pvc are defined in a single template file
  5. openshift/mysql + ceph + pvc -- same as example 3 except that we're using openshift/mysql which, due to the UID being set to 27 in the image, presents some unique challenges.

About

storage aspects of openshift/kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages