Skip to content

Commit

Permalink
support ubuntu tar.gz (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu authored May 6, 2022
1 parent 63dfe77 commit f84f437
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,3 @@ ansible-playbook remove.yml
```bash
ansible-playbook -i inventory.qa61 install.yml
```


26 changes: 20 additions & 6 deletions roles/install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
state: directory
mode: 0775

- name: verify if the package is exist
- name: verify if the binary is exist
stat:
path: "{{ deploy_dir }}/bin"
register: stat_package
register: stat_binary

- name: verify if the rpm is exist
- name: verify if the install package is exist
stat:
path: "{{ deploy_dir }}/{{ nebula_packages.name }}"
register: stat_rpm
register: stat_package

- name: copy nebula package from Control Machine to all machines in the cluster
copy:
src: "{{ packages_dir }}/{{ nebula_packages.name }}"
dest: "{{ deploy_dir }}"
when:
- not stat_rpm.stat.exists
- not stat_package.stat.exists


- name: unzip rpm file
Expand All @@ -32,8 +32,22 @@
- "mv {{ deploy_dir }}/usr/local/nebula/scripts {{ deploy_dir }}/"

when:
- not stat_package.stat.exists
- not stat_binary.stat.exists
- pkg == 'rpm'

- name: unzip tgz file
shell: "{{ item }}"
with_items:
- "cd {{ deploy_dir }} && tar zxvf {{ nebula_packages.name }}"
- "mv {{ deploy_dir }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}/bin {{ deploy_dir }}/"
- "mv {{ deploy_dir }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}/etc {{ deploy_dir }}/"
- "mv {{ deploy_dir }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}/share {{ deploy_dir }}/"
- "mv {{ deploy_dir }}/nebula-graph-{{ nebula_version }}.{{ os_version }}.{{ arc }}/scripts {{ deploy_dir }}/"

when:
- not stat_binary.stat.exists
- pkg == 'tar.gz'

- name: config {{ module }}.conf
template:
src: "{{ playbook_dir}}/templates/{{ module }}.conf.j2"
Expand Down
2 changes: 1 addition & 1 deletion templates/nebula-storaged.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
########## Disk ##########
# Root data path. Split by comma. e.g. --data_path=/disk1/path1/,/disk2/path2/
# One path per Rocksdb instance.
--data_path=data/storage
--data_path={{ data_dir }}

# The default reserved bytes for one batch operation
--rocksdb_batch_size=4096
Expand Down

0 comments on commit f84f437

Please sign in to comment.