This section covers installing Squirro on a supported Linux system, either Red Hat® Enterprise Linux® (RHEL) or its open source derivative CentOS Linux.
In addition to this installation method, Squirro also provides ready-made images for VMWare and VirtualBox, that are fully configured. See the Installation section for information on these methods.
Table of Contents
Architecture Overview
A Squirro cluster can contain anywhere from just one to dozens of servers. Adding additional servers to a Squirro cluster always serves two different needs: performance and capacity. As these needs do not necessarily scale in the same way, Squirro differentiates two different types of servers:
- Storage Nodes: stores the data that is indexed into Squirro. Add more storage nodes to scale capacity.
- Cluster Nodes: answers requests by users and handles the processing of items that come in. Add more cluster nodes to improve performance.
Storage and cluster nodes can be installed on the same server, and for a single-node setup that is the recommended approach. But if you intend to scale to more than just one server, it is recommended to only install one of the two node types on a server. That makes better use of the available performance and allows for more flexible scaling.
Prerequisites
This manual assumes that a few prerequisites have been met. This includes a set up system with internet connectivity and some relevant ports opened in the firewall.
If some of these conditions can not be met, please contact support.
Linux setup
The installation of the base system is not covered in this manual. A fully functional RHEL or CentOS installation is assumed to be set up. The supported versions of these Linux distributions are documented on the System Requirements page.
If you want to avoid setting up Linux yourself, there are pre-installed images available for VMWare and VirtualBox. See the Installation section for information on these methods.
Networking
The Linux system needs internet access to download the Squirro packages. Additionally the system should be accessible from your internal network, so that the Squirro interface can be accessed by administrators and users.
Information on how to set up networking is provided by Red Hat in their networking guide.
Firewall
Incoming traffic to Squirro servers should be open on a number of TCP ports. The individual ports and the required access level are documented below:
Storage Nodes
TCP Port | Usage | Open for |
---|---|---|
9200 | Elasticsearch access | All storage and Squirro nodes |
9300 | Elasticsearch replication | All storage nodes |
Squirro Nodes
TCP Port | Usage | Open for |
---|---|---|
81 | Web access |
|
111 | Gluster |
|
443 | Web access (SSL-protected) |
|
2181 | Zookeeper |
|
2888 | Zookeeper node discovery |
|
3306 | MySql |
|
3888 | Zookeeper node discovery |
|
6379 | Redis |
|
24007 | Gluster |
|
49152+ (one per node, e.g. range 49152 – 49155 for a cluster of three nodes) | Gluster nodes |
|
Users
Squirro provides packages that sets up all the Linux users required on a system. Those packages are used in the instructions below.
However in some environments users must not be created by packages. For these cases, users have to be manually created up-front. See the separate page Linux users for Squirro for a detailed list on users that need to be set up.
YUM Repositories
Squirro packages are provided with a Yum repository. Yum is a utility, provided with the RHEL / CentOS Linux system, that downloads and installs packages from central repositories. To configure a new such repository, it needs to be set up using a file in the folder /etc/yum.repos.d
.
Squirro
Create the file /etc/yum.repos.d/squirro.repo
. The exact content of the file will be provided to you by Squirro support, when delivering the license.
The following is an example for RHEL 6.5, though the username and password for the YUM repository have not been filled in:
[squirro-stable] name=Squirro - Red Hat Enterprise Linux 6 - Stable baseurl=https://<user name>:<password>@mirror.squirro.net/rhel/6/stable/$basearch/latest/ enabled=1 gpgkey=https://mirror.squirro.net/rhel/RPM-GPG-KEY-squirro-stable gpgcheck=1 sslverify=1 metadata_expire=300
Storage Node Installation
Installation of the storage node happens with two separate packages. The first package installs the required Linux users and the second installs the services. Use the following two commands for the installation:
[root@localhost ~]# yum install squirro-storage-node-users [root@localhost ~]# yum install squirro-storage-node
Cluster Node Installation
Installation of the Squirro cluster node happens with two separate packages. The first package installs the required Linux users and the second installs the services. Use the following commands for the installation:
Python
Squirro depends on Python, which is provided by a separate YUM repository. Execute the following commands to set up this repository. Please answer y for yes in response to the yum install command prompts.
RHEL6 | RHEL7 | Centos |
---|---|---|
[root]# yum install yum-utils [root]# yum-config-manager --enable rhel-server-rhscl-6-rpms [root]# yum install python27 | [root]# yum install yum-utils [root]# yum-config-manager --enable rhel-server-rhscl-7-rpms [root]# yum install python27 | [root]# yum install centos-release-SCL [root]# yum install python27 |
EPEL
RHEL6 / CentOS 6 | RHEL7 / CentOS 7 |
---|---|
[root]# yum install wget [root]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [root]# yum localinstall epel-release-6-8.noarch.rpm | [root]# wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm [root]# yum localinstall epel-release-7-9.noarch.rpm |
Squirro Cluster node
Important step for RHEL7 / CentOS7
Support for RHEL7 is still experimental. The default MySQL variant for MySQL on RHEL7/CentOS7 is MariaDB. Our RPM packages are however not yet ready for this change.
Please execute the following workaround before you execute the next step:
echo "Installing Squirro dependency MariaDB" yum install -y mariadb-server yum install -y policycoreutils-devel if [ -f /lib/systemd/system/mariadb.service ]; then systemctl stop mariadb mv /lib/systemd/system/{mariadb,mysqld}.service systemctl enable mysqld systemctl start mysqld fi
Note that once we've release offical support this renaming of the mariadb script will have to be undone.
[root]# yum install squirro-cluster-node-users [root]# yum install squirro-cluster-node
If the Storage and Cluster node are not the same physical machine, then you need now to adjust the file /etc/nginx/conf.d/upstream-elastic.inc to point to the IP or Hostnames of the storage node(s).
Examples:
Single Server both roles | Dedicated Storage Node | Multiple Storage Nodes |
---|---|---|
upstream elastic { server 127.0.0.1:9200; keepalive 32; } | upstream elastic { server 192.168.0.20:9200; keepalive 32; } | upstream elastic { server 192.168.0.20:9200; server 192.168.0.21:9200; server 192.168.0.22:9200; keepalive 32; } |
If changes have been made to this file, reload the nginx configuration
service nginx reload
Finally start the Squirro Services
RHEL6 /Centos6 | RHEL7/CentOS7 |
---|---|
[root]# service monit start [root]# monit -g all-manual start | echo "Starting Squirro services" cd /lib/systemd/system for service in $(ls sq*d.service); do echo "Starting $service" systemctl restart $service done At the time of writing monit is not yet part of our RHEL7/CentOS packages. |