Introduction
Ansible is a configuration management tool that facilitates the task of setting up and maintaining remote servers. It uses SSH and Python to communicate and execute commands on managed servers.
Ansible allows users to manage servers in two different ways: via ad hoc commands, and via playbooks. Playbooks are YAML files containing a list of ordered tasks that should be executed on remote servers to complete a task or reach a certain goal.
This document describes how to install and configure Denodo Solution Manager with Ansible playbooks on remote servers.
Prerequisites
- One Ansible Control Node: The Ansible control node is the machine we will use to connect to and control the remote servers over SSH.
- One or more Ansible Hosts: An Ansible host is any remote server that the Ansible control node is configured to automate the installation.
Ansible Preparation
Install Ansible on the control node
In this example, we are using Ubuntu 22.04.3 as the operating system of all the nodes. The first step is to refresh the system’s package with:
# sudo apt update |
And then install the Ansible software with:
# sudo apt install ansible |
The guide How to Install and Configure Ansible on Ubuntu 22.04 provides more details about how to set up Ansible.
Create an Ansible inventory file
The Ansible inventory contains information about all the remote servers that Ansible controls. We can edit the default inventory file created when Ansible is installed at /etc/ansible/hosts on the Ansible control node. The guide, How To Set Up Ansible Inventories explains in detail how to create an Ansible inventory file.
Once the information about the remote servers is added to the inventory file, the next step is to run the following command to check the inventory file.
In this example, there is one remote server called server1 in the servers group.
# ansible-inventory --list -y |
all: children: servers: hosts: server1: ansible_host: 192.168.31.128 ansible_python_interpreter: /usr/bin/python3 |
Testing connectivity to remote servers
To test if the connection from the control node to the remote servers over SSH works fine, we use the following command and make sure it returns Success for every remote server.
# ansible all -m ping |
server1 | SUCCESS => { "changed": false, "ping": "pong" } |
Solution Manager Installation
Download the Solution Manager Installer
Download the Solution Manager installer (denodo-install-solution manager-9.0-ga-linux64) from Denodo Support Site in the following path of the Ansible control node (/opt/denodo-install-solutionmanager-9.0-ga-linux64.zip).
Create the response file on the control node
To generate a response file to automate the installation, we follow the steps in our documentation, Unattended Installation of the Solution Manager. In this example, the response file will be generated in the path /opt/denodo-install-solutionmanager-9.0/response_file_9_0.xml on the Ansible control node.
Create the Ansible playbook file
Create an Ansible playbook containing a list of ordered tasks that will be executed on remote servers to install the Solution Manager. The details about specific tasks can be seen under the tasks label.
--- - hosts: all become: true name: Install Denodo Solution Manager tasks: - name: Copy and unzip the Solution Manager Installer to remote servers unarchive: src: /opt/denodo-install-solutionmanager-9.0-ga-linux64.zip dest: /opt/ - name: Copy the response file from control node to remote servers copy: src: /opt/denodo-install-solutionmanager-9.0/response_file_9_0.xml dest: /opt/denodo-install-solutionmanager-9.0/ - name: Change the permission shell: chmod +x /opt/denodo-install-solutionmanager-9.0/installer_cli.sh - name: Start the unattended installation shell: /opt/denodo-install-solutionmanager-9.0/installer_cli.sh install --autoinstaller response_file_9_0.xml register: ps # Print the shell task's stout - debug var=ps.stdout_lines |
Run the Ansible playbook
The next step is to run the Ansible denodo_playbook.yml from the control node with the ansible-playbook command to start the unattended installation on remote servers:
# ansible-playbook denodo_playbook.yml |
We will see the following page after the automated installation is done:
Conclusion
In this article, we have shown you an example of how to execute the Ansible playbook from the control node to install Denodo Solution Manager on remote servers. You can use similar steps to install the Denodo Platform or automate other Denodo configurations.
References
Solution Manager Installation Guide - Unattended Installation of the Solution Manager
How To Install and Configure Ansible on Ubuntu 22.04
How To Set Up Ansible Inventories
How to Write Ansible Playbooks
The information provided in the Denodo Knowledge Base is intended to assist our users in advanced uses of Denodo. Please note that the results from the application of processes and configurations detailed in these documents may vary depending on your specific environment. Use them at your own discretion.
For an official guide of supported features, please refer to the User Manuals. For questions on critical systems or complex environments we recommend you to contact your Denodo Customer Success Manager.