Nav

Deploying an APIkit project

You can deploy an APIkit project to a Mule runtime on-premises or in the cloud. You can deploy an APIkit project to the legacy API Gateway Runtime 2.x or 1.3.x if the number of connectors, other than HTTP/S, Jetty, and/or Web Service Consumer, does not exceed two.

Perform the following set up to step through the deployment procedures:

  1. Download an APIkit project.

  2. In Studio, select File > Import.

  3. Select Anypoint Studio > Anypoint Studio generated Deployable Archive (zip).

  4. Click Next.

    The Import Mule Project dialog appears.

  5. Browse to the downloaded file.

  6. Click Finish.

On-Premises Mule Runtime

Deploy an APIkit project to an on-premises runtime as described in the following procedure.

  1. If you have not downloaded the Mule standalone runtime, follow steps to install the latest version.

  2. Start Mule in the command line by running:

    Windows: <MULE_HOME>\bin\mule

    Mac and Unix: <MULE_HOME>/bin/mule

    <MULE_HOME> is the value of the MULE_HOME variable employed by Mule, usually the root directory of the installation, such as /opt/Mule/mule-standalone-3.8.0/

  3. Navigate to the directory where the .zip file is located and copy the .zip file.

    Ensure that your copy of the file does not have any spaces in the name. + 

  4. Drop the copy of the .zip file into the <MULE_HOME>/apps folder.

  5. Mule polls this folder for new applications every five seconds. Watch your command line window to track the progress of the deployment.

  6. When you see the message Started app 'TshirtService', then your API is deployed to the Mule runtime.

If you want to undeploy your application, navigate to the app directory and delete the file your_application.txt. This removes your application from the /app directory, which automatically undeploys it.

Cloud-Based Mule Runtime

This procedure assumes that you have an Anypoint Platform account.

Deploy an APIkit project to a Cloud runtime as described in the following procedure.

  1. Right-click on the project in Package Explorer, and then click Anypoint Platform > Deploy to Cloud from the cascading menu.

    The Anypoint Platform Sign In dialog appears.

  2. Enter your user name and password, and click Sign In.

    The Deploy to Runtime Manager dialog opens.

  3. Type an arbitrary domain name up to 42 characteris in length.

  4. Select an Environment and a Mule Version.

    Click Finish.

    Anypoint Studio packages, uploads, and deploys your application to CloudHub.

  5. Browse to the URL of yourdomain.cloudhub.io (also shown in the pop-up window above).

    The Runtime Manager indicates that the API is running.

To stop the application, click the Settings tab and click Cancel deployment.

Deploying an APIkit Project in Studio

If you created or modified the file in Anypoint Studio:

  1. Save the project, and go to File > Export…​

  2. Select Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata), and click Next.

  3. Select the name of your application from the Project drop-down, and click Browse…​ to select a destination for the file.

  4. Click Finish .

If your organization has On Premises Auto-Deploy enabled, and you have already configured Auto-deployment, then you can also deploy your applications on premises via the Anypoint Runtime Manager Console.