Skip to content

Instantly share code, notes, and snippets.

@chmouel
Created November 30, 2015 15:18
Show Gist options
  • Save chmouel/e7ed906c427548175bcb to your computer and use it in GitHub Desktop.
Save chmouel/e7ed906c427548175bcb to your computer and use it in GitHub Desktop.
OpenShift with RBD
---
kind: "Template"
apiVersion: "v1"
metadata:
name: "quickstart-keyvalue-application"
annotations:
description: "This is an example of a Ruby and MySQL application on OpenShift 3"
iconClass: "icon-ruby"
tags: "instant-app,ruby,mysql"
labels:
template: "quickstart-keyvalue-application"
objects:
-
kind: "Service"
apiVersion: "v1"
metadata:
name: "database"
creationTimestamp: null
spec:
ports:
-
name: "db"
protocol: "TCP"
port: 5434
targetPort: 3306
nodePort: 0
selector:
name: "database"
portalIP: ""
type: "ClusterIP"
sessionAffinity: "None"
status:
loadBalancer: {}
-
kind: "DeploymentConfig"
apiVersion: "v1"
metadata:
name: "database"
creationTimestamp: null
spec:
strategy:
type: "Recreate"
triggers:
-
type: "ConfigChange"
replicas: 1
selector:
name: "database"
template:
metadata:
creationTimestamp: null
labels:
name: "database"
nodeSelector:
region: "primary"
spec:
containers:
-
name: "ceph-test"
image: "python:2.7"
command: [ "python", "-m", "SimpleHTTPServer", "8000" ]
ports:
-
containerPort: 3306
protocol: "TCP"
volumeMounts:
-
name: mysql-pv
mountPath: /var/lib/mysql
imagePullPolicy: "Always"
securityContext:
privileged: false
volumes:
- name: mysql-pv
persistentVolumeClaim:
claimName: ceph-claim
restartPolicy: "Always"
dnsPolicy: "ClusterFirst"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment