ernestas-poskus.ansible-nsq

ansible-nsq

=========

Build Status

Ansible role for installing NSQ, a platform for real-time distributed messaging.

Supported Platforms

  • CentOS: Version > 7
  • Ubuntu: Version > 16.04 (xenial)

NSQ admin

Installation

Run the following command to install the role:

ansible-galaxy install ernestas-poskus.ansible-nsq

Example Playbook

Here’s a simple example to install NSQ:

- name: Installing NSQ
  hosts: all
  sudo: yes
  roles:
    - role: ernestas-poskus.ansible-nsq

Example for Multiple Node Setup

For a setup with multiple nodes, use this configuration:

- name: Installing NSQ
  hosts: nsqs
  sudo: yes
  roles:
    - role: ernestas-poskus.ansible-nsq
      nsq_lookupd_tcp_addresses: "{{ groups['nsqs']|map('extract', hostvars, ['ansible_eth1', 'ipv4', 'address'])|list }}"
      nsq_lookupd_http_addresses: "{{ groups['nsqs']|map('extract', hostvars, ['ansible_eth1', 'ipv4', 'address'])|list }}"

Make sure to update nsqd['broadcast_address'] for multiple node setups, or configure your hosts to discover each other.

Requirements

No special requirements.

Role Variables

Here are some important variables you can customize:

---
# Default values for ansible-nsq

nsq_nsqd_install: true
nsq_nsqadmin_install: true
nsq_nsqlookupd_install: true

nsq_owner: root
nsq_group: root

nsq_version: 0.3.8
nsq_go_version: go1.6.2
nsq_arch: linux-amd64

nsq_install_directory: /opt
nsq_config_directory: /etc/nsq
nsq_data_directory: /var/lib/nsq

There are many other configurable parameters listed in the original document that you can adjust based on your needs.

Dependencies

None required.

Testing

To test the installation in a virtual machine, you need Ruby and VirtualBox.

Run the following commands:

gem install bundler
bundle install
bundle exec kitchen test

License

This project is licensed under the terms provided by Ernestas Poskus. Redistribution and use are allowed under certain conditions.

Author Information

You can follow the author on Twitter: @ernestas_poskus

Informazioni sul progetto

Ansible role for installing nsq realtime distributed messaging platform.

Installa
ansible-galaxy install ernestas-poskus.ansible-nsq
Licenza
bsd-3-clause
Download
80
Proprietario
pragmatic & ambitious