rctl, Routr’s command-line tool, to manage Connect resources: Agents, Domains, Peers, Trunks, Numbers, Credentials, and ACLs. It talks to the API Server on port 51908.
Prerequisites
- Node.js and npm.
- A running Routr server with a database-backed API Server, such as routr-one or the Helm chart. The file-based simpledata API Server is configured through YAML files instead.
- Network access to the API Server’s port
51908. On Kubernetes, usekubectl port-forward. See Deploy on Kubernetes.
Install rctl
Install the package globally.Connect to the server
Every command accepts the same three connection flags. There is no login step or saved profile, so pass the flags on each command.
Pick the form that matches how the API Server is configured.
- TLS off
- TLS with a self-signed certificate
- TLS with a trusted certificate
routr-one runs the API Server without TLS by default (
TLS_ON=false). Add --insecure.Work with resources
Commands follow arctl <resource> <verb> pattern. The resources are acl, agents, credentials, domains, numbers, peers, and trunks. Each one supports create, get, describe, update, and delete. The examples below use --insecure and Agents.
1
Create a resource
create is interactive. It prompts for each field and lists existing resources, such as Domains and Credentials, to choose from. Create the Domain and Credentials before the Agent that uses them.ref. Other commands use it.2
List resources
get prints a paginated table. Use --size to change the page size (default 50) and --extended for more columns. Pass a ref to show one item.3
Show the details of a resource
describe prints every field of one resource, including linked resources such as the Agent’s Domain and Credentials.4
Update a resource
update takes the ref and prompts for the fields you can change, prefilled with the current values. Some fields, such as an Agent’s username, can’t be changed after creation.5
Delete a resource
delete requires the ref and runs without a confirmation prompt.Pitfalls
- Creating a resource that references a missing one. Create Credentials and Domains before Agents, ACLs before the Domains or Trunks that use them, and Trunks before Numbers.
This Agent already exist. A resource with the same unique field, such as a username, already exists. Useupdateor pick another value.- Connection errors. Check
--endpoint, then check that the TLS flag matches the server:--insecurefor TLS off,--cacertfor a self-signed certificate. - Scripting.
createandupdateare interactive. To automate changes, use the Node.js SDK.
Extend rctl
rctl supports oclif plugins through rctl plugins:install. To add your own commands, see Extend rctl. For shell completion, run rctl autocomplete.
Related
rctl reference
Every command, argument, and flag.
Connect resources
What each resource represents and its fields.