Deploy a model edition using VS Code

This page explains how to deploy a model edition in an existing data location using the Semarchy extension for VS Code.

Set up the deployment configuration

To deploy a model, you need to configure the extension to connect to an existing xDM instance. Follow the steps below to set up the Semarchy extension in VS Code:

  1. In the Extensions view, locate the Semarchy extension and click the Extension settings Settings icon.

  2. In the contextual menu, select Extension Settings.

  3. Select the Workspace tab.

  4. Set the following properties for the Semarchy extension at the workspace level:

    • semarchy.xdm.url: URL of the xDM instance.

    • semarchy.xdm.port: port of the xDM instance.

    • semarchy.xdm.apiKey: API key for authenticating to the instance, defined in the xDM instance.

    • semarchy.xdm.authInfo: user-password credentials for authentication to the instance, formatted as username:password.

      Choose either user-password authentication or API key authentication. Ensure that the user or API key has a role with the Application Management platform privilege.
    • semarchy.xdm.datasourceName: name of the datasource, as configured in the Configuration interface.

    • semarchy.xdm.datalocationName: name of the data location where the model will be deployed.

The properties configured in the extension settings are saved in a file named settings.json, which is automatically created in your workspace. You can manually adjust these properties in this file.

Deploy a model

To deploy a model, you can use any of the following options:

  • Semarchy extension toolbar

    1. From the Activity Bar, access the Extension Semarchy view.

    2. Click the Build and Deploy button.

or

  • Command Palette

    1. Open the Command Palette.

    2. Type and select Semarchy: Build and Deploy Data Management Model.

When using the integrated tools in VS Code, the Output panel shows the model validation results and any potential errors.

or

  • Semarchy CLI

    1. Open the Terminal view.

    2. Use the following command to build and deploy a specific model:

semarchy dm data-location deploy
        [--workspace <workspace_directory>]
        --instance-url <xdm_instance_url>
        --instance-port <xdm_instance_port>
        --data-location <data_location_name>
        --api-key <api_key>
        --username <username>
        --password <password>