Configuring HX Bench for Kubernetes Deployments

Prerequisites

  • Install sshpass before executing the script file.

    • On Debian/Ubuntu and its derivatives:

      • sudo apt-get install sshpass

    • In RedHat/CentOS based systems:

      • yum install sshpass

      • dnf install sshpass [On Fedora 22+ versions]

  • RAM requirement: 4 GiB

  • CPU requirement: 4 CPUs

  • Storage Class free space requirement: Minimum of 40 GB.

  • Users who select key based Authentication:

    • Locate the pem file in home/username directory

    • Name the pem file csi_private_key.pem

    • The master and worker nodes should use a common pem file

Configuring HX Bench for Kubernetes Environments

  1. Download the Cisco-HxBench-2.1-CSI.tar file from https://hyperflexsizer.cloudapps.cisco.com.

    • DOWNLOAD HX TOOLS > HyperFlex Bench > Kubernetes

  2. Untar Cisco-HxBench-2.1-CSI.tar.

  3. Inside Cisco-HxBench-CSI locate the directory named Script_files.

  4. Locate the hxbench_deployment.sh file in the Script_files directory.

  5. Run the hxbench_deployment.sh file using the bash hxbench_deployment.sh command.

  6. When prompted, type your storage class name and press the enter button.


    Note

    If you enter wrong storage class name, you will see an error response. If you enter wrong storage name 3 times, the deployment process ends and returns you to the config prompt. Return to step 1 and restart the process.


  7. Select your authentication type. Valid values are 1. Keybased Authentication and 2. Password based Authentication (recommended).

    • Keybased Authentication: Select your authentication type; Type 1 and press the Enter button.

      1. When prompted, type the worker node username and press the Enter button. Make sure that you receive the Image deployed successfully message.

    • Password based Authentication (recommended):: Select your authentication type; Type 2 and press the Enter button.

  8. Deploy hxbench image in worker nodes: Answer the "Do you want to deploy hxbench image in all worker nodes (Recommended) Y/N:" question.

    • If you want to deploy the hxbnch to all worker nodes, type Y and press the Enter button and return to Step 8a.

    • If you do not want to deploy image in all worker nodes, type N and press the Enter button and skip to Step 9.

    1. When prompted, type the worker node username and password and press the Enter button. Make sure that you receive the Image deployed successfully message.


      Note

      The Password field only appears when Password-based Authentication is configured.


    2. Repeat step 8a to deploy the image in all worker nodes.

  9. If you do not want to deploy image in all worker nodes, then type N and press the Enter button. Type IP, username and password of the worker node if you want to deploy image in any specific node.

  10. Deployment Namespace: The default namespace used for deployment is hxbench.

    In the provided namespace, it will check if Elasticsearch and postgres pods deployed in the namespace, if yes, you are provided with 2 options:

    • Delete the entire namespace and deploy fresh namespace, continue to step 11.

    • Use the existing Elasticsearch and postgres pod.

    1. If you want to delete and create a new then type Y and press the enter button. The default hxbench namespace is deleted, and the new namespace named hxbench is created, type Y and press the enter button to confirm the action.

    2. If you want to deploy in any other namespace type Y and type the desired namespace.

  11. Enter the new namespace name and press the Enter button.


    Note

    Namespace name requirements: lower case alphanumeric characters and "-" (dash). The name must start and end with an alphanumeric character.


    Deployment of Elasticsearch, Postgres and hxbench – controller yaml file in all nodes are created.

    Applying and Running Migrations

    Importing prebaked profiles from the package.

  12. At the prompt for the current UNIX password, type the password for the appadmin GUI account (default password is password) and press the Enter button.

  13. At the prompt for the new UNIX password, type your new user defined password and press the Enter button.

  14. At the prompt to retype your new UNIX password, type your new password and press the Enter button. The result is the final hxbench-ip with the port number. Copy the IP address and paste it in the browser to fetch the UI.

Delete HX Bench

To delete HX Bench completely delete the namespace using the following commands:

  • To get a list of the current namespace, use the kubectl get ns command.

  • To delete the desired namespace, use the kubectl delete ns<namespace-name> command.


    Note

    Replace the <namespace-name> with the name of the namespace which needs to be deleted.