mirror of https://github.com/ceph/ceph-ansible.git
Merge pull request #176 from leseb/os-tuning
Make OS tuning var configurable and file re-orderingpull/177/head
commit
5047ac7669
|
@ -42,9 +42,10 @@ ceph_dev_branch: master # development branch you would like to use e.g: master,
|
||||||
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
|
# For rhel, please pay attention to the versions: 'rhel6 3' or 'rhel 4', the fullname is _very_ important.
|
||||||
ceph_dev_redhat_distro: centos7
|
ceph_dev_redhat_distro: centos7
|
||||||
|
|
||||||
###############
|
|
||||||
# CONFIGURATION
|
####################
|
||||||
###############
|
# CEPH CONFIGURATION
|
||||||
|
####################
|
||||||
|
|
||||||
## Ceph options
|
## Ceph options
|
||||||
#
|
#
|
||||||
|
@ -112,3 +113,11 @@ radosgw: false # referenced in monitor role too.
|
||||||
# enable this mode _only_ when you have a single node
|
# enable this mode _only_ when you have a single node
|
||||||
# if you don't want it keep the option commented
|
# if you don't want it keep the option commented
|
||||||
#common_single_host_mode: true
|
#common_single_host_mode: true
|
||||||
|
|
||||||
|
|
||||||
|
###########
|
||||||
|
# OS TUNING
|
||||||
|
###########
|
||||||
|
|
||||||
|
os_tuning_pid_max: 4194303
|
||||||
|
os_tuning_file_max: 26234859
|
||||||
|
|
|
@ -1,76 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: Fail on unsupported system
|
- include: os_check.yml
|
||||||
fail: "msg=System not supported {{ ansible_system }}"
|
|
||||||
when: "ansible_system not in ['Linux']"
|
|
||||||
|
|
||||||
- name: Fail on unsupported architecture
|
- include: os_tuning.yml
|
||||||
fail: "msg=Architecture not supported {{ ansible_architecture }}"
|
|
||||||
when: "ansible_architecture not in ['x86_64']"
|
|
||||||
|
|
||||||
- name: Fail on unsupported distribution
|
- include: prerequisite_ice.yml
|
||||||
fail: "msg=Distribution not supported {{ ansible_os_family }}"
|
|
||||||
when: "ansible_os_family not in ['Debian', 'RedHat']"
|
|
||||||
|
|
||||||
- name: Disable OSD directory parsing by updatedb
|
|
||||||
command: updatedb -e /var/lib/ceph
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Increase PID max value to a very large value
|
|
||||||
sysctl: >
|
|
||||||
name="kernel.pid_max"
|
|
||||||
value=4194303
|
|
||||||
state=present
|
|
||||||
sysctl_file=/etc/sysctl.conf
|
|
||||||
|
|
||||||
- name: Increase the maximum number of open files
|
|
||||||
sysctl: >
|
|
||||||
name="fs.file-max"
|
|
||||||
value=13211539
|
|
||||||
state=present
|
|
||||||
sysctl_file=/etc/sysctl.conf
|
|
||||||
|
|
||||||
- name: Create package directory
|
|
||||||
file: >
|
|
||||||
path={{ ceph_stable_ice_temp_path }}
|
|
||||||
state=directory
|
|
||||||
owner=root
|
|
||||||
group=root
|
|
||||||
mode=0644
|
|
||||||
when: ceph_stable_ice
|
when: ceph_stable_ice
|
||||||
|
|
||||||
- name: Get ICE packages
|
|
||||||
get_url: >
|
|
||||||
url_username={{ ceph_stable_ice_user }}
|
|
||||||
url_password={{ ceph_stable_ice_password }}
|
|
||||||
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
|
|
||||||
dest={{ ceph_stable_ice_temp_path }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
|
|
||||||
when: ceph_stable_ice
|
|
||||||
|
|
||||||
- name: Get ICE Kernel Modules
|
|
||||||
get_url: >
|
|
||||||
url_username={{ ceph_stable_ice_user }}
|
|
||||||
url_password={{ ceph_stable_ice_password }}
|
|
||||||
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_kmod_version }}/{{ item }}
|
|
||||||
dest={{ ceph_stable_ice_temp_path }}
|
|
||||||
with_items:
|
|
||||||
- kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm
|
|
||||||
- kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm
|
|
||||||
when: ceph_stable_ice and ansible_os_family == 'RedHat'
|
|
||||||
|
|
||||||
- name: Stat extracted repo files
|
|
||||||
stat: >
|
|
||||||
path={{ ceph_stable_ice_temp_path }}/ice_setup.py
|
|
||||||
register: repo_exist
|
|
||||||
when: ceph_stable_ice
|
|
||||||
|
|
||||||
- name: Extract packages
|
|
||||||
shell: "cd {{ ceph_stable_ice_temp_path }} && tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
|
|
||||||
when: ceph_stable_ice and repo_exist.stat.exists == False
|
|
||||||
|
|
||||||
- name: Move the extracted packages
|
|
||||||
shell: "mv {{ ceph_stable_ice_temp_path }}/ceph/*/* {{ ceph_stable_ice_temp_path }}"
|
|
||||||
when: ceph_stable_ice and repo_exist.stat.exists == False
|
|
||||||
|
|
||||||
- include: install_on_redhat.yml
|
- include: install_on_redhat.yml
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- name: Fail on unsupported system
|
||||||
|
fail: "msg=System not supported {{ ansible_system }}"
|
||||||
|
when: "ansible_system not in ['Linux']"
|
||||||
|
|
||||||
|
- name: Fail on unsupported architecture
|
||||||
|
fail: "msg=Architecture not supported {{ ansible_architecture }}"
|
||||||
|
when: "ansible_architecture not in ['x86_64']"
|
||||||
|
|
||||||
|
- name: Fail on unsupported distribution
|
||||||
|
fail: "msg=Distribution not supported {{ ansible_os_family }}"
|
||||||
|
when: "ansible_os_family not in ['Debian', 'RedHat']"
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Disable OSD directory parsing by updatedb
|
||||||
|
command: updatedb -e /var/lib/ceph
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Increase PID max value to a very large value
|
||||||
|
sysctl: >
|
||||||
|
name="kernel.pid_max"
|
||||||
|
value={{ os_tuning_pid_max }}
|
||||||
|
state=present
|
||||||
|
sysctl_file=/etc/sysctl.conf
|
||||||
|
|
||||||
|
- name: Increase the maximum number of open files
|
||||||
|
sysctl: >
|
||||||
|
name="fs.file-max"
|
||||||
|
value={{ os_tuning_file_max }}
|
||||||
|
state=present
|
||||||
|
sysctl_file=/etc/sysctl.conf
|
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
- name: Create ICE package directory
|
||||||
|
file: >
|
||||||
|
path={{ ceph_stable_ice_temp_path }}
|
||||||
|
state=directory
|
||||||
|
owner=root
|
||||||
|
group=root
|
||||||
|
mode=0644
|
||||||
|
when: ceph_stable_ice
|
||||||
|
|
||||||
|
- name: Get ICE packages
|
||||||
|
get_url: >
|
||||||
|
url_username={{ ceph_stable_ice_user }}
|
||||||
|
url_password={{ ceph_stable_ice_password }}
|
||||||
|
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_version }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
|
||||||
|
dest={{ ceph_stable_ice_temp_path }}/ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz
|
||||||
|
when: ceph_stable_ice
|
||||||
|
|
||||||
|
- name: Get ICE Kernel Modules
|
||||||
|
get_url: >
|
||||||
|
url_username={{ ceph_stable_ice_user }}
|
||||||
|
url_password={{ ceph_stable_ice_password }}
|
||||||
|
url={{ ceph_stable_ice_url }}/{{ ceph_stable_ice_kmod_version }}/{{ item }}
|
||||||
|
dest={{ ceph_stable_ice_temp_path }}
|
||||||
|
with_items:
|
||||||
|
- kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm
|
||||||
|
- kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm
|
||||||
|
when: ceph_stable_ice and ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: Stat extracted ICE repo files
|
||||||
|
stat: >
|
||||||
|
path={{ ceph_stable_ice_temp_path }}/ice_setup.py
|
||||||
|
register: repo_exist
|
||||||
|
when: ceph_stable_ice
|
||||||
|
|
||||||
|
- name: Extract ICE packages
|
||||||
|
shell: "cd {{ ceph_stable_ice_temp_path }} && tar -xzf ICE-{{ ceph_stable_ice_version }}-{{ ceph_stable_ice_distro }}.tar.gz"
|
||||||
|
when: ceph_stable_ice and repo_exist.stat.exists == False
|
||||||
|
|
||||||
|
- name: Move ICE extracted packages
|
||||||
|
shell: "mv {{ ceph_stable_ice_temp_path }}/ceph/*/* {{ ceph_stable_ice_temp_path }}"
|
||||||
|
when: ceph_stable_ice and repo_exist.stat.exists == False
|
Loading…
Reference in New Issue