How to deploy Anypoint Runtime Fabric in Oracle Cloud

Anypoint Runtime Fabric is a container service that automates the deployment and orchestration of Mule applications and API gateways. Runtime Fabric runs within a customer-managed infrastructure on AWS, Azure, virtual machines (VMs), and bare-metal servers.

Some of the capabilities of Anypoint Runtime Fabric include:

  • Isolation between applications by running a separate Mule runtime engine per application.
  • Ability to run multiple versions of Mule on the same set of resources.
  • Scaling applications across multiple replicas.
  • Automated application failover.
  • Application management with Anypoint Runtime Manager.

Current deployment options

Current Runtime Fabric deployment instructions for public clouds include deployment on AWS and Azure. There is no deployment documentation for Oracle Cloud. This article will walk you through the process of manually installing and deploying Runtime Fabric on an Oracle Cloud Infrastructure. It also highlights some necessary changes required to successfully install Runtime Fabric.

Setup

Make sure you meet the installation requirements — mentioned here — before continuing the setup. Anypoint Runtime Fabric supports development and production configuration. Each of these supported configurations specify the minimum nodes and resources required.

In this setup, we will use the development configuration. This configuration requires at least one controller and two worker nodes.

architecture development
Runtime Fabric Deployment with development configuration.

We will need to first create the required infrastructure in Oracle Cloud. The required minimum configuration for a development configuration is listed below.

Build the infrastructure in Oracle Cloud

First and foremost, you need to build the infrastructure required to deploy Runtime Fabric. Since we are going to deploy a development configuration with one controller and two worker nodes, we will need three virtual machines that meet the infrastructure and OS requirements.

Launch virtual machines

Create three VMs. One for controller node and one each for two worker nodes with the below minimum requirements. You can choose either RHEL or Centos OS within the supported versions listed under OS requirements.

Additionally, create and attach block volumes to each of the corresponding VMs. These block volumes must also meet the storage requirements and the IOPS requirements mentioned in the documentation.

Controller node:

Worker node/s:

Network port requirements

It’s recommended to only open the firewall ports as documented in the network port requirements

The following picture represents the ingress ports that were opened to allow traffic to the instances and allow access to the Ops center from the web. 

Runtime Fabric installation

Log into the controller node and follow the manual installation steps as described here.

  1. Base64 encode your Mule license keys.
  2. Define variables
    1. RTF_CONTROLLER_IPS=”172.31.1.9″
    2. RTF_WORKER_IPS=”172.31.1.7 172.31.1.8″
    3. RTF_ACTIVATION_DATA=”YW55cG9pbnQubXVsZXNvxxxxxxmQ4NzViYjQ5LTFjZTktNDk0NC05ZjlmLTFkMjQ4YTE0NDczMQ==”
    4. RTF_DOCKER_DEVICE: /dev/sdb2
    5. RTF_ETCD_DEVICE: /dev/sdb1
    6. RTF_MULE_LICENSE:== “2414asdfgdDSFSDFSD31234098f”
  3. Use the ./generate-configs.sh script to generate the environment variables for each VM. This should output a set of instructions and a script to run on each of the VMs (controller, worker node one and worker node two).
  4. Execute the snippet generated above on each VM (controller node and the two worker nodes) based on the IP address to apply the environment variables.
  5. On each VM, copy the ./scripts/init.sh file to /opt/anypoint/runtimefabric and make it executable. 
  6. Run the init.sh script in a privileged mode.
  1. This should begin the installation process. The installation process will run through some pre checks and availability of necessary packages. If all requirements are met the script continues the installation process. Installation completes after executing through 15 steps.

If you run into issues during installation, you will need to monitor the error in the terminal window or view the logs in the /var/log/rtf-init.log file. You will then need to correct the problem and rerun the init.sh script.

Things to watch out during installation in Oracle Cloud

To survive a VM restart and attach block device to the compute instance

Edit the /etc/fstab file to include ‘_netdev’ option into the two lines automatically added by the Runtime Fabric installation program.

Debugging DNS resolution

Create a simple Pod to use as a test environment. Then create a busybox pod named ‘busybox’ using the following command:

Once that pod is running, you can execute nslookup in that environment. If you see something like the following, DNS is working correctly.

If the nslookup command fails, check the following:

  • Check the local DNS configuration.
  • Take a look inside the resolv.conf file.
  • Verify that the search path and name server are set up like the following:

Errors such as the following indicate a problem with the coredns or associated services:

To solve this, check if the DNS pod is running. Then use the kubectl get pods command to verify that the DNS pod is running.

If you see that no pod is running or that the pod has failed/completed, the DNS add-on may not be deployed by default in your current environment and you will have to deploy it manually.

Verify that the DNS service is up by using the kubectl get service command.

You can verify that DNS endpoints are exposed by using the kubectl get endpoints command.

Learn more about the product and the manual installation process in the documentation. Start your free trial of Anypoint Platform and test out Anypoint Runtime Fabric now. 



We'd love to hear your opinion on this post