Contact Us 1-800-596-4880

Lab 1: CloudHub 2.0 Deployments

Overview

In this lab, you will use Anypoint Runtime Manager to view existing applications on CloudHub and make changes to the configuration of a deployed application.

The lab will consist of two steps:

CloudHub 2.0 Architecture

CloudHub 2.0 has been built from the ground up to provide enterprises with a multi-tenant, secure, elastic, and highly available integration platform as a service (iPaaS). CloudHub is managed via the Runtime Manager console, in Anypoint Platform. On top of Runtime Manager, you can also deploy to it directly from Anypoint Studio like we have done in other modules or using your favorite CI/CD tools leveraging the CloudHub API, or via the CloudHub Command Line Interface.

To understand CloudHub’s approach to security and availability, it’s important to understand the architecture behind CloudHub. It includes two major components: the platform services, and the worker cloud. These two components and the Runtime Manager console through which you access them work together to run your integration applications.

module7 lab1 ch arch

Integration Applications

These are applications that you create and deploy to CloudHub to perform integration logic and provide APIs for your business.

Runtime Manager Console

The Runtime Manager console is the face of CloudHub, allowing you to deploy and monitor integrations, and configure your account, among other things.

Platform Services

This set of shared CloudHub platform services and APIs includes CloudHub Insight, alerting, logging, account management, virtual private cloud/secure data gateway, load balancing, and others.

Global Worker Clouds

This is an elastic cloud of Mule instances that run integration applications.

You can view the live status and detailed service history for the Runtime Manager console, platform services, and the CloudHub worker cloud at trust.mulesoft.com.

A Mule application can host one or more APIs (or none.) When you deploy your application to CloudHub, it is provisioned to one or more CloudHub Workers. A Worker is an instance of an application, deployed to a Mule Runtime and hosted in the CloudHub Worker Cloud.

module7 lab1 workers apis

Step 1: Deploy the Omni Channel API

If you have already deployed the "Omni Channel API" application to CloudHub directly from Anypoint Studio in a previous Module, you can proceed to Step 2: View your Application. If you have not, follow the steps below to deploy the “Omni Channel API”.

  1. Start Anypoint Studio from the desktop icon.

    module7 lab1 studio logo
  2. From Studio open exchange

    module7 open exchange
  3. Filter by Examples

  4. Select the sub organization

  5. Click on the omni-channel-api

  6. Filter by Examples

  7. Select the sub organization

  8. Click on the omni-channel-api

    module7 example omni
  9. In the portal press Open

    module7 open portal

    Once opened, the project will be imported into Studio.

    module7 project imported
  10. Go to pom file and add your initials on the 'artifactId' on line 6

    module7 update pom
  11. Let’s deploy it to Cloudhub. Right click on the project name → Anypoint Platform → Deploy to Cloud.

    module7 lab1 deploy cloudhub

    If this is your first time deploying in this way, a popup menu asks you to provide your login credentials for Anypoint Platform. Studio stores your credentials and uses them automatically the next time you deploy to CloudHub.

    You can manage these credentials through the Studio Preferences menu, in Anypoint Studio > Authentication
  12. Once logged in to the Anypoint Platform one needs to select an Environment and Business Group. Choose the one Business Group you have access to and select environment as Sandbox.

    module7 lab1 select environment
  13. Now we need to specify application (worker) configuration for our API.

    1. On the application name put [MyName-omni-channel-api]. You should see a green check if the name is available. If not, please use another name.

      1. Save this name as you will use it later on. An example would be donald-omni-channel-api

    2. On Deployment Target leave "Cloudhub 2.0" with the corresponding region (regions might change depending on your location)

    3. On Runtime version select the latest version available

    4. On Worker Size select 0.1 vCore

      Leave the rest of the default values.
      module7 lab1 deploy cloudhub2.0
  14. Once the configuration is done, click on the Deploy Application button.

  15. Once the deployment is complete (it may take a few minutes), you can browse the API Console at http://<username-omni-channel-api>.<region>.cloudhub.io/console/. NOTE: The Region may change depending on which Platform you are working US or EU.

    The Region may change depending on which Platform you are working US or EU.
  16. In the previous example it would be something like https://omni-channel-api-egl-m18ecd.5sc6y6-4.usa-e2.cloudhub.io/console/.

    module7 lab1 view deployed

Now you have a fully functional Omni Channel API of your own.

Step 2: View your Application

You can view your application’s status with Anypoint Runtime Manager .

  1. Open a browser window and navigate to https://anypoint.mulesoft.com

  2. Login if you are not already.

  3. Click on the entry for Runtime Manager

    module7 lab1 ap runtime mgr

    In case you are asked to choose the environment, select Sandbox

  4. The landing page for Runtime Manager will display your running Applications. Click on the name of your application (<yourname>-omni-channel-api-complete) and click on the application’s Dashboard

    module7 lab1 ap arm app
  5. Here you are presented with your application’s Dashboard

    module7 lab1 ap dashboard

    The Dashboard helps you answer questions about your applications, such as:

    • When did peaks in usage occur?

    • What impact do high traffic peaks have on response time?

    • How well is the processing power behind my app coping with these peaks?

    • What impact do high traffic peaks have on message fail rate?

You can also set up Alerts to notify you automatically whenever any of these metrics hits a critical value for a sustained period of time.

Step 3: Manage your Application

Now that you have viewed the status of your running application, it is time to begin managing it.

  1. Navigate back to the Applications tab of Runtime Manager

    module7 lab1 ap app nav
  2. Click on the <yourname>-omni-channel-api-complete row (not on the name) and on the right you will see options to manage your application.

    module7 lab1 ap app mgmt

    From here you can access a variety of management options directly. You can quickly restart, stop, or delete the application. You can also download the deployable jar file of the running application or upload/deploy a new version of the application.

  3. Click Manage Application to view additional management options

    module7 lab1 ap app mg app

    You are now presented with the Settings tab for your Application.

    module7 lab1 ap app settings

    The Replica size option let you scale your application vertically or horizontally with zero downtime.

    Adding more than one replica to a CloudHub application will let you automatically take advantage of CloudHub Fabric to provide horizontal scalability and reliability. Trial accounts, however, are limited to one worker per application.

  4. Click on the dropdown for Replica size and scale your worker vertically by increasing the compute size from "0.05 vCores, 1GB memory" to ".2 vCores 2GB memory"

    module7 lab1 ap app scale
  5. Click Apply Changes

    module7 lab1 ap app apply
    CloudHub supports updating your applications at runtime so end users of your HTTP APIs experience zero downtime. While your application update is deploying, CloudHub keeps the old version of your application running. Your domain points to the old version of your application until the newly uploaded version is fully started. This allows your API to keep servicing requests from your old application while the new version of your application is starting.

    While your new worker is being instantiated, your old worker is still serving requests until the new .2 vCore worker is ready. During this time your application’s icon will change from a green dot to an animated blue circle, indicating that it is Deploying.

    module7 lab1 ap settings deploying

    From the Settings tab you can also move your application to a different Region (limited in Trial accounts), change Logging levels, manage Properties, enable Insights, allocate static IPs, and upgrade your Runtime version.

Summary

In this lab, you learned about the CloudHub architecture and saw how easy it is to view and manage your applications. With Anypoint Runtime Manager, MuleSoft customers can monitor, troubleshoot, analyze and manage applications and APIs securely deployed in a public or private cloud or on-premises, in a sandbox, staging or production environment all in one place.

In this lab, we completed these steps:

If you’d like to learn more

Congratulations! You have completed Lab 1.

Please proceed to Lab 2