Creating and Connecting Tenants to HPE Ezmeral Data Fabric on Bare Metal

This topic describes how to create tenants to connect to HPE Ezmeral Data Fabric on Bare Metal not registered as Tenant Storage.

Prerequisites

Set up HPE Ezmeral Data Fabric on Bare Metal cluster. To learn more, see HPE Ezmeral Data Fabric Documentation.

Procedure

  1. Create Kubernetes cluster and enable Spark Operator. See Creating a New Kubernetes Cluster and Installing and Configuring Spark Operator.
  2. Log in to HPE Ezmeral Runtime Enterprise GUI and create a default <sampletenant> tenant. See Creating a New Kubernetes Tenant or Project.
  3. Run kubectl get tenant sampletenant -o jsonpath={.spec} command.
    Save the generated information about <sampletenant> tenant.
  4. Delete existing <sampletenant> tenant.
    kubectl delete tenant sampletenant
  5. Run gen-external-secrets.sh script to generate <df-external-secrets.yaml> file . The gen-external-secrets.sh script is available on HPE Ezmeral df-on-k8s tools. When prompted, Hewlett Packard Enterprise recommends changing the default names of secrets and ConfigMaps. For example: df-external-cm, df-client-secrets.
  6. To create generated secrets and ConfigMaps on Kubernetes cluster, run:
    kubectl apply -f <df-external-secrets.yaml>
  7. Manually create an external <sampletenant> tenant.
    kubectl apply -f <external-tenant-CR.yaml>
    NOTE
    This external tenant is the tenant created on HPE Ezmeral Data Fabric on Bare Metal cluster.
    Ensure the following:
    • Set metadata.name field with the same tenant name as the one created using HPE Ezmeral Runtime Enterprise GUI in step 2. For example: sampletenant.
    • Set spec.clustername to HPE Ezmeral Data Fabric on Bare Metal cluster name. For example: my.cluster.com.
    • Set spec.security.external**** field with the same values as the ones used while running gen-external-secrets.sh script. You can check the secrets and ConfigMap names in hpe-externalclusterinfo namespace.
    Example Tenant CR template:
    apiVersion: hcp.hpe.com/v1
    kind: Tenant
    metadata:
      name: [tenant-name]
    spec:
      clustername: [external-cluster-name]
      clustertype: external
      baseimagetag: [pick-from-default-tenant]
      imageregistry: [pick-from-default-tenant]
      loglocation: /var/lib/docker/mapr/logs
      corelocation: /var/lib/docker/mapr/cores
      podinfolocation: /var/lib/docker/mapr/podinfo
      security:
        environmenttype: hcp
        usesssd: true
        externalconfigmap: [external-cm-name]
        externalhivesiteconfigmap: [external-hivesite-cm-name]
        externalusersecret: [external-user-secret-name]
        externalserversecret: [external-server-secret-name]
        externalclientsecret: [external-client-secret-name]
      tenantservices:
        tenantcli:
          count: 1
      grouplist:
        - [pick-from-default-tenant]]

Results

You can now run Spark applications on the tenants created on HPE Ezmeral Data Fabric on Bare Metal cluster not registered as Tenant Storage.