Skip to content

queeno/ansible-uchiwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-uchiwa

Ansible-Uchiwa

Ansible role for installing and configuring Uchiwa, the open-source sensu dashboard.

Requirements

This role doesn't have any hard dependencies on other roles. Uchiwa can run on a standalone, vanilla box. However, you may want to connect Uchiwa to sensu-api in order to display clients and events.

You can install Sensu and RabbitMQ on the same node. The following Ansible roles may help:

Supported systems

Currently Debian-like and RedHat-like operating systems are supported. This includes the popular Ubuntu and CentOS.

This role is tested on ubuntu/precise64 and centos/6.5 OSes. For more information, check out the vagrant folder included in this project.

Installation

You can use ansible-galaxy:

$ ansible-galaxy install queeno.uchiwa

Role default variables

These variables are defined in defaults/main.yml. Please overwrite if you have different requirements.

Name Type Description Default
supported_os_families List of strings Supported OS families by the role ['Debian','RedHat']
install_repo Boolean Determines whether to install sensu repo True
sensu_apt_repo_url String Sensu APT repository URL 'https://sensu.global.ssl.fastly.net/apt'
sensu_apt_repo_distribution String Sensu APT repository distribution '{{ ansible_distribution_release }}'
sensu_apt_repo String Sensu APT repository name 'main'
sensu_apt_repo_key_url String Sensu APT repository key URL Please see 1
sensu_apt_repo_key_id String Sensu APT repository key ID 'EB9C94BB'
sensu_yum_repo String Determines which YUM sensu repo to install 2 'sensu'
version String Determines the uchiwa version to install 3 'installed'
uchiwa_apt_pkg String The uchiwa package name for Debian systems 'uchiwa'
uchiwa_yum_pkg String The uchiwa package name for RedHat systems 'uchiwa'
sensu_api_endpoints List of hashes List of sensu API endpoint configuration 4 Please see 4
host String The uchiwa host or IP address to bind uchiwa to '0.0.0.0'
port Integer The port uchiwa listens on 3000
user String The username to access uchiwa dashboard '' (empty for none)
pass String The password to access uchiwa dashboard '' (empty for none)
refresh Integer The interval to pull the sensu APIs (in seconds) 5
users List of hashes Multiple user credentials to access uchiwa dashhboard Please see 5
auth Hash Contains the path to the private and public keys for JWT validation Please see 6

Footnotes

1 http://repos.sensuapp.org/apt/pubkey.gpg

2 sensu_yum_repo could be either sensu (installs the stable YUM repo) or sensu-unstable (installs the unstable YUM repo). The repo configuration is in files\*sensu_yum_repo*.repo.

3 version takes the following values:

  • latest: Ensures the uchiwa latest version is always installed.
  • installed: Installs the uchiwa latest version without updating it.
  • *version number*: Explicitly specify a version number to pin uchiwa to a specific version.

4 sensu_api_endpoints identifies the sensu API endpoints, so uchiwa can connect to them.

You don't need to overwrite all the hash keys in the array. If you don't pass a hash key, the respective default will be used.

Name Type Description Default
name String The name of the sensu API endpoint 'sensu'
host String The IP address or name of the sensu API endpoint '127.0.0.1'
ssl Boolean Determines whether or not the sensu API endpoint requires SSL authentication False
insecure Boolean Determines whether or not to accept an insecure SSL certificate True
port Integer The sensu API endpoint listening port 4567
user String The username of the sensu API endpoint '' (empty for none)
pass String The password of the sensu API endpoint '' (empty for none)
path String The path to the sensu API endpoint '' (empty for none)
timeout Integer Timeout of the sensu API endpoint in seconds 5

5 users specifies a list of user credentials to access the uchiwa dashboard. This feature is available from uchiwa 0.10.0. users has precedence over user. If left empty or omitted the user and password values will be used instead.

Please specify the following keys for each element of users:

Name Type Description Default
username String The username to access uchiwa dashboard
password String The password to access uchiwa dashboard
readonly Boolean Should the user have read only access? false

6 auth specifies the public and private keys for JTW validation and signing. If this hash is omitted, then uchiwa will generate its own keys on start behind the scenes. For this reason, all fields are mandatory if variable is declared.

Please populate the auth hash with the following values:

Name Type Description Default
privatekey String Path to the private key
publickey String Path to the public key

Files required

You need to have the following files in the role folder (for RedHat only):

 files/
  | - sensu.repo
  | - sensu-unstable.repo

Dependencies

No hard dependency.

Weak dependencies on:

  • Redis
  • RabbitMQ
  • Sensu

Tests

Vagrant

Vagrant creates a Debian-like VM (hashicorp/precise64) and a RedHat-like VM (chef/centos-6.5). The vagrant up command will trigger a standalone.yml ansible-playbook run that will test this role on the two VMs.

You can also spin up a specific vm:

vagrant up debian spins up ubuntu/xenial64 vagrant up redhat spins up bento/centos-8

Acceptance Tests

The acceptance tests will be in the vagrant/ folder and will be integrated with travis-ci. Watch this space for more info.

Licence

BSD

About

Ansible role for installing and configuring uchiwa

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •