Skip to content

Commit

Permalink
Merge pull request #166 from idealista/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sorobon authored Jan 17, 2023
2 parents 2714a93 + 6388c10 commit e4c6a31
Show file tree
Hide file tree
Showing 9 changed files with 559 additions and 324 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

## [Unreleased](https://github.com/idealista/solr_role/tree/develop)


## [3.1.2](https://github.com/idealista/solr_role/tree/3.1.2) (2023-01-17)
### Fixed
- *[#164](https://github.com/idealista/solr_role/issues/164) Reinstalling/Updating problem* @sorobon

## [3.1.1](https://github.com/idealista/solr_role/tree/3.1.1) (2022-11-07)
### Added
- *[#136](https://github.com/idealista/solr_role/issues/136) Add documentation about setting up cores and collections* @sorobon
Expand Down
16 changes: 9 additions & 7 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
name = "pypi"

[packages]
ansible = "==2.9.13"
molecule = "==3.0.4"
docker = "==4.2.0"
ansible = "==5.0.1"
molecule = "==3.5.2"
molecule-docker = "==1.1.0"
docker = "==4.4.4"
ansible-lint = "==4.2.0"
yamllint = "==1.29.0"

[dev-packages]

[requires]
python_version = "3.9"
python_version = "3"
818 changes: 502 additions & 316 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ solr_os_tunning: true
solr_cleanup: true
solr_remove_examples: false

# Misc
solr_force_reinstall: false

# pam_limits
solr_nofile_soft_limit: 65535
solr_nofile_hard_limit: 65535
Expand Down Expand Up @@ -66,6 +69,7 @@ solr_tmp_basedir: "/usr/local/src"
solr_tmp_dest_dir: "{{ solr_tmp_basedir }}/{{ solr_package }}"
solr_collections_config_tmp_dir: "{{ solr_tmp_basedir }}/collections"
solr_cores_config_dir: "{{ solr_data_dir }}/cores"
solr_config_file_dir: /etc/default/solr.in.sh
solr_cores_transfer_mode: copy
solr_recommended_open_files: 65550
solr_recommended_max_processes: 65550
Expand Down
3 changes: 2 additions & 1 deletion tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- name: Solr | Configuring Solr init script
template:
src: "{{ solr_templates_dir }}/solr.in.sh.j2"
dest: /etc/default/solr.in.sh
dest: "{{ solr_config_file_dir }}"
force: true
notify: restart Solr

Expand Down Expand Up @@ -60,6 +60,7 @@
repository_url: "{{ solr_external_libraries_repository_url }}"
dest: "{{ solr_external_libraries_destination_path }}"
mode: 0644
keep_name: true
with_items: "{{ solr_external_libraries }}"
notify: restart Solr
when: solr_external_libraries is defined and solr_external_libraries|length > 0
Expand Down
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---

- name: Solr | Prepare env
import_tasks: reinstall.yml
tags:
- solr_install
when: solr_force_reinstall

- name: Solr | Install
import_tasks: install.yml
tags:
Expand Down
1 change: 1 addition & 0 deletions tasks/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
repository_url: "{{ solr_external_packages_repository_url }}"
dest: "{{ solr_external_packages_tmp_dir }}"
mode: 0644
keep_name: true
with_items: "{{ solr_external_packages }}"
when: solr_external_packages is defined and solr_external_packages|length > 0

Expand Down
29 changes: 29 additions & 0 deletions tasks/reinstall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# tasks file for Solr
# installation instructions taken from: https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production
- name: Solr | Stopping service
systemd:
name: solr
state: "stopped"
enabled: "no"
daemon_reload: true
ignore_errors: true

- name: Solr | Cleaning config
file:
path: "{{ solr_config_file_dir }}"
state: absent
ignore_errors: true

- name: Solr | Cleaning previous downloaded files
file:
path: "{{ solr_tmp_basedir }}/solr*"
state: absent

- name: Solr | Agent installation | Cleanup agent files
file:
path: "{{ solr_tmp_basedir }}/{{ item.download_url | basename }}"
state: absent
loop: "{{ solr_agents_config|flatten(levels=1) }}"
loop_control:
index_var: index
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ molecule==3.5.2
molecule-docker==1.1.0
docker==4.4.4
ansible-lint==4.2.0
yamllint==1.29.0

0 comments on commit e4c6a31

Please sign in to comment.