forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.py
61 lines (56 loc) · 1.77 KB
/
deploy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/env python
# -*- coding: utf-8 -*-
# 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.
"""
This module provide Palo deployer.
Date: 2015/10/07 17:23:06
"""
import os
import init_env
import backup
import config_be
import process_config_file
import prepare_package
import hadoop_mkdir
import distribute
import start
import time
def deploy_palo():
"""deploy palo
"""
if os.path.exists('./output/audit_loader/auditloader.zip'):
deploy_audit = True
else:
deploy_audit = False
# 集群停止,备份
backup.backup_palo()
# 初始化fe/be目录等
if not init_env.init_palo_env():
return False
# 更新conf文件
process_config_file.process_palo_conf()
# 准备部署表
prepare_package.prepare_palo_package(deploy_audit=deploy_audit)
# hadoop_mkdir.create_hdfs_dir()
# 分发部署包到fe/be机器
distribute.distribute_package()
time.sleep(100)
# config_be.config_be()
start.start_palo(init_state=True, deploy_audit=deploy_audit)
if __name__ == '__main__':
deploy_palo()