Skip to content

Commit 9feca63

Browse files
committed
remove property and namespace steps (already covered in benchmark script)
1 parent d36ba6f commit 9feca63

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

driver-pulsar/deploy/deploy.yaml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@
5252
httpUrl: "http://{{ hostvars[groups['pulsar'][0]].private_ip }}:8080/"
5353
pulsarVersion: "1.21.0-incubating"
5454

55-
- name: Download Pulsar
55+
- name: Create Pulsar directory
5656
file:
5757
path: "/opt/pulsar"
5858
state: directory
59-
- get_url:
60-
url: https://dist.apache.org/repos/dist/dev/incubator/pulsar/pulsar-{{ pulsarVersion }}-candidate-3/apache-pulsar-{{ pulsarVersion }}-bin.tar.gz
61-
dest: /tmp/pulsar.tgz
62-
- command: tar --strip-components=1 -xvf /tmp/pulsar.tgz
63-
args:
64-
chdir: /opt/pulsar
65-
59+
- name: Download Pulsar binary package
60+
unarchive:
61+
src: https://github.com/apache/incubator-pulsar/releases/download/v{{ pulsarVersion }}/apache-pulsar-{{ pulsarVersion }}-bin.tar.gz
62+
remote_src: yes
63+
dest: /opt/pulsar
64+
extra_opts: ["--strip-components=1"]
6665
- set_fact:
6766
private_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
6867
max_heap_memory: "24g"
@@ -71,7 +70,7 @@
7170
src: "templates/pulsar_env.sh"
7271
dest: "/opt/pulsar/conf/pulsar_env.sh"
7372

74-
- name: Setup ZooKeeper
73+
- name: ZooKeeper setup
7574
hosts: zookeeper
7675
connection: ssh
7776
become: true
@@ -101,7 +100,9 @@
101100
state: restarted
102101
daemon_reload: yes
103102
name: "zookeeper"
104-
- command: >
103+
- name: Initialize cluster metadata
104+
run_once: true
105+
command: >
105106
bin/pulsar initialize-cluster-metadata --cluster local
106107
--zookeeper localhost:2181
107108
--global-zookeeper localhost:2181
@@ -111,7 +112,7 @@
111112
chdir: /opt/pulsar
112113
when: groups['zookeeper'][0] == inventory_hostname
113114

114-
- name: Setup Bookkeeper
115+
- name: Bookkeeper setup
115116
hosts: pulsar
116117
connection: ssh
117118
become: true
@@ -128,7 +129,7 @@
128129
daemon_reload: yes
129130
name: "bookkeeper"
130131

131-
- name: Setup Pulsar
132+
- name: Pulsar setup (part 2)
132133
hosts: pulsar
133134
connection: ssh
134135
become: true
@@ -147,16 +148,17 @@
147148

148149
- name: Get Maven version
149150
hosts: localhost
151+
become: false
150152
tasks:
151153
- shell: >
152154
cat ../../pom.xml | xmllint --format - \
153155
| sed "s/xmlns=\".*\"//g" | xmllint --stream --pattern /project/version --debug - \
154156
| grep -A 2 "matches pattern" | grep text | sed "s/.* [0-9] //g"
155157
register: maven_version
156158
- set_fact:
157-
benchmark_version: "{{ maven_version.stdout }}"
159+
benchmark_version: "{{ maven_version.stdout }}"
158160

159-
- name: Setup Pulsar client
161+
- name: Pulsar client setup
160162
hosts: client
161163
connection: ssh
162164
become: true
@@ -174,21 +176,20 @@
174176
mv /opt/openmessaging-benchmark-0.0.1-SNAPSHOT /opt/benchmark
175177
- name: Configure service URL
176178
lineinfile:
177-
dest: /opt/benchmark/driver-pulsar/pulsar.yaml
178-
regexp: '^ serviceUrl \: '
179-
line: ' serviceUrl : {{ serviceUrl }}'
179+
dest: /opt/benchmark/driver-pulsar/pulsar.yaml
180+
regexp: '^ serviceUrl \: '
181+
line: ' serviceUrl : {{ serviceUrl }}'
180182
- name: Configure http URL
181183
lineinfile:
182-
dest: /opt/benchmark/driver-pulsar/pulsar.yaml
183-
regexp: '^ httpUrl : '
184-
line: ' httpUrl : {{ httpUrl }}'
184+
dest: /opt/benchmark/driver-pulsar/pulsar.yaml
185+
regexp: '^ httpUrl : '
186+
line: ' httpUrl : {{ httpUrl }}'
185187
- name: Configure http URL
186188
lineinfile:
187189
dest: /opt/benchmark/bin/benchmark
188190
regexp: '^JVM_MEM='
189191
line: 'JVM_MEM="-Xms24G -Xmx24G -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch -XX:-UseBiasedLocking"'
190192

191-
192193
- name: Hosts addresses
193194
hosts: localhost
194195
become: false

0 commit comments

Comments
 (0)