All Projects → idealista → solr_role

idealista / solr_role

Licence: Apache-2.0 license
Ansible role to install an Apache Solr (Cloud) server/cluster

Programming Languages

Jinja
831 projects
XSLT
1337 projects
YAML
28 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to solr role

IATI.cloud
The open-source IATI datastore for IATI data with RESTful web API providing XML, JSON, CSV output. It extracts and parses IATI XML files referenced in the IATI Registry and powered by Apache Solr.
Stars: ✭ 35 (+66.67%)
Mutual labels:  apache-solr, solrcloud
ansible-pyenv
Ansible role to install pyenv on Ubuntu or macOS development machines
Stars: ✭ 46 (+119.05%)
Mutual labels:  debian
Autodesk-Fusion-360-for-Linux
This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
Stars: ✭ 810 (+3757.14%)
Mutual labels:  debian
anon-hotspot
On demand Debian Linux (Tor) Hotspot setup tool
Stars: ✭ 34 (+61.9%)
Mutual labels:  debian
my blog
在 Issues 中建立的个人博客
Stars: ✭ 28 (+33.33%)
Mutual labels:  debian
BnLMetsExporter
Command Line Interface (CLI) to export METS/ALTO documents to other formats.
Stars: ✭ 11 (-47.62%)
Mutual labels:  solrcloud
debian900
DebiaN900 - A set of scripts to facilitate the installation of Devuan or Debian GNU/Linux on the Nokia N900
Stars: ✭ 35 (+66.67%)
Mutual labels:  debian
thelounge-deb
📦 ‎ Debian/Ubuntu package for The Lounge
Stars: ✭ 16 (-23.81%)
Mutual labels:  debian
docker-dolibarr
🐳 🐘 Docker image for Dolibarr.
Stars: ✭ 58 (+176.19%)
Mutual labels:  debian
awesome-sysadmin-tools
Collection of links and resources for sysadmins and Drupal lovers
Stars: ✭ 17 (-19.05%)
Mutual labels:  debian
grml-debootstrap
wrapper around debootstrap
Stars: ✭ 53 (+152.38%)
Mutual labels:  debian
wp-in-a-box
WordPress in a (LEMP) box (Debian & Ubuntu)!
Stars: ✭ 53 (+152.38%)
Mutual labels:  debian
Linux-Active-Directory-join-script
Active directory Join script for Ubuntu, Debian, CentOS, Linux Mint, Fedora, Kali, Elementary OS and Raspbian with built in failchcheck and debugmode for Ubuntu. "The most advanced and updated AD join script on GITHUB for Linux"
Stars: ✭ 97 (+361.9%)
Mutual labels:  debian
wakemeops
A Debian repository for portable applications
Stars: ✭ 54 (+157.14%)
Mutual labels:  debian
cozy-debian
Cozy Debian package
Stars: ✭ 13 (-38.1%)
Mutual labels:  debian
cylon-deb
TUI menu driven bash shell script to update and maintain a Debian based Linux distro.
Stars: ✭ 23 (+9.52%)
Mutual labels:  debian
pi-safe
Create your own custom image files
Stars: ✭ 96 (+357.14%)
Mutual labels:  debian
LinuxMirrors
Linux 一键更换国内软件源
Stars: ✭ 623 (+2866.67%)
Mutual labels:  debian
scale-build
TrueNAS SCALE Build System
Stars: ✭ 180 (+757.14%)
Mutual labels:  debian
xtrix
xtrix OS repo
Stars: ✭ 23 (+9.52%)
Mutual labels:  debian

Logo

Build Status

Solr Ansible role

This ansible role installs a Solr server in a debian environment.

Getting Started

These instructions will get you a copy of the role for your ansible playbook. Once launched, it will install a Solr server in a Debian system.

This role is tested on:

  • Debian
    • stretch (java 8 and 11)
    • buster (java 11)
  • Ubuntu
    • focal (java 8 and 14)

Prerequisities

Ansible 2.8.8 version installed. Inventory destination should be a Debian environment.

For testing purposes, Molecule with Docker as driver.

Installing

Create or add to your roles dependency file (e.g requirements.yml):

- src: idealista.solr_role
  version: x.x.x
  name: solr

Install the role with ansible-galaxy command:

ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

---
- hosts: someserver
  roles:
    - { role: solr }

Playbook example below showing how to provision from scratch a SolrCloud cluster with two nodes plus create an example (and empty) collection called sample_techproducts_configs, using idealista java, zookeeper and solr roles:

Note: Assuming that 'solrcloud' group has two nodes (solrcloud1 and solrcloud2) as is declared in molecule.yml, collection will have two shards, one replica and one shard per node as is declared in group vars file called solrcloud.yml and configuration files are stored under directory called sample_techproducts_configs under template directory.

⚠️ Use the example below just as a reference, requires inventory host groups solr and zookeeper to be correctly defined

---

- hosts: zookeeper
  roles:
    - role: zookeeper
  pre_tasks:
    - name: installing required libs
      apt:
        pkg: "{{ item }}"
        state: present
      with_items:
        - net-tools
        - netcat

- hosts: solrcloud
  roles:
    - role: solr_role

Usage

Look to the defaults properties file to see the possible configuration properties.

Add JVM Agent to your installation

This role supports JVM agents (such as Newrelic, Datadog, etc.) to be used inside your installation. You can view an example with JVM Agents in the molecule tests section --> example_setup_with_agent.

Its very simple, must follow this steps (in this case we will add config for Newrelic's agent):

  • Just add the config in your group_vars.
    solr_agents_required_libs:
      - unzip
      - apt-transport-https
    solr_agents_config:
      - name: "newrelic"
        download_url: "http://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip"
        vm_opts:
          - '-javaagent:{{ solr_installation_dir }}/newrelic/newrelic.jar'
        configuration_files:
          - "newrelic.yml"
        params: {
          application_name: "application_sample_name",
          license_key: "your_license_key"
        }
  • Optional: Place the configuration files in the templates folder using this order "templates/{{ agent_name }}/{{ file names specified in solr_agents_config.configuration_files }}.j2. In this case we have the newrelic.yml.j2 in templates/agents/newrelic/newrelic.yml.j2.

Prometheus Exporter

If you want to scrape metrics from Solr using Prometheus, you will need to configure a exporter. We have a Prometheus Solr Exporter role that will make configuration easier for you, just keep in mind that the variables solr_version and prometheus_solr_exporter_version must have the same value.

Testing

$ pipenv sync
$ pipenv shell

# This will execute tests but doesn't destroy created environment (because of --destroy=never)
$ molecule test --destroy=never -s setup_with_collections

Solr Admin UI should be accessible from docker container host at URL:

http://localhost:8983/solr/#/ (node: solrcloud1)

or

http://localhost:8984/solr/#/ (node: solrcloud2)

Solr Admin UI example

See molecule.yml to check possible testing platforms.

Built With

Ansible Molecule Goss

Versioning

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].