Contact Free trial Login

Install Runtime Fabric on AWS

This topic describes how to install Anypoint Runtime Fabric on your AWS account.

Ensure your infrastructure meets the minimum hardware, operating system, and networking requirements. These requirements should be reviewed by your organization’s operations, networking and security teams.

Before you Begin

Ensure the following criteria have been met before beginning the installation:

  • You have created a Runtime Fabric in Runtime Manager.

  • Your AWS user has access to create EC2 instances, Disks, VPCs, and Security Groups.

  • Your AWS account has enough quota for the infrastructure being provisioned.

  • Your Anypoint user account has the Manage Runtime Fabrics permission.

Running Terraform

Ensure you’re able to run Terraform on your machine. There are a couple of options you can use to run the Terraform script:

  • Download and install Terraform on your machine.

    • Check the version of Terraform installed is 0.11.7 or later by running terraform --version on your terminal.

  • Run Terraform using Docker.

Installation

First, download the Terraform script from Runtime Manager.

  1. Sign in to Anypoint platform and navigate to Runtime Manager.

  2. On the left navigation pane, select Runtime Fabrics.

  3. Click on the Runtime Fabric you created. It should be in the Activating state.

  4. Click the Download files link.

  5. Once downloaded, unzip the rtf-install-scripts.zip file.

Inside the rtf-install-scripts directory, you’ll find a sub-directory named aws containing the following:

  • fabric.tf: a Terraform script to provision infrastructure on your AWS account.

  • security_group.tf: a separate Terraform script containing the Security Groups used by the fabric.tf script.

  • installer_env.sh: a shell script of environment variables added to the controller VM acting as a leader during the installation.

  • controller_env.sh: a shell script of environment variables added to the other controller VM(s).

  • worker_env.sh: a shell script of environment variables added to the worker VM(s).

  • README.md: a markdown file containing installation instructions.

Variables to Define

Second, become familiar with the variables needed for installation. The value for the activation_data variable below can be found on the Runtime Fabric page on Runtime Manager.

Variable Description Example

activation_data

The encoded Runtime Fabric activation data found in Runtime Manager.

NzdlMzU1YTktMzAxMC00OGE0LWJlMGQtMDdxxxx

key_pair

The name of the keypair in the AWS region you are deploying to.

my-keypair

enable_public_ips

Provision public IP addresses for each VM. If left as false, ensure you have consulted with your network administrator on how to obtain shell/SSH access to VMs.

false

controllers

The number of controller VMs to provision.

3

workers

The number of worker VMs to provision.

3

mule_license

The base64 encoded contents of your organization’s Mule Enterprise license key (license.lic).

To base64 encode the Mule license key, use the base64 -w0 license.lic command. (base64 -b0 license.lic in OSX)

Optional Variables

The following variables can be defined based upon your organization’s requirements.

Variable Description Example

service_uid

An integer representing the user ID to run each Runtime Fabric service. Overrides the default behavior of creating a user named "planet".

1000

service_gid

An integer representing the group ID used when running each Runtime Fabric service. Overrides the default behavior of creating a group named "planet".

900

http_proxy

A hostname and port for a HTTP proxy server to forward outbound HTTP requests.

1.1.1.1:80

tcp_proxy

A hostname and port for a TCP proxy server to forward outbound TCP requests.

1.1.1.2:800

no_proxy

A comma-separated list of hosts which should bypass the proxy.

1.1.1.1,no-proxy.com

Run the Terraform Script

Third, run the Terraform script to provision the hardware and network settings required to install Runtime Fabric.

You’ll need a key pair to provision the VMs. This is required to enable secure access to your VMs via SSH (Secure Shell).

To run the Terraform script, AWS API access should be configured in your terminal. Define your values for AWS_ACCESS_KEY, AWS_ACCESS_SECRET_KEY, or other environment variables (such as AWS_SESSION_TOKEN, AWS_REGION, or AWS_DEFAULT_REGION) to access the AWS API for your account. As a test, you should be able to run the aws-cli tool, if installed on your machine.

Terraform State Files

When running Terraform, a state file is generated to capture the details of the deployment. In the example below, the state file resides under tf-data/rtf.tfstate. A separate state file should be created and maintained for each Runtime Fabric infrastructure creation. The state file should be referenced when modifying or destroying the infrastructure.

Keep the state file in a safe place. You’ll need to reference it when making changes to this deployment, such as when scaling the number of worker or controller VMs.

Run using Native Terraform

  1. Initialize terraform (only has to be done one time):

    terraform init
  2. Copy the script below in a text editor to easily define the variables.

    terraform apply \
      -var activation_data='' \
      -var key_pair='' \
      -var enable_public_ips='' \
      -var controllers='3' \
      -var workers='3' \
      -var mule_license='' \
      -state=tf-data/rtf.tfstate
  3. Use the Variables to Define table above to help define the variables.

  4. Ensure your terminal has access to the AWS_ACCESS_KEY, AWS_ACCESS_SECRET_KEY, and other related AWS environment variables (such as AWS_SESSION_TOKEN, AWS_REGION) as expected by Terraform.

    1. If you experience an error related to AWS authorization, ensure you’re using the same terminal window for verifying the variables and running the Terraform command.

  5. Run the script.

Run using Docker

  1. Open a terminal/shell on the machine containing the Terraform script.

  2. Verify your current directory is the unzipped directory. When running the dir command, you should see the aws directory listed, along with other directories (azure, manual, etc).

  3. Initialize terraform (only has to be done one time):

    docker run -v $(pwd):/src -w /src/aws \
      -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN \
      hashicorp/terraform:0.11.7 init
  4. Copy the script below in a text editor to easily define the variables.

  5. Use the Variables to Define table above to help define the variables.

  6. Run the Terraform script:

docker run -it -v $(pwd):/src -w /src/aws \
  -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN \
  hashicorp/terraform:0.11.7 apply \
  -var activation_data='' \
  -var key_pair='' \
  -var enable_public_ips='' \
  -var controllers='3' \
  -var workers='3' \
  -var mule_license='' \
  -state=tf-data/rtf.tfstate

The Terraform script will provision the infrastructure and run the installation on each VM. When complete, the Runtime Fabric will update to the Active status in Runtime Manager.

This step installs Runtime Fabric across all servers to form a cluster. It may take 15-25 minutes or longer to complete.

Monitoring the Installation

To view the progress during the installation, you can tail the output log on each VM:

  1. Open a shell (or SSH session) to the first controller VM.

  2. 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 to Ops Center

After installation is completed successfully, the last few lines of the log output file located at /var/log/rtf-init.log will contain a host, username, and password to access the Ops Center. Copy these values and store them securely.

Next Steps

Before deploying applications on Anypoint Runtime Fabric, you’ll need to perform the following steps:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.