concept metric in category openshift

appears as: metrics, metrics
OpenShift in Action

This is an excerpt from Manning's book OpenShift in Action.

We strongly recommend going through the process of installing a full OpenShift cluster. You can run most of the examples in this book on Minishift, through chapter 6. But you’ll run into trouble when you start working with persistent storage, metrics, complex application deployments, and networking. If you’re ready to get your full OpenShift cluster up and running, head to appendix A and deploy your cluster before you move on to the examples in this chapter. If you want to dive in to the examples a little faster, Minishift is your path forward. Take a look at its documentation to get it up and running.

In OpenShift, triggering horizontal pod scaling without human intervention is called autoscaling. Developers can set objective measures to scale pods up and down on demand, and administrators can limit the number of pods to a defined range. The indicators that OpenShift uses to determine whether the application needs more or fewer pods are based on pod metrics such as CPU and memory. But those pod metrics aren’t available out of the box; to use metrics in OpenShift, the administrator must deploy the OpenShift metrics stack. This metrics stack comprises several popular open source technologies including Hawkular, Heapster, and Apache Cassandra. Once the metrics stack is installed, OpenShift autoscaling has the objective measures it needs to scale pods up and down on demand.

$ ansible-playbook -i /root/hosts \ /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/ openshift-metrics.yml \ #1 -e openshift_metrics_install_metrics=True \ #2 -e openshift_metrics_start_cluster=True \ #3 -e openshift_metrics_duration=1 \ #4 -e openshift_metrics_hawkular_hostname=hawkular-metrics.apps.192.168. 122.101.nip.io #5 #1 OpenShift metrics Ansible playbook #2 Deploys the metrics stack #3 Starts gathering metrics after the components are deployed #4 Number of days to retain metrics #5 Route for the metrics endpoint !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":2,\"ch\":72},{\"line\":2,\"ch\":74}],[{\"line\":9,\"ch\":0},{\"line\":9,\"ch\":2}],[{\"line\":3,\"ch\":74},{\"line\":3,\"ch\":76}],[{\"line\":10,\"ch\":0},{\"line\":10,\"ch\":2}],[{\"line\":4,\"ch\":74},{\"line\":4,\"ch\":76}],[{\"line\":11,\"ch\":0},{\"line\":11,\"ch\":2}],[{\"line\":5,\"ch\":74},{\"line\":5,\"ch\":76}],[{\"line\":12,\"ch\":0},{\"line\":12,\"ch\":2}],[{\"line\":7,\"ch\":72},{\"line\":7,\"ch\":74}],[{\"line\":13,\"ch\":0},{\"line\":13,\"ch\":2}]]"} !@%STYLE%@!
Figure 5.1. Project overview page displaying metrics