Deploying Artifacts¶ Now that you have developed an integration using the WSO2 Integrator: MI Visual Studio Code plugin, you have several options to deploy that integration to the WSO2 Integrator: MI server runtime. Build and run¶ Download and install the WSO2 Integrator: MI server on your local machine. Follow these steps to add the server to the VS Code extension if it has not been added yet. Open the command palette by pressing Ctrl+Shift+P and select the command Add MI Server. In the file selector that opens, select the WSO2 Integrator: MI server directory. Open the Project Overview page by clicking on the Project Overview icon. Click on the Build and Run button on top right corner of the Project Overview page. Then the artifacts will get deployed in the WSO2 Integrator: MI server and you can see the deployment logs in the Console. Build and Export the Composite Application¶ If we are deploying the Composite Application in some remote server which we cannot configure as in the Build and Run option, we can export the Composite Application and deploy it in the server manually. Click on the Build button on the top right corner of the Project Overview page to build the Composite Application. Once the build is finished, you can switch to VS Code default file explorer view and get the Composite Application file from the target directory. To build and export in a single step, click on the Export button on the top right corner of the Project Overview page to export the Composite Application. Select a directory to save the exported Composite Application file. Once the Composite Application is exported, we can copy it to the <MI_HOME>/repository/deployment/server/carbonapps directory manually and start the server. Enable priority-based composite application deployment¶ When multiple composite applications are deployed, they are processed according to their dependency tree by default. If there isn't enough information to construct a dependency tree, composite applications are deployed in alphabetical order instead. However, composite applications deployed in alphabetical order can still depend on each other, in which case deployment may fail due to incorrect ordering. To handle such scenarios, you can enable priority-based deployment by adding the following configuration to <MI_HOME>/conf/deployment.toml: [server] enable_priority_deployment = true With this configuration, composite applications are divided into two categories: High-priority: composite applications containing a connector, datasource, registry resource, or class mediator. Low-priority: all other composite applications. High-priority composite applications are deployed first (in alphabetical order), followed by low-priority ones (also in alphabetical order). If high-priority composite applications depend on each other, deployment may still fail due to incorrect ordering. To mitigate this, configure a retry count using priority_deployment_retry_count. This value represents the number of additional deployment attempts made for high-priority composite applications after the initial attempt. The default is 1. [server] enable_priority_deployment = true priority_deployment_retry_count = 2 By default, the artifact types listed above (connector, datasource, registry resource, and class mediator) are treated as high-priority. You can override this default list by configuring priority_deployment_high_priority_types with the specific artifact types you want to treat as high-priority. [server] enable_priority_deployment = true priority_deployment_high_priority_types = ["lib/synapse/mediator", "synapse/lib", "registry/resource", "datasource/datasource"] Build Docker image¶ We can use the WSO2 Integrator: MI VS Code extension to build a Docker image of our integration solution. Make sure the Docker is installed on your local machine and the Docker daemon is running. Click on the Build button on the top right corner of the Project Overview page and select the Docker option to build the Docker image. Run the docker images command to verify the Docker image is built correctly. Run the Docker image using the following command. docker run -p 8290:8290 -p 8253:8253 -p 9164:9164 <DOCKER_IMAGE_NAME> Replace <DOCKER_IMAGE_NAME> with the name of the Docker image you have built. Note You might get the following error depending on the name you have given to the project. image part 'HelloWorld' doesn't match allowed pattern '[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?' To resolve this, go to the pom.xml file, locate the io.fabric8 maven plugin and change the <name> configuration to match the regex <name>helloworld:${project.version}</name> Then build the Docker image again.