-
Notifications
You must be signed in to change notification settings - Fork 526
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
ansible: fix some issues #380
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
# | ||
# Copyright (c) 2021 NetEase Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Get chunkserver number | ||
|
||
- name: get chunkserver number not get disk automatically | ||
set_fact: | ||
chunkserver_num: "{{ disk_list | length }}" | ||
when: not auto_get_disk_list | bool | ||
|
||
- name: get chunkserver number get disk automatically | ||
block: | ||
- shell: echo '{{ get_disk_list_cmd }} | wc -l' | ||
register: result | ||
- set_fact: | ||
chunkserver_num: "{{ result.stdout }}" | ||
when: auto_get_disk_list | bool |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,43 +15,45 @@ | |
# limitations under the License. | ||
# | ||
|
||
- name: install libunwind | ||
vars: | ||
apt_lib_name: libunwind8 | ||
yum_lib_name: libunwind | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
|
||
- name: install libunwind-dev | ||
vars: | ||
apt_lib_name: libunwind8-dev | ||
yum_lib_name: libunwind-devel | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
|
||
- name: install bzip2 | ||
vars: | ||
apt_lib_name: bzip2 | ||
yum_lib_name: bzip2 | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
- name: install package via deb | ||
include_tasks: "install_deb_package.yml" | ||
when: install_with_deb | bool | ||
|
||
- name: install jemalloc | ||
vars: | ||
lib_name: jemalloc | ||
download_url: "{{ jemalloc_download_url }}" | ||
include_tasks: install_jemalloc.yml | ||
|
||
- name: install psmisc | ||
vars: | ||
apt_lib_name: psmisc | ||
yum_lib_name: psmisc | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
when: chunkserver_format_disk | bool | ||
|
||
- name: install chunkserver bin | ||
vars: | ||
remote_dir_name: "{{ curve_bin_dir }}" | ||
local_file_path: "{{ local_chunkserver_package_path }}/bin/" | ||
file_mode: 0755 | ||
include_tasks: copy_file_to_remote.yml | ||
- name: install package via tar | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not install the same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
because install via tar package do different things based on installed package name. So can not give a unified task. |
||
block: | ||
- name: install libunwind | ||
vars: | ||
apt_lib_name: libunwind8 | ||
yum_lib_name: libunwind | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
- name: install libunwind-dev | ||
vars: | ||
apt_lib_name: libunwind8-dev | ||
yum_lib_name: libunwind-devel | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
- name: install bzip2 | ||
vars: | ||
apt_lib_name: bzip2 | ||
yum_lib_name: bzip2 | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
- name: install jemalloc | ||
vars: | ||
lib_name: jemalloc | ||
download_url: "{{ jemalloc_download_url }}" | ||
include_tasks: install_jemalloc.yml | ||
- name: install psmisc | ||
vars: | ||
apt_lib_name: psmisc | ||
yum_lib_name: psmisc | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
when: chunkserver_format_disk | bool | ||
- name: install chunkserver bin | ||
vars: | ||
remote_dir_name: "{{ curve_bin_dir }}" | ||
local_file_path: "{{ local_chunkserver_package_path }}/bin/" | ||
file_mode: 0755 | ||
include_tasks: copy_file_to_remote.yml | ||
when: not install_with_deb | bool | ||
|
||
- name: generate chunkserver_ctl.sh | ||
vars: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,27 +15,27 @@ | |
# limitations under the License. | ||
# | ||
|
||
- name: pull prom/prometheus:latest | ||
shell: sudo docker image pull prom/prometheus:latest | ||
- name: install package via deb | ||
include_tasks: "install_deb_package.yml" | ||
when: install_with_deb | bool | ||
|
||
- name: pull grafana/grafana:latest | ||
shell: sudo docker image pull grafana/grafana:latest | ||
|
||
- name: promoon/reporter:latest | ||
shell: sudo docker image pull promoon/reporter:latest | ||
|
||
- name: install jq | ||
vars: | ||
apt_lib_name: jq | ||
yum_lib_name: jq | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
|
||
- name: install monitor work space | ||
vars: | ||
remote_dir_name: "{{ monitor_work_dir }}" | ||
local_file_path: "{{ local_monitor_package_path }}/" | ||
file_mode: 0777 | ||
include_tasks: copy_file_to_remote.yml | ||
|
||
- name: generate curve-monitor.sh | ||
template: src=curve-monitor.sh.j2 dest={{ deploy_dir }}/curve-monitor.sh mode=0755 | ||
- name: install package via tar | ||
block: | ||
- name: pull prom/prometheus:latest | ||
shell: sudo docker image pull prom/prometheus:latest | ||
- name: pull grafana/grafana:latest | ||
shell: sudo docker image pull grafana/grafana:latest | ||
- name: promoon/reporter:latest | ||
shell: sudo docker image pull promoon/reporter:latest | ||
- name: install jq | ||
vars: | ||
apt_lib_name: jq | ||
yum_lib_name: jq | ||
include_tasks: common_tasks/install_with_yum_apt.yml | ||
- name: install monitor work space | ||
vars: | ||
remote_dir_name: "{{ monitor_work_dir }}" | ||
local_file_path: "{{ local_monitor_package_path }}/" | ||
file_mode: 0777 | ||
include_tasks: copy_file_to_remote.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The task There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
because the 'curve-monitor.sh' has included in debain and tar pacages, so don't need creat again. |
||
when: not install_with_deb | bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add
sudo_or_not
and other related fields inclient.ini
file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this pr has included the field 'https://github.com/opencurve/curve/pull/370/files'