-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdeploy.yml
70 lines (56 loc) · 1.13 KB
/
deploy.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
---
# Site Configuration
# ==================
- hosts: all
tasks:
- name: determine interface
set_fact: ipv4_address="{{ hostvars[inventory_hostname].ansible_default_ipv4.address }}"
tags:
[slaves, elasticsearch]
# Deploy the default roles to all nodes
- hosts: all
roles:
- common
- hosts: elasticsearch
roles:
- elasticsearch
# HADOOP
# ======
- hosts: zookeepers
roles:
- cdh_zookeeper_server
- hosts: journalnodes
roles:
- cdh_hadoop_journalnode
# Create first nameNode
## This will be the active node
- hosts: namenodes[0]
roles:
- cdh_hadoop_namenode_active
# Create standby datanode
##
- hosts: namenodes[1]
roles:
- cdh_hadoop_namenode_standby
# Starting Hadoop HDFS Zookeeper Failover Controller
##
- hosts: namenodes
tasks:
- name: starting Hadoop HDFS Zookeeper Failover Controller
service: name=hadoop-hdfs-zkfc state=started
# Add datanodes
##
- hosts: datanodes
roles:
- cdh_hadoop_datanode
# Add Spark
##
- hosts: sparkmasters
roles:
- spark_master
- hosts: sparkworkers
roles:
- spark_workers
- hosts: monitor
roles:
- nginx