-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy path00_apache_storm_install.yml
More file actions
91 lines (79 loc) · 2.5 KB
/
00_apache_storm_install.yml
File metadata and controls
91 lines (79 loc) · 2.5 KB
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
---
- name: Install Apache Storm
hosts: develop
gather_facts: yes
become: true
become_method: su
tasks:
- name: Install all system dependencies for Apache Storm
apt:
name: "{{ item }}"
update_cache: yes
with_items:
- openjdk-8-jre
- python
- unzip
- zookeeperd
- name: Make sure that all Apache Storm folders exist
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ install_path }}"
- "{{ storm_log_dir }}"
- "{{ storm_local_dir }}"
- name: Download Apache Storm in local
become: false
get_url:
url: "{{ storm_url }}"
dest: "/tmp/{{ file_distro_name }}"
delegate_to: localhost
- name: Copy Apache Storm on server target
copy:
src: "/tmp/{{ file_distro_name }}"
dest: "/tmp/{{ file_distro_name }}"
- name: Unarchive Apache Storm file archive
unarchive:
src: "/tmp/{{ file_distro_name }}"
dest: "{{ install_path }}"
- name: Remove Apache Storm file archive
file:
path: "/tmp/{{ file_distro_name }}"
state: absent
- name: Rename downloaded Apache Storm folder
command: "mv {{ install_path }}/{{ distro_name }} {{ storm_path }}"
- name: Copy configuration file storm.yaml
template:
src: templates/storm.yaml.j2
dest: "{{ storm_path }}/conf/storm.yaml"
- name: Add Apache Storm bin in $PATH and environment variable
template:
src: templates/apache-storm-path.sh.j2
dest: /etc/profile.d/apache-storm-path.sh
- name: Make Apache Storm units files
template:
src: templates/service.template.j2
dest: "/lib/systemd/system/storm_{{ item.service_name }}.service"
with_items:
- { service_name: supervisor }
- { service_name: ui }
- { service_name: nimbus }
- { service_name: logviewer }
- name: Enable and start Apache Storm units files
systemd:
name: "storm_{{ item.service_name }}"
state: started
enabled: yes
with_items:
- { service_name: supervisor }
- { service_name: ui }
- { service_name: nimbus }
- { service_name: logviewer }
- name: Wait for Apache Storm is up
uri:
url: "http://{{ ansible_default_ipv4.address }}:8080/api/v1/nimbus/summary"
return_content: yes
register: result
until: result.content.find("Leader") != -1
retries: 5
delay: "{{ delay }}"