Registering Things and Racks in CosmicAC
Register Kubernetes control plane nodes as Things and physical or virtual server racks with the CosmicAC orchestrator worker.
Registering Things and Racks in CosmicAC
Get RPC Public Keys
Each worker has an rpcPublicKey stored in its status file:
# Get wrk-server-k8s-nvidia rpcPublicKey
cat ~/cosmicac-wrk-server-k8s-nvidia/status/*.json | jq '.rpcPublicKey'
# Get wrk-ork rpcPublicKey
cat ~/cosmicac-wrk-ork/status/*.json | jq '.rpcPublicKey'Register K8s Control Plane (Thing)
npx hp-rpc-cli -s <RPC_PUBLIC_KEY_OF_WRK_SERVER_K8S_NVIDIA> -m registerThing -d '{
"id": "<THING_ID>",
"opts": {
"inCluster": false,
"clusters": [{
"name": "cluster.local",
"server": "<CONTROL_PLANE_URL>",
"caData": "<CA_DATA>",
"skipTLSVerify": false
}],
"users": [{
"name": "<USER_NAME>",
"token": "<TOKEN>"
}],
"contexts": [{
"name": "<USER_NAME>@cluster.local",
"user": "<USER_NAME>",
"cluster": "cluster.local"
}]
},
"info": {},
"tags": ["k8s-control-plane"]
}' -t 100000Verify Thing Registration
npx hp-rpc-cli -s <RPC_PUBLIC_KEY_OF_WRK_SERVER_K8S_NVIDIA> -m isOnline -d '{"id": "<THING_ID>"}' -t 100000Register Rack
npx hp-rpc-cli -s <RPC_PUBLIC_KEY_OF_WRK_ORK> -m registerRack -d '{
"id": "<RACK_ID>",
"type": "server",
"info": {
"rpcPublicKey": "<RPC_PUBLIC_KEY_OF_WRK_SERVER_K8S_NVIDIA>",
"location": "IN"
}
}' -t 100000