You can install and activate a vSphere Bitfusion client on multiple platforms.

  • For clients in the same vCenter Server instance as your servers, you can activate the client from the vSphere Bitfusion Plug-in, without generating an authorization token first.
  • For clients that are installed on different vCenter Server instances or bare metal machines, you can generate an authorization token and use it to activate a single or multiple clients.
  • For clients that are installed on Tanzu Kubernetes Grid (TKG) containers, you can add the Kubernetes cluster and namespace in the vSphere Bitfusion plug-in, create an authentication token and publish the token to the Kubernetes Secrets, and then configure the vSphere Bitfusion client on the Kubernetes pod.

You can create multiple tokens to activate groups of vSphere Bitfusion clients and manage the clients or client groups, by activating, deactivating, editing, and deleting the specific authentication tokens.

The following figure displays the available activation options for a vSphere Bitfusion client on multiple platforms.

A diagram that displays the different options to activate a vSphere Bitfusion client

How to activate a vSphere Bitfusion client by using the vSphere Bitfusion plug-in

You can use the vSphere Bitfusion plug-in to activate a vSphere Bitfusion client that you installed in the same vCenter Server instance as your vSphere Bitfusion servers.

To activate a vSphere Bitfusion client, that is installed in the same vCenter Server instance as your vSphere Bitfusion servers, use the vSphere Bitfusion plug-in. To add a client that is installed outside of the vCenter Server instance, see How to activate a vSphere Bitfusion client by using a token.

Prerequisites

Procedure

  1. In the vCenter Server inventory, right-click the virtual machine of your vSphere Bitfusion client and select Bitfusion > Activate Bitfusion.
  2. In the Activate Bitfusion dialog box, select the For a client, this will allow users to run Bitfusion workloads radio button, and click Activate.
  3. Power on the client VM.
  4. In the terminal of the client machine, add a user to the vSphere Bitfusion Linux user group by running the sudo usermod -aG bitfusion username command, where username is the name of the new user.
    Any user of the vSphere Bitfusion client must be a member of the vSphere Bitfusion Linux user group.
  5. (Optional) Verify that the users were successfully added to the vSphere Bitfusion Linux user group.
    1. Log out and log in to the terminal of the client machine.
    2. In the terminal, run the groups command.
    The user and user associated groups are listed. The bitfusion group is displayed as a part of the list.
  6. (Optional) To verify that the vSphere Bitfusion client is activated, from the vSphere Bitfusion client, list the available GPUs on the vSphere Bitfusion servers by running the bitfusion list_gpus command.

Results

You have successfully activated the vSphere Bitfusion client.

What to do next

Start an application in the vSphere Bitfusion client. After the first run, the vSphere Bitfusion client joins the cluster. For example, start the nvidia-smi application by running the bitfusion run -n 1 -- nvidia-smi command.

How to activate a vSphere Bitfusion client by using a token

By using a client authentication token, you can activate a vSphere Bitfusion client that you installed on a bare metal machine or a different vCenter Server instance.

To activate a vSphere Bitfusion client that is not part of the same vCenter Server instance as your servers, you must generate an authorization token, download the related tar file, and extract the contents of the file in the filesystem of your client.

To activate a client that is part of the same vCenter Server instance as your servers, see How to activate a vSphere Bitfusion client by using the vSphere Bitfusion plug-in.

Prerequisites

Procedure

  1. In the vSphere Client, select Menu (vSphere Client menu icon) > Bitfusion.
  2. On the Tokens > Tokens tab, select Create.
    The Create Token dialog box appears.
    1. Enter a name for your token.
    2. (Optional) Select the Activate token after creation check box.
    3. Click Create.
  3. Select the token from the list, click Download, and save the token tar file to your local machine.
  4. Copy the tar file to the filesystem of your client machine.
  5. In the terminal of the client machine, add a user to the vSphere Bitfusion Linux user group by running the sudo usermod -aG bitfusion username command, where username is the name of the new user.
    Any user of the vSphere Bitfusion client must be a member of the vSphere Bitfusion Linux user group.
  6. (Optional) Verify that the users were successfully added to the vSphere Bitfusion Linux user group.
    1. Log out and log in to the terminal of the client machine.
    2. In the terminal, run the groups command.
    The user and user associated groups are listed. The bitfusion group is displayed as a part of the list.
  7. Extract the contents of the tar file and run the install.sh installer script.
  8. If your vSphere Bitfusion client is version 3.5 and earlier, change the permissions of the client.yaml file.
    1. In the terminal of a client machine, navigate to the cd ~/.bitfusion/ folder.
    2. Run the sudo chmod 0600 client.yaml command.
  9. (Optional) Verify that the contents of the tar file are installed in the correct locations.
    File Location
    ca.crt /etc/bitfusion/tls
    client.yaml ~/.bitfusion
    servers.conf /etc/bitfusion
  10. (Optional) To verify that the vSphere Bitfusion client is activated, from the vSphere Bitfusion client, list the available GPUs on the vSphere Bitfusion servers by running the bitfusion list_gpus command.

Results

You have successfully activated the vSphere Bitfusion client.

What to do next

