Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dinky-web/src/locales/zh-CN/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default {
'welcome.finish.title': '初始化完成!',
'welcome.finish': '立即开始你的Dinky之旅吧!',

'welcome.goLogin': '去登陆!',
'welcome.goLogin': '去登录!',
'welcome.base.config.title': '基本配置',
'welcome.base.config.dinky.url.title': 'Dinky地址:',
'welcome.base.config.dinky.url':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ vim prometheus.yml 检查是否有dinky配置文件 如果没有则添加

### 5.2 Grafana 配置

通过下图展示的url进去grafana配置图表,默认登陆账户密码:admin :admin
通过下图展示的url进去grafana配置图表,默认登录账户密码:admin :admin
![bbbb](https://github.com/user-attachments/assets/9f8478ad-3a64-4d3a-bf26-e97036e2d3c0)

### 5.3 创建Grafana 模板文件
Expand Down
4 changes: 2 additions & 2 deletions script/bin/init_check_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ echo -e "${YELLOW}Checking whether your network can connect to the Internet prop
if ! ping -c 1 ${EXTERNAL_CONNECTIVITY_CHECK_URL} &> /dev/null; then
echo -e "${RED}Your network cannot connect to the Internet using ping mode, please check whether your network environment is normal, and the program will try to use curl mode to detect the network connection again...${RESET}"
if ! curl -I -s --connect-timeout 5 ${EXTERNAL_CONNECTIVITY_CHECK_URL} -w '%{http_code}' | tail -n1 | grep "200" &> /dev/null; then
echo -e "${RED}Your network cannot be connected to the Internet using curl mode, please check whether your network environment is normal${RESET}"
echo -e "${RED}Your network cannot be connected to the Internet using curl mode, please check whether your network environment is normal.${RESET}"
echo -e "${YELLOW}Note that in some network environments, firewalls or security policies may block ICMP requests (i.e., pings). If this happens, you can use curl to detect the network connection.${RESET}"
exit 1
else
echo -e "${GREEN}Your network can use curl to connect to the Internet and proceed to the next step...${RESET}"
fi
else
echo -e "${GREEN}Your network can use ping to connect to the Internet and proceed to the next step...${RESET}"
fi
fi
14 changes: 7 additions & 7 deletions script/bin/init_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if [ -z "$DINKY_HOME_PARAMS" ]; then
fi

while true; do
read -e -p "Please select a database type (1.MySQL 2.PostgresSQL)" db_type
read -e -p "Please select a database type (1.MySQL 2.PostgresSQL): " db_type
while [ -z "$db_type" ]; do
read -e -p "Please select a database type (1.MySQL 2.PostgresSQL)" db_type
read -e -p "Please select a database type (1.MySQL 2.PostgresSQL): " db_type
done
read -e -p "Please enter the database address (hostname or IP, default localhost): " -i "localhost" db_host
read -p "Please enter the database port : " db_port
Expand All @@ -39,7 +39,7 @@ while true; do
1)
echo -e "${YELLOW}Configuring MySQL database related information...${RESET}"
config_file="${DINKY_HOME_PARAMS}/config/application-mysql.yml"
echo -e "${GREEN} The automatic initialization script uses the export environment variable method to support the loading of environment variables of the data source. The configuration file is${config_file} ${RESET}"
echo -e "${GREEN} The automatic initialization script uses the export environment variable method to support the loading of environment variables of the data source. The configuration file is: ${config_file} ${RESET}"

add_to_env "DB_ACTIVE" "mysql" "$DB_ENV_FILE"
add_to_env "MYSQL_ADDR" "${db_host}:${db_port}" "$DB_ENV_FILE"
Expand All @@ -51,15 +51,15 @@ while true; do
sleep 2
source "$DB_ENV_FILE"

echo -e "${GREEN}MySQLThe configuration of database related information is completed. Please confirm whether the following configuration is correct${RESET}"
echo -e "${GREEN}MySQLThe configuration of database related information is completed. Please confirm whether the following configuration is correct: ${RESET}"
grep -E '^(export DB_ACTIVE|export MYSQL_ADDR|export MYSQL_DATABASE|export MYSQL_USERNAME|export MYSQL_PASSWORD)' $DB_ENV_FILE | grep -v "^#" | grep -v "^$"
break
;;
2)
echo -e "${YELLOW}Configuring PostgresSQL database related information...${RESET}"
config_file="${DINKY_HOME_PARAMS}/config/application-postgresql.yml"

