HiMarket Deployment Guide_AI-HigressOfficial Website
AgentScope Java v1.0 重磅发布Know more

HiMarket Deployment Guide

Release Time 2025-12-12


1. Local Setup

Environment Dependencies: JDK 17, Node.js 18+, Maven 3.6+, MySQL 8.0+

Start Backend:

Terminal window
# Build project
mvn clean package -DskipTests
# Start backend service
java --add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
-Ddb.host=${DB_HOST} \
-Ddb.port=${DB_PORT} \
-Ddb.name=${DB_NAME} \
-Ddb.username=${DB_USERNAME} \
-Ddb.password=${DB_PASSWORD} \
-jar himarket-bootstrap/target/himarket-bootstrap-1.0-SNAPSHOT.jar
# Backend API address: http://localhost:8080

Start Frontend:

Terminal window
# Start management console
cd himarket-web/himarket-admin
npm install
npm run dev
# Management console address: http://localhost:5174
# Start developer portal
cd himarket-web/himarket-frontend
npm install
npm run dev
# Developer portal address: http://localhost:5173

2. Docker Compose Deployment

Includes seven service components:

  • mysql: Database service, providing data storage for backend services;
  • himarket-server: Backend service, running on port 8081;
  • himarket-admin: Management console interface, running on port 5174, for administrators to configure Portal;
  • himarket-frontend: Frontend user interface, running on port 5173, for users to browse and use API Products;
  • Higress: Higress all-in-one gateway service, running on ports 8443, 8082, 8001, with console running on port 8001 for user access;
  • Redis: Higress cache service;
  • Nacos: Nacos service, running on ports 8080, 8848, 9848, with console running on port 8080 for user access.

Installation Commands

Environment Dependencies: docker, docker compose, curl, jq

One-Click Startup: Use the deploy.sh script to complete full-stack deployment and data initialization of HiMarket, Higress, and Nacos.

Terminal window
# Clone project
git clone https://github.com/higress-group/himarket.git
cd himarket/deploy/docker/scripts
# Deploy full-stack services and initialize
./deploy.sh install
# Or deploy only Himarket services (without Nacos/Higress)
./deploy.sh himarket-only
# Uninstall all services
./deploy.sh uninstall
# Service addresses
# Management console address: http://localhost:5174
# Developer portal address: http://localhost:5173
# Backend API address: http://localhost:8081

The script will execute data initialization hooks after deployment: performs login data initialization, example MCP data initialization, and API product data initialization. Note that the script includes deployment and data initialization parts. Data initialization execution does not block deployment. If data initialization hooks fail, they can be retried in /scripts/hooks/post_ready.d. For example:

Terminal window
cd docker/scripts/hooks/post_ready.d
# Retry failed script
./10-init-nacos-admin.sh

Installation Configuration

All configurations are centralized in the scripts/data/.env file:

