Nav

Managing Servers

logo cloud disabled logo hybrid active logo server active logo pcf disabled

Through Runtime Manager, you can register and set up the properties of servers, server groups, and clusters that reside on-premises. Once these are set up, you can select them as the deployment target for your applications, as an alternative to deploying to CloudHub.

Runtime Manager provides a single management interface where you can manage applications running in the cloud, on local servers, on server groups that are on-premises within your data center, or on clusters of servers. Applications that are on-premises run on Mule runtime instances on a single server or on a group of servers.

Whether you’re using the cloud based or the on-premise edition of the Anypoint Platform, these features work identically in both. If you’re interested in requesting the Anypoint Platform on-Premises Edition, please contact your sales representative.

Prerequisites

To perform on-premises server management, you need to have one of the following installed on your on-premises server:

  • Mule ESB – Version 3.6 or above

  • API Gateway runtime – Version 2.0 or above

For details on configuring an API Gateway runtime, see Configuring an API Gateway.

This document assumes that, if using the API Gateway, you are using version 2.0 or higher. The steps needed to complete server tasks differ between API Gateway 2.0 and previous versions.

You also need to have the latest version of the Runtime Manager Agent to handle the communication between the Runtime and Runtime Manager. See installing and configuring Runtime Manager Agent.

If you’re using the Anypoint Platform on-Premises Edition, then you must have at least version 1.5.2 of the agent, which is shipped with version 3.8.1 or earlier of the Mule Runtime. In that case you must download the Agent separately from here. You can then install it following the instructions in Installing and Configuring the Runtime Manager Agent.

If you need to whitelist IPs or ports for connecting to the Anypoint Platform through a firewall, see Ports and IPs to Whitelist.

Getting Started

Sign in to Anypoint Platform and click Runtime Manager:

deploying to your own servers get to arm

Runtime Manager has two main tabs, Applications and Servers.

Applications Tab

In Runtime Manager, an application is a Mule Application that is running on a Mule runtime instance. The instance can be running on CloudHub, on an on-premise server of your organization, on a group of servers, or on a cluster. For server groups, an application deployed to the group runs separately on each of the servers, but it’s displayed as a single unit on this console.

See [Status States] for possible values in the Status column.

AMC_Applications

From the Applications tab, by selecting an entry as shown, you can perform these tasks:

  • Deploy an Application

  • Start, Stop, and Delete an Application

  • Manage an Application

For more on the options offered by this tab, see Managing Deployed Applications.

Servers Tab

In Runtime Manager, a server is a Mule runtime or API Gateway runtime instance in a location other than CloudHub. You must first register the in the Runtime Manager console. Once registered and configured in this tab, you may deploy your applications to it through the Applications Tab.

Virtual servers created through Pivotal Cloud Foundry (PCF) aren’t displayed on this tab, just as CloudHub workers don’t.

AMC_Servers

From the Servers tab, by selecting an entry as shown, you can perform these tasks:

Switching Environments

If you have multiple environments in your organization, you can switch between them. From any screen in the CloudHub platform, you can switch to a different environment by clicking the current environment name, displayed in the upper left corner of the screen, and picking another environment.

managing deployed applications 0e10f
  1. Click the current environment in the top left corner of your Anypoint Platform UI

  2. Select the environemnt you want to switch to

  3. Click the switch button

Both servers and applications are always associated to a particular environment, and you won’t be able to see these until you switch to the right environment.

Servers Dashboard

If you select any of the servers, server groups or clusters on the Servers tab, a panel opens on the right. Here you will be able to read additional information about it and access some configuration items.

dashboard

What this dashboard displays depends on whether it’s a server, server group, or cluster and on what runtime versions are in use. You will always see the status, the Mule version installed in it (server groups and clusters must all have the same Mule version installed to work together), the Agent version in use, in case of clusters and server groups you will also see the type (unicast or multicast).

A series of tabs in the bottom allow you to see details about:

On all panels, two buttons are displayed:

  • The View Dashboard button, which takes you to the server’s dashboard page. This page displays more detailed performance metrics and the evolution of these over time, see Monitoring Dashboards for more on this.

    managing servers 7fc41
    Dashboards are a feature that isn’t currently available on the Anypoint Platform On-premises Edition
  • The Manage Server / Manage Group / Manage Cluster button, which takes you to the Settings Page.

    managing servers ebc52

