Contact Us 1-800-596-4880

Deploying Mule Apps to CloudHub

logo cloud IDE Cloud IDE

logo desktop IDE Desktop IDE

Open Beta Release: The cloud IDE is in open beta. Any use of Anypoint Code Builder in its beta state is subject to the applicable beta services terms and conditions, available from the IDE.

You can use Anypoint Code Builder to deploy your Mule application to CloudHub.

Anypoint Code Builder can deploy applications only to the 1.0 version of CloudHub. To deploy to CloudHub 2.0, create a deployable JAR file, and follow a deployment procedure identified in Export to a Deployable JAR File.

Before You Begin

Deploy an App to CloudHub

When you deploy an application to CloudHub, Anypoint Code Builder configures a default deploy.json file in your src/main/resources directory. If you intend to configure properties at deployment time, for example, to create secure properties, Anypoint Code Builder prompts you to modify deploy.json during deployment the deployment process.

To deploy your app to CloudHub:

  1. In the activity bar of the IDE, click the (Anypoint Code Builder) icon.

  2. Open the configuration XML file for the Mule app to deploy.

  3. Click the (Deploy to CloudHub) icon.

    Alternatively, open the Command Palette and select MuleSoft: Deploy to CloudHub.

  4. If prompted, click Allow to allow sign in using Anypoint Platform and select the business group.

    If the project doesn’t already have a deploy.json file, Anypoint Code Builder prompts that a deployment configuration file has been created and opens it for you to review, for example:

    Review deploy.json file

    The applicationName property defines part of the URL that you use to access your application on CloudHub.

    This name must be unique across all applications deployed to CloudHub.

  5. After reviewing the deployment configuration, click Deploy to deploy the application to CloudHub.

  6. At the prompt, select the environment to deploy to.

    Anypoint Code Builder packages the application and deploys it to CloudHub. The Output panel opens with Mule Maven Output selected:

    Output panel with Mule Maven Output selected
  7. After deployment completes, click Open in Runtime Manager.

    Your app opens in Runtime Manager in Anypoint Platform.

    The domain name of the application varies, but it follows a similar structure such as: app-with-40-schedulers.us-w1.cloudhub.io.

  8. Open your preferred REST client and make a GET request to the domain name as displayed in Runtime Manager, for example, http://app-with-100-schedulers.us-w1.cloudhub.io/api/flights.