Setup KNIX on localhost, or a single remote host, or a cluster of hosts. Tested on the following operating systems on the target machines:
- Ubuntu 16.04, 18.04, 20.04
- Xubuntu 18.04, 20.04
- Debian 9
-
Install python.
sudo apt-get update sudo apt-get install python3 python3-dev python3-pip
-
Install dependencies required by ansible
# for python2 sudo pip install netaddr # for python3 sudo pip3 install netaddr # OR sudo apt install python-netaddr
-
Install ansible on host machine
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
-
You should be able to ssh into the target machines/VMs without a password. If not then run (on host machine):
# if not installed yet sudo apt-get install ssh ssh-keygen # you must ensure the target machine has ssh server installed already (see below) ssh-copy-id -i ~/.ssh/id_rsa your-username@your-target-hostname
Note that for a local installation, your public key should be put into ~/.ssh/authorized_keys
.
-
Ensure the ssh server is installed
sudo apt-get install ssh
-
The login user (in step 1) on the target machines should be added to the sudoer group
-
Appropriate proxies (/etc/profile, /etc/bash.bashrc, and /etc/apt/apt.conf) should be set on target machines
-
Appropriate packages should be installed on target machines:
sudo apt-get update sudo apt-get install python3 python3-dev python3-pip # install docker-ce #<https://docs.docker.com/install/linux/docker-ce/ubuntu/> #<https://docs.docker.com/install/linux/docker-ce/debian/> # activate sudo-less access to docker commands sudo usermod -a -G docker your-username #if you don't want to log out and in to activate the change to group newgrp docker # set docker proxies by updating `/etc/systemd/system/docker.service.d/http-proxy.conf` sudo apt-get install rustc
-
Ensure that the hostname of the target machine resolves to the correct IP.
-
Remove any old installation of KNIX
cd /opt/knix ./stop-all.sh ./purge-riak.sh cd .. sudo rm -rf knix
-
Create an
ansible.cfg
filemv ansible.cfg.sample ansible.cfg
-
Create an
inventory.cfg
mv inventory.cfg.sample inventory.cfg
-
For a localhost setup
./local_inventory.sh
-
For a remote host setup (single host or cluster)
vi inventory.cfg # For a single remote host installation, the hostname should be added to all groups. # For a cluster of hosts (preferably 3 or more), all host names must be added to [riak] group. # [nginx] and [elasticsearch] group should contain a single host. # At least one host should be in [management] and [triggers_frontend] group.
-
-
Update
settings.json
mfn_server_installation_folder
: folder where KNIX will be installedstart_at_boot
: whether KNIX services should be started at system start upriak_leveldb_maximum_memory
: total memory (in bytes) assigned to each Riak storage node's LevelDB backendnginx_http_listen_port
: http port the ngix server, serving the KNIX GUI, will listen onnginx_https_listen_port
: https port the ngix server, serving the KNIX GUI, will listen onmanagement_service_exposed_port
: http port management service of KNIX will listen on
-
Checks connectivity to target machines and collects & cache facts about the remote machines
ansible all -m setup
-
Run the installation script: (it will ask for SUDO password on the target machine)
make
-
Check *.log files for any errors
For Ubuntu installation, if riak fails to install via a missing libssl
dependency, check out this comment.
- After installation, open a browser and access
http://<nginx-hostname>:<nginx_http_listen_port>/
Note: If you find something wrong or missing, please consider opening an issue on GitHub and/or letting us know in our Slack workspace. Thank you!