Configure the C3 Agentic AI Platform to Bundle in an Air-Gapped Environment
C3 AI supports UI to be bundled from the C3 Agentic AI Platform in an air-gapped environment. The following steps describe how to bundle in an air-gapped environment.
Identify NPM packages for UI development
Go to the application URL to access the static console:
https://<cluster>/<env>/<app>/console/index.htmlIn the static console of the application, run the following command:
JavaScriptImplLanguage.Runtime.forName('js-webpack')The output object includes a field called
librariesthat lists Open Source and C3 AI-specific libraries that need to be populated in the private NPM registry.Next, run the following command:
JavaScriptNpmLibraryManager.mergedRuntime('js-webpack_c3')The output object includes a field called
librariesthat lists Open Source and C3 AI-specific libraries that need to be populated in the private NPM registry.Populate the private NPM registry with the libraries identified in Step 2 and 3.
For Open Source libraries, work with your IT department to make sure the libraries are added to the NPM registry.
For C3 AI-specific libraries, these are the libraries that begin with
@c3/<name of library>. They are automatically downloaded for you and seeded into your private registry when you start UI bundling.
Configure your application package
Get the URL, username, and password to authenticate into your private NPM registry.
In the static console of the application, run the following commands to authenticate the UI and pull the libraries from the specified NPM registry:
JavaScriptNpmLibraryManager.Config.setConfigValue('username', '<username>') NpmLibraryManager.Config.setConfigValue('registry', '<registry>') NpmLibraryManager.Config.setSecretValue('password', '<password>')NOTE: As an Environment Administrator, you can set this configuration for all applications in an environment by running the following commands in the static console of the environment (
env/c3):JavaScriptNpmLibraryManager.Config.setConfigValue('username', '<username>', ConfigOverride.ENV) NpmLibraryManager.Config.setConfigValue('registry', '<registry>', ConfigOverride.ENV)As a Cluster Administrator, this configuration can also be set cluster wide by changing
ConfigOverride.ENVtoConfigOverride.CLUSTER. For this to take effect, in the static console of each application, you may need to clear the cache for each application by running:NpmLibraryManager.Config.clearCache()and refreshing the browser.Run the following command to generate server-side UI:
JavaScriptUiBundler.generateBundles()