### Execute Squirro Installation Playbook Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Runs the Squirro Ansible playbook locally. This command initiates the installation process on the target server. ```bash ansible-playbook --connection=local --inventory 127.0.0.1, playbook-quickstart.yml ``` -------------------------------- ### Filesystem-Based Offline Squirro Installation Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples An Ansible playbook for offline Squirro installation using a shared filesystem for packages. This method avoids repeated unzipping and is faster for multiple installations. ```yaml - name: Offline Squirro hosts: all become: true vars: squirro_clusternode: True squirro_storagenode: True squirro_install_mode: filesystem yum_repo_folder: /path/to/offline/yum/repo squirro_channel: stable squirro_version: latest elasticsearch_discovery_type: single-node roles: - role: squirro-ansible ``` -------------------------------- ### Basic Squirro Installation Playbook Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples An Ansible playbook for a quick single-server Squirro installation. It configures Squirro as a cluster and storage node, sets up YUM credentials, and specifies the Squirro channel and version. ```yaml - name: Quickstart Install Squirro hosts: all become: true vars: squirro_clusternode: True squirro_storagenode: True yum_user: ... yum_password: ... squirro_channel: stable squirro_version: latest elasticsearch_discovery_type: single-node roles: - role: squirro-ansible ``` -------------------------------- ### Offline Squirro Installation Playbook Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples An Ansible playbook for installing Squirro in an offline environment. It requires a pre-downloaded tar.gz package and specifies the installation mode as 'offline'. ```yaml - name: Offline Squirro hosts: all become: true vars: squirro_clusternode: True squirro_storagenode: True squirro_install_mode: offline squirro_packages_tar: /path/to/os-n.n-stable-x86_64-n.n.n.tar.gz squirro_channel: stable squirro_version: latest elasticsearch_discovery_type: single-node roles: - role: squirro-ansible ``` -------------------------------- ### Quickstart Ansible Playbook for Squirro Installation Source: https://docs.squirro.com/en/latest/getting/install/ansible/index This Ansible playbook demonstrates a quick start for installing a single-node Squirro instance. It utilizes the squirro-ansible role and requires specifying user credentials for package management. ```yaml - name: Quickstart Install Squirro hosts: all become: true vars: squirro_clusternode: True squirro_storagenode: True yum_user: ... yum_password: ... squirro_channel: stable squirro_version: latest elasticsearch_discovery_type: single-node roles: - role: squirro-ansible ``` -------------------------------- ### Execute Ansible Playbook Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Command to execute the Ansible playbook for installing Squirro on AWS. This command uses a local connection and specifies the inventory file to run the playbook against. ```bash ansible-playbook --connection=local --inventory 127.0.0.1, playbook-quickstart-aws.yml ``` -------------------------------- ### Check Squirro Service Status Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Verifies if all Squirro services are running correctly after installation. This command helps in troubleshooting and confirming a successful deployment. ```bash squirro_status ``` -------------------------------- ### Install Squirro External Authentication Service Source: https://docs.squirro.com/en/latest/technical/admin/external-authentication/index This command installs the Squirro external authentication package using yum. After installation, the service needs to be started and enabled to run on boot. ```bash yum install squirro-python-squirro-extauth ``` -------------------------------- ### Unzip Squirro Ansible Module Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Extracts the Squirro Ansible module from a zip archive. Replace 'x.x.x' with the specific version number of the module. ```bash unzip squirro-ansible-x.x.x-release.zip ``` -------------------------------- ### Configure Firewall for Squirro Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Opens HTTP and HTTPS ports on the server's firewall to allow access to Squirro services. This ensures external connectivity to the installed Squirro instance. ```bash firewall-cmd --zone=public --permanent --add-service=http firewall-cmd --zone=public --permanent --add-service=https firewall-cmd --reload ``` -------------------------------- ### Install Ansible on RHEL/Rocky Linux Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples Installs Ansible on Red Hat Enterprise Linux or Rocky Linux systems using yum. This is a prerequisite for running Squirro Ansible playbooks. ```bash yum install -y epel-release yum install -y ansible ``` -------------------------------- ### Install Apache 2.4 for LDAP Integration Source: https://docs.squirro.com/en/latest/technical/admin/external-authentication/index Installs Apache 2.4 and necessary LDAP modules for external authentication. Starts the Apache service. This is a prerequisite for configuring Apache as a reverse proxy. ```bash yum install httpd24 httpd24-mod_ldap httpd24-mod_ssl /etc/init.d/httpd24-httpd start ``` -------------------------------- ### Copy Environment Example File Source: https://docs.squirro.com/en/latest/getting/install/aws-installation Copies the example environment file to a new file named .env. This new file will be modified to include 1Password secret references for Terraform authentication. ```bash cp .env.example .env ``` -------------------------------- ### Install Squirro Storage Node Components Source: https://docs.squirro.com/en/latest/getting/install/linux Installs the necessary packages for the Squirro storage node, including user setup, the storage node service, and Elasticsearch. This requires root privileges. ```bash sudo su yum install squirro-storage-node-users yum install elasticsearch yum install squirro-storage-node ``` -------------------------------- ### Start and Enable Squirro External Authentication Service Source: https://docs.squirro.com/en/latest/technical/admin/external-authentication/index These commands ensure the Squirro external authentication daemon (`sqextauthd`) is running and configured to start automatically on system boot. It also restarts the Nginx service. ```bash chkconfig sqextauthd on /etc/init.d/sqextauthd start service nginx rest ``` -------------------------------- ### Install Squirro Cluster Node Components Source: https://docs.squirro.com/en/latest/getting/install/linux Installs the Squirro cluster node packages, including user setup and the cluster node service. This requires root privileges. ```bash yum install squirro-cluster-node-users yum install squirro-cluster-node ``` -------------------------------- ### Instantiate SquirroClient Source: https://docs.squirro.com/en/latest/technical/api/squirro_client/squirroclient-class Demonstrates how to instantiate the SquirroClient with different authentication and configuration options. This includes providing client ID and secret, cluster endpoint, and retry configurations. ```python from squirro_client import SquirroClient client = SquirroClient('client_id', 'client_secret') client = SquirroClient(None, None, cluster='http://squirro.example.com') client = SquirroClient(None, None, cluster='http://squirro.example.com', retry_total=10) ``` -------------------------------- ### Squirro Filesystem Data Loader Command Example Source: https://docs.squirro.com/en/latest/technical/data-loading/reference An example of how to invoke the Squirro data loader for a filesystem source. This command demonstrates the use of essential parameters like token, cluster, project ID, source type, folder path, and various mapping options for file attributes. It also shows how to include a facets file. ```bash squirro_data_load -v \ --token $TOKEN \ --cluster $CLUSTER \ --project-id $PROJECT_ID \ --source-type filesystem \ --folder FOLDER_TO_INDEX \ --map-title "title" \ --map-file-name "file_name" \ --map-file-mime "file_mime" \ --map-file-data "file_data" \ --map-id "id" \ --map-url "link" \ --map-created-at "created_at" \ --facets-file facets.json ``` -------------------------------- ### SquirroClient Instantiation Source: https://docs.squirro.com/en/latest/technical/api/squirro_client/squirroclient-class This section covers the instantiation of the SquirroClient class, including required parameters and optional configurations for API access and request handling. ```APIDOC ## SquirroClient Instantiation ### Description Instantiate the SquirroClient to access the Squirro API. You can provide credentials directly or configure connection details and retry mechanisms. ### Method `__init__` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters * **client_id** (string) - Required - The client ID for accessing the API. * **client_secret** (string) - Required - The client secret for accessing the API. * **cluster** (string) - Optional - The cluster endpoint for accessing the API. * **user_api_url** (string) - Optional - Endpoint URL for the user API service. * **topic_api_url** (string) - Optional - Endpoint URL for the topic API service. * **genai_api_url** (string) - Optional - Endpoint URL for the GenAI API service. Defaults to `/service/genai` if not provided. * **tenant** (string) - Optional - Tenant domain. * **version** (string) - Optional - API version to use. Defaults to ‘v0’. * **requests** (object) - Optional - A requests instance for HTTP calls. * **retry_total** (integer) - Optional - Total number of retries to allow. Takes precedence over other counts. * **retry_connect** (integer) - Optional - How many connection-related errors to retry on. * **retry_read** (integer) - Optional - How many times to retry on read errors. * **retry_redirect** (integer) - Optional - How many redirects to perform. * **retry_method_whitelist** (set) - Optional - Set of uppercase HTTP method verbs that should be retried on. * **retry_status_forcelist** (set) - Optional - A set of integer HTTP status codes that should force a retry. * **retry_backoff_factor** (float) - Optional - A backoff factor to apply between attempts. * **timeout_secs** (integer) - Optional - How many seconds to wait for data before giving up. Defaults to 55. ### Request Example ```python from squirro_client import SquirroClient # Example 1: Basic instantiation client = SquirroClient('client_id', 'client_secret') # Example 2: Instantiation with cluster URL client = SquirroClient(None, None, cluster='http://squirro.example.com') # Example 3: Instantiation with cluster URL and retry configuration client = SquirroClient(None, None, cluster='http://squirro.example.com', retry_total=10) ``` ### Response #### Success Response (200) An instance of the SquirroClient class is returned upon successful instantiation. #### Response Example ```python # No direct response, but an object of type SquirroClient is created. ``` ``` -------------------------------- ### Start Squirro Services (RHEL) Source: https://docs.squirro.com/en/latest/getting/install/linux This snippet shows how to start Squirro services on RHEL systems using the squirro_start command. It also includes an optional command to start the cluster service if needed. ```bash source /etc/profile.d/squirro-aliases.sh squirro_restart ``` ```bash systemctl start sqclusterd ``` -------------------------------- ### Install cx_Oracle and Oracle Instant Client Source: https://docs.squirro.com/en/latest/technical/admin/operations/set-up-oracle-metadata Installs the cx_Oracle Python package and Oracle Instant Client on a Linux system. It downloads the necessary files, unzips them, and configures the system's library path. ```bash squirro_activate pip install cx_Oracle mkdir -p /opt/oracle cd /opt/oracle wget https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip unzip instantclient-basic-linux.x64-21.12.0.0.0dbru.zip rm -f instantclient-basic-linux.x64-21.12.0.0.0dbru.zip yum install libaio sh -c "echo /opt/oracle/instantclient_21_12 > /etc/ld.so.conf.d/oracle-instantclient.conf" ldconfig ``` -------------------------------- ### GET Community Response Examples Source: https://docs.squirro.com/en/latest/technical/communities/augmentation Examples of GET community responses, illustrating the structure before and after augmentation with data from an external API. ```APIDOC ## Example GET Responses ### Success Response (200) - Without Augmentation ```json { "id": "Abdrgjsdj09831Oda", "name": "Jon Snow", "created_at": "2022-05-19T14:44:37", "photo": "www.xyz.com", "facet_value": "rishu@squirro.com", "modified_at": "2022-05-19T14:44:40" } ``` ### Success Response (200) - With Augmentation ```json { "id": "Abdrgjsdj09831Oda", "name": "Jon Snow", "created_at": "2022-05-19T14:44:37", "photo": "www.xyz.com", "facet_value": "jon.snow@example.com", "modified_at": "2022-05-19T14:44:40", "properties": { "id": 10, "username": "theUser", "name": "Jon Snow", "photo": "www.xyz.com", "title": "Lord Commander of the Night's Watch", "phone": "12345", "social": [ { "url": "www.example.com", "name": "Microsoft teams" } ], "contact": { "profiles": [ { "name": "Intranet", "url": "https://intranet.example.com/" } ], "office": "OF123.61", "location": "Stuttgart", "extension": "1234", "email": "jon.snow@example.com" }, "roles": [ { "role": "JST Teamlead", "expertise": ["Project Lifecycle"], "language": ["EN"] } ], "projects": [ { "name": "XYZ", "url": "www.xyz.com" } ], "additional_info": "Jon Snow is a Business executive with... and organizational apps." } } ``` ``` -------------------------------- ### Run Basic KEE Test Source: https://docs.squirro.com/en/latest/technical/kee/how-cli Executes a basic test of the Squirro KEE using provided fixtures. This command provides a summary of correct, missed, and extra results. ```bash squirro_kee -v test ``` -------------------------------- ### Create Deployments Directory Source: https://docs.squirro.com/en/latest/technical/data-virtualization/index Creates the '/etc/squirro/genai.d/deployments' directory using sudo. This is a prerequisite for configuring the Data Virtualization add-on. ```bash sudo mkdir /etc/squirro/genai.d/deployments ``` -------------------------------- ### Ansible Playbook for Squirro on AWS Source: https://docs.squirro.com/en/latest/getting/install/ansible/quickstart-examples An Ansible playbook to install Squirro on AWS, configuring it to use managed services such as RDS for MariaDB/MySQL, ElastiCache for Key/Value Store and In-Memory Cache, and EFS for shared file systems. This playbook requires specific AWS resource endpoints and credentials to be filled in the variables section. ```yaml - name: Quickstart Install Squirro on AWS hosts: all become: true vars: squirro_clusternode: True squirro_storagenode: True yum_user: ... yum_password: ... squirro_channel: stable squirro_version: latest elasticsearch_squirro_cluster_name: squirro-quickstart elasticsearch_cluster_nodes: ['10.1.0.2', '10.1.0.3', '...'] elasticsearch_network_interface: eth0 remote_mysql_server: True mysql_host: yourproject-db.abcdefghij.eu-central-1.rds.amazonaws.com mysql_root_user: root mysql_root_password: ... mysql_shared_service_password: ... remote_redis_server: True redis_tls: True redis_storage_host: master.storage-abcdefgh.euc1.cache.amazonaws.com redis_storage_port: 6379 redis_storage_password: ... redis_cache_host: master.storage-abcdefgh.euc1.cache.amazonaws.com redis_cache_port: 6380 redis_cache_password: ... remote_filesystem: True remote_filesystem_path: /mnt/efs/squirro roles: - role: squirro-ansible ``` -------------------------------- ### Start Squirro Cluster Daemon Source: https://docs.squirro.com/en/latest/getting/install/cluster-expansion Starts the main Squirro cluster daemon (sqclusterd). This command should be executed after other necessary services have been started and verified. ```bash systemctl start sqclusterd ``` -------------------------------- ### Start Remaining Squirro Services Source: https://docs.squirro.com/en/latest/getting/install/cluster-expansion Starts all other Squirro-related services by iterating through systemd service files starting with 'sq'. This ensures all components of the Squirro cluster are operational. ```bash cd /usr/lib/systemd/system for service in $(ls sq*d.service); do echo "Starting $service"; systemctl start $service; done ``` -------------------------------- ### Data Load Flexibility with Squirro Data Load Source: https://docs.squirro.com/en/latest/getting/release/3-14/3.14.4-release-notes This command-line example illustrates using alternative URL options for data loading instead of the `--cluster` option. It supports specifying user, topic, or provider API URLs. ```bash squirro_data_load --user-api-url http://example.com/api/user --topic-api-url http://example.com/api/topic ``` -------------------------------- ### Install Squirro Zookeeper Library Source: https://docs.squirro.com/en/latest/getting/install/linux Installs the Squirro Zookeeper library required for multi-node cluster setups on RHEL-based systems using yum. ```bash yum install squirro-python38-squirro.lib.zookeeper ``` -------------------------------- ### Basic Data Load Command Help (CLI) Source: https://docs.squirro.com/en/latest/technical/data-loading/how-to/how-data-loader Executes the `squirro_data_load` command with the `--help` argument to display all available options and confirm correct installation. This is the initial step to verify the Data Loader is functional. ```bash squirro_data_load --help ``` -------------------------------- ### Example LDAP Search Query Source: https://docs.squirro.com/en/latest/technical/admin/external-authentication/index This command performs an LDAP search to retrieve information about the 'acme' domain. It's used here to demonstrate the structure of an example LDAP setup. ```bash $ ldapsearch -x -LLL -b dc=acme,dc=com dn: dc=acme,dc=com objectClass: dcObject objectClass: organization dc: acme o: acme dn: ou=Users,dc=acme,dc=com objectClass: organizationalUnit ou: Users dn: cn=Bob Jones,ou=Users,dc=acme,dc=com cn: Bob Jones sn: Jones objectClass: inetOrgPerson mail: bob@squirro.com uid: bob dn: cn=Engineering,ou=Users,dc=acme,dc=com cn: Engineering objectClass: groupOfNames member: cn=Bob Jones,ou=Users,dc=acme,dc=com ``` -------------------------------- ### Get Time Selection in Squirro Dashboard Source: https://docs.squirro.com/en/latest/technical/widgets/react/hooks Retrieves the start or end time from the current time selection in the dashboard. Requires a key argument specifying either 'start' or 'end'. ```javascript const startTime = store.getTime('start'); const endTime = store.getTime('end'); ``` -------------------------------- ### Squirro GenAI Platform Setup Directories and Permissions Source: https://docs.squirro.com/en/latest/technical/agents/developing-custom-tools These bash commands set up the necessary directories and assign ownership for Squirro GenAI plugins and deployment configurations. Correct permissions are crucial for the `sqgenaid` service to access and load these components. The commands create directories, set ownership to the `sqgenai` user and `squirro` group, and then restart the service. ```bash sudo mkdir -p /var/lib/squirro/genai/plugins sudo mkdir -p /etc/squirro/genai.d/deployments sudo chown -R sqgenai:squirro /var/lib/squirro/genai/plugins sudo chown -R sqgenai:squirro /etc/squirro/genai.d/deployments sudo systemctl restart sqgenaid ``` -------------------------------- ### Install Additional SpaCy Language Models Source: https://docs.squirro.com/en/latest/technical/data-processing/pipeline-steps/discover This command installs additional language models for SpaCy, which can be used by the NLP Tagger. Ensure you have Python and pip installed. The 'ja_core_news_sm' model is an example for Japanese. ```bash python -m spacy download ja_core_news_sm ``` -------------------------------- ### Create Squirro Backends Configuration Directory Source: https://docs.squirro.com/en/latest/getting/install/linux Creates the necessary directory for Squirro backend configuration files and initializes an empty backends.ini file. ```bash mkdir -p /etc/squirro touch /etc/squirro/backends.ini ``` -------------------------------- ### ItemUploader Configuration Example Source: https://docs.squirro.com/en/latest/technical/api/squirro_client/itemuploader Shows an example of how to configure the ItemUploader using a .ini file. This configuration specifies the project ID and user token, which can be loaded by the ItemUploader. ```ini [squirro] project_id = 2sic33jZTi-ifflvQAVcfw token = 9c2d1a9002a8a152395d74880528fbe4acadc5a1 ``` -------------------------------- ### Install Zookeeper Library for Squirro Source: https://docs.squirro.com/en/latest/getting/install/cluster-expansion Installs the necessary Zookeeper library package for Squirro cluster coordination using yum. This is a prerequisite for cluster functionality. ```bash yum install squirro-python-squirro.lib.zookeeper ``` -------------------------------- ### Monitor Squirro Installation Progress Source: https://docs.squirro.com/en/latest/getting/install/azure-installation This message indicates that the Squirro installation may take a significant amount of time. To monitor the progress, you can use the `tail -f` command on the specified log file (`/var/log/squirro/install-storage-node.log`) on the instance. This allows you to track the installation steps in real-time. ```text msg": "This can take a while. To monitor the progress, run 'tail -f /var/log/squirro/install-storage-node.log on the instance" ``` -------------------------------- ### Install Elasticsearch Maintenance Scripts Source: https://docs.squirro.com/en/latest/getting/install/elasticsearch-migration Installs the Squirro Elasticsearch maintenance package using yum. This package contains helper scripts for index migration. ```bash $ yum install squirro-elasticsearch-maintenance ``` -------------------------------- ### Set Default Terraform Version with tfenv Source: https://docs.squirro.com/en/latest/getting/install/azure-installation Sets a specific installed version of Terraform as the default for the current environment. After installing a new version, this command ensures that version is used when Terraform commands are executed. The example shows how to set version 1.12.2 as the default. ```bash tfenv use 1.12.2 ``` -------------------------------- ### Install SquirroClient using pip Source: https://docs.squirro.com/en/latest/technical/api/squirro_client/tutorial This command installs the SquirroClient package using pip. Ensure you have a Python environment set up before running this command. No specific inputs or outputs are associated with this installation command. ```bash pip install SquirroClient ``` -------------------------------- ### Install ldap3 Module for Squirro Source: https://docs.squirro.com/en/latest/technical/admin/external-authentication/index Installs the 'ldap3' Python module required by the Squirro external authentication plugin. This command assumes a Python 2.7 environment within a Squirro virtual environment. ```bash source /opt/rh/python27/enable source /opt/squirro/virtualenv/bin/activate pip install ldap3 ```