Automatically Generating and Deploying External Info for a CSpace

You can automatically generate info for both secure and unsecure storage clusters:

Generating and Deploying Info for an Unsecure External Storage Cluster

To automatically generate the info files on an unsecure storage cluster for a CSpace, do the following:
  1. Using SCP or another method, copy the gen-external-secrets.sh script in the tools directory to a node on the storage cluster.
  2. To start the script, run the following command on the storage cluster as the admin user (typically mapr):
    su - mapr
    ./gen-external-secrets.sh
  3. Enter a name for the generated secret file when prompted. The default value is mapr-external-info.yaml. If you are creating CSpaces that each talk to different external storage clusters, you must name these secrets differently as they are all deployed in the same mapr-external-info namespace. Each CSpace CR must to point to the right secret, depending on the secret name.
  4. Enter the MapR username and password when prompted. The prompt displays the default values for the user name and password.
  5. Enter a name for the user secret when prompted. The default value is mapr-user-secret.
  6. Enter a name for the auto-generated file. The default value is mapr-external-info.yaml.
  7. Copy the file to a machine that has a copy of kubectl and is able to communicate with the Kubernetes cluster hosting the CSpaces.
  8. Deploy the info by running the following command:
    kubectl apply -f <mapr-external-info.yaml>

Generating and Deploying Info for a Secure External Storage Cluster

To automatically generate the secret file on a secure storage cluster for a CSpace, do the following:
  1. Using SCP or another method, copy the gen-external-secrets.sh script in the tools directory to a node on the storage cluster.
  2. As the admin user (typically mapr), generate a user ticket using the maprlogin utility:
    $ maprlogin password
  3. To start the script, run the following command on the storage cluster as the admin user:
    ./gen-external-secrets.sh
  4. Enter a name for the auto-generated file. The default value is mapr-external-info.yaml.

    If you are creating CSpaces that each talk to different external storage clusters, you must name these secrets differently as they are all deployed in the same mapr-external-info namespace. Each CSpace CR must to point to the right secret, depending on the secret name.

  5. Enter the MapR username and password when prompted. The prompt shows the default value of the username and password.
  6. Specify whether the node is a Kubernetes Storage node by entering one of the following:
    • y – if the storage cluster is running in a Kubernetes environment (this value is currently not supported).
    • n – if the storage cluster is running in a non-Kubernetes environment.
  7. Enter values for the following when prompted. The values must be unique for each external storage cluster you want to access:
    Prompted for ... Default is... Description
    Server ConfigMaps mapr-external.cm Contains the host locations of the cluster services.
    User secret mapr-user-secrets Contains the secret generated for the MapR system user credentials.
    Server secret mapr-server-secrets Contains the secret generated for the MapR maprserverticket in the /opt/mapr/conf directory.
    Client secret mapr-client-secrets Contains the secret generated for the ssl_truststore in the /opt/mapr/conf directory.
    Hivesite ConfigMap mapr-hivesite.cm Contains the information from the hive-site.xml file.
  8. Copy the generated file to a machine that has a copy of kubectl and is able to communicate with the Kubernetes cluster hosting the CSpace.
  9. Deploy the info by running the following command:
    kubectl apply -f <mapr-external-info.yaml>
    

    The info is now deployed to the mapr-external-info namespace.