Robin’s CLI is powerful, but what if you need to manage multiple clusters from a single machine? That’s where the Robin Remote Client comes in. It mirrors the native CLI functionality and introduces the concept of contexts, allowing you to switch between clusters seamlessly.
This blog post walks you through downloading the remote client, adding and managing contexts, and using them to control your Robin clusters efficiently.
๐ฅ 4.11.1 Downloading the Robin Client
To begin, download the Robin client from your cluster’s master node:
curl -k 'https://<masterip>:<port>/api/v3/robinserver/download?file=robincli&os=<os>' -o robin
๐น Example
curl -k 'https://vnode42:29442/api/v3/robin_server/download?file=robincli&os=linux' -o robin
Output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.1M 100 10.1M 0 0 1421k 0 0:00:07 0:00:07 --:--:-- 1483k
Verify the download:
๐งฉ 4.11.2 Adding a Context
A context defines a Robin cluster for the remote client. You can add one using:
๐น Example
robin client add-context centos-60-214 --port 29442
Output:
Context robin-cluster-centos-60-214 created successfully
๐ก If the cluster is highly available, use VIP and set ports to
29465.
๐ 4.11.3 Listing All Contexts
To view all registered contexts with details:
robin client list-contexts --full
✅ Output
| Server | Port | Version | Tenant | Last Login | Tenants | FPort | WPort | MPort | LogLevel
---+-----------------------------------+-------+------------+----------------+----------------------+----------------+-------+-------+-------+----------
| master.robin-server.service.robin | 29442 | - | - | - | | 29445 | 29444 | 29446 | ERR
| centos-60-214 | 29443 | - | Administrators | - | | 29445 | 29444 | 29446 | ERR
* | 172.19.174.194 | 29442 | 5.2.3-9842 | Administrators | 26 Mar 2020 16:10:58 | Administrators | 29445 | 29444 | 29446 | ERR
The asterisk
*indicates the current context.
๐ 4.11.4 Setting the Current Context
To switch to a specific cluster:
robin client set-current <context>
๐น Example
Output:
Current context set to robin-cluster-centos-60-214
๐ง 4.11.5 Updating the Current Context
If cluster attributes change (e.g., after reinstallation), update the context:
๐น Example
robin client update-context --port 29942 --file-port 29445 --watchdog-port 29444 --metrics-port 29446
Output:
Updating attributes for context robin-cluster-centos-60-214
Server: centos-60-214
Context config updated for robin-cluster-centos-60-214
๐️ 4.11.6 Deleting a Context
To remove a context:
robin client delete-context <context>
๐น Example
robin client delete-context centos-60-214
Output:
Context centos-60-214 deleted
๐ Summary
| Task | Command | Description |
|---|---|---|
| Download client | curl | Get Robin CLI for remote use |
| Add context | robin client add-context | Register a cluster |
| List contexts | robin client list-contexts --full | View all registered clusters |
| Set current | robin client set-current <context> | Switch active cluster |
| Update context | robin client update-context | Modify cluster attributes |
| Delete context | robin client delete-context <context> | Remove a cluster |
No comments:
Post a Comment