This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.このコンテンツは選択した言語では利用できません。
A.3. Setting up the Heketi Server
After deploying the containers and installing the templates, the system is now ready to load the Heketi topology file. Heketi provides a RESTful management interface which can be used to manage the lifecycle of Red Hat Gluster Storage volumes.
A sample, formatted topology file (topology-sample.json) is installed with the ‘heketi-templates’ package in the
/usr/share/heketi/ directory.
Edit the topology file based on the Red Hat Gluster Storage pod hostname under the
node.hostnames.manage section and node.hostnames.storage section with the IP address. For simplicity, the /usr/share/heketi/topology-sample.json file only sets up 4 nodes with 8 drives each.
Important
Heketi stores its database on a Red Hat Gluster Storage volume. Heketi service does not respond if the volume is down.
To resolve this issue, restart the gluster pods hosting the Heketi volume.
Execute the following steps to set up the Heketi server:
- Execute the following command to check if the bootstrap container is running:
curl http://deploy-heketi-<project_name>.<sub-domain_name>/hello
# curl http://deploy-heketi-<project_name>.<sub-domain_name>/helloCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:curl http://deploy-heketi-storage-project.cloudapps.mystorage.com/hello
# curl http://deploy-heketi-storage-project.cloudapps.mystorage.com/hello Hello from HeketiCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to load the topology file:
export HEKETI_CLI_SERVER=http://deploy-heketi-<project_name>.<sub_domain_name>
# export HEKETI_CLI_SERVER=http://deploy-heketi-<project_name>.<sub_domain_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:export HEKETI_CLI_SERVER=http://deploy-heketi-storage-project.cloudapps.mystorage.com
# export HEKETI_CLI_SERVER=http://deploy-heketi-storage-project.cloudapps.mystorage.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow heketi-cli topology load --json=topology.json
# heketi-cli topology load --json=topology.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to verify that the topology is loaded:
heketi-cli topology info
# heketi-cli topology infoCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to create the Heketi storage volume which will store the database on a reliable Red Hat Gluster Storage volume:
heketi-cli setup-openshift-heketi-storage
# heketi-cli setup-openshift-heketi-storageCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:heketi-cli setup-openshift-heketi-storage
# heketi-cli setup-openshift-heketi-storage Saving heketi-storage.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to create a job which will copy the database from deploy-heketi bootstrap container to the volume.
oc create -f heketi-storage.json
# oc create -f heketi-storage.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:oc create -f heketi-storage.json
# oc create -f heketi-storage.json secret "heketi-storage-secret" created endpoints "heketi-storage-endpoints" created service "heketi-storage-endpoints" created job "heketi-storage-copy-job" createdCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to verify that the job has finished successfully:
oc get jobs
# oc get jobsCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:oc get jobs
# oc get jobs NAME DESIRED SUCCESSFUL AGE heketi-storage-copy-job 1 1 2mCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to remove all resources used to bootstrap heketi:
oc delete all,job,template,secret --selector="deploy-heketi"
# oc delete all,job,template,secret --selector="deploy-heketi"Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to deploy the Heketi service which will be used to create persistent volumes for OpenShift:
oc process heketi | oc create -f -
# oc process heketi | oc create -f -Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:oc process heketi | oc create -f -
# oc process heketi | oc create -f - service "heketi" created route "heketi" created deploymentconfig "heketi" createdCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Execute the following command to let the client communicate with the container:
export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>
# export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.com
# export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow heketi-cli topology info
# heketi-cli topology infoCopy to Clipboard Copied! Toggle word wrap Toggle overflow