fix: Set elastic search parameters.
Set ES parameters (files, processes...)
This commit is contained in:
		
							parent
							
								
									1b99ec682d
								
							
						
					
					
						commit
						d6cdbb6759
					
				@ -7,6 +7,12 @@ sonarqube_db_image: postgres
 | 
			
		||||
sonarqube_http_port: 9000
 | 
			
		||||
sonarqube_api_port: 9001
 | 
			
		||||
 | 
			
		||||
# Limits
 | 
			
		||||
sonarqube_vm_max_map_count: 524288
 | 
			
		||||
sonarqube_fs_file_max: 131072
 | 
			
		||||
sonarqube_nofile: 131072
 | 
			
		||||
sonarqube_nproc: 8192
 | 
			
		||||
 | 
			
		||||
# Sonarqube paths
 | 
			
		||||
sonarqube_root_path: /var/local
 | 
			
		||||
sonarqube_config_path: "{{ sonarqube_root_path }}/conf/sonarqube"
 | 
			
		||||
 | 
			
		||||
@ -21,3 +21,29 @@
 | 
			
		||||
    - "{{ sonarqube_configuration_files }}"
 | 
			
		||||
  tags:
 | 
			
		||||
    - sonarqube_configure
 | 
			
		||||
 | 
			
		||||
- name: "SONARQUBE | Set up nofiles and nproc for ansible user"
 | 
			
		||||
  pam_limits:
 | 
			
		||||
    domain: "*"
 | 
			
		||||
    limit_type: "{{ item.limit_type }}"
 | 
			
		||||
    limit_item: "{{ item.limit_item }}"
 | 
			
		||||
    value: "{{ item.value }}"
 | 
			
		||||
  loop:
 | 
			
		||||
    # Add nofile and nproc, both soft and hard, limit for the user db_user with a comment.
 | 
			
		||||
    # Type "-" for enforcing both soft and hard resource limits together for more details read `man limits.conf`.
 | 
			
		||||
    - { limit_type: '-', limit_item: 'nofile', value: "{{ sonarqube_nofile }}" }
 | 
			
		||||
    - { limit_type: '-', limit_item: 'nproc', value: "{{ sonarqube_nproc }}" }
 | 
			
		||||
 | 
			
		||||
- name: "SONARQUBE | Set up the max files"
 | 
			
		||||
  sysctl:
 | 
			
		||||
    name: fs.file-max
 | 
			
		||||
    value: "{{ sonarqube_fs_file_max }}"
 | 
			
		||||
    state: present
 | 
			
		||||
    reload: yes
 | 
			
		||||
 | 
			
		||||
- name: "SONARQUBE | Set up the VM max_map_count"
 | 
			
		||||
  sysctl:
 | 
			
		||||
    name: vm.max_map_count
 | 
			
		||||
    value: "{{ sonarqube_vm_max_map_count }}"
 | 
			
		||||
    state: present
 | 
			
		||||
    reload: yes
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user