diff --git a/.travis.yml b/.travis.yml index 9d0af36..5580ebe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ --- language: python -python: "3.7" +python: "3.9" sudo: required services: - docker @@ -14,6 +14,7 @@ env: - DOCKER_IMAGE_BASE=idealista/jdk:11.0.6-stretch-openjdk-headless - DOCKER_IMAGE_BASE=idealista/jdk:8u252-focal-openjdk-headless - DOCKER_IMAGE_BASE=idealista/jdk:14.0.1-focal-openjdk-headless + - DOCKER_IMAGE_BASE=idealista/jdk:11.0.12-bullseye-openjdk-headless script: - pipenv run molecule test --all --destroy always diff --git a/CHANGELOG.md b/CHANGELOG.md index b066f26..eca0d95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased](https://github.com/idealista/solr_role/tree/develop) +## [3.0.2](https://github.com/idealista/solr_role/tree/3.0.2) (2021-12-20) +### Added +- *[#141] Upgrade to version 8.11.0* @aren-pulid0 +- *[#141] Fix log4j vulnerability* @aren-pulid0 +- *[#141] Support for Debian 11 bullseye* @aren-pulid0 + ## [3.0.1](https://github.com/idealista/solr_role/tree/3.0.1) (2021-09-13) ### Changed - *Default version as 8.9.0* @sorobon diff --git a/Pipfile b/Pipfile index 69dd941..e913a88 100644 --- a/Pipfile +++ b/Pipfile @@ -12,4 +12,4 @@ docker = "==4.2.0" ansible-lint = "==4.2.0" [requires] -python_version = "3" +python_version = "3.9" diff --git a/defaults/main.yml b/defaults/main.yml index e8f31df..46bb150 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,7 +1,7 @@ --- ## General -solr_version: 8.9.0 +solr_version: 8.11.0 solr_install: true solr_mode: cloud # standalone|cloud diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 093b6c6..3deaef5 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -7,9 +7,16 @@ FROM {{ item.image }} {% endif %} # install minimal packages for debian slim images +{% if 'bullseye' in item.image %} +RUN apt-get update && \ + DEBIAN_FRONTEND="noninteractive" apt-get install -y python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-pip python3-lxml && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3 0 &&\ + apt-get clean +{% else %} RUN apt-get update && \ DEBIAN_FRONTEND="noninteractive" apt-get install -y -q python3 sudo bash ca-certificates iproute2 systemd systemd-sysv python3-lxml && \ apt-get clean +{% endif %} STOPSIGNAL SIGRTMIN+3 RUN systemctl set-default multi-user.target \ No newline at end of file diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index a39cc21..3417ed6 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -29,7 +29,7 @@ platforms: - name: solrcloud1 hostname: solrcloud1 - image: ${DOCKER_IMAGE_BASE:-idealista/jdk:11.0.12-buster-openjdk-headless} + image: ${DOCKER_IMAGE_BASE:-idealista/jdk:11.0.12-bullseye-openjdk-headless} privileged: false capabilities: - SYS_ADMIN @@ -54,7 +54,7 @@ platforms: - name: solrcloud2 hostname: solrcloud2 - image: ${DOCKER_IMAGE_BASE:-idealista/jdk:11.0.12-buster-openjdk-headless} + image: ${DOCKER_IMAGE_BASE:-idealista/jdk:11.0.12-bullseye-openjdk-headless} privileged: false capabilities: - SYS_ADMIN diff --git a/tasks/config.yml b/tasks/config.yml index af953fc..45ab7ea 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -35,6 +35,9 @@ force: true notify: restart Solr +- name: Solr | Gather OS specific vars + include_vars: "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" + - name: Solr | Install maven_artifact module required packages apt: package: "{{ solr_external_libraries_required_packages }}" diff --git a/templates/solr.in.sh.j2 b/templates/solr.in.sh.j2 index f180e84..734af52 100644 --- a/templates/solr.in.sh.j2 +++ b/templates/solr.in.sh.j2 @@ -230,4 +230,7 @@ SOLR_OPTS="$SOLR_OPTS -Dsolr.environment={{ solr_environment_ui }}" # Runtime properties are passed to the security policy file (server/etc/security.policy) # You can also tweak via standard JDK files such as ~/.java.policy, see https://s.apache.org/java8policy # This is experimental! It may not work at all with Hadoop/HDFS features. -#SOLR_SECURITY_MANAGER_ENABLED=false \ No newline at end of file +#SOLR_SECURITY_MANAGER_ENABLED=false + +# log4j vulnerability https://solr.apache.org/security.html#apache-solr-affected-by-apache-log4j-cve-2021-44228 +SOLR_OPTS="$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true" \ No newline at end of file diff --git a/test-requirements.txt b/test-requirements.txt index e1d000a..2a3b5a2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ -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 diff --git a/vars/Debian-10.yml b/vars/Debian-10.yml new file mode 100644 index 0000000..ed383ab --- /dev/null +++ b/vars/Debian-10.yml @@ -0,0 +1,4 @@ +--- + +solr_external_libraries_required_packages: + - python-lxml \ No newline at end of file diff --git a/vars/Debian-11.yml b/vars/Debian-11.yml new file mode 100644 index 0000000..d1630b7 --- /dev/null +++ b/vars/Debian-11.yml @@ -0,0 +1,4 @@ +--- + +solr_external_libraries_required_packages: + - python3-lxml diff --git a/vars/Debian-9.yml b/vars/Debian-9.yml new file mode 100644 index 0000000..ed383ab --- /dev/null +++ b/vars/Debian-9.yml @@ -0,0 +1,4 @@ +--- + +solr_external_libraries_required_packages: + - python-lxml \ No newline at end of file diff --git a/vars/Ubuntu-20.yml b/vars/Ubuntu-20.yml new file mode 100644 index 0000000..ed383ab --- /dev/null +++ b/vars/Ubuntu-20.yml @@ -0,0 +1,4 @@ +--- + +solr_external_libraries_required_packages: + - python-lxml \ No newline at end of file