offline installation - mata-elang-stable/mataelang-platform GitHub Wiki
Prepare Ubuntu with the following packages.
- Python (3.8 or later)
- Ansible (2.13 or later)
- sshpass
Pip is easy way to install ansible ver2.13. The following code is an example of install ansible & sshpass. This offline installer doesn't work with older version of Ansible, and older one will be installed when you run apt install ansible
as of January 2023.
sudo apt update && sudo apt -y upgrade
sudo apt install python3-pip
export PATH=$PATH:$HOME/.local/bin
pip install ansible
sudo apt -y install sshpass
If you don’t have an install media yet, see this page.
Download GeoLite2-City.mmdb. For details about how to download GeoLite2, see this page.
Copy files to /home/USERNAME/me-ansible-playbook
from your offline installation media.
Copy GeoLite2-City.mmdb to me-ansible-playbook/files/GeoLite2-City.mmdb
.
Copy the me-ansible-playbook/inventory.example
to me-ansible-playbook/inventory
. This file defines the grouping for each hostname that going to installed with ansible automation. Edit ansible_ssh_user, ansible_ssh_password, ansible_become_password, IP addresses, sensor_network_interface and sensor_home_net.
This is an example for the inventory file.
- Sensor node
Username: username
Password: password
Network interface: ens5 172.16.3.110
Network interface2: ens6 172.16.4.110 (connected to defense center)
- Defense-Center node
Username: username
Password: password
Network interface: ens5, 172.16.4.111
- Inventory
[all:vars]
ansible_ssh_user=username
ansible_ssh_password=password
ansible_become_password=password
force=False
[mosquitto]
172.16.4.111
[kafka]
172.16.4.111
[hadoop]
172.16.4.111
[spark]
172.16.4.111
[opensearch]
172.16.4.111
[sensor]
172.16.4.110 sensor_id=sensor1 sensor_network_interface=ens5 sensor_home_net=172.16.3.0/24
You can reinstall all components by adding the force=True
at [all:vars]
section in the inventory file.
[all:vars]
ansible_ssh_user=username
ansible_ssh_password=password
ansible_become_password=password
force=True
Generate ssh-key on control node and copy public key. This command should be executed on the control node.
ssh-keygen
cat .ssh/id_rsa.pub
Paste public key to authorized_keys file on target nodes. This command should be executed on the target node.
mkdir ~/.ssh
nano ~/.ssh/authorized_keys
cd me-ansible-playbook
ansible-playbook -i inventory site.yaml
Please refer to our wiki for detail.
Please refer to our wiki for detail.
Please refer to our wiki for detail.
Reboot machine and start each component in the following order.