Manage racks in your CosmicAC network
Register, list, and remove racks in your CosmicAC network with the CLI.
Register, list, and remove racks in your CosmicAC network with the CLI. A rack points CosmicAC to a Kubernetes worker, which reports the nodes and GPUs in your cluster. A default deployment registers one rack, rack-0, when you run task bootstrap.
Prerequisites
Before you start, make sure that you have the following.
- A running CosmicAC deployment. See Set up CosmicAC.
- Access to the deployment host machine. You need it to get the RPC keys in this guide.
- The CosmicAC CLI installed and configured. See Install the CLI.
Set up administrator access
The cosmicac admin commands authenticate with the ORK RPC key, which is the RPC key of the orchestrator, cosmicac-wrk-ork. You set up this access once.
Initialize administrator access
Run the following command, paste the ORK RPC key at the prompt, and then confirm that you want to save the configuration.
cosmicac admin initThe CLI stores the key for all later cosmicac admin commands.
Register and list racks
Register a rack
Run the following command.
cosmicac admin rack registerThe command asks for the following values.
- Rack ID: a unique ID for the rack.
- Rack type: select Server. CosmicAC supports only this rack type.
- RPC public key: the
rpcPublicKeyvalue from the status file of the Kubernetes worker, cosmicac-wrk-server-k8s-nvidia. On the deployment host machine, the file is inservices/cosmicac-wrk-server-k8s-nvidia/status/. - Location: a two-letter country code, such as
PT. The job creation form offers this location.
To skip the prompts, pass the values as arguments instead.
cosmicac admin rack register <rack-id> server <rpc-public-key> --location <country-code>When you register a rack, CosmicAC contacts the Kubernetes worker to read its nodes and GPUs. If CosmicAC can't reach the worker, the registration fails.
List racks
Check that the rack appears in the network.
cosmicac admin rack listEach rack shows its ID, type, RPC key, location, and status.
Remove a rack
To remove one or more racks, run the following command with their IDs.
cosmicac admin rack forget <rack-id> [<rack-id>...]You can't undo removing all racks.
To remove every rack, run the command without arguments, select the option to remove all racks, and then confirm twice.