Settings Page

The settings page can be accessed by either:

  • Clicking the Manage Server / Manage Group / Manage Cluster button on the right pannel that opens when selecting a server

    managing servers ebc52
  • Directly clicking on the name of the server / group / cluster on the table

    managing servers baa89

The settings page contains the same infomation that’s accesible on the right pannel of the Servers section, with the addition of an Alerts History tab, that displays a record of the triggered alerts on this server. See Alerts on Runtime Manager for more on this.

Add a Server

server

The server communicates with Runtime Manager via an add-on to the Mule runtime called The Runtime Manager Agent. In order to make a server visible in the Runtime Manager console and be able to manage it, you must first register it with the Runtime Manager Agent.

If the server you want to add is already registered with a different instance of Runtime Manager, you won’t be able to add it until you remove if from the other instance. To do this, remove the server from the server list on the Runtime Manager console and then delete the 'mule-agent.yaml' configuration file found on your '{RUNTIME PARENT FOLDER}/conf' folder.

If your environment requires all outbound calls to go through a proxy you will need to modify the proxy settings in the 'wrapper.conf' file in the '{RUNTIME PARENT FOLDER}/conf' folder.

If you’re using Anypoint Platform On-premises Edition, make sure you have at least version 1.5.2 of the Runtime Manager agent installed.

Obtaining the Server Registration Token

To be able to run the command that registers your server with the Runtime Manager Agent, you must obtain the unique Token code for your particular instance of Runtime Manager and environment.

  1. Go to the Servers tab in Runtime Manager.

  2. Copy the full sample code that includes your unique token for your Runtime Manager account + environment. You will then run this code in a terminal in a further step.

    • If you have not added any servers to the environment yet, you will see the sample displayed right away in this tab.

    empty_servers-add_server_1st_srv-CORR.COMM-REAL-2

    • If the environment already contains servers, click Add Server. When you do this, you will see this same code that includes the token in it.

Run Command

  1. Run the displayed command (listed below) on each Mule server or API Gateway server, it contains information that is unique to your organization. Running this command enables the Mule server to communicate with Runtime Manager. The key included in the -H parameter (partly redacted in the image above) is a token generated specifically for your Mule server or API Gateway to authenticate against Runtime Manager.

To run this command:

  1. In Runtime Manager, click Copy to copy the displayed command to your clipboard.

  2. Open a terminal in the server where your Mule server or API Gateway resides.

  3. Go to the bin directory inside the Mule server or API Gateway root directory.

  4. Paste the command into your terminal.

  5. Substitute the last parameter, server-name, with the name you want for your server. In the example below, the name is srv1.

    
                 
              
    1
    
    ./amc_setup -H 17958da2-[redacted]---1942 srv1
    If running Windows, substitute amc_setup.bat for ./amc_setup (without ./).
  6. Press Enter to run the command.

    1. Check that the command output on your terminal states that the credentials were extracted correctly

    2. In the Servers screen of Runtime Manager, you should see that your server (named srv1 in this example) is listed as Created:

      srv1_created

If the server was running when registered, it needs to be restarted for it to start communicating with Runtime Manager.

About the amc_setup Command

The amc_setup command described above resides in $MULE_HOME/bin. If you do not run it from this directory, you have to either set the MULE_HOME environment variable before running the command, or use the --mule-home parameter:


           
        
1
/opt/mule-3.7.0/bin/amc_setup --mule-home /opt/mule-3.7.0 -H ...

The amc_setup script actually invokes the Runtime Manager Agent installation script, which has several useful parameters for configuring security and proxies. For details on the options, see Installation Options in installing and configuring Runtime Manager Agent.

About the Server Registration Token

The registration token provided by Runtime Manager (included in the command with the -H parameter) is specific to a single environment. For example, if you register a server in a QA environment by clicking Add Server, you get one token. However if you try to register into your Production environment by also clicking Add Server,  you get a different token. Tokens are specific to the environment in which you register a server. You can only copy and paste a token to register multiple Mules if you want all servers to be in the same environment.