echo -e "${GREEN}The automatic initialization script uses the export environment variable method to support the loading of environment variables from the data source configuration file. The configuration file is${config_file} ${RESET}"
echo -e "${GREEN}The automatic initialization script uses the export environment variable method to support the loading of environment variables from the data source configuration file. The configuration file is: ${config_file} ${RESET}"

add_to_env "DB_ACTIVE" "postgresql" "$DB_ENV_FILE"
add_to_env "POSTGRES_ADDR" "${db_host}:${db_port}" "$DB_ENV_FILE"
Expand All @@ -69,7 +69,7 @@ while true; do
sleep 2
source $DB_ENV_FILE

echo -e "${GREEN}PostgresSQL The configuration of database related information is completed. Please confirm whether the following configuration is correct${RESET}"
echo -e "${GREEN}PostgresSQL The configuration of database related information is completed. Please confirm whether the following configuration is correct: ${RESET}"
grep -E '^(export DB_ACTIVE|export POSTGRES_ADDR|export POSTGRES_DB|export POSTGRES_USER|export POSTGRES_PASSWORD)' $DB_ENV_FILE | grep -v "^#" | grep -v "^$"

break
Expand All @@ -78,4 +78,4 @@ while true; do
echo -e "${RED}The entered database type is incorrect, please select the correct database type again.${RESET}"
;;
esac
done
done
6 changes: 3 additions & 3 deletions script/bin/init_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ while true; do
add_to_env "PATH" "\$DINKY_HOME/bin:\$PATH" "$ENV_FILE"
sleep 2
source $ENV_FILE
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct${RESET}"
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct: ${RESET}"
grep -E '^(export DINKY_HOME)' $ENV_FILE | grep -v "^#" | grep -v "^$"
break
;;
Expand All @@ -36,7 +36,7 @@ while true; do
add_to_env "PATH" "\$DINKY_HOME/bin:\$PATH" "$ENV_FILE"
sleep 2
source $ENV_FILE
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct${RESET}"
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct: ${RESET}"
grep -E '^(export DINKY_HOME)' $ENV_FILE | grep -v "^#" | grep -v "^$"
fi
break
Expand All @@ -49,4 +49,4 @@ while true; do
echo -e "${RED}Invalid input, please re-run the script to select the correct option.${RESET}"
;;
esac
done
done
40 changes: 20 additions & 20 deletions script/bin/init_flink_dependences.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DINKY_HOME=$5

echo -e "${GREEN}====================== Flink dependency initialization ======================${RESET}"

echo -e "${BLUE}Parameters: The current Flink version is${CURRENT_FLINK_FULL_VERSION}The scanned Flink version is${FLINK_VERSION_SCAN} The temporary directory is${DINKY_TMP_DIR} The expansion package directory is${EXTENDS_HOME} Dinky The root directory is${DINKY_HOME}${RESET}"
echo -e "${BLUE}Parameters: The current Flink version is: ${CURRENT_FLINK_FULL_VERSION}, The scanned Flink version is: ${FLINK_VERSION_SCAN} , The temporary directory is: ${DINKY_TMP_DIR} , The expansion package directory is: ${EXTENDS_HOME} , Dinky The root directory is: ${DINKY_HOME}${RESET}"