Terminal window
cd docker/scripts/data
vi .env
Configuration NameConfiguration DescriptionDefault Value
MYSQL_ROOT_PASSWORDMySQL Root password123456
MYSQL_DATABASEMySQL database nameportal_db
MYSQL_USERMySQL usernameportal_user
MYSQL_PASSWORDMySQL passwordportal_pass
USE_BUILTIN_MYSQLWhether to use built-in MySQL (true/false)true
DB_HOSTDatabase address (required when using external database)mysql
DB_PORTDatabase port (required when using external database)3306
DB_NAMEDatabase name (required when using external database)portal_db
DB_USERNAMEDatabase username (required when using external database)portal_user
DB_PASSWORDDatabase password (required when using external database)portal_pass
USE_COMMERCIAL_NACOSWhether to use commercial Nacos (true/false), skips Nacos deployment if usedfalse
COMMERCIAL_NACOS_NAMECommercial Nacos instance nameEmpty
COMMERCIAL_NACOS_SERVER_URLCommercial Nacos service addressEmpty
COMMERCIAL_NACOS_USERNAMECommercial Nacos username (required for commercial Nacos MCP data import)Empty
COMMERCIAL_NACOS_PASSWORDCommercial Nacos password (required for commercial Nacos MCP data import)Empty
COMMERCIAL_NACOS_ACCESS_KEYCommercial Nacos AccessKeyEmpty
COMMERCIAL_NACOS_SECRET_KEYCommercial Nacos SecretKeyEmpty
USE_AI_GATEWAYWhether to use AI Gateway (true/false), skips Higress deployment and related initialization scripts if usedfalse
AI_GATEWAY_IDAI Gateway instance IDEmpty
AI_GATEWAY_NAMEAI Gateway instance nameEmpty
AI_GATEWAY_REGIONAI Gateway regionEmpty
AI_GATEWAY_ACCESS_KEYAI Gateway AccessKeyEmpty
AI_GATEWAY_SECRET_KEYAI Gateway SecretKeyEmpty
NACOS_ADMIN_PASSWORDNacos administrator passwordnacos
HIGRESS_USERNAMEHigress login usernameadmin
HIGRESS_PASSWORDHigress login passwordadmin
ADMIN_USERNAMEBackend administrator usernameadmin
ADMIN_PASSWORDBackend administrator passwordadmin
FRONT_USERNAMEFrontend default usernamedemo
FRONT_PASSWORDFrontend default passworddemo123
NACOS_IMAGENacos image addressnacos-registry.cn-hangzhou.cr.aliyuncs.com/nacos/nacos-server:v3 .1.1
NACOS_AUTH_IDENTITY_KEYNacos authentication identity keyserverIdentity
NACOS_AUTH_IDENTITY_VALUENacos authentication identity valuesecurity
NACOS_AUTH_TOKENNacos authentication tokenVGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
HIGRESS_IMAGEHigress image addresshigress-registry.cn-hangzhou.cr.aliyuncs.com/higress/all-in-one:latest
HIMARKET_SERVER_IMAGEHimarket backend service imageopensource-registry.cn-hangzhou.cr.aliyuncs.com/higress-group/himarket-server:latest
HIMARKET_ADMIN_IMAGEHimarket management console imageopensource-registry.cn-hangzhou.cr.aliyuncs.com/higress-group/himarket-admin:latest
HIMARKET_FRONTEND_IMAGEHimarket frontend service imageopensource-registry.cn-hangzhou.cr.aliyuncs.com/higress-group/himarket-frontend:latest
REDIS_IMAGERedis image addresshigress-registry.cn-hangzhou.cr.aliyuncs.com/higress/redis-stack-server:7.4.0-v3
MYSQL_IMAGEMySQL image addressopensource-registry.cn-hangzhou.cr.aliyuncs.com/higress-group/mysql:latest

3. Cloud-Native Deployment with Helm

Helm is a package management system for automating Kubernetes software management and release. Through the Helm one-click deployment script, you can quickly deploy and install HiMarket+Higress+Nacos on a Kubernetes cluster, including ten service components:

  • HiMarket:
    • himarket-server: HiMarket AI open platform backend service;
    • himarket-admin: HiMarket AI open platform management console, administrators configure Portal through this interface;
    • himarket-frontend: HiMarket AI open platform frontend service, users browse and use APIs through this interface;
    • mysql: Optional built-in database.
  • Higress:
    • higress-console: Console, users browse and use Higress service through this interface;
    • higress-controller: Control plane component, responsible for managing configuration distribution;
    • higress-gateway: Data plane component, responsible for carrying data traffic;
    • redis-stack-server: Cache component.
  • Nacos:
    • nacos: Nacos application;
    • nacos-mysql: Nacos database.

Service Type Description:

Default is LoadBalancer type service, suitable for cloud environments (Alibaba Cloud ACK, AWS EKS, etc.). If your environment does not support LoadBalancer (such as local minikube, self-built clusters), you can use NodePort or port forwarding to access. After configuring Himarket in the backend, resolve the domain name to the himarket-frontend service access address, and users can access the frontend site through the domain name.

Installation Commands

Environment Dependencies: kubectl, python3/python, curl, jq

One-Click Startup: Use the deploy.sh script to deploy HiMarket to a Kubernetes cluster.

Terminal window
# Clone project
git clone https://github.com/higress-group/himarket.git
cd himarket/deploy/helm/scripts
# Deploy full-stack services and initialize
./deploy.sh install
# Or deploy only Himarket services (without Nacos/Higress)
./deploy.sh himarket-only
# Uninstall
./deploy.sh uninstall

The script will execute data initialization hooks after deployment: performs login data initialization, example MCP data initialization, and API product data initialization. Note that the script includes deployment and data initialization parts. Data initialization execution does not block deployment. If data initialization hooks fail, they can be retried in /scripts/hooks/post_ready.d. For example:

