Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Install the Runtime Fabric Command Line Tool

Install the rtfctl command-line tool to locally manage Runtime Fabrics.

If you are using the default namespace (rtf), don’t specify the flag --namespace <rtf_namespace>. This flag is introduced only as of rtfctl version 0.4.1.

Install RTFCTL Tool

Your IT administrator must perform these installation tasks.

If you’re using Runtime Fabric for AKS and have the AKS-managed Azure AD integration enabled, this command returns the credentials needed to run rtfctl commands:

az aks get-credentials --name <NAME> --resource-group <RESOURCE_GROUP> --admin

rtfctl is supported on Windows, MacOS (Darwin), and Linux.

Perform these steps for the installation:

  1. Download the rtfctl command-line tool by running the appropriate operating system CURL command:

    • Windows

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-windows/latest -o rtfctl.exe
    • MacOS (Darwin)

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl-darwin/latest -o rtfctl
    • Linux

      curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl/latest -o rtfctl
  2. Change the file permissions for the rtfctl command-line tool:

    chmod +x rtfctl

Run Commands

The rtfctl command line tool consumes kubeconfig files as described in Organizing Cluster Access Using kubeconfig FilesLeaving the Site. Use this method to configure which cluster you want to manage. Confirm that the rtfctl binary is present in the current working directory and in the user $PATH.

  • Run rtfctl commands as a privileged user.

  • To list all supported commands, run rtfctl -h.

  • For more information about a specific command, run rtfctl <command> -h.

Check for Proxy Settings

When you run commands, rtfctl checks for any proxy settings in your environment. The tool looks for a NO_PROXY key (in upper case) and accepts a no_proxy key (in lower case) if NO_PROXY is not used. If both keys are present, rtfctl uses NO_PROXY. The rtfctl tool sets the key in your local Kubernetes context to honor your proxy settings.

Install a Mule License

To install a Mule license, follow these steps:

  1. Make sure to base64 encode the license.

  2. Run the following command:

    $ sudo ./rtfctl apply mule-license '<license-key-information>'  --namespace rtf1
    Updating rtf namespace... OK

Capture a Heap Dump

To capture a heap dump, run this command:

$ sudo /usr/local/bin/rtfctl heapdump hello-world /tmp/dump.hprof --app-namespace bed42b62-XXXX --namespace rtf1
Dumping heap for hello-world-f76484d8-l44qv...
Heap dump written to /tmp/dump.hprof

For additional information, run the rtfctl heapdump -h command.

Work with Multiple Replicas

For application management commands that accept a --pod flag, you can obtain the list of replicas using the describe command:

$ sudo ./rtfctl describe apps hello-world --app-namespace bed42b62-XXXX --namespace rtf1
Name:              hello-world
Namespace:         bed42b62-XXXX
Status:            PROGRESSING
Runtime:           2
ID:
Version:
Organization ID:   d30f74c0-XXXX
Replicas:          1 desired | 1 updated | 1 total | 0 available | 1 unavailable

  Name                             Status
  ----                             ------
  hello-world-77f5897949-z54gb   Pending

Audit RTFCTL Operations

The rtfctl command line tool (from v1.0.29 and above) audits the rtfctl operations on the cluster and it helps cluster administrators and you to track operations that impact Runtime Fabric core software.

Consider the following points:

  • Audit logs are stored in a Kubernetes secret in the rtfctl-audit namespace.

  • Audit logs are cluster scoped and not attached to Runtime Fabric core software lifecycle.

  • Command executions remain operational even if the auditing process fails to audit the operation.

To audit the operations, run this command:

$ sudo ./rtfctl audit-logs

An output example:

[{"timestamp":"2023-10-26 00:52:24.446 +0000 UTC","kubeContext":"test-k8scontext","command":["./rtfctl","restart","test-application","--app-namespace","8456f9c7-2149-4983-b02b-6b18ddd28efe","--namespace","rtf"]}]
Currently audit logs rollover or rotation is not supported.

Understand RTFCTL Output

The rtfctl command line tool commonly calls other applications and system tools, and the output of those calls is sent to standard output and standard error output. This output is written in the context of each operation performed.

The rtfctl command line tool includes a last output line on the most verbose commands to make it clear whether the operation succeed or failed. Normal operation may include some intermediate failure messages, such as when a stopped system unit is attempted to be stopped again.

If you are in doubt about whether a message represents a problem or not, discuss it with your system administrator or contact MuleSoft support.

Download Previous RTFCTL CLI Versions

Use the following rest API call to download different rtfctl tool CLI versions:

curl -L https://anypoint.mulesoft.com/runtimefabric/api/download/rtfctl/{version} -o rtfctl