Start Mule or API Gateway runtime

  1. Start your Mule runtime or API Gateway runtime. To do so, open a terminal and change directory to the MuleSoft bin directory:

    • For Mule runtime: Run ./mule

    • For API Gateway runtime: Run ./gateway or ./gateway start. The first command retains the gateway process in the terminal foreground; when you want to stop the gateway, press CTRL-C. If you are running API Gateway runtime in the foreground, your terminal fills with startup messages.

  2. In the Servers screen of Runtime Manager, your server’s status changes first to Connected, then to Running:

    srv1_running

See a full reference for server statuses in Status States.

At this point, you have successfully added server srv1.

Restart an Application on a Server

You can restart an application that is currently running on a server from the drop-down menu in the status menu:

AMC_RestartApp

Stop an Application on a Server

To stop an application that is currently running on a server:

  1. Click a server entry to display the detail view on the right side of the screen.

  2. Select Stop from the drop-down menu in the Status menu:

    StopAppOnServer

Delete a Server

To delete a server:

  1. Click a server entry to display the detail view on the right side of the screen. 

  2. Click the down arrow below the server name and select Delete.

    DeleteServer

Create a Server Group

server group

A server group is a set of servers that act as a single deployment target, in which instances of the applications are completely isolated from each other.

To create a server group in Runtime Manager:

  1. Download and install Mule runtime on two or more physical or virtual servers in your site.

  2. Sign in to the Anypoint Platform and click Runtime Manager:

  3. Click the Servers tab and use the token to register each server to the platform via its command line

    all servers

  4. After all servers are registered and visible in the Servers tab, click Create Group:

    CreateGroup

    This takes you to a settings page where you can select what servers to include in your new group and give it a name:

    AMC_CreateServerGroup

  5. Give the server group a name

    The group name must not start or end with a dash, must be at least 3 characters long, no more than 40 characters, must be unique, and contain only letters, numbers, or dashes.
  6. Click the checkbox for each server to include in the group, and click Create Group.

    All servers in a server group must be running the same Mule runtime version and the same Agent version. Also, a server group can be created from servers that all display the status 'Running' or 'Disconnected' but these can’t be mixed with servers that display the status 'Created'. You can on the other hand create a server group out of only servers that display the status 'Created'.

Add a Server to a Server Group

If you want to add a server to a group that is currently running an existing application, you must first stop and and delete the application before you can add the server to a group.
Remember that you must first register each of the servers to Runtime Manager, by downloading and installing the same version of the Mule runtime and then running the amc_setup script on each.
  1. From the Servers screen, click a server to view the additional menu, and click Add Servers:

    AddServersToGroup

  2. After you select servers to add to the group, click Add to Group:

    AddToGroup

Remove a Server from a Server Group

To remove a server from a server group:

  1. Expand the server group entry in the Servers tab and click the X icon at the far right of the entry:

    RemoveServerFromAGroup

  2. Anypoint Connection Manager displays a verification prompt. Click the check box and click Remove.

    RemoveVerifyPrompt

Delete a Server Group

To remove server group from Runtime Manager:

  1. From the Runtime Manager Servers tab, click a server group entry to display the detail view on the right side of the screen. 

  2. Click the down arrow below the server name and select Delete group.

    DeleteGroup

  3. A prompt appears to be sure you want to continue. Click the check box and click Delete Server Group

  • Deleting a Server Group doesn’t delete the actual servers, just their pairing as a group. These servers will then be once again displayed in the main server list, from where they can be used individually or be paired up into other Server Groups or Clusters.

  • Deleting a Server Group doesn’t delete the applications within each server. If there were apps deployed to the servers in it, they will still be uploaded on them once the group is deleted.

Create a Cluster

cluster

A Cluster is a set of servers that act as a single deployment target, in which instances of the application are aware of one another and share common information and synchronize statuses.

An on-premise cluster enables up to 8 servers to participate in a high availability processing unit so that in case one server should fail, another server takes over processing applications. A cluster can run multiple applications.

Remember that you must first register each of the servers in the cluster, by downloading and installing the same version of the Mule runtime and then running the amc_setup script on each. A cluster can only be made up of servers that are not already in a server group or part of another cluster.
The minimum Mule version that supports this feature is Mule version 3.7.0 and newer. The minimum Runtime Manager Agent version that supports this feature is Agent version 1.1.1 and newer.