Terminal window
cd helm/scripts/hooks/post_ready.d
# Retry failed script
./10-init-nacos-admin.sh

Installation Configuration

Related configurations are centralized in the scripts/data/.env file:

Terminal window
cd helm/scripts/data
vi .env
Configuration NameConfiguration DescriptionDefault Value
NAMESPACEKubernetes namespacehimarket-system
HIMARKET_ONLYDeploy only Himarket (skip Nacos/Higress)false
HIMARKET_IMAGE_TAGHimarket image taglatest
HIMARKET_MYSQL_IMAGE_TAGMySQL image taglatest
HIMARKET_MYSQL_ENABLEDWhether to use built-in MySQL (true/false)true
EXTERNAL_DB_HOSTExternal database address (used when HIMARKET_MYSQL_ENABLED=false)Your_External_DB_Host
EXTERNAL_DB_PORTExternal database port3306
EXTERNAL_DB_NAMEExternal database nameYour_DB_Name
EXTERNAL_DB_USERNAMEExternal database usernameYour_DB_Username
EXTERNAL_DB_PASSWORDExternal database passwordYour_DB_Password
USE_COMMERCIAL_NACOSWhether to use commercial Nacos (true/false), skips Nacos deployment if usedfalse
COMMERCIAL_NACOS_NAMECommercial Nacos instance nameEmpty
COMMERCIAL_NACOS_SERVER_URLCommercial Nacos service addressEmpty
COMMERCIAL_NACOS_USERNAMECommercial Nacos username (required for commercial Nacos MCP data import)Empty
COMMERCIAL_NACOS_PASSWORDCommercial Nacos password (required for commercial Nacos MCP data import)Empty
COMMERCIAL_NACOS_ACCESS_KEYCommercial Nacos AccessKeyEmpty
COMMERCIAL_NACOS_SECRET_KEYCommercial Nacos SecretKeyEmpty
USE_AI_GATEWAYWhether to use AI Gateway (true/false), skips Higress deployment and related initialization scripts if usedfalse
AI_GATEWAY_IDAI Gateway instance IDEmpty
AI_GATEWAY_NAMEAI Gateway instance nameEmpty
AI_GATEWAY_REGIONAI Gateway regionEmpty
AI_GATEWAY_ACCESS_KEYAI Gateway AccessKeyEmpty
AI_GATEWAY_SECRET_KEYAI Gateway SecretKeyEmpty
NACOS_ADMIN_PASSWORDNacos administrator passwordnacos
HIGRESS_USERNAMEHigress login usernameadmin
HIGRESS_PASSWORDHigress login passwordadmin
ADMIN_USERNAMEBackend administrator usernameadmin
ADMIN_PASSWORDBackend administrator passwordadmin
FRONT_USERNAMEFrontend default usernamedemo
FRONT_PASSWORDFrontend default passworddemo123
NACOS_VERSIONNacos image versionv3.1.1
NACOS_IMAGE_REGISTRYNacos image registrynacos-registry.cn-hangzhou.cr.aliyuncs.com
NACOS_IMAGE_REPOSITORYNacos image addressnacos/nacos-server
HIGRESS_REPO_NAMEHigress Helm repository namehigress.io
HIGRESS_REPO_URLHigress Helm repository URLhttps://higress.cn/helm-charts
HIGRESS_CHART_REFHigress Chart referencehigress.io/higress
NACOS_REPO_NAMENacos Helm repository nameygqygq2
NACOS_REPO_URLNacos Helm repository URLhttps://ygqygq2.github.io/charts/
NACOS_CHART_REFNacos Chart referenceygqygq2/nacos
HIMARKET_HUBHimarket image registry addressopensource-registry.cn-hangzhou.cr.aliyuncs.com/higress-group
HIMARKET_IMAGE_TAGHimarket image taglatest
HIMARKET_MYSQL_IMAGE_TAGMySQL image taglatest

Note: HiMarket’s Helm package is adapted for Alibaba Cloud ACK cluster use. The storage class persistence.storageClass: “alicloud-disk-essd” value in the /helm/values.yaml file needs to be adjusted according to the actual environment.

4. Cloud Platform Deployment (Alibaba Cloud)

Alibaba Cloud Computing Nest supports the out-of-the-box version of this project, with one-click deployment of the community edition: Deploy on AlibabaCloud ComputeNest