if [ -z "$CURRENT_FLINK_FULL_VERSION" ] || [ -z "$FLINK_VERSION_SCAN" ] || [ -z "$DINKY_TMP_DIR" ] || [ -z "$EXTENDS_HOME" ] || [ -z "$DINKY_HOME" ]; then
echo -e "${RED}Parameter error, please check!${RESET}"
Expand All @@ -20,7 +20,7 @@ FLINK_STORE_DIR=${DINKY_TMP_DIR}/flink-download
mkdir -p ${FLINK_STORE_DIR}

if [ -f "${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz" ]; then
echo -e "${YELLOW}${FLINK_STORE_DIR} ALREADY EXISTS flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz fileTo ensure completeness, delete first ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz Download the file again${RESET}"
echo -e "${YELLOW}${FLINK_STORE_DIR} ALREADY EXISTS flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz file, To ensure completeness, delete first ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz Download the file again${RESET}"
rm -rf ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz
if [ -d "${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}" ]; then
echo -e "${YELLOW}The flink directory already exists, delete it ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}"
Expand All @@ -36,23 +36,23 @@ try_mirrors_download_file() {

exec_tsinghua_result=$(download_file "$tsinghua_url" "${FLINK_STORE_DIR}")
if [ ! "$exec_tsinghua_result" ]; then
echo -e "${BLUE}The tsinghua address of the currently downloaded Flink installation package is${tsinghua_url}${RESET}"
echo -e "${BLUE}The tsinghua address of the currently downloaded Flink installation package is: ${tsinghua_url}${RESET}"
return 0
else
echo -e "${YELLOW}Failed to download from Tsinghua mirror, try downloading from Aliyun mirror...${RESET}"
exec_aliyun_result=$(download_file "$aliyun_url" "${FLINK_STORE_DIR}")
if [ "$exec_aliyun_result" ]; then
echo -e "${BLUE}The aliyun address of the currently downloaded Flink installation package is${aliyun_url}${RESET}"
echo -e "${BLUE}The aliyun address of the currently downloaded Flink installation package is: ${aliyun_url}${RESET}"
return 0
else
echo -e "${YELLOW}Failed to download from Aliyun mirror too, try downloading from Apache official source...${RESET}"

exec_apache_result=$(download_file "$apache_url" "${FLINK_STORE_DIR}")
if [ "$exec_apache_result" ]; then
echo -e "${RED}Downloading from Apache official source also failed, please check the network or download manually${RESET}"
echo -e "${RED}Downloading from Apache official source also failed, please check the network or download manually.${RESET}"
return 1
else
echo -e "${BLUE}The apache address of the currently downloaded Flink installation package is${apache_url}${RESET}"
echo -e "${BLUE}The apache address of the currently downloaded Flink installation package is: ${apache_url}${RESET}"
return 0
fi
fi
Expand All @@ -64,62 +64,62 @@ if ! try_mirrors_download_file; then
fi


echo -e "${GREEN}Flink installation package download completed${RESET}"
echo -e "${GREEN}Flink installation package download completed.${RESET}"
echo -e "\n${GREEN}===============================================================${RESET}\n"
echo -e "${GREEN}Start decompressing the Flink installation package...${RESET}"
tar -zxvf ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}-bin-scala_2.12.tgz -C ${FLINK_STORE_DIR}/
if [ $? -eq 0 ]; then
echo -e "${GREEN}Flink installation package decompression completed${RESET}"
echo -e "${GREEN}Flink installation package decompression completed.${RESET}"
else
echo -e "${RED}Flink installation package failed to decompress, please check${RESET}"
echo -e "${RED}Flink installation package failed to decompress, please check.${RESET}"
exit 1
fi

echo -e "\n${GREEN}===============================================================${RESET}\n"

flink_dir_tmp=$(ls -n ${FLINK_STORE_DIR} | grep '^d' | grep flink | awk '{print $9}')
full_flink_dir_tmp="${FLINK_STORE_DIR}/${flink_dir_tmp}"
echo -e "${BLUE}Unzipped directory name${full_flink_dir_tmp}${RESET}"
echo -e "${BLUE}Unzipped directory name: ${full_flink_dir_tmp}${RESET}"



