Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 4.07 KB

File metadata and controls

90 lines (71 loc) · 4.07 KB

Deploying Mule Apps to CloudHub and CloudHub 2.0

reuse::partial$beta-banner.adoc

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

Before You Begin

Deploy an App to CloudHub or CloudHub 2.0

When you deploy an application to CloudHub or CloudHub 2.0, Anypoint Code Builder configures a default deploy.json or deploy_ch2.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 or deploy_ch2.json during the deployment process.

Note

For CloudHub 2.0 deployments, you must update your pom.xml file:

  • Modify groupId to match your Anypoint Platform business group (organization) ID.

    For more information, see Finding your Business Group ID.

  • Remove the -SNAPSHOT suffix from version.

  • Increment version when redeploying.

To deploy your app to CloudHub or CloudHub 2.0:

  1. Open any configuration XML file for the Mule app to deploy.

  2. Click the (Deploy to CloudHub) icon.

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

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

  4. Select a Business Group to use for deployment.

  5. When prompted via the VS Code command palette, select the deployment target: CloudHub 2.0 or CloudHub 1.0.

    If you select CloudHub 2.0, you are prompted to select the space to deploy your application, for example: “myprivspace”.

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

    Review deploy.json file

    For applications deployed to CloudHub 2.0, ensure that the deploy_ch2.json file contains the value for the deployment model. You can set this to the default value of rolling.

    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.

  6. After reviewing the deployment configuration, click Deploy to deploy the application to CloudHub or CloudHub 2.0. The VS Code status bar shows the progress of the deployment.

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

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

    Output panel with Mule Maven Output selected
  8. 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.

  9. 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.

Change a Value in deploy.json

anypoint-code-builder::partial$acb-deployment.adoc

Deployment Properties

anypoint-code-builder::partial$acb-deployment.adoc

See Also

  • cloudhub::deploying-to-cloudhub.adoc

  • cloudhub-2::ch2-deploy.adoc

  • runtime-manager::index.adoc