- Run
yarn install
to install dependencies. - Run
yarn nx serve deploy-instance
oryarn nx serve service
to start the local development server for either the "UI plugin for deploying the Operator instance" or the "UI plugin for Operator functionality". The server runs onlocalhost:5000
. - Navigate to the
alauda-fe
project directory and start the project that integrates the plugin. Once started, the product page will automatically load the plugin running on port 5000, allowing you to debug as needed. - Alternatively, you can open
http://localhost:5000
in your browser to debug the plugin page directly.
- The
apps/deploy-instance
andapps/service
projects correspond to the UI plugins for the Operator instance deployment form and the functionality UI, respectively. - The plugin is built using the Webpack Module Federation mechanism. The
module-federation.config.js
file is used to configure the plugin module exports. - The
console-plugin.json
file configures how the ACP host project loads the plugin. Please refer to the corresponding version of the ACP documentation to see the supported plugin types and configuration properties.
- Run
yarn nx build deploy-instance
oryarn nx build service
to compile the plugin code. The build output is located in./dist/apps
. - Build the Docker image, and during the build, copy all contents from the
./dist/apps
directory to the/frontend-plugins
directory in the image (you can use theDockerfile
provided in the repository).
-
Deployment Instance UI
cpaas.io/frontend-plugin-deploy-instance-image: <namespace/name:tag>
-
Function UI
- Single:
cpaas.io/frontend-plugin-service-image: <namespace/name:tag>
- Multi-module:
cpaas.io/frontend-plugin-service-image-<subpath>: <namespace/name:tag>
- Single:
Example:
metadata:
annotations:
cpaas.io/frontend-plugin-deploy-instance-image: frontend/plugin:v1.0.0
cpaas.io/frontend-plugin-service-image: frontend/plugin:v1.0.0