echo -e "${GREEN}Process ${full_flink_dir_tmp}/lib/flink-table-planner-loader* file...${RESET}"
rm -rf ${full_flink_dir_tmp}/lib/flink-table-planner-loader*
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process ${full_flink_dir_tmp}/opt/flink-table-planner_2.12-*.jar file...${RESET}"
mv ${full_flink_dir_tmp}/opt/flink-table-planner_2.12-*.jar ${full_flink_dir_tmp}/lib/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process flink jar dependencies into dinky...${RESET}"
cp -r ${full_flink_dir_tmp}/lib/*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}jar dependency processing completed${RESET}"
echo -e "${GREEN}jar dependency processing completed.${RESET}"

echo -e "${GREEN}Process flink-sql-client ...${RESET}"
cp -r ${full_flink_dir_tmp}/opt/flink-sql-client-*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process flink-cep-scala ...${RESET}"
cp -r ${full_flink_dir_tmp}/opt/flink-cep-scala*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process flink-queryable-state-runtime ...${RESET}"
cp -r ${full_flink_dir_tmp}/opt/flink-queryable-state-runtime*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process flink-state-processor-api ...${RESET}"
cp -r ${full_flink_dir_tmp}/opt/flink-state-processor-api*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN}Process flink-s3-fs-presto ...${RESET}"
cp -r ${full_flink_dir_tmp}/opt/flink-s3-fs-presto*.jar ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/
echo -e "${GREEN}Processing completed${RESET}"
echo -e "${GREEN}Processing completed.${RESET}"

echo -e "${GREEN} ================= List files in the ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/ directory ==============${RESET}"
ls -l ${EXTENDS_HOME}/flink${FLINK_VERSION_SCAN}/

echo -e "${YELLOW}Please check the above dependent files${RESET}"
echo -e "${YELLOW}Please check the above dependent files.${RESET}"

rm -rf ${FLINK_STORE_DIR}/flink-${CURRENT_FLINK_FULL_VERSION}*

echo -e "${GREEN}The basic dependency processing is completed, please perform subsequent operations according to the actual situation.${RESET}"
echo -e "${GREEN}The basic dependency processing is completed, please perform subsequent operations according to the actual situation.${RESET}"
12 changes: 6 additions & 6 deletions script/bin/init_jdbc_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ echo -e "${GREEN}Start downloading the mysql driver package...${RESET}"
# Run the command to check whether the file exists
exec_result=$(ll "${DINKY_LIB_DIR}"/mysql-connector-j-8.4.0.jar)
if [ "$exec_result" ]; then
echo -e "${YELLOW}The mysql driver package already exists, no need to download it again. Skip this step${RESET}"
echo -e "${YELLOW}The mysql driver package already exists, no need to download it again. Skip this step.${RESET}"
else
download_file https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.4.0/mysql-connector-j-8.4.0.jar "${DINKY_LIB_DIR}"
echo -e "${GREEN}Download is complete, please verify. The downloaded file storage address is ${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar${RESET}"
echo -e "${GREEN}Download is complete, please verify. The downloaded file storage address is: ${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar${RESET}"
if [ -f "${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar" ]; then
echo -e "${GREEN}mysql driver package downloaded successfully${RESET}"
echo -e "${GREEN}mysql driver package downloaded successfully.${RESET}"
else
echo -e "${RED}Mysql driver package download failed, please check the network or download manually${RESET}"
echo -e "${RED}Mysql driver package download failed, please check the network or download manually.${RESET}"
exit 1
fi
echo -e "${GREEN}After the verification is completed, subsequent installation and configuration operations can be performed as needed.${RESET}"
fi
echo -e "${GREEN}After the verification is completed, subsequent installation and configuration operations can be performed as needed.${RESET}"
fi
Loading
Loading