Once you’ve installed the GRID Enterprise command console, you can start using the CLI to interact with the GRID platform. This section will guide you through the post-installation steps, and familiarizes you with the ‘resource configuration’ file.

The resource configuration file that resides at ~/.grid/resource_config.json is a JSON file that contains your GRID credentials, as well as information about the resources you wish to target for running GRID.

For your convenience, the resource configuration file targets localhost by default, which means it allows you to run sessions on the same machine. If you wish to target other remote machines, see the following sections.

Configuration Overview

The configuration file contains the following sections:

  1. Credentials:
"tokens": {
    "username": "***",
    "password": "****",
    "storage_token": "****"
}
  1. Resources:
"resources": {
    "host_grid_local": true,
    "local": {
        "ip": "127.0.0.1"
    }
}

The resources section contains information about the nodes where you wish to run GRID sessions. The host_grid_local key is set to true by default, which allows you to run the containers on the same machine.

Host vs. Client mode

The GRID CLI can be run in two modes: host and client. The host mode is used when you want to run the GRID containers on the same machine where the CLI is installed. In this mode, the host_grid_local key is set to true in the resource configuration file. If you want to run the GRID containers on a remote machine, you need to set the host_grid_local key to false and provide the necessary details for the remote machine in the resource configuration file.

Mounting Storage

To mount a folder from the host to the GRID containers, add a storage key under the corresponding resource. For example, if you wish to mount a folder from localhost into the GRID containers:

{
  "resources": {
    "local": {
      "storage": {
        "code": "/home/test/Documents/code"
      }
    }
  }
}

This will mount /home/test/Documents/code on the host to /mnt/code in the GRID containers.

Targeting Remote Machines

To target remote machines, you need to add the necessary keys for IP address, username, and password in the resource configuration file. For example:

{
  "resources": {
    "host_grid_local": false,
    "remote": {
      "ip": "****",
      "username": "****",
      "password": "****"
    }
  }
}

When running GRID commands, always verify your node names (e.g., @local, @node0) before executing to ensure you are running them on the right machines.

Ports for Remote Access:
If you are using GRID on a remote machine, ensure that the following ports are open to access the simulation, notebooks, and visualizations:

  • 8000: GRID server
  • 8890: Jupyter Notebook
  • 3080: Simulation
  • 9090: Rerun visualization
  • 9877: Rerun stream

Was this page helpful?