To create a cluster in Runtime Manager:

  1. Download and install Mule runtime on two or more physical or virtual servers in your site.

  2. Sign in to the Anypoint Platform and click Runtime Manager

  3. Click the Servers tab and obtain the necessary token register each server to the platform via its command line.

    all servers

  4. After all servers are registered and visible in the Servers tab, click Create Cluster. Servers can be added to a cluster in any status.

    CreateCluster

  5. Give the cluster a name.

    The cluster name must not start or end with a dash, must be at least 3 characters long, no more than 40 characters, must be unique, and contain only letters, numbers, or dashes.
  6. Choose Multicast or Unicast. For more information, see Multicast Versus Unicast.

  7. Click the checkboxes for the names of the servers to add to your cluster, and click Create Cluster.

    • None of the servers you select for creating a new cluster can contain any previously deployed applications.

    • Multicast servers can be in the Status States 'Running' or 'Disconnected', whereas unicast servers can only be in the state 'Running'. They can’t be merely in 'Created' state.

    • All servers in a cluster must be running the same Mule runtime version and Agent version.

    CreateACluster

  8. Click the cluster name to list details about the cluster. This view also lets you add additional servers, remove servers, and delete the cluster:

    ClusterDetail

If you wish to have Object Store persistence amongst all servers of your cluster, you must create your cluster manually and use the quorum feature.

Add a Server to a Cluster

Remember that you must first register each of the servers in the cluster, by downloading and installing the same version of the Mule runtime and then running the amc_setup script on each. A cluster can only be made up of servers that are not already in a server group or part of another cluster.

To add an additional server to an existing cluster:

  1. In the Runtime Manager Servers tab, click the name of a cluster to open the details view. 

    server details

  2. Click Add Servers.

    AddServers

  3. Click the checkbox for each server to add to the cluster, and click Add Servers

    AddAnotherServer

All servers in a cluster must run the same version of Mule runtime and of the Runtime Manager Agent.

Delete a Server From a Cluster

To delete a server from a cluster:

  1. From the Runtime Manager’s Servers tab, click the name of a cluster.

  2. Click the X to the right of the server’s name:

    DeleteServerX

    A prompt appears to be sure you really want to remove the server from the cluster.

  3. Click the checkbox to verify your choice, and click Remove to complete the action:

    DeleteMessage

Delete a Cluster

To delete a cluster from Runtime Manager:

  1. From the Runtime Manager Servers tab, click the name of a cluster to show details.

    server details

  2. Click the down arrow next to the cluster status and click Delete Cluster:

    DeleteServerDownArrow

  3. A prompt appears to be sure you want to continue. Click the check box and click Delete Cluster:

    DeleteACluster

Clusters vs Server Groups

Both clusters and server groups run applications in multiple distributed nodes, the difference lies in that in a server group, instances of the applications are completely isolated from each other, whilst on a cluster its nodes are aware one another and share common information and synchronize statuses.

For a detailed explanation of the benefits of clusters, see Mule High Availability Clusters.

Multicast Versus Unicast

A cluster can be created in the Runtime Manager from servers that are already registered with the Runtime Manager console. While configuring a cluster, you can specify either unicast or multicast options for identifying a node within the cluster:

  • Unicast. A unicast cluster requires that you configure the IP addresses of which nodes to associate together. No special network configuration is necessary other than to indicate which are the server IP addresses that make up the cluster. Each server needs to be in Running status when it is added to a unicast cluster. If a server has multiple interfaces, use the internal IP, the one that allows a node to have a direct communication with other nodes. Clustering across different subnets is not supported.

    Mule relies on the IP address as the unique handle for identifying a server, which means it is impossible to have IP addresses dynamically assigned using DHCP for servers on a unicast cluster. If a server is restarted and uses DHCP to get a new IP address, it needs to be rejoined with the cluster using its new IP address.
  • Multicast. A multicast cluster groups servers that automatically detect each other. Servers that are part of a multicast cluster should be on the same network segment.

    One advantage of using multicast is that a server does not need to be running to be configured as a node in a cluster. Another is that you can add nodes to the cluster dynamically without restarting the cluster.

    Check with your network administrator if multicast is allowed within your network, as many networks block multicast functionalities.

Alerts

You can set up email alerts that are sent whenever certain events occur to your servers, such as a server being disconnected, or a server being removed from a cluster. These alerts may be linked to a specific server or to all of them. See Alerts for instructions on how to do this.

See Also