This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch doris-manager
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/doris-manager by this push:
new 07cacca [Manager] Change build script (#6863)
07cacca is described below
commit 07caccab15f9e48c8ac36123ddaeaf67b4eafd43
Author: songchuanyuan <[email protected]>
AuthorDate: Mon Oct 18 13:07:34 2021 +0800
[Manager] Change build script (#6863)
Modify the bugs in readme documents and some running scripts
---
manager/README.md | 81 ++++++++++++++++++----
manager/build.sh | 5 +-
manager/doris-manager/src/routes/space/index.tsx | 28 ++++++--
.../doris/stack/service/config/SettingService.java | 5 ++
manager/manager-bin/start_manager.sh | 8 +--
5 files changed, 103 insertions(+), 24 deletions(-)
diff --git a/manager/README.md b/manager/README.md
index 3a40c9c..3ab4020 100644
--- a/manager/README.md
+++ b/manager/README.md
@@ -20,33 +20,88 @@ under the License.
# Apache Doris Manager (incubating)
[](https://gitter.im/apache-doris/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-Apache Doris Manager is used to manage the doris cluster, such as installing
the cluster, upgrading the cluster, starting and stopping services, etc.
+Apache Doris Manager is used to manage the doris cluster, such as monitoring
cluster, installing the cluster, upgrading the cluster, starting and stopping
services, etc.
-## 1.Database configuration
-
-* Modify the database configuration in the
manager/dm-server/src/main/resources/application.properties file.
-* Create a new database, and then execute the table creation statement in the
manager/dm-server/src/main/resources/dm-server.sql file
-
-## 2. Compile and install
+## 1. Compile and install
### Step1: build
```
-$ mvn clean package -DskipTests
+$ sh build.sh
+```
+Compiles the front and back ends of the project. After compilation, a tar
package will be generated in the output/ directory and output.tar.gz
package.The content of the compiled output is:
+```
+agent/
+ bin/
+ agent_start.sh, doris manger agent startup script
+ agent_stop.sh, doris manger agent stop script
+ install_be.sh, doris be install script
+ install_fe.sh, doris fe install script
+ lib/
+ dm-agent.jar, executable package of doris manger agent
+conf/
+ manager.conf, doris manger server configuration file
+resources/, doris manger server static resources
+static/, doris manger server front end compilation output
+doris-manager.jar, executable package of doris manger server
+start_manager.sh, doris manger server startup script
+stop_manager.sh, doris manger server stop script
```
-After compilation, a tar package will be generated in the assembly/output/
directory, For example doris-manager-1.0.0.tar.gz
### Step2: install manager server
-Copy tar package to the the machine where the manager server needs to be
installed, Start the manager service after decompression
+#### 1) Unzip the installation package
+Copy output.tar.gz tar package to the the machine where the manager server
needs to be installed.
+```
+$ tar -zxvf output.tar.gz
+```
+#### 2) Modify profile
+Edit conf/manager.conf
+```$xslt
+Start HTTP port of the service
+STUDIO_PORT=8080
+
+The type of database where back-end data is stored, including MySQL / H2 /
PostgreSQL. MySQL is supported by default
+MB_DB_TYPE=mysql
+
+Database connection information
+
+If you are configuring a H2 type database, you do not need to configure this
information, and the data will be stored locally as a local file
+
+For MySQL / PostgreSQL, you need to configure the following connection
information
+
+Database address
+MB_DB_HOST=
+
+Database port
+MB_DB_PORT=3306
+
+Database access port
+MB_DB_USER=
+
+Database access password
+MB_DB_PASS=123456
+
+Database name of the database
+MB_DB_DBNAME
+```
+
+#### 3) Start manager server
+Start the manager service after decompression and configuration.
+```
+$ sh start_manager.sh
+```
+#### 4) User manager server
+Browser access ${serverIp}:8080, Manger server has a preset super
administrator user. The information is as follows:
```
-$ tar zxf doris-manager-1.0.0.tar.gz
-$ sh bin/startup.sh
+user name: Admin
+password: Admin@123
+(Case sensitive)
```
### Step3: install agent service
After decompressing the tar package in the second step, there will be a
directory called agent. copy the agent directory to the
machine where the agent service is installed,
```
-$ sh bin/agent_start.sh --agent ${agentIp} --server ${serverIp}:9601
+$ sh bin/agent_start.sh --agent ${agentIp} --server ${serverIp}:8080
```
${agentIp} is the IP of the machine where the agent is located, ${serverIp} is
the IP of the machine where the manager server is located
diff --git a/manager/build.sh b/manager/build.sh
index 53e742c..991ddbb 100644
--- a/manager/build.sh
+++ b/manager/build.sh
@@ -33,6 +33,7 @@ echo "copy doris manager web resources to server end"
echo "build doris manager server start"
set -e
rm -rf output
+rm -rf output.tar.gz
mkdir -p output
mvn clean install
mv manager-server/target/manager-server-1.0.0.jar output/doris-manager.jar
@@ -42,5 +43,5 @@ cp -r dm-agent/src/main/resources/agent output/
mkdir -p output/agent/lib
mv dm-agent/target/dm-agent-1.0.0.jar output/agent/lib/dm-agent.jar
cp -r manager-server/src/main/resources/static output/
-tar -zcvf output.tar.gz output/
-rm -rf output/
\ No newline at end of file
+cp -r manager-server/src/main/resources output/
+tar -zcvf output.tar.gz output/
\ No newline at end of file
diff --git a/manager/doris-manager/src/routes/space/index.tsx
b/manager/doris-manager/src/routes/space/index.tsx
index 31fe2a2..ad8abe2 100644
--- a/manager/doris-manager/src/routes/space/index.tsx
+++ b/manager/doris-manager/src/routes/space/index.tsx
@@ -22,6 +22,7 @@ import styles from './index.module.less';
import Password from 'antd/lib/input/Password';
type RequiredMark = boolean | 'optional';
import { SpaceAPI } from './space.api';
+import { useHistory } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
@@ -30,18 +31,35 @@ const FormLayoutDemo = () => {
const [form] = Form.useForm();
const [clusterForm] = Form.useForm();
const [requiredMark, setRequiredMarkType] =
useState<RequiredMark>('optional');
+ const history = useHistory();
const onRequiredTypeChange = ({ requiredMarkValue }: { requiredMarkValue:
RequiredMark }) => {
setRequiredMarkType(requiredMarkValue);
};
const handleCreate = () => {
- form.validateFields().then(value => {
+ form.validateFields().then(values => {
clusterForm.validateFields().then(cluValues => {
- SpaceAPI.spaceCreate({...value, ...cluValues}).then(res => {
+ SpaceAPI.spaceCreate({
+ cluster:{
+ "address": cluValues.address,
+ "httpPort": cluValues.httpPort,
+ "passwd": cluValues.passwd || "",
+ "queryPort": cluValues.queryPort,
+ "user": cluValues.user
+ },
+ name: values.userName,
+ describe: values.describe,
+ user:{
+ "email": values.email,
+ "name": values.name,
+ "password": values.password
+ }
+ }).then(res => {
const { msg, data, code } = res;
if (code === 0) {
if (res.data) {
- console.log(res.data);
+ message.success(msg);
+ history.replace(`/space/list`);
}
} else {
message.error(msg);
@@ -55,7 +73,7 @@ const FormLayoutDemo = () => {
SpaceAPI.spaceValidate({
address: values.address,
httpPort: values.httpPort,
- passwd: values.passwd,
+ passwd: values.passwd || "",
queryPort: values.queryPort,
user: values.user
}).then(res => {
@@ -162,7 +180,7 @@ const FormLayoutDemo = () => {
<Form.Item label={t`userName`} name="user" rules={[{required:
true,message: t`required`}]}>
<Input placeholder={t`userName`} />
</Form.Item>
- <Form.Item label={t`userPwd`} name="passwd" rules={[{required:
true,message: t`required`}]}>
+ <Form.Item label={t`userPwd`} name="passwd">
<Input.Password style={{ width: '400px' }}
className={styles['input-password']} />
</Form.Item>
<Form.Item>
diff --git
a/manager/general/src/main/java/org/apache/doris/stack/service/config/SettingService.java
b/manager/general/src/main/java/org/apache/doris/stack/service/config/SettingService.java
index ef4916c..8e853fc 100644
---
a/manager/general/src/main/java/org/apache/doris/stack/service/config/SettingService.java
+++
b/manager/general/src/main/java/org/apache/doris/stack/service/config/SettingService.java
@@ -183,6 +183,11 @@ public class SettingService extends BaseService {
settingComponent.addNewSetting(ConfigConstant.DEPLOY_TYPE,
environment.getProperty(PropertyDefine.DEPLOY_TYPE_PROPERTY),
configCache);
+ // TODO:The front-end is not implemented. First, the user system is
specified as
+ // the application's own system by default
+ settingComponent.addNewSetting(ConfigConstant.AUTH_TYPE_KEY,
+ InitStudioReq.AuthType.studio.name(), configCache);
+
ConfigCache.writeConfigs(configCache);
log.debug("init config end.");
}
diff --git a/manager/manager-bin/start_manager.sh
b/manager/manager-bin/start_manager.sh
index 4fa8862..9f283b8 100644
--- a/manager/manager-bin/start_manager.sh
+++ b/manager/manager-bin/start_manager.sh
@@ -22,9 +22,9 @@ curdir=`dirname "$0"`
curdir=`cd "$curdir"; pwd`
export MANAGER_HOME=`cd "$curdir"; pwd`
-echo "MANAGER_HOME"
+echo "$MANAGER_HOME"
-export LOG_DIR="MANAGER_HOME/logs"
+export LOG_DIR="$MANAGER_HOME/logs"
echo "Make log dir"
# make log path
@@ -41,7 +41,7 @@ while read line; do
if [[ $envline == *"="* ]]; then
eval 'export "$envline"'
fi
-done < MANAGER_HOME/conf/manager.conf
+done < $MANAGER_HOME/conf/manager.conf
echo "config end"
@@ -96,5 +96,5 @@ then
fi
#start manager
-nohup $JAVA -jar MANAGER_HOME/doris-manager.jar > $LOG_DIR/manager.out 2>&1
</dev/null &
+nohup $JAVA -jar $MANAGER_HOME/doris-manager.jar > $LOG_DIR/manager.out 2>&1
</dev/null &
echo "Doris Manager start done"
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]