BASE64_ENCODED_LICENSE=$(base64 -b0 license.lic)
Installing Runtime Fabric Manually
This topic describes how to manually install Anypoint Runtime Fabric on VMs / Bare Metal on VMs hosted in your data center.
Before installing Runtime Fabric on VMs / Bare Metal, refer to Shared Responsibility for Runtime Fabric on VMs / Bare Metal. If your infrastructure does not meet the minimum hardware, operating system, and networking requirements, Runtime Fabric on VMs / Bare Metal will not operate successfully. Your organization’s operations, networking, and security teams must be involved. See Anypoint Runtime Fabric Installation Prerequisites. |
Before you Begin
Ensure that you’ve met following criteria before beginning the installation:
-
The necessary hardware has been provisioned as outlined in Anypoint Runtime Fabric on VMs / Bare Metal Installation Prerequisites.
-
The required disks are listed as block devices for each VM. The disks should not be mounted or formatted.
-
The necessary ports are open and hostnames are added to allowlists as described in Anypoint Runtime Fabric on VMs / Bare Metal Installation Prerequisites.
-
You have disabled any antivirus agents, such as McAfee, running in your environment.
-
You have reviewed the requirements for load balanacing. In Runtime Fabric on VMs / Bare Metal, the inbound load balancer runs in either shared or dedicated mode:
-
Shared Mode enables you to specify the number of CPU cores and amount of memory for the internal load balancer. In shared mode, the internal load balancer is distributed across the controller nodes. Shared Mode is the default setting.
-
Dedicated Mode specifies that all available resources are dedicated to the internal load balancer, so you cannot choose the number of CPU cores and memory amount. In dedicated mode, the internal load balancer is deployed on dedicated internal load balancer nodes.
Refer to Manage Runtime Fabric for detailed information.
-
Operations Performed During Installation
The installation performs the following actions on each VM:
-
Formats the dedicated disks.
-
Mounts the dedicated disks to the appropriate path.
-
Sets iptable rules.
-
Enables the required kernel modules.
-
Enables and reloads system services.
Base64 Encode your Mule License Key
To install Runtime Fabric, your Mule license key must be Base64 encoded. Copy the license file, license.lic
, to the installer node.
-
Base64 encode the new Mule
.lic
license file provided by MuleSoft:-
On MacOS, run the following command in the terminal:
-
On Unix, run the following command:
BASE64_ENCODED_LICENSE=$(base64 -w0 license.lic)
-
On Windows, choose one of the following:
-
Use a WSL or Cygwin shell that includes the base64 tool and use the above Unix command.
-
Use the
base64.exe
program included with Windows git (C:\Program Files\Git\usr\bin
). -
Use the following Powershell command:
$BASE64_ENCODED_LICENSE=[convert]::ToBase64String((Get-Content -path "license.lic" -Encoding byte))
-
-
Windows
To encode your license file on Windows, a shell terminal emulator (such as cygwin) or access to a Unix-based computer is required to follow these steps:
-
Find your organization’s Mule Enterprise license key file (
license.lic
) and transfer to your Unix environment if necessary. -
Run the following command to Base64 encode the license key:
base64 -w0 license.lic
Download the Install Scripts
Download the scripts ZIP file on the controller VM that will act as the leader in the installation.
To install a specific version of Runtime Fabric on VMs / Bare Metal, transfer the installation package to this path on the controller VM acting as the leader during installation: |
-
Sign in to Anypoint Platform and navigate to Runtime Manager.
-
On the left navigation pane, select Runtime Fabrics.
-
Click on the Runtime Fabric you created. It should be in the Activating state.
-
Right-click the Download files button and select "Copy link location".
-
Download the file to the controller VM.
-
Open a shell (SSH session) to the controller VM.
-
Download the file:
curl -L {INSTALLER_URL} --output rtf-install-scripts.zip
-
-
Once downloaded, unzip the
rtf-install-scripts.zip
file in a separate directory.mkdir -p ./rtf-install-scripts && unzip rtf-install-scripts.zip -d ./rtf-install-scripts
Inside the
rtf-install-scripts/
directory, you’ll find a sub-directory namedmanual
containing the following:-
generate-configs.sh
: a script to help generate environment variables for each VM. -
README.md
: a markdown file containing instructions to aid with installation.
-
Generate the Variables for Installation and Run the Install Scripts
You must run the install scripts from a Bash shell. |
-
Familiarize yourself with the variables needed for installation.
-
Use the
./generate-configs.sh
script to generate the environment variables for each VM. -
Copy the command below in a text editor and fill in the values of each variable inside the single quotes. Add and define any optional variables if required. A common example is if you require an HTTP proxy for outbound internet connectivity.
RTF_CONTROLLER_IPS='' \ RTF_WORKER_IPS='' \ RTF_DOCKER_DEVICE='' \ RTF_ETCD_DEVICE='' \ RTF_ACTIVATION_DATA='' \ RTF_MULE_LICENSE='' \ ./generate-configs.sh
-
Open a shell/SSH on the controller VM and navigate to the
manual
sub-directory from the unzipped directory. -
Copy the command from your text editor, paste it in the terminal, and run the command on the controller VM. The script should output a set of instructions and a script to run on each VM, categorized by the IP address of each VM. You may need to scroll up to see the outputted instructions.
-
Execute the snippet on each VM based upon its IP address to apply the required environment variables.
-
On each VM, copy the
./scripts/init.sh
file to/opt/anypoint/runtimefabric
, and ensure the script is executable. The script below assumes the present working directory contains the unzipped directoryrtf-install-scripts
.mkdir -p /opt/anypoint/runtimefabric && cp ./rtf-install-scripts/scripts/init.sh /opt/anypoint/runtimefabric/init.sh && chmod +x /opt/anypoint/runtimefabric/init.sh
-
-
Run the
init.sh
script in privileged mode on the controller VM.You must have root privileges to run the
init.sh
script.sudo /opt/anypoint/runtimefabric/init.sh
-
Wait until the installation has successfully completed the pre-flight checks. The output should continue past the Execute preflight checks message to indicate the checks have passed:
... Tue Aug 14 02:28:54 UTC Starting the installation Tue Aug 14 02:28:56 UTC Operation has been created Tue Aug 14 02:28:57 UTC Execute preflight checks Tue Aug 14 02:29:48 UTC Configure packages for all nodes Tue Aug 14 02:29:59 UTC Bootstrap all nodes ...
-
Execute the
init.sh
script in privileged mode on all the other VMs. This step can be performed on each VM concurrently.sudo /opt/anypoint/runtimefabric/init.sh
-
If the installation process encounters an error, it exits with a message to help indicate how to resolve the error. In most cases, errors can be resolved by updating one or more variables to a valid value, and re-running the
init.sh
script.This step will install Runtime Fabric on VMs / Bare Metal across all VMs to form a cluster. It may take 15-25 minutes or longer to complete.
When the installation completes successfully, the file
/opt/anypoint/runtimefabric/.state/init-complete
is created.The internal load balancer is distributed across the controller nodes for shared mode and is deployed on the internal load balancer nodes for dedicated mode.
Variables to Define
Use the following required variables to install Runtime Fabric.
Parameter | Description | Example |
---|---|---|
|
IP addresses of the controller VMs, separated by whitespace. The first IP address will need to be the leader of the installation. |
|
|
IP addresses of the worker VMs, separated by whitespace. |
|
|
The full block device path for the dedicated disk used for Docker, supporting 1000 provisioned IOPS. |
|
|
The full block device path for the dedicated disk used for etcd, supporting 3000 provisioned IOPS. |
|
|
The encoded Runtime Fabric activation data. You can access this data by viewing your Runtime Fabric in Runtime Manager. |
|
|
The base64 encoded contents of your organization’s Mule Enterprise license key ( |
|
To help identify the block device paths to your disks, use the lsblk command on the VMs.
To base64 encode the Mule license key, see the instructions above under Base64 Encode your Mule License Key.
|
Optional Variables
The following variables can be defined based upon your organization’s requirements.
Parameter | Description | Example |
---|---|---|
|
The hostname and port of the HTTP proxy server that will forward outbound HTTP requests. |
|
|
The hostname, port, and optional username and password of the SOCKS5 proxy server that will forward metrics and logs to Anypoint Monitoring. |
|
|
A comma-separated list of hosts which should bypass the proxy. |
|
|
An integer representing the user ID to run each Runtime Fabric service. Overrides the default behavior of creating a user named "planet". |
|
|
An integer representing the group ID used when running each Runtime Fabric service. Overrides the default behavior of creating a group named "planet". |
|
|
Support for a custom pod CIDR block. |
|
|
Support for a custom service CIDR block. |
|
|
A boolean variable that disables/enables SELinux on the host operating system. The default value is |
|
|
Allows private IP address to be discovered from the network interface. |
|
Monitoring Installation Progress
If the forground
parameter was passed when running the init.sh
script, the install logs will output on the terminal. Otherwise to view the progress during the installation, you can tail the output log on each VM:
-
Open another shell (or SSH session) to the VM.
-
Tail the output log, located at
/var/log/rtf-init.log
tail -f /var/log/rtf-init.log
You can tail the same log on each VM to view its progress. |
When the installation completes successfully, the file /opt/anypoint/runtimefabric/.state/init-complete
is created.
Access Ops Center
After installation is completed successfully, login to Ops Center to view that status of your Runtime Fabric infrastructure. See Using Ops Center on Anypoint Runtime Fabric for information on accessing Ops Center and determining the Ops Center username and password.
Common Errors
If the installation process encounters an error, it’ll exit with a message to help indicate how to resolve the error. In most cases, errors can be resolved by updating one or more values in the /opt/anypoint/runtimefabric/env
file to the correct value, and re-running the init.sh
script.