Skip to content

Business Configuration Description

The MCPCAN platform uses a series of YAML files for detailed business configuration. These configurations are injected into the corresponding services via configmap.yaml during deployment. This document aims to elaborate on the configuration parameters of each core service to help you better understand and customize the platform's behavior.


Overview

The platform configuration is divided into multiple files, each corresponding to a core microservice. This modular design makes configuration management clearer and more independent.

  • gateway.yaml: Configuration for the API gateway service.
  • authz.yaml: Configuration for the authorization and authentication service.
  • market.yaml: Configuration for the application market service.
  • init.yaml: Configuration for the platform initialization service.

In a Helm deployment, the contents of these files are ultimately integrated into configmap.yaml and provided to the container instances of each service as file mounts.


1. Gateway Service (gateway.yaml)

The gateway service (gateway) is the traffic entry point for the entire platform, responsible for receiving, authenticating, and routing all API requests. It securely forwards external requests to the various internal microservices.

Parameter PathDescriptionExample Value
server.httpPortThe HTTP port the gateway listens on.8085
database.mysql.hostThe hostname or IP address of the MySQL database.mysql-svc
database.mysql.portThe port of the MySQL database.3306
database.mysql.databaseThe name of the database to use.mcp_dev
database.mysql.usernameThe database username.mcp_user
database.mysql.passwordThe database password.dev-password
database.redis.hostThe hostname or IP address of the Redis server.redis-svc
database.redis.portThe port of the Redis server.6379
database.redis.passwordThe authentication password for Redis.dev-redis-password
database.redis.dbThe Redis database number to use.0
log.levelThe logging level, can be debug, info, warn, error.debug
log.formatThe log format, can be text or json.text

2. Authorization Service (authz.yaml)

The authorization service (authz) is the core of the platform's security system, responsible for user identity authentication, permission management (RBAC), and token generation and validation.

Parameter PathDescriptionExample Value
server.httpPortThe HTTP port the service listens on.8082
secretThe secret key for inter-service communication and JWT signing. This value must be consistent with the secret in market.yaml.dev-app-secret
services.mcpMarket.hostThe internal hostname of the market service.mcp-market-svc
services.mcpMarket.portThe internal port of the market service.8081
database.mysql.*MySQL database connection configuration, similar to the gateway service.(Same as above)
database.redis.*Redis connection configuration, similar to the gateway service.(Same as above)
log.levelThe logging level.debug
log.formatThe log format.text
storage.rootPathThe root directory for persistent data storage../data
storage.codePathThe storage path for code packages, usually a subdirectory of rootPath../data/code-package
storage.staticPathThe storage path for static resources, usually a subdirectory of rootPath../data/static

3. Market Service (market.yaml)

The market service (market) is responsible for managing all applications on the platform, including application publishing, version control, review, and user subscription relationships.

Parameter PathDescriptionExample Value
server.httpPortThe HTTP port the service listens on.8081
secretThe secret key for inter-service communication and JWT signing. This value must be consistent with the secret in authz.yaml.dev-app-secret
domainThe main domain for external access to the platform, used for generating access links, etc.http://demo.mcp-box.com
services.mcpAuthz.hostThe internal hostname of the authorization service.127.0.0.1
services.mcpAuthz.portThe internal port of the authorization service.8082
database.mysql.*MySQL database connection configuration.(Same as above)
database.redis.*Redis connection configuration.(Same as above)
log.levelThe logging level.debug
log.formatThe log format.text
code.upload.maxFileSizeThe maximum allowed size for uploaded application code packages (in MB).100
code.upload.allowedExtensionsA list of allowed file extensions for code packages.[".zip", ".tar.gz"]
storage.rootPathThe root directory for persistent storage../data
storage.codePathThe storage path for code packages../data/code-package
storage.staticPathThe storage path for static resources../data/static

4. Initialization Service (init.yaml)

The initialization service (init) is a one-time job that runs when the platform is first deployed. It is responsible for creating the initial administrator account, roles, permissions, and performing database initialization (such as data migration).

Parameter PathDescriptionExample Value
init.admin_username[IMPORTANT] The login username for the initial administrator.admin
init.admin_password[IMPORTANT] The login password for the initial administrator. Please be sure to change it to a strong password.admin123
init.admin_nicknameThe display nickname for the initial administrator.admin
init.admin_role_nameThe name of the role to which the initial administrator belongs.admin
init.admin_role_descriptionThe description of the initial administrator's role.admin role
init.admin_role_levelThe level of the role, used for permission sorting.1
init.admin_data_scopeThe data scope, all means having all data permissions.all
kubernetes.namespaceThe Kubernetes namespace where the platform is deployed.mcp-box
kubernetes.defaultConfigFilePathThe path to the kubeconfig file inside the Pod for accessing the K8s API./app/config/kubeconfig.yaml
database.mysql.*MySQL database connection configuration.(Same as above)
database.redis.*Redis connection configuration.(Same as above)
log.levelThe logging level.debug
log.formatThe log format.text
storage.rootPathThe root directory for persistent storage../data
storage.codePathThe storage path for code packages../data/code-package
storage.staticPathThe storage path for static resources../data/static

Released under the MIT License.