Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support ubuntu tar.gz #12

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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