Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Latest commit

 

History

History
77 lines (53 loc) · 1.77 KB

README.md

File metadata and controls

77 lines (53 loc) · 1.77 KB

Create a Heketi service in OpenShift

NOTE: This template file places the database in an EmptyDir volume. You will need to adjust accordingly if you would like the database to be on reliable persistent storage.

  • Register template with OpenShift
oc create -f heketi.json
  • Note the number of parameters which need to be set. Currently only NAME needs to be set.
oc process --parameters heketi
  • Deploy a Heketi service

Here is an example of how to deploy Heketi

oc process heketi -v NAME=myheketiservice \
     HEKETI_KUBE_NAMESPACE=test \
     HEKETI_KUBE_APIHOST='https://192.168.10.90:8443' \
     HEKETI_KUBE_INSECURE=y \
     HEKETI_KUBE_USER=test-admin \
     HEKETI_KUBE_PASSWORD=admin | oc create -f -
  • Note service
oc status
  • Send a hello command to service
curl http://<ip of service>:<port>/hello
  • For example
$ oc create -f heketi-template.json 
template "heketi" created

$ oc process heketi -v NAME=myheketi | oc create -f -
service "myheketi" created
imagestream "myheketi" created
deploymentconfig "myheketi" created

$ oc status
In project default on server https://localhost:8443

svc/docker-registry - 172.30.109.242:5000
  dc/docker-registry deploys docker.io/openshift/origin-docker-registry:v1.1.4 
    deployment #1 deployed 5 days ago - 1 pod

svc/kubernetes - 172.30.0.1 ports 443, 53, 53

svc/myheketi - 172.30.72.141:8080
  dc/myheketi deploys istag/myheketi:latest 
    deployment #1 pending 3 seconds ago

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.

$ oc get pods
NAME                      READY     STATUS    RESTARTS   AGE
myheketi-1-h1tyy          1/1       Running   0          1m

$ curl http://172.30.72.141:8080/hello
HelloWorld from GlusterFS Application