How to Enable HDP
-
Create MySQL database: MDHDP
-
Entering the container
docker exec -it $(docker ps | grep -E 'mingdaoyun-community|mingdaoyun-hap' | awk '{print $1}') bash -
Create Database
CREATE DATABASE IF NOT EXISTS MDHDP DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_general_ci;
-
- If MongoDB connection authentication is enabled, you need to manually create the
mdhdpdatabase. Please refer to how to create a new MongoDB database
-
Deploy the Flink service, referring to: How to Deploy the Flink Service
- The HDP functionality depends on the Flink service. Before enabling HDP, ensure that the Flink service has been successfully deployed.
- If Flink has been deployed using the data integration or aggregation table function before, you need to upgrade Flink to 1.19.710
- Standalone mode: refer to Flink Upgrade(cross version)
- Cluster mode: refer to Flink Upgrade(cross version)
-
Download the HDP image (Offline Package Download)
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-hdp:1.0.0 -
Modify the
docker-compose.yamlfile (default path:/data/mingdao/script/docker-compose.yaml)-
Add the
hdpservicehdp:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-hdp:1.0.0
environment:
<<: *app-environment -
Add the
ENV_HDP_ENABLEenvironment variable to theappserviceapp:
environment:
ENV_HDP_ENABLE: "true"Click to view the complete modification example
version: '3'
services:
app:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-hap:7.1.0
environment: &app-environment
ENV_ADDRESS_MAIN: "https://hap.domain.com"
ENV_APP_VERSION: "7.1.0"
ENV_API_TOKEN: "******"
ENV_FLINK_URL: "http://flink:8081"
ENV_HDP_ENABLE: "true" # New: Enable the HDP function
ports:
- 8880:8880
volumes:
- ./volume/data/:/data/
- ../data:/data/mingdao/data
sc:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-sc:3.2.0
environment:
<<: *app-environment
volumes:
- ./volume/data/:/data/
command:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-command:node1018-python36
doc:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-doc:2.0.0
flink:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-flink:1.19.710
entrypoint: ["/bin/bash"]
command: ["/run.sh"]
environment:
ENV_FLINK_S3_ENDPOINT: "sc:9010"
volumes:
- ./volume/data/:/data/
# --- Newly added service ---
hdp:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-hdp:1.0.0
environment:
<<: *app-environment
-
-
Restart the service by executing the following command in the installation manager's extraction path:
bash service.sh restartall