Start an application in the vSphere Bitfusion client. After the first run, the vSphere Bitfusion client joins the cluster. For example, start the nvidia-smi application by running the bitfusion run -n 1 -- nvidia-smi command.

How to activate a vSphere Bitfusion client on a Kubernetes cluster

Activate a vSphere Bitfusion client that you installed on a Tanzu Kubernetes Grid (TKG) container.

To activate a vSphere Bitfusion client that you installed on a Tanzu Kubernetes Grid (TKG) container, you must add the Kubernetes cluster and namespace in the vSphere Bitfusion plug-in, create an authentication token and publish the token to the Kubernetes Secrets, and then configure the vSphere Bitfusion client on the Kubernetes pod.
A diagram that displays the activation process of a vSphere Bitfusion client that is installed in a Kubernetes cluster.

Prerequisites

  • Verify that you have installed a vSphere Bitfusion 4.0 server or later.
  • Verify that the version of your vSphere Bitfusion client is the same version as your vSphere Bitfusion servers or earlier. See How to upgrade vSphere Bitfusion.
  • Verify that the Kubernetes containers have network access to the vSphere Bitfusion servers.

Procedure

  1. In the vSphere Client, select Menu (vSphere Client menu icon) > Bitfusion.
  2. To add a Kubernetes cluster in the vSphere Bitfusion plug-in, on the Tokens > Kubernetes Clusters tab, click Add.
    The Add Kubernetes Cluster dialog box is displayed.
    1. Enter a name for your Kubernetes cluster.
    2. Click Browse and select a Kubeconfig file.
      Typically, the Kubeconfig file is located in the ~/.kube/config folder of the machine that runs the Kubeadm tool. After the Kubeconfig file is uploaded, the IP address of the cluster is displayed.
    3. Select namespaces from your Kubernetes cluster and click Add.
    The Kubernetes clusters, namespaces, and IP addresses are displayed on the Kubernetes Clusters tab.
  3. To publish the authentication token to the Kubernetes Secrets, on the Tokens > Tokens tab, click Create.
    The Create Token dialog box is displayed.
    1. Enter a name for your client authentication token.
    2. Select one or more Kubernetes clusters and namespaces.
    3. Select the Activate token after creation check box.
    4. Select Create.
    The new token and the Kubernetes clusters and namespaces, where the token is published, are displayed on the Tokens tab.
  4. Configure the vSphere Bitfusion client on a Kubernetes pod.
    1. On the machine that runs the Kubeadm tool, create a pods.yaml file by using the following code, where pod_name is the name of the Kubernetes pod, container_name is the name of the Kubernetes container, and container_image_path is the path to the Kubernetes container image.
      apiVersion: v1
      kind: Pod
      metadata:
        name: pod_name
      spec:
        hostNetwork: true
        containers:
        - name: container_name
          image: container_image_path
          command: ["/bin/sh", "-c", "while : ;do curl http://localhost:80/; sleep 3; done"]
          volumeMounts:
          - name: config-files
            mountPath: /etc/bitfusion
          - name: certificate  
            mountPath: /etc/bitfusion/tls  
        volumes:
        - name: config-files
          projected:
            defaultMode: 0640
            sources:
            - secret:
                name: bitfusion-client-secret-client.yml
            - secret:
                name: bitfusion-client-secret-servers.conf
        - name: certificate
          secret:
            secretName: bitfusion-client-secret-ca.crt
            defaultMode: 0640
    2. Create a Kubernetes pod in the same namespace where the token is published by running the kubectl create -f path_to_file --namespace namespace_name command, where path_to_file is the path to the pods.yaml file and namespace_name is the name of the Kubernetes namespace.
    3. To get access to the Kubernetes pod, run the kubectl exec -it pod_name --namespace namespace_name -- bash command, where pod_name is the name of the Kubernetes pod and namespace_name is the name of the Kubernetes namespace.
    4. (Optional) In the Kubernetes pod, verify that the files of the authentication token are installed in the correct locations.
      File Location
      ca.crt /etc/bitfusion/tls
      client.yaml /etc/bitfusion
      servers.conf /etc/bitfusion
  5. Install the vSphere Bitfusion client on the Kubernetes pod.
    For more information, see How to install the vSphere Bitfusion client.
  6. If the version of your vSphere Bitfusion client is 3.5 or earlier, in the Kubernetes pod, run the following commands.
    1. Create a bitfusion folder.
      mkdir ~/.bitfusion
    2. Copy the client.yaml file.
      cp /etc/bitfusion/client.yaml ~/.bitfusion/
    3. Provide read and write access to the client.yaml file.
      chmod 600 ~/.bitfusion/client.yaml
  7. (Optional) To verify that the vSphere Bitfusion client is activated, from the vSphere Bitfusion client, list the available GPUs on the vSphere Bitfusion servers by running the bitfusion list_gpus command.

Results

You have successfully activated the vSphere Bitfusion client.

What to do next

Start an application in the vSphere Bitfusion client. After the first run, the vSphere Bitfusion client joins the cluster. For example, start the nvidia-smi application by running the bitfusion run -n 1 -- nvidia-smi command.