Deploying UI Components

To make your UI Component available, you'll need to deploy and publish it. To be able to deploy a UI Component, we'll first need to add some configuration.

Configuration

To deploy a UI Component, you'll need a place to upload to, a page component template. Page component templates can be requested by sending an email to [email protected] providing these details:

  1. Request for a UI Component
  2. The company name
  3. The Company ID, found in the Account dropdown on the top right
  4. The name of the new UI Component, visible to end users
  5. If the UI Component will be used on a main page (Main page: yes/no)
  6. If the UI Component will be used as a landing page (Landing page: yes/no)

One you have received a page component template ID, you'll need to update you cdk.config.json by adding a deployment configuration, your cdk.config.json should look something like the following

{
  "$schema": "./node_modules/@ixon-cdk/core/config/schema.json",
  "prefix": "pct",
  "components": {
    "hello-world": {
      "runner": {
        "build": {
          "builder": "<BUILDER>",
          "input": "<COMPONENT>"
        },
        "deploy": {
          "company": "<YOUR COMPANY ID>",
          "template": "<PAGE COMPONENT TEMPLATE ID>"
        }
      }
    }
  }
}

Deploy and publish

UI Component deployment is a two stage process, deploying and publishing. Deploying uploads your code to the IXON Cloud, while publishing enables the UI Component for all users.

πŸ“˜

Note

  • The user account that is used for publishing needs to have a role with Manage apps enabled.

First, make sure you are logged in. This can be done via the login command as shown below, this will ask you to fill in your IXON Cloud credentials.

npx cdk login

Now that you are logged in, you can deploy your UI Component to the cloud, to do this, run the deployment command.

npx cdk deploy hello-world

You'll see a preview link in the output. You can do a last check with this link to see if your UI Component works as intended. To make your component available to everyone in the company, you'll need to publish it.

npx cdk publish hello-world

It will ask you to select the version you want to publish. Once done, all users in the company can use your (updated) component.

Deploying updates

After deploying and publishing a first version, you can keep uploading new versions. Your users will remain on the published version, until you publish a new version.

πŸ“˜

Note

  • The version number needs to be increased in the manifest file every time a new version is deployed.