This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git
The following commit(s) were added to refs/heads/main by this push:
new 4c6ccda upload AINode docs (#284)
4c6ccda is described below
commit 4c6ccda6612a39ad674a5018481ae24f4b4e5128
Author: W1y1r <[email protected]>
AuthorDate: Thu Aug 1 15:47:59 2024 +0800
upload AINode docs (#284)
---
src/.vuepress/sidebar_timecho/V1.3.x/en.ts | 2 +-
src/.vuepress/sidebar_timecho/V1.3.x/zh.ts | 2 +-
.../AINode_Deployment_timecho.md | 427 +++++++++++++++++++++
.../AINode_Deployment.md | 0
.../AINode_Deployment_timecho.md | 427 +++++++++++++++++++++
.../AINode_Deployment.md | 0
.../AINode_Deployment_timecho.md | 418 ++++++++++++++++++++
.../AINode_Deployment.md | 0
.../AINode_Deployment_timecho.md | 418 ++++++++++++++++++++
.../AINode_Deployment.md | 0
10 files changed, 1692 insertions(+), 2 deletions(-)
diff --git a/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
b/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
index f91e797..b34c069 100644
--- a/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
+++ b/src/.vuepress/sidebar_timecho/V1.3.x/en.ts
@@ -74,7 +74,7 @@ export const enSidebar = {
{ text: 'Cluster Deployment', link: 'Cluster-Deployment_timecho' },
{ text: 'Dual Active Deployment', link:
'Dual-Active-Deployment_timecho' },
{ text: 'Docker Install', link: 'Docker-Install' },
- { text: 'AINode Deployment', link: 'AINode_Deployment' },
+ { text: 'AINode_Deployment_timecho', link: 'AINode_Deployment_timecho'
},
{ text: 'Monitoring Panel Deployment', link:
'Monitoring-panel-deployment' },
{ text: 'Workbench Deployment', link: 'workbench-deployment' },
],
diff --git a/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
b/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
index ba80e86..1ea41fd 100644
--- a/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
+++ b/src/.vuepress/sidebar_timecho/V1.3.x/zh.ts
@@ -74,7 +74,7 @@ export const zhSidebar = {
{ text: '集群版部署', link: 'Cluster-Deployment_timecho' },
{ text: '双活版部署', link: 'Dual-Active-Deployment_timecho' },
{ text: 'docker部署', link: 'Docker-Install' },
- { text: 'AINode部署', link: 'AINode_Deployment' },
+ { text: 'AINode部署', link: 'AINode_Deployment_timecho' },
{ text: '工具部署(监控面板)', link: 'Monitoring-panel-deployment' },
{ text: '工具部署(可视化控制台)', link: 'workbench-deployment' },
],
diff --git
a/src/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
b/src/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
new file mode 100644
index 0000000..5d405eb
--- /dev/null
+++
b/src/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
@@ -0,0 +1,427 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# AINode Deployment
+
+## 1 AINode Introduction
+
+### 1.1 Capability Introduction
+
+ AINode is the third type of endogenous node provided by IoTDB after the
Configurable Node and DataNode. This node extends its ability to perform
machine learning analysis on time series by interacting with the DataNode and
Configurable Node of the IoTDB cluster. It supports the introduction of
existing machine learning models from external sources for registration and the
use of registered models to complete time series analysis tasks on specified
time series data through simple SQL sta [...]
+
+### 1.2 Delivery Method
+ It is an additional package outside the IoTDB cluster, with independent
installation and activation (if you need to try or use it, please contact
Tianmu Technology Business or Technical Support).
+
+### 1.3 Deployment mode
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B21.png" alt=""
style="width: 60%;"/>
+</div>
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B22.png" alt=""
style="width: 70%;"/>
+</div>
+
+## 2 Installation preparation
+
+### 2.1 Get installation package
+
+ Users can download the software installation package for AINode, download and
unzip it to complete the installation of AINode.
+
+ Unzip and install the package
+ `(iotdb-enterprise-ainode-<version>.zip)`, The directory structure after
unpacking the installation package is as follows:
+| **Catalogue** | **Type** | **Explain**
|
+| ------------ | -------- | ------------------------------------------------ |
+| lib | folder | AINode compiled binary executable files and
related code dependencies |
+| sbin | folder | The running script of AINode can start, remove,
and stop AINode |
+| conf | folder | Contains configuration items for AINode,
specifically including the following configuration items |
+| LICENSE | file | Certificate
|
+| NOTICE | file | Tips |
+| README_ZH.md | file | Explanation of the Chinese version of the markdown
format |
+| README.md | file | Instructions
|
+
+### 2.2 Environmental preparation
+- Suggested operating environment:Ubuntu, CentOS, MacOS
+
+- Runtime Environment
+ - Python>=3.8 is sufficient in a networked environment, and comes with pip
and venv tools; Python 3.8 version is required for non networked
environments,And from
[here](https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/?p=%2Flibs&mode=list)
Download the zip file corresponding to the operating system (Note that when
downloading dependencies, you need to select the zip file in the libs folder,
as shown in the following figure),Copy all files in the folder to the `lib`
folder in the io [...]
+
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B23.png" alt=""
style="width: 80%;"/>
+
+ - There must be a Python interpreter in the environment variables that can
be directly called through the `python` instruction.
+ - It is recommended to create a Python interpreter venv virtual environment
in the `iotdb enterprise android -<version>` folder. If installing version
3.8.0 virtual environment, the statement is as follows:
+ ```Bash
+ # Install version 3.8.0 of Venv
+ ../Python-3.8.0/python -m venv venv(Folder Name)
+ ```
+
+## 3 Installation steps
+
+### 3.1 AINode activation
+
+Require IoTDB to be in normal operation and have AINode module authorization
in the license (usually not in the license, please contact Tianmou Business or
technical support personnel to obtain AINode module authorization).
+
+ The authorization method for activating the AINode module is as follows:
+ - Method 1: Activate file copy activation
+ - After restarting the confignode node, enter the activation folder, copy
the system_info file to the Tianmou staff, and inform them to apply for
independent authorization for AINode;
+ - Received the license file returned by the staff;
+ - Put the license file into the activation folder of the corresponding
node;
+
+- Method 2: Activate Script Activation
+ - Obtain the required machine code for activation, enter the `sbin`
directory of the installation directory, and execute the activation script:
+ ```Bash
+ cd sbin
+ ./start-activate.sh
+ ```
+ - The following information is displayed. Please copy the machine code (i.e.
this string of characters) to the Tianmou staff and inform them to apply for
independent authorization of AINode:
+ ```Bash
+ Please copy the system_info's content and send it to Timecho:
+
Y17hFA0xRCE1TmkVxILuCIEPc7uJcr5bzlXWiptw8uZTmTX5aThfypQdLUIhMljw075hNRSicyvyJR9JM7QaNm1gcFZPHVRWVXIiY5IlZkXdxCVc1erXMsbCqUYsR2R2Mw4PSpFJsUF5jHWSoFIIjQ2bmJFW5P52KCccFMVeHTc=
+ Please enter license:
+ ```
+ - Enter the activation code returned by the staff into the `Please enter
license:` command prompt in the previous step, as shown below:
+ ```Bash
+ Please enter license:
+
Jw+MmF+AtexsfgNGOFgTm83BgXbq0zT1+fOfPvQsLlj6ZsooHFU6HycUSEGC78eT1g67KPvkcLCUIsz2QpbyVmPLr9x1+kVjBubZPYlVpsGYLqLFc8kgpb5vIrPLd3hGLbJ5Ks8fV1WOVrDDVQq89YF2atQa2EaB9EAeTWd0bRMZ+s9ffjc/1Zmh9NSP/T3VCfJcJQyi7YpXWy5nMtcW0gSV+S6fS5r7a96PjbtE0zXNjnEhqgRzdU+mfO8gVuUNaIy9l375cp1GLpeCh6m6pF+APW1CiXLTSijK9Qh3nsL5bAOXNeob5l+HO5fEMgzrW8OJPh26Vl6ljKUpCvpTiw==
+ License has been stored to sbin/../activation/license
+ Import completed. Please start cluster and excute 'show cluster' to
verify activation status
+ ```
+- After updating the license, restart the DataNode node and enter the sbin
directory of IoTDB to start the datanode:
+ ```Bash
+ cd sbin
+ ./start-datanode.sh -d #The parameter'd 'will be started in the
background
+ ```
+
+ ### 3.2 Configuration item modification
+
+AINode supports modifying some necessary parameters. You can find the
following parameters in the `conf/iotdb-ainode.properties` file and make
persistent modifications to them:
+:
+
+| **Name** | **Describe**
| **Type** | **Default value** |
**Effective method after modification** |
+| :----------------------------- |
------------------------------------------------------------ | ------- |
------------------ | ---------------------------- |
+| cluster_name | The identifier for AINode to join the
cluster | string | defaultCluster |
Only allow modifications before the first service startup |
+| ain_seed_config_node | The Configurable Node address registered
during AINode startup | String | 10710 |
Only allow modifications before the first service startup |
+| ain_inference_rpc_address | AINode provides service and communication
addresses | String | 127.0.0.1 |
Effective after restart |
+| ain_inference_rpc_port | AINode provides ports for services and
communication | String | 10810 |
Effective after restart |
+| ain_system_dir | AINode metadata storage path, the starting
directory of the relative path is related to the operating system, and it is
recommended to use an absolute path | String | data/AINode/system | Effective
after restart |
+| ain_models_dir | AINode stores the path of the model file,
and the starting directory of the relative path is related to the operating
system. It is recommended to use an absolute path | String |
data/AINode/models | Effective after restart |
+| ain_logs_dir | The path where AINode stores logs, the
starting directory of the relative path is related to the operating system, and
it is recommended to use an absolute path | String | logs/AINode |
Effective after restart |
+| ain_thrift_compression_enabled | Does AINode enable Thrift's compression
mechanism , 0-Do not start, 1-Start | Boolean | 0 |
Effective after restart |
+
+### 3.3 Start AINode
+
+ After completing the deployment of Seed Config Node, the registration and
inference functions of the model can be supported by adding AINode nodes. After
specifying the information of the IoTDB cluster in the configuration item, the
corresponding instruction can be executed to start AINode and join the IoTDB
cluster。
+
+### Networking environment startup
+
+#### Start command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual
environment where AINode is installed requires the use of an absolute path.
| no | String | Default reading of environment variables | Input or
persist modifications during invocation |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect. | no
| Bool | false | Input when calling |
+| ain_no_dependencies | -n | Specify whether to install dependencies when
installing AINode, and if so, only install the AINode main program without
installing dependencies. | no | Bool | false | Input when
calling |
+
+ If you don't want to specify the corresponding parameters every time you
start, you can also persistently modify the parameters in the `ainode-env.sh`
and `ainode-env.bat` scripts in the `conf` folder (currently supporting
persistent modification of the ain_interpreter-dir parameter).
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ After writing the parameter value, uncomment the corresponding line and save
it to take effect on the next script execution.
+
+
+### Example
+
+#### Directly start:
+
+```Bash
+ # Start command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh
+ # Windows systems
+ sbin\start-ainode.bat
+
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+#### Update Start:
+If the version of AINode has been updated (such as updating the `lib` folder),
this command can be used. Firstly, it is necessary to ensure that AINode has
stopped running, and then restart it using the `-r` parameter, which will
reinstall AINode based on the files under `lib`.
+
+
+```Bash
+ # Update startup command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh -r
+ # Windows systems
+ sbin\start-ainode.bat -r
+
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh -r > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat -r > myout.file 2>& 1 &
+ ```
+### Non networked environment startup
+
+### Start command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual environment
where AINode is installed requires the use of an absolute path | no
| String | Default reading of environment variables | Input or persist
modifications during invocation |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect | no |
Bool | false | Input when calling |
+
+> Attention: When installation fails in a non networked environment, first
check if the installation package corresponding to the platform is selected,
and then confirm that the Python version is 3.8 (due to the limitations of the
downloaded installation package on Python versions, 3.7, 3.9, and others are
not allowed)
+
+### Example
+
+#### Directly start:
+
+```Bash
+ # Start command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh
+ # Windows systems
+ sbin\start-ainode.bat
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+### 3.4 Detecting the status of AINode nodes
+
+During the startup process of AINode, the new AINode will be automatically
added to the IoTDB cluster. After starting AINode, you can enter SQL in the
command line to query. If you see an AINode node in the cluster and its running
status is Running (as shown below), it indicates successful joining.
+
+
+```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|Running| 127.0.0.1| 10810|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+
+### 3.5 Stop AINode
+
+If you need to stop a running AINode node, execute the corresponding shutdown
script.
+
+### Stop command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -t<AINode-id>/<ip>:<rpc-port>
+
+ #Windows
+ sbin\stop-ainode.bat -t<AINode-id>/<ip>:<rpc-port>
+ ```
+
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ----------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ------ | ---------- |
+| ain_remove_target | -t | When closing AINode, you can specify the Node ID,
address, and port number of the target AINode to be removed, in the format of
`<AINode id>/<ip>:<rpc port>` | no | String | nothing | Input when
calling |
+
+### Example
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh
+
+ # Windows
+ sbin\stop-ainode.bat
+ ```
+After stopping AINode, you can still see AINode nodes in the cluster, whose
running status is UNKNOWN (as shown below), and the AINode function cannot be
used at this time.
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|UNKNOWN| 127.0.0.1| 10790|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+If you need to restart the node, you need to execute the startup script again.
+
+### 3.6 Remove AINode
+
+When it is necessary to remove an AINode node from the cluster, a removal
script can be executed. The difference between removing and stopping scripts is
that stopping retains the AINode node in the cluster but stops the AINode
service, while removing removes the AINode node from the cluster.
+
+ ### Remove command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r
-n
+
+ # Windows
+ sbin\stop-ainode.bat -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r -n
+ ```
+
+#### Parameter introduction:
+
+ | **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | --------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual environment
where AINode is installed requires the use of an absolute path | no
| String | Default reading of environment variables | Input+persistent
modification during invocation |
+| ain_remove_target | -t | When closing AINode, you can specify the Node
ID, address, and port number of the target AINode to be removed, in the format
of `<AINode id>/<ip>:<rpc port>` | no | String | nothing |
Input when calling |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect | no |
Bool | false | Input when calling |
+| ain_no_dependencies | -n | Specify whether to install dependencies when
installing AINode, and if so, only install the AINode main program without
installing dependencies | no | Bool | false | Input when
calling |
+
+ If you don't want to specify the corresponding parameters every time you
start, you can also persistently modify the parameters in the `ainode-env.sh`
and `ainode-env.bat` scripts in the `conf` folder (currently supporting
persistent modification of the ain_interpreter-dir parameter).
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ After writing the parameter value, uncomment the corresponding line and save
it to take effect on the next script execution.
+
+### Example
+
+#### Directly remove:
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh
+
+ # Windows
+ sbin\remove-ainode.bat
+ ```
+ After removing the node, relevant information about the node cannot be
queried.
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+#### Specify removal:
+
+If the user loses files in the data folder, AINode may not be able to actively
remove them locally. The user needs to specify the node number, address, and
port number for removal. In this case, we support users to input parameters
according to the following methods for deletion.
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh -t <AINode-id>/<ip>:<rpc-port>
+
+ # Windows
+ sbin\remove-ainode.bat -t <AINode-id>/<ip>:<rpc-port>
+ ```
+
+## 4 common problem
+
+### 4.1 An error occurs when starting AINode stating that the venv module
cannot be found
+
+ When starting AINode using the default method, a Python virtual environment
will be created in the installation package directory and dependencies will be
installed, so it is required to install the venv module. Generally speaking,
Python 3.8 and above versions come with built-in VenV, but for some systems
with built-in Python environments, this requirement may not be met. There are
two solutions when this error occurs (choose one or the other):
+
+ To install the Venv module locally, taking Ubuntu as an example, you can run
the following command to install the built-in Venv module in Python. Or install
a Python version with built-in Venv from the Python official website.
+
+ ```Bash
+apt-get install python3.8-venv
+```
+Install version 3.8.0 of venv into AINode in the AINode path.
+
+ ```Bash
+../Python-3.8.0/python -m venv venv(Folder Name)
+```
+ When running the startup script, use ` -i ` to specify an existing Python
interpreter path as the running environment for AINode, eliminating the need to
create a new virtual environment.
+
+ ### 4.2 The SSL module in Python is not properly installed and configured to
handle HTTPS resources
+WARNING: pip is configured with locations that require TLS/SSL, however the
ssl module in Python is not available.
+You can install OpenSSLS and then rebuild Python to solve this problem
+> Currently Python versions 3.6 to 3.9 are compatible with OpenSSL 1.0.2,
1.1.0, and 1.1.1.
+
+ Python requires OpenSSL to be installed on our system, the specific
installation method can be found in
[link](https://stackoverflow.com/questions/56552390/how-to-fix-ssl-module-in-python-is-not-available-in-centos)
+
+ ```Bash
+sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
xz-utils tk-dev libffi-dev liblzma-dev uuid-dev lzma-dev liblzma-dev
+sudo -E ./configure --with-ssl
+make
+sudo make install
+```
+
+ ### 4.3 Pip version is lower
+
+ A compilation issue similar to "error: Microsoft Visual C++14.0 or greater is
required..." appears on Windows
+
+The corresponding error occurs during installation and compilation, usually
due to insufficient C++version or Setup tools version. You can check it in
+
+ ```Bash
+./python -m pip install --upgrade pip
+./python -m pip install --upgrade setuptools
+```
+
+
+ ### 4.4 Install and compile Python
+
+ Use the following instructions to download the installation package from the
official website and extract it:
+ ```Bash
+.wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
+tar Jxf Python-3.8.0.tar.xz
+```
+ Compile and install the corresponding Python package:
+ ```Bash
+cd Python-3.8.0
+./configure prefix=/usr/local/python3
+make
+sudo make install
+python3 --version
+```
\ No newline at end of file
diff --git
a/src/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment.md
b/src/UserGuide/Master/stage/AINode_Deployment.md
similarity index 100%
rename from src/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment.md
rename to src/UserGuide/Master/stage/AINode_Deployment.md
diff --git
a/src/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
b/src/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
new file mode 100644
index 0000000..27421ff
--- /dev/null
+++
b/src/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
@@ -0,0 +1,427 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# AINode Deployment
+
+## 1 AINode Introduction
+
+### 1.1 Capability Introduction
+
+ AINode is the third type of endogenous node provided by IoTDB after the
Configurable Node and DataNode. This node extends its ability to perform
machine learning analysis on time series by interacting with the DataNode and
Configurable Node of the IoTDB cluster. It supports the introduction of
existing machine learning models from external sources for registration and the
use of registered models to complete time series analysis tasks on specified
time series data through simple SQL sta [...]
+
+### 1.2 Delivery Method
+ It is an additional package outside the IoTDB cluster, with independent
installation and activation (if you need to try or use it, please contact
Tianmu Technology Business or Technical Support).
+
+### 1.3 Deployment mode
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B21.png" alt=""
style="width: 60%;"/>
+</div>
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B22.png" alt=""
style="width: 70%;"/>
+</div>
+
+## 2 Installation preparation
+
+### 2.1 Get installation package
+
+ Users can download the software installation package for AINode, download and
unzip it to complete the installation of AINode.
+
+ Unzip and install the package
+ `(iotdb-enterprise-ainode-<version>.zip)`, The directory structure after
unpacking the installation package is as follows:
+| **Catalogue** | **Type** | **Explain**
|
+| ------------ | -------- | ------------------------------------------------ |
+| lib | folder | AINode compiled binary executable files and
related code dependencies |
+| sbin | folder | The running script of AINode can start, remove,
and stop AINode |
+| conf | folder | Contains configuration items for AINode,
specifically including the following configuration items |
+| LICENSE | file | Certificate
|
+| NOTICE | file | Tips |
+| README_ZH.md | file | Explanation of the Chinese version of the markdown
format |
+| README.md | file | Instructions
|
+
+### 2.2 Environmental preparation
+- Suggested operating environment:Ubuntu, CentOS, MacOS
+
+- Runtime Environment
+ - Python>=3.8 is sufficient in a networked environment, and comes with pip
and venv tools; Python 3.8 version is required for non networked
environments,And from
[here](https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/?p=%2Flibs&mode=list)
Download the zip file corresponding to the operating system (Note that when
downloading dependencies, you need to select the zip file in the libs folder,
as shown in the following figure),Copy all files in the folder to the `lib`
folder in the io [...]
+
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B23.png" alt=""
style="width: 80%;"/>
+
+ - There must be a Python interpreter in the environment variables that can
be directly called through the `python` instruction.
+ - It is recommended to create a Python interpreter venv virtual environment
in the `iotdb enterprise android -<version>` folder. If installing version
3.8.0 virtual environment, the statement is as follows:
+ ```Bash
+ # Install version 3.8.0 of Venv
+ ../Python-3.8.0/python -m venv venv(Folder Name)
+ ```
+
+## 3 Installation steps
+
+### 3.1 AINode activation
+
+Require IoTDB to be in normal operation and have AINode module authorization
in the license (usually not in the license, please contact Tianmou Business or
technical support personnel to obtain AINode module authorization).
+
+ The authorization method for activating the AINode module is as follows:
+ - Method 1: Activate file copy activation
+ - After restarting the confignode node, enter the activation folder, copy
the system_info file to the Tianmou staff, and inform them to apply for
independent authorization for AINode;
+ - Received the license file returned by the staff;
+ - Put the license file into the activation folder of the corresponding
node;
+
+- Method 2: Activate Script Activation
+ - Obtain the required machine code for activation, enter the `sbin`
directory of the installation directory, and execute the activation script:
+ ```Bash
+ cd sbin
+ ./start-activate.sh
+ ```
+ - The following information is displayed. Please copy the machine code (i.e.
this string of characters) to the Tianmou staff and inform them to apply for
independent authorization of AINode:
+ ```Bash
+ Please copy the system_info's content and send it to Timecho:
+
Y17hFA0xRCE1TmkVxILuCIEPc7uJcr5bzlXWiptw8uZTmTX5aThfypQdLUIhMljw075hNRSicyvyJR9JM7QaNm1gcFZPHVRWVXIiY5IlZkXdxCVc1erXMsbCqUYsR2R2Mw4PSpFJsUF5jHWSoFIIjQ2bmJFW5P52KCccFMVeHTc=
+ Please enter license:
+ ```
+ - Enter the activation code returned by the staff into the `Please enter
license:` command prompt in the previous step, as shown below:
+ ```Bash
+ Please enter license:
+
Jw+MmF+AtexsfgNGOFgTm83BgXbq0zT1+fOfPvQsLlj6ZsooHFU6HycUSEGC78eT1g67KPvkcLCUIsz2QpbyVmPLr9x1+kVjBubZPYlVpsGYLqLFc8kgpb5vIrPLd3hGLbJ5Ks8fV1WOVrDDVQq89YF2atQa2EaB9EAeTWd0bRMZ+s9ffjc/1Zmh9NSP/T3VCfJcJQyi7YpXWy5nMtcW0gSV+S6fS5r7a96PjbtE0zXNjnEhqgRzdU+mfO8gVuUNaIy9l375cp1GLpeCh6m6pF+APW1CiXLTSijK9Qh3nsL5bAOXNeob5l+HO5fEMgzrW8OJPh26Vl6ljKUpCvpTiw==
+ License has been stored to sbin/../activation/license
+ Import completed. Please start cluster and excute 'show cluster' to
verify activation status
+ ```
+- After updating the license, restart the DataNode node and enter the sbin
directory of IoTDB to start the datanode:
+ ```Bash
+ cd sbin
+ ./start-datanode.sh -d #The parameter'd 'will be started in the
background
+ ```
+
+ ### 3.2 Configuration item modification
+
+AINode supports modifying some necessary parameters. You can find the
following parameters in the `conf/iotdb-ainode.properties` file and make
persistent modifications to them:
+:
+
+| **Name** | **Describe**
| **Type** | **Default value** |
**Effective method after modification** |
+| :----------------------------- |
------------------------------------------------------------ | ------- |
------------------ | ---------------------------- |
+| cluster_name | The identifier for AINode to join the
cluster | string | defaultCluster |
Only allow modifications before the first service startup |
+| ain_seed_config_node | The Configurable Node address registered
during AINode startup | String | 10710 |
Only allow modifications before the first service startup |
+| ain_inference_rpc_address | AINode provides service and communication
addresses | String | 127.0.0.1 |
Effective after restart |
+| ain_inference_rpc_port | AINode provides ports for services and
communication | String | 10810 |
Effective after restart |
+| ain_system_dir | AINode metadata storage path, the starting
directory of the relative path is related to the operating system, and it is
recommended to use an absolute path | String | data/AINode/system | Effective
after restart |
+| ain_models_dir | AINode stores the path of the model file,
and the starting directory of the relative path is related to the operating
system. It is recommended to use an absolute path | String |
data/AINode/models | Effective after restart |
+| ain_logs_dir | The path where AINode stores logs, the
starting directory of the relative path is related to the operating system, and
it is recommended to use an absolute path | String | logs/AINode |
Effective after restart |
+| ain_thrift_compression_enabled | Does AINode enable Thrift's compression
mechanism , 0-Do not start, 1-Start | Boolean | 0 |
Effective after restart |
+
+### 3.3 Start AINode
+
+ After completing the deployment of Seed Config Node, the registration and
inference functions of the model can be supported by adding AINode nodes. After
specifying the information of the IoTDB cluster in the configuration item, the
corresponding instruction can be executed to start AINode and join the IoTDB
cluster。
+
+### Networking environment startup
+
+#### Start command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual
environment where AINode is installed requires the use of an absolute path.
| no | String | Default reading of environment variables | Input or
persist modifications during invocation |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect. | no
| Bool | false | Input when calling |
+| ain_no_dependencies | -n | Specify whether to install dependencies when
installing AINode, and if so, only install the AINode main program without
installing dependencies. | no | Bool | false | Input when
calling |
+
+ If you don't want to specify the corresponding parameters every time you
start, you can also persistently modify the parameters in the `ainode-env.sh`
and `ainode-env.bat` scripts in the `conf` folder (currently supporting
persistent modification of the ain_interpreter-dir parameter).
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ After writing the parameter value, uncomment the corresponding line and save
it to take effect on the next script execution.
+
+
+### Example
+
+#### Directly start:
+
+```Bash
+ # Start command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh
+ # Windows systems
+ sbin\start-ainode.bat
+
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+#### Update Start:
+If the version of AINode has been updated (such as updating the `lib` folder),
this command can be used. Firstly, it is necessary to ensure that AINode has
stopped running, and then restart it using the `-r` parameter, which will
reinstall AINode based on the files under `lib`.
+
+
+```Bash
+ # Update startup command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh -r
+ # Windows systems
+ sbin\start-ainode.bat -r
+
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh -r > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat -r > myout.file 2>& 1 &
+ ```
+### Non networked environment startup
+
+### Start command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual environment
where AINode is installed requires the use of an absolute path | no
| String | Default reading of environment variables | Input or persist
modifications during invocation |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect | no |
Bool | false | Input when calling |
+
+> Attention: When installation fails in a non networked environment, first
check if the installation package corresponding to the platform is selected,
and then confirm that the Python version is 3.8 (due to the limitations of the
downloaded installation package on Python versions, 3.7, 3.9, and others are
not allowed)
+
+### Example
+
+#### Directly start:
+
+```Bash
+ # Start command
+ # Linux and MacOS systems
+ bash sbin/start-ainode.sh
+ # Windows systems
+ sbin\start-ainode.bat
+
+ # Backend startup command (recommended for long-term running)
+ # Linux and MacOS systems
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows systems
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+### 3.4 Detecting the status of AINode nodes
+
+During the startup process of AINode, the new AINode will be automatically
added to the IoTDB cluster. After starting AINode, you can enter SQL in the
command line to query. If you see an AINode node in the cluster and its running
status is Running (as shown below), it indicates successful joining.
+
+
+```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|Running| 127.0.0.1| 10810|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+
+### 3.5 Stop AINode
+
+If you need to stop a running AINode node, execute the corresponding shutdown
script.
+
+### Stop command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -t<AINode-id>/<ip>:<rpc-port>
+
+ #Windows
+ sbin\stop-ainode.bat -t<AINode-id>/<ip>:<rpc-port>
+ ```
+
+#### Parameter introduction:
+
+| **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ----------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ------ | ---------- |
+| ain_remove_target | -t | When closing AINode, you can specify the Node ID,
address, and port number of the target AINode to be removed, in the format of
`<AINode id>/<ip>:<rpc port>` | no | String | nothing | Input when
calling |
+
+### Example
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh
+
+ # Windows
+ sbin\stop-ainode.bat
+ ```
+After stopping AINode, you can still see AINode nodes in the cluster, whose
running status is UNKNOWN (as shown below), and the AINode function cannot be
used at this time.
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|UNKNOWN| 127.0.0.1| 10790|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+If you need to restart the node, you need to execute the startup script again.
+
+### 3.6 Remove AINode
+
+When it is necessary to remove an AINode node from the cluster, a removal
script can be executed. The difference between removing and stopping scripts is
that stopping retains the AINode node in the cluster but stops the AINode
service, while removing removes the AINode node from the cluster.
+
+ ### Remove command
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r
-n
+
+ # Windows
+ sbin\stop-ainode.bat -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r -n
+ ```
+
+#### Parameter introduction:
+
+ | **Name** | **Label** | **Describe**
| **Is it mandatory** | **Type** | **Default
value** | **Input method** |
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | --------------------- |
+| ain_interpreter_dir | -i | The interpreter path of the virtual environment
where AINode is installed requires the use of an absolute path | no
| String | Default reading of environment variables | Input+persistent
modification during invocation |
+| ain_remove_target | -t | When closing AINode, you can specify the Node
ID, address, and port number of the target AINode to be removed, in the format
of `<AINode id>/<ip>:<rpc port>` | no | String | nothing |
Input when calling |
+| ain_force_reinstall | -r | Does this script check the version when
checking the installation status of AINode. If it does, it will force the
installation of the whl package in lib if the version is incorrect | no |
Bool | false | Input when calling |
+| ain_no_dependencies | -n | Specify whether to install dependencies when
installing AINode, and if so, only install the AINode main program without
installing dependencies | no | Bool | false | Input when
calling |
+
+ If you don't want to specify the corresponding parameters every time you
start, you can also persistently modify the parameters in the `ainode-env.sh`
and `ainode-env.bat` scripts in the `conf` folder (currently supporting
persistent modification of the ain_interpreter-dir parameter).
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ After writing the parameter value, uncomment the corresponding line and save
it to take effect on the next script execution.
+
+### Example
+
+#### Directly remove:
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh
+
+ # Windows
+ sbin\remove-ainode.bat
+ ```
+ After removing the node, relevant information about the node cannot be
queried.
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+#### Specify removal:
+
+If the user loses files in the data folder, AINode may not be able to actively
remove them locally. The user needs to specify the node number, address, and
port number for removal. In this case, we support users to input parameters
according to the following methods for deletion.
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh -t <AINode-id>/<ip>:<rpc-port>
+
+ # Windows
+ sbin\remove-ainode.bat -t <AINode-id>/<ip>:<rpc-port>
+ ```
+
+## 4 common problem
+
+### 4.1 An error occurs when starting AINode stating that the venv module
cannot be found
+
+ When starting AINode using the default method, a Python virtual environment
will be created in the installation package directory and dependencies will be
installed, so it is required to install the venv module. Generally speaking,
Python 3.8 and above versions come with built-in VenV, but for some systems
with built-in Python environments, this requirement may not be met. There are
two solutions when this error occurs (choose one or the other):
+
+ To install the Venv module locally, taking Ubuntu as an example, you can run
the following command to install the built-in Venv module in Python. Or install
a Python version with built-in Venv from the Python official website.
+
+ ```Bash
+apt-get install python3.8-venv
+```
+Install version 3.8.0 of venv into AINode in the AINode path.
+
+ ```Bash
+../Python-3.8.0/python -m venv venv(Folder Name)
+```
+ When running the startup script, use ` -i ` to specify an existing Python
interpreter path as the running environment for AINode, eliminating the need to
create a new virtual environment.
+
+ ### 4.2 The SSL module in Python is not properly installed and configured to
handle HTTPS resources
+WARNING: pip is configured with locations that require TLS/SSL, however the
ssl module in Python is not available.
+You can install OpenSSLS and then rebuild Python to solve this problem
+> Currently Python versions 3.6 to 3.9 are compatible with OpenSSL 1.0.2,
1.1.0, and 1.1.1.
+
+ Python requires OpenSSL to be installed on our system, the specific
installation method can be found in
[link](https://stackoverflow.com/questions/56552390/how-to-fix-ssl-module-in-python-is-not-available-in-centos)
+
+ ```Bash
+sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
xz-utils tk-dev libffi-dev liblzma-dev uuid-dev lzma-dev liblzma-dev
+sudo -E ./configure --with-ssl
+make
+sudo make install
+```
+
+ ### 4.3 Pip version is lower
+
+ A compilation issue similar to "error: Microsoft Visual C++14.0 or greater is
required..." appears on Windows
+
+The corresponding error occurs during installation and compilation, usually
due to insufficient C++version or Setup tools version. You can check it in
+
+ ```Bash
+./python -m pip install --upgrade pip
+./python -m pip install --upgrade setuptools
+```
+
+
+ ### 4.4 Install and compile Python
+
+ Use the following instructions to download the installation package from the
official website and extract it:
+ ```Bash
+.wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
+tar Jxf Python-3.8.0.tar.xz
+```
+ Compile and install the corresponding Python package:
+ ```Bash
+cd Python-3.8.0
+./configure prefix=/usr/local/python3
+make
+sudo make install
+python3 --version
+```
\ No newline at end of file
diff --git
a/src/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment.md
b/src/UserGuide/latest/stage/AINode_Deployment.md
similarity index 100%
rename from src/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment.md
rename to src/UserGuide/latest/stage/AINode_Deployment.md
diff --git
a/src/zh/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
b/src/zh/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
new file mode 100644
index 0000000..f54b038
--- /dev/null
+++
b/src/zh/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment_timecho.md
@@ -0,0 +1,418 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# AINode 部署
+
+## 1 AINode介绍
+
+### 1.1 能力介绍
+
+AINode 是 IoTDB 在 ConfigNode、DataNode 后提供的第三种内生节点,该节点通过与 IoTDB 集群的
DataNode、ConfigNode
的交互,扩展了对时间序列进行机器学习分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL
语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。
+
+### 1.2 交付方式
+ 是 IoTDB 集群外的额外套件,独立安装包,独立激活(如需试用或使用,请联系天谋科技商务或技术支持)。
+
+### 1.3 部署模式
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B21.png" alt=""
style="width: 60%;"/>
+</div>
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B22.png" alt=""
style="width: 70%;"/>
+</div>
+
+## 2 安装准备
+
+### 2.1 安装包获取
+
+ 用户可以下载AINode的软件安装包,下载并解压后即完成AINode的安装。
+
+ 解压后安装包(`iotdb-enterprise-ainode-<version>.zip`),安装包解压后目录结构如下:
+| **目录** | **类型** | **说明** |
+| ------------ | -------- | ------------------------------------------------ |
+| lib | 文件夹 | AINode编译后的二进制可执行文件以及相关的代码依赖 |
+| sbin | 文件夹 | AINode的运行脚本,可以启动,移除和停止AINode |
+| conf | 文件夹 | 包含AINode的配置项,具体包含以下配置项 |
+| LICENSE | 文件 | 证书 |
+| NOTICE | 文件 | 提示 |
+| README_ZH.md | 文件 | markdown格式的中文版说明 |
+| README.md | 文件 | 使用说明 |
+
+### 2.2 环境准备
+- 建议操作环境: Ubuntu, CentOS, MacOS
+
+- 运行环境
+ - 联网环境下 Python >= 3.8即可,且带有 pip 和 venv 工具;非联网环境下需要使用 Python 3.8版本,并从
[此处](https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/?p=%2Flibs&mode=list)
下载对应操作系统的zip压缩包(注意下载依赖需选择libs文件夹中的zip压缩包,如下图),并将文件夹下的所有文件拷贝到
`iotdb-enterprise-ainode-<version>` 文件夹中 `lib` 文件夹下,并按下文步骤启动AINode。
+
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B23.png" alt=""
style="width: 80%;"/>
+
+ - 环境变量中需存在 Python 解释器且可以通过 `python` 指令直接调用
+ - 建议在 `iotdb-enterprise-ainode-<version>` 文件夹下,新建 Python 解释器 venv 虚拟环境。如安装
3.8.0 版本虚拟环境,语句如下:
+
+ ```Bash
+ # 安装3.8.0版本的venv
+ ../Python-3.8.0/python -m venv venv(文件夹名)
+ ```
+## 3 安装步骤
+
+### 3.1 AINode 激活
+
+ 要求 IoTDB 处于正常运行状态,且 license 中有 AINode 模块授权(通常 license 中不具有 AINode
授权,可联系天谋商务或技术支持人员获取 AINode 模块授权)。
+
+ 激活 AINode 模块授权方式如下:
+ - 方式一:激活文件拷贝激活
+ - 重新启动 confignode 节点后,进入 activation 文件夹, 将 system_info
文件复制给天谋工作人员,并告知工作人员申请 AINode 独立授权;
+ - 收到工作人员返回的 license 文件;
+ - 将 license 文件放入对应节点的 activation 文件夹下;
+- 方式二:激活脚本激活
+ - 获取激活所需机器码,进入安装目录的 `sbin` 目录,执行激活脚本:
+ ```Bash
+ cd sbin
+ ./start-activate.sh
+ ```
+ - 显示如下信息,请将机器码(即该串字符)复制给天谋工作人员,并告知工作人员申请 AINode 独立授权:
+ ```Bash
+ Please copy the system_info's content and send it to Timecho:
+
Y17hFA0xRCE1TmkVxILuCIEPc7uJcr5bzlXWiptw8uZTmTX5aThfypQdLUIhMljw075hNRSicyvyJR9JM7QaNm1gcFZPHVRWVXIiY5IlZkXdxCVc1erXMsbCqUYsR2R2Mw4PSpFJsUF5jHWSoFIIjQ2bmJFW5P52KCccFMVeHTc=
+ Please enter license:
+ ```
+ - 将工作人员返回的激活码输入上一步的命令行提示处 `Please enter license:`,如下提示:
+ ```Bash
+ Please enter license:
+
Jw+MmF+AtexsfgNGOFgTm83BgXbq0zT1+fOfPvQsLlj6ZsooHFU6HycUSEGC78eT1g67KPvkcLCUIsz2QpbyVmPLr9x1+kVjBubZPYlVpsGYLqLFc8kgpb5vIrPLd3hGLbJ5Ks8fV1WOVrDDVQq89YF2atQa2EaB9EAeTWd0bRMZ+s9ffjc/1Zmh9NSP/T3VCfJcJQyi7YpXWy5nMtcW0gSV+S6fS5r7a96PjbtE0zXNjnEhqgRzdU+mfO8gVuUNaIy9l375cp1GLpeCh6m6pF+APW1CiXLTSijK9Qh3nsL5bAOXNeob5l+HO5fEMgzrW8OJPh26Vl6ljKUpCvpTiw==
+ License has been stored to sbin/../activation/license
+ Import completed. Please start cluster and excute 'show cluster' to
verify activation status
+ ```
+- 更新 license 后,重新启动 DataNode 节点,进入 IoTDB 的 sbin 目录下,启动 datanode:
+ ```Bash
+ cd sbin
+ ./start-datanode.sh -d #-d参数将在后台进行启动
+ ```
+### 3.2 配置项修改
+AINode 支持修改一些必要的参数。可以在 `conf/iotdb-ainode.properties` 文件中找到下列参数并进行持久化的修改:
+
+| **名称** | **描述**
| **类型** | **默认值** | **改后生效方式**
|
+| :----------------------------- |
------------------------------------------------------------ | ------- |
------------------ | ---------------------------- |
+| cluster_name | AINode 要加入集群的标识
| string | defaultCluster | 仅允许在第一次启动服务前修改 |
+| ain_seed_config_node | AINode 启动时注册的 ConfigNode 地址
| String | 10710 | 仅允许在第一次启动服务前修改 |
+| ain_inference_rpc_address | AINode 提供服务与通信的地址
| String | 127.0.0.1 | 重启后生效 |
+| ain_inference_rpc_port | AINode 提供服务与通信的端口
| String | 10810 | 重启后生效 |
+| ain_system_dir | AINode 元数据存储路径,相对路径的起始目录与操作系统相关,建议使用绝对路径 |
String | data/AINode/system | 重启后生效 |
+| ain_models_dir | AINode 存储模型文件的路径,相对路径的起始目录与操作系统相关,建议使用绝对路径
| String | data/AINode/models | 重启后生效 |
+| ain_logs_dir | AINode 存储日志的路径,相对路径的起始目录与操作系统相关,建议使用绝对路径 |
String | logs/AINode | 重启后生效 |
+| ain_thrift_compression_enabled | AINode 是否启用 thrift 的压缩机制,0-不启动、1-启动
| Boolean | 0 | 重启后生效 |
+### 3.3 启动 AINode
+
+ 在完成 Seed-ConfigNode 的部署后,可以通过添加 AINode 节点来支持模型的注册和推理功能。在配置项中指定 IoTDB
集群的信息后,可以执行相应的指令来启动 AINode,加入 IoTDB 集群。
+
+### 联网环境启动
+
+#### 启动命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### 参数介绍:
+
+| **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入或持久化修改 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+| ain_no_dependencies | -n | 指定在安装 AINode 的时候是否安装依赖,如果指定则仅安装 AINode
主程序而不安装依赖。 | 否 | Bool | false | 调用时输入 |
+
+ 如不想每次启动时指定对应参数,也可以在 `conf` 文件夹下的`ainode-env.sh` 和 `ainode-env.bat`
脚本中持久化修改参数(目前支持持久化修改 ain_interpreter_dir 参数)。
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ 在写入参数值的后解除对应行的注释并保存即可在下一次执行脚本时生效。
+
+### 示例
+
+#### 直接启动:
+
+```Bash
+ # 启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh
+ # Windows 系统
+ sbin\start-ainode.bat
+
+
+ # 后台启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+#### 更新启动:
+如果 AINode 的版本进行了更新(如更新了 `lib` 文件夹),可使用此命令。首先要保证 AINode 已经停止运行,然后通过 `-r`
参数重启,该参数会根据 `lib` 下的文件重新安装 AINode。
+
+```Bash
+ # 更新启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh -r
+ # Windows 系统
+ sbin\start-ainode.bat -r
+
+
+ # 后台更新启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh -r > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat -r > myout.file 2>& 1 &
+ ```
+### 非联网环境启动
+
+### 启动命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### 参数介绍:
+
+| **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入或持久化修改 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+
+>
注意:非联网环境下安装失败时,首先检查是否选择了平台对应的安装包,其次确认python版本为3.8(由于下载的安装包限制了python版本,3.7、3.9等其他都不行)
+
+### 示例
+
+#### 直接启动:
+
+```Bash
+ # 启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh
+ # Windows 系统
+ sbin\start-ainode.bat
+
+
+ # 后台启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+### 3.4 检测 AINode 节点状态
+
+AINode 启动过程中会自动将新的 AINode 加入 IoTDB 集群。启动 AINode 后可以在 命令行中输入 SQL 来查询,集群中看到
AINode 节点,其运行状态为 Running(如下展示)表示加入成功。
+
+```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|Running| 127.0.0.1| 10810|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+
+### 3.5 停止 AINode
+
+如果需要停止正在运行的 AINode 节点,则执行相应的关闭脚本。
+
+### 停止命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -t<AINode-id>/<ip>:<rpc-port>
+
+ #Windows
+ sbin\stop-ainode.bat -t<AINode-id>/<ip>:<rpc-port>
+ ```
+
+#### 参数介绍:
+
+ | **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式** |
+| ----------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ------ | ---------- |
+| ain_remove_target | -t | AINode 关闭时可以指定待移除的目标 AINode 的 Node
ID、地址和端口号,格式为`<AINode-id>/<ip>:<rpc-port>` | 否 | String | 无 | 调用时输入 |
+
+### 示例
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh
+
+ # Windows
+ sbin\stop-ainode.bat
+ ```
+停止 AINode 后,还可以在集群中看到 AINode 节点,其运行状态为 UNKNOWN(如下展示),此时无法使用 AINode 功能。
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|UNKNOWN| 127.0.0.1| 10790|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+如果需要重新启动该节点,需重新执行启动脚本。
+
+### 3.6 移除 AINode
+
+当需要把一个 AINode 节点移出集群时,可以执行移除脚本。移除和停止脚本的差别是:停止是在集群中保留 AINode 节点但停止 AINode
服务,移除则是把 AINode 节点从集群中移除出去。
+
+ ### 移除命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r
-n
+
+ # Windows
+ sbin\stop-ainode.bat -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r -n
+ ```
+
+#### 参数介绍:
+
+ | **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | --------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入+持久化修改 |
+| ain_remove_target | -t | AINode 关闭时可以指定待移除的目标 AINode 的 Node
ID、地址和端口号,格式为`<AINode-id>/<ip>:<rpc-port>` | 否 | String | 无
| 调用时输入 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+| ain_no_dependencies | -n | 指定在安装 AINode 的时候是否安装依赖,如果指定则仅安装 AINode
主程序而不安装依赖。 | 否 | Bool | false | 调用时输入 |
+
+ 如不想每次启动时指定对应参数,也可以在 `conf` 文件夹下的`ainode-env.sh` 和 `ainode-env.bat`
脚本中持久化修改参数(目前支持持久化修改 ain_interpreter_dir 参数)。
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ 在写入参数值的后解除对应行的注释并保存即可在下一次执行脚本时生效。
+
+### 示例
+
+#### 直接移除:
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh
+
+ # Windows
+ sbin\remove-ainode.bat
+ ```
+ 移除节点后,将无法查询到节点的相关信息。
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+#### 指定移除:
+
+如果用户丢失了 data 文件夹下的文件,可能 AINode
本地无法主动移除自己,需要用户指定节点号、地址和端口号进行移除,此时我们支持用户按照以下方法输入参数进行删除。
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh -t <AINode-id>/<ip>:<rpc-port>
+
+ # Windows
+ sbin\remove-ainode.bat -t <AINode-id>/<ip>:<rpc-port>
+ ```
+
+## 4 常见问题
+
+### 4.1 启动AINode时出现找不到venv模块的报错
+
+ 当使用默认方式启动 AINode 时,会在安装包目录下创建一个 python 虚拟环境并安装依赖,因此要求安装 venv 模块。通常来说
python3.8 及以上的版本会自带 venv,但对于一些系统自带的 python 环境可能并不满足这一要求。出现该报错时有两种解决方案(二选一):
+
+ 在本地安装 venv 模块,以 ubuntu 为例,可以通过运行以下命令来安装 python 自带的 venv 模块。或者从 python
官网安装一个自带 venv 的 python 版本。
+
+ ```Bash
+apt-get install python3.8-venv
+```
+ 安装 3.8.0 版本的 venv 到 AINode 里面 在 AINode 路径下
+
+ ```Bash
+../Python-3.8.0/python -m venv venv(文件夹名)
+```
+ 在运行启动脚本时通过 `-i` 指定已有的 python 解释器路径作为 AINode 的运行环境,这样就不再需要创建一个新的虚拟环境。
+
+ ### 4.2 python中的SSL模块没有被正确安装和配置,无法处理HTTPS资源
+WARNING: pip is configured with locations that require TLS/SSL, however the
ssl module in Python is not available.
+可以安装 OpenSSLS 后,再重新构建 python 来解决这个问题
+> Currently Python versions 3.6 to 3.9 are compatible with OpenSSL 1.0.2,
1.1.0, and 1.1.1.
+
+ Python 要求我们的系统上安装有
OpenSSL,具体安装方法可见[链接](https://stackoverflow.com/questions/56552390/how-to-fix-ssl-module-in-python-is-not-available-in-centos)
+
+ ```Bash
+sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
xz-utils tk-dev libffi-dev liblzma-dev uuid-dev lzma-dev liblzma-dev
+sudo -E ./configure --with-ssl
+make
+sudo make install
+```
+
+ ### 4.3 pip版本较低
+
+ windows下出现类似“error:Microsoft Visual C++ 14.0 or greater is required...”的编译问题
+
+ 出现对应的报错,通常是 c++版本或是 setuptools 版本不足,可以在
+
+ ```Bash
+./python -m pip install --upgrade pip
+./python -m pip install --upgrade setuptools
+```
+
+
+ ### 4.4 安装编译python
+
+ 使用以下指定从官网下载安装包并解压:
+ ```Bash
+.wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
+tar Jxf Python-3.8.0.tar.xz
+```
+ 编译安装对应的 python 包:
+ ```Bash
+cd Python-3.8.0
+./configure prefix=/usr/local/python3
+make
+sudo make install
+python3 --version
+```
\ No newline at end of file
diff --git
a/src/zh/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment.md
b/src/zh/UserGuide/Master/stage/AINode_Deployment.md
similarity index 100%
rename from
src/zh/UserGuide/Master/Deployment-and-Maintenance/AINode_Deployment.md
rename to src/zh/UserGuide/Master/stage/AINode_Deployment.md
diff --git
a/src/zh/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
b/src/zh/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
new file mode 100644
index 0000000..f54b038
--- /dev/null
+++
b/src/zh/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment_timecho.md
@@ -0,0 +1,418 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+# AINode 部署
+
+## 1 AINode介绍
+
+### 1.1 能力介绍
+
+AINode 是 IoTDB 在 ConfigNode、DataNode 后提供的第三种内生节点,该节点通过与 IoTDB 集群的
DataNode、ConfigNode
的交互,扩展了对时间序列进行机器学习分析的能力,支持从外部引入已有机器学习模型进行注册,并使用注册的模型在指定时序数据上通过简单 SQL
语句完成时序分析任务的过程,将模型的创建、管理及推理融合在数据库引擎中。目前已提供常见时序分析场景(例如预测与异常检测)的机器学习算法或自研模型。
+
+### 1.2 交付方式
+ 是 IoTDB 集群外的额外套件,独立安装包,独立激活(如需试用或使用,请联系天谋科技商务或技术支持)。
+
+### 1.3 部署模式
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B21.png" alt=""
style="width: 60%;"/>
+</div>
+<div align="center">
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B22.png" alt=""
style="width: 70%;"/>
+</div>
+
+## 2 安装准备
+
+### 2.1 安装包获取
+
+ 用户可以下载AINode的软件安装包,下载并解压后即完成AINode的安装。
+
+ 解压后安装包(`iotdb-enterprise-ainode-<version>.zip`),安装包解压后目录结构如下:
+| **目录** | **类型** | **说明** |
+| ------------ | -------- | ------------------------------------------------ |
+| lib | 文件夹 | AINode编译后的二进制可执行文件以及相关的代码依赖 |
+| sbin | 文件夹 | AINode的运行脚本,可以启动,移除和停止AINode |
+| conf | 文件夹 | 包含AINode的配置项,具体包含以下配置项 |
+| LICENSE | 文件 | 证书 |
+| NOTICE | 文件 | 提示 |
+| README_ZH.md | 文件 | markdown格式的中文版说明 |
+| README.md | 文件 | 使用说明 |
+
+### 2.2 环境准备
+- 建议操作环境: Ubuntu, CentOS, MacOS
+
+- 运行环境
+ - 联网环境下 Python >= 3.8即可,且带有 pip 和 venv 工具;非联网环境下需要使用 Python 3.8版本,并从
[此处](https://cloud.tsinghua.edu.cn/d/4c1342f6c272439aa96c/?p=%2Flibs&mode=list)
下载对应操作系统的zip压缩包(注意下载依赖需选择libs文件夹中的zip压缩包,如下图),并将文件夹下的所有文件拷贝到
`iotdb-enterprise-ainode-<version>` 文件夹中 `lib` 文件夹下,并按下文步骤启动AINode。
+
+ <img
src="https://alioss.timecho.com/docs/img/AINode%E9%83%A8%E7%BD%B23.png" alt=""
style="width: 80%;"/>
+
+ - 环境变量中需存在 Python 解释器且可以通过 `python` 指令直接调用
+ - 建议在 `iotdb-enterprise-ainode-<version>` 文件夹下,新建 Python 解释器 venv 虚拟环境。如安装
3.8.0 版本虚拟环境,语句如下:
+
+ ```Bash
+ # 安装3.8.0版本的venv
+ ../Python-3.8.0/python -m venv venv(文件夹名)
+ ```
+## 3 安装步骤
+
+### 3.1 AINode 激活
+
+ 要求 IoTDB 处于正常运行状态,且 license 中有 AINode 模块授权(通常 license 中不具有 AINode
授权,可联系天谋商务或技术支持人员获取 AINode 模块授权)。
+
+ 激活 AINode 模块授权方式如下:
+ - 方式一:激活文件拷贝激活
+ - 重新启动 confignode 节点后,进入 activation 文件夹, 将 system_info
文件复制给天谋工作人员,并告知工作人员申请 AINode 独立授权;
+ - 收到工作人员返回的 license 文件;
+ - 将 license 文件放入对应节点的 activation 文件夹下;
+- 方式二:激活脚本激活
+ - 获取激活所需机器码,进入安装目录的 `sbin` 目录,执行激活脚本:
+ ```Bash
+ cd sbin
+ ./start-activate.sh
+ ```
+ - 显示如下信息,请将机器码(即该串字符)复制给天谋工作人员,并告知工作人员申请 AINode 独立授权:
+ ```Bash
+ Please copy the system_info's content and send it to Timecho:
+
Y17hFA0xRCE1TmkVxILuCIEPc7uJcr5bzlXWiptw8uZTmTX5aThfypQdLUIhMljw075hNRSicyvyJR9JM7QaNm1gcFZPHVRWVXIiY5IlZkXdxCVc1erXMsbCqUYsR2R2Mw4PSpFJsUF5jHWSoFIIjQ2bmJFW5P52KCccFMVeHTc=
+ Please enter license:
+ ```
+ - 将工作人员返回的激活码输入上一步的命令行提示处 `Please enter license:`,如下提示:
+ ```Bash
+ Please enter license:
+
Jw+MmF+AtexsfgNGOFgTm83BgXbq0zT1+fOfPvQsLlj6ZsooHFU6HycUSEGC78eT1g67KPvkcLCUIsz2QpbyVmPLr9x1+kVjBubZPYlVpsGYLqLFc8kgpb5vIrPLd3hGLbJ5Ks8fV1WOVrDDVQq89YF2atQa2EaB9EAeTWd0bRMZ+s9ffjc/1Zmh9NSP/T3VCfJcJQyi7YpXWy5nMtcW0gSV+S6fS5r7a96PjbtE0zXNjnEhqgRzdU+mfO8gVuUNaIy9l375cp1GLpeCh6m6pF+APW1CiXLTSijK9Qh3nsL5bAOXNeob5l+HO5fEMgzrW8OJPh26Vl6ljKUpCvpTiw==
+ License has been stored to sbin/../activation/license
+ Import completed. Please start cluster and excute 'show cluster' to
verify activation status
+ ```
+- 更新 license 后,重新启动 DataNode 节点,进入 IoTDB 的 sbin 目录下,启动 datanode:
+ ```Bash
+ cd sbin
+ ./start-datanode.sh -d #-d参数将在后台进行启动
+ ```
+### 3.2 配置项修改
+AINode 支持修改一些必要的参数。可以在 `conf/iotdb-ainode.properties` 文件中找到下列参数并进行持久化的修改:
+
+| **名称** | **描述**
| **类型** | **默认值** | **改后生效方式**
|
+| :----------------------------- |
------------------------------------------------------------ | ------- |
------------------ | ---------------------------- |
+| cluster_name | AINode 要加入集群的标识
| string | defaultCluster | 仅允许在第一次启动服务前修改 |
+| ain_seed_config_node | AINode 启动时注册的 ConfigNode 地址
| String | 10710 | 仅允许在第一次启动服务前修改 |
+| ain_inference_rpc_address | AINode 提供服务与通信的地址
| String | 127.0.0.1 | 重启后生效 |
+| ain_inference_rpc_port | AINode 提供服务与通信的端口
| String | 10810 | 重启后生效 |
+| ain_system_dir | AINode 元数据存储路径,相对路径的起始目录与操作系统相关,建议使用绝对路径 |
String | data/AINode/system | 重启后生效 |
+| ain_models_dir | AINode 存储模型文件的路径,相对路径的起始目录与操作系统相关,建议使用绝对路径
| String | data/AINode/models | 重启后生效 |
+| ain_logs_dir | AINode 存储日志的路径,相对路径的起始目录与操作系统相关,建议使用绝对路径 |
String | logs/AINode | 重启后生效 |
+| ain_thrift_compression_enabled | AINode 是否启用 thrift 的压缩机制,0-不启动、1-启动
| Boolean | 0 | 重启后生效 |
+### 3.3 启动 AINode
+
+ 在完成 Seed-ConfigNode 的部署后,可以通过添加 AINode 节点来支持模型的注册和推理功能。在配置项中指定 IoTDB
集群的信息后,可以执行相应的指令来启动 AINode,加入 IoTDB 集群。
+
+### 联网环境启动
+
+#### 启动命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### 参数介绍:
+
+| **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入或持久化修改 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+| ain_no_dependencies | -n | 指定在安装 AINode 的时候是否安装依赖,如果指定则仅安装 AINode
主程序而不安装依赖。 | 否 | Bool | false | 调用时输入 |
+
+ 如不想每次启动时指定对应参数,也可以在 `conf` 文件夹下的`ainode-env.sh` 和 `ainode-env.bat`
脚本中持久化修改参数(目前支持持久化修改 ain_interpreter_dir 参数)。
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ 在写入参数值的后解除对应行的注释并保存即可在下一次执行脚本时生效。
+
+### 示例
+
+#### 直接启动:
+
+```Bash
+ # 启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh
+ # Windows 系统
+ sbin\start-ainode.bat
+
+
+ # 后台启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+#### 更新启动:
+如果 AINode 的版本进行了更新(如更新了 `lib` 文件夹),可使用此命令。首先要保证 AINode 已经停止运行,然后通过 `-r`
参数重启,该参数会根据 `lib` 下的文件重新安装 AINode。
+
+```Bash
+ # 更新启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh -r
+ # Windows 系统
+ sbin\start-ainode.bat -r
+
+
+ # 后台更新启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh -r > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat -r > myout.file 2>& 1 &
+ ```
+### 非联网环境启动
+
+### 启动命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/start-ainode.sh -i <directory> -r -n
+
+ # Windows
+ sbin\start-ainode.bat -i <directory> -r -n
+ ```
+#### 参数介绍:
+
+| **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | ---------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入或持久化修改 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+
+>
注意:非联网环境下安装失败时,首先检查是否选择了平台对应的安装包,其次确认python版本为3.8(由于下载的安装包限制了python版本,3.7、3.9等其他都不行)
+
+### 示例
+
+#### 直接启动:
+
+```Bash
+ # 启动命令
+ # Linux 和 MacOS 系统
+ bash sbin/start-ainode.sh
+ # Windows 系统
+ sbin\start-ainode.bat
+
+
+ # 后台启动命令(长期运行推荐)
+ # Linux 和 MacOS 系统
+ nohup bash sbin/start-ainode.sh > myout.file 2>& 1 &
+ # Windows 系统
+ nohup bash sbin/start-ainode.bat > myout.file 2>& 1 &
+ ```
+
+### 3.4 检测 AINode 节点状态
+
+AINode 启动过程中会自动将新的 AINode 加入 IoTDB 集群。启动 AINode 后可以在 命令行中输入 SQL 来查询,集群中看到
AINode 节点,其运行状态为 Running(如下展示)表示加入成功。
+
+```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|Running| 127.0.0.1| 10810|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+
+### 3.5 停止 AINode
+
+如果需要停止正在运行的 AINode 节点,则执行相应的关闭脚本。
+
+### 停止命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -t<AINode-id>/<ip>:<rpc-port>
+
+ #Windows
+ sbin\stop-ainode.bat -t<AINode-id>/<ip>:<rpc-port>
+ ```
+
+#### 参数介绍:
+
+ | **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式** |
+| ----------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ------ | ---------- |
+| ain_remove_target | -t | AINode 关闭时可以指定待移除的目标 AINode 的 Node
ID、地址和端口号,格式为`<AINode-id>/<ip>:<rpc-port>` | 否 | String | 无 | 调用时输入 |
+
+### 示例
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh
+
+ # Windows
+ sbin\stop-ainode.bat
+ ```
+停止 AINode 后,还可以在集群中看到 AINode 节点,其运行状态为 UNKNOWN(如下展示),此时无法使用 AINode 功能。
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
+| 2| AINode|UNKNOWN| 127.0.0.1| 10790|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+如果需要重新启动该节点,需重新执行启动脚本。
+
+### 3.6 移除 AINode
+
+当需要把一个 AINode 节点移出集群时,可以执行移除脚本。移除和停止脚本的差别是:停止是在集群中保留 AINode 节点但停止 AINode
服务,移除则是把 AINode 节点从集群中移除出去。
+
+ ### 移除命令
+
+```Bash
+ # Linux / MacOS
+ bash sbin/stop-ainode.sh -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r
-n
+
+ # Windows
+ sbin\stop-ainode.bat -i<directory> -t<AINode-id>/<ip>:<rpc-port> -r -n
+ ```
+
+#### 参数介绍:
+
+ | **名称** | **标签** | **描述**
| **是否必填** | **类型** | **默认值** | **输入方式**
|
+| ------------------- | ---- |
------------------------------------------------------------ | -------- |
------ | ---------------- | --------------------- |
+| ain_interpreter_dir | -i | AINode 所安装在的虚拟环境的解释器路径,需要使用绝对路径 | 否
| String | 默认读取环境变量 | 调用时输入+持久化修改 |
+| ain_remove_target | -t | AINode 关闭时可以指定待移除的目标 AINode 的 Node
ID、地址和端口号,格式为`<AINode-id>/<ip>:<rpc-port>` | 否 | String | 无
| 调用时输入 |
+| ain_force_reinstall | -r | 该脚本在检查 AINode 安装情况的时候是否检查版本,如果检查则在版本不对的情况下会强制安装
lib 里的 whl 安装包 | 否 | Bool | false | 调用时输入 |
+| ain_no_dependencies | -n | 指定在安装 AINode 的时候是否安装依赖,如果指定则仅安装 AINode
主程序而不安装依赖。 | 否 | Bool | false | 调用时输入 |
+
+ 如不想每次启动时指定对应参数,也可以在 `conf` 文件夹下的`ainode-env.sh` 和 `ainode-env.bat`
脚本中持久化修改参数(目前支持持久化修改 ain_interpreter_dir 参数)。
+
+ `ainode-env.sh` :
+ ```Bash
+ # The defaulte venv environment is used if ain_interpreter_dir is not set.
Please use absolute path without quotation mark
+ # ain_interpreter_dir=
+ ```
+ `ainode-env.bat` :
+```Bash
+ @REM The defaulte venv environment is used if ain_interpreter_dir is not
set. Please use absolute path without quotation mark
+ @REM set ain_interpreter_dir=
+ ```
+ 在写入参数值的后解除对应行的注释并保存即可在下一次执行脚本时生效。
+
+### 示例
+
+#### 直接移除:
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh
+
+ # Windows
+ sbin\remove-ainode.bat
+ ```
+ 移除节点后,将无法查询到节点的相关信息。
+
+ ```Bash
+IoTDB> show cluster
++------+----------+-------+---------------+------------+-------+-----------+
+|NodeID| NodeType| Status|InternalAddress|InternalPort|Version| BuildInfo|
++------+----------+-------+---------------+------------+-------+-----------+
+| 0|ConfigNode|Running| 127.0.0.1| 10710|UNKNOWN|190e303-dev|
+| 1| DataNode|Running| 127.0.0.1| 10730|UNKNOWN|190e303-dev|
++------+----------+-------+---------------+------------+-------+-----------+
+```
+#### 指定移除:
+
+如果用户丢失了 data 文件夹下的文件,可能 AINode
本地无法主动移除自己,需要用户指定节点号、地址和端口号进行移除,此时我们支持用户按照以下方法输入参数进行删除。
+
+ ```Bash
+ # Linux / MacOS
+ bash sbin/remove-ainode.sh -t <AINode-id>/<ip>:<rpc-port>
+
+ # Windows
+ sbin\remove-ainode.bat -t <AINode-id>/<ip>:<rpc-port>
+ ```
+
+## 4 常见问题
+
+### 4.1 启动AINode时出现找不到venv模块的报错
+
+ 当使用默认方式启动 AINode 时,会在安装包目录下创建一个 python 虚拟环境并安装依赖,因此要求安装 venv 模块。通常来说
python3.8 及以上的版本会自带 venv,但对于一些系统自带的 python 环境可能并不满足这一要求。出现该报错时有两种解决方案(二选一):
+
+ 在本地安装 venv 模块,以 ubuntu 为例,可以通过运行以下命令来安装 python 自带的 venv 模块。或者从 python
官网安装一个自带 venv 的 python 版本。
+
+ ```Bash
+apt-get install python3.8-venv
+```
+ 安装 3.8.0 版本的 venv 到 AINode 里面 在 AINode 路径下
+
+ ```Bash
+../Python-3.8.0/python -m venv venv(文件夹名)
+```
+ 在运行启动脚本时通过 `-i` 指定已有的 python 解释器路径作为 AINode 的运行环境,这样就不再需要创建一个新的虚拟环境。
+
+ ### 4.2 python中的SSL模块没有被正确安装和配置,无法处理HTTPS资源
+WARNING: pip is configured with locations that require TLS/SSL, however the
ssl module in Python is not available.
+可以安装 OpenSSLS 后,再重新构建 python 来解决这个问题
+> Currently Python versions 3.6 to 3.9 are compatible with OpenSSL 1.0.2,
1.1.0, and 1.1.1.
+
+ Python 要求我们的系统上安装有
OpenSSL,具体安装方法可见[链接](https://stackoverflow.com/questions/56552390/how-to-fix-ssl-module-in-python-is-not-available-in-centos)
+
+ ```Bash
+sudo apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
xz-utils tk-dev libffi-dev liblzma-dev uuid-dev lzma-dev liblzma-dev
+sudo -E ./configure --with-ssl
+make
+sudo make install
+```
+
+ ### 4.3 pip版本较低
+
+ windows下出现类似“error:Microsoft Visual C++ 14.0 or greater is required...”的编译问题
+
+ 出现对应的报错,通常是 c++版本或是 setuptools 版本不足,可以在
+
+ ```Bash
+./python -m pip install --upgrade pip
+./python -m pip install --upgrade setuptools
+```
+
+
+ ### 4.4 安装编译python
+
+ 使用以下指定从官网下载安装包并解压:
+ ```Bash
+.wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
+tar Jxf Python-3.8.0.tar.xz
+```
+ 编译安装对应的 python 包:
+ ```Bash
+cd Python-3.8.0
+./configure prefix=/usr/local/python3
+make
+sudo make install
+python3 --version
+```
\ No newline at end of file
diff --git
a/src/zh/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment.md
b/src/zh/UserGuide/latest/stage/AINode_Deployment.md
similarity index 100%
rename from
src/zh/UserGuide/latest/Deployment-and-Maintenance/AINode_Deployment.md
rename to src/zh/UserGuide/latest/stage/AINode_Deployment.md