-
Notifications
You must be signed in to change notification settings - Fork 8
/
start.yml
156 lines (148 loc) · 3.47 KB
/
start.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
---
- name: start zookeeper
vars_files:
- vars.yml
- vars-deploy.yml
- roles/zookeeper/defaults/main.yml
hosts: zookeeper
tasks:
- command: ./zkServer.sh start
become: yes
become_user: zookeeper
ignore_errors: yes
args:
chdir: "{{zk_install_dir}}/bin"
- command: sleep 5
ignore_errors: yes
- service: name=crond state=started enabled=yes
tags:
- zk
- name: start hdfs
vars_files:
- vars.yml
- vars-deploy.yml
hosts: hadoop-hdfs-namenode
tasks:
- command: ./start-dfs.sh
become: yes
become_user: "{{hadoop_user}}"
ignore_errors: yes
args:
chdir: "/opt/app/hadoop/sbin"
- command: sleep 15
ignore_errors: yes
tags:
- hadoop
- name: start yarn
vars_files:
- vars.yml
- vars-deploy.yml
hosts: hadoop-yarn-resource-manager
tasks:
- name: "sleep for awale"
command: sleep 10
ignore_errors: yes
- name: "execute start-yarn.sh"
command: ./start-yarn.sh
become: yes
become_user: "{{hadoop_user}}"
ignore_errors: yes
args:
chdir: "/opt/app/hadoop/sbin"
- name: "sleep for awale"
command: sleep 10
ignore_errors: yes
tags:
- hadoop
- name: start hive metastore
vars_files:
- vars.yml
- vars-deploy.yml
hosts: hadoop-hdfs-namenode
tasks:
- name: "start hive metastore"
## enable debug: --debug
shell: |
nohup ./bin/hive --service metastore >./metastore.log 2>&1 &
echo $! > metastore.pid
echo "start metastore successed pid is $! "
become: yes
become_user: "{{hadoop_user}}"
ignore_errors: yes
args:
chdir: "/opt/app/hive"
- command: sleep 5
ignore_errors: yes
- name: "start hiveServer2"
shell: |
nohup ./bin/hive --service hiveserver2 > ./hiveserver2.log 2>&1 &
echo $! > hiveserver2.pid
echo "start hiveserver2 successed pid is $! "
become: yes
become_user: "{{hadoop_user}}"
ignore_errors: yes
args:
chdir: "/opt/app/hive"
- command: sleep 5
ignore_errors: yes
tags:
- hive
- name: start thriftserver
vars_files:
- vars.yml
- vars-deploy.yml
hosts: hadoop-yarn-resource-manager
tasks:
- command: ./start-thriftserver.sh --master yarn --deploy-mode cluster --name thriftserver --driver-java-options "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8101"
become: yes
# become_user: hadoop
become_user: "{{hadoop_user}}"
ignore_errors: yes
args:
chdir: "/opt/app/spark/sbin"
when: need_install_spark and need_install_spark_shuffle
- command: sleep 5
ignore_errors: yes
tags:
- tserver
- name: start tis
vars_files:
- vars.yml
- vars-deploy.yml
hosts: solr,tis-console,assemble
tasks:
- command: ./tis restart -force
become: yes
become_user: "{{tis_user}}"
args:
chdir: "{{tis_app_dir}}/"
- command: sleep 10
ignore_errors: yes
tags:
- tjs
# must start console first
#- name: start tis-console
# vars_files:
# - vars.yml
# hosts: tis-console
# tasks:
# - command: ./tis start
# become: yes
# become_user: tis
# ignore_errors: yes
# args:
# chdir: "/opt/app/spring-boot/bin"
# - command: sleep 5
# ignore_errors: yes
#
#- name: start tis-assemble
# vars_files:
# - vars.yml
# hosts: assemble
# tasks:
# - command: ./tis start
# become: yes
# become_user: tis
# ignore_errors: yes
# args:
# chdir: "/opt/app/spring-boot/bin"