Installing and Configuring Kimchi

Discover the Kimchi project, a KVM management tool. Drive your hypervisor simply through an intuitive HTML5 interface accessible to everyone.

Jérémie KassianoffCybernetics team 3 min read
Certified inLPI Linux Essentials – Exam 010-150
Installing and Configuring Kimchi

Real-world use case

You want to manage your KVM hypervisor from a simple web interface: discover how to install and configure Kimchi.

The Kimchi project

Having a simple, accessible management tool for Kernel-based Virtual Machine (KVM) is possible with Kimchi. Developed in Python, installing the Kimchi project is accessible to everyone, and a few commands are enough to get a ready-to-use platform. Web browser access is ideal, the project is licensed under LGPL and was incubated by the larger oVirt project. Let's install and configure Kimchi on CentOS 7 together.

Table of contents

  1. The Kimchi project's modules
  2. Installing the Kimchi project (CentOS)
  3. Changing wok's listening port (nginx)
  4. Conclusion

The Kimchi project's modules

The project's main engine is Wok, a web framework based on Cherrypy. It can be extended with plugins that expose features via REST APIs:

  • Kimchi (virtualization management).
  • Ginger Base (basic host management).
  • Ginger (system administration).

Installing the Kimchi project (CentOS)

The Wok interface runs on a web server, here we add the nginx repository:

bash
nano /etc/yum.repos.d/nginx.repo

Let's add the following content:

ini
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1

Let's download the nginx package signing key:

bash
wget https://nginx.org/keys/nginx_signing.key

Let's install the nginx package signing key:

bash
rpm --import nginx_signing.key

Let's install the dependencies for wok and Kimchi:

bash
yum install nginx gcc make autoconf automake gettext-devel git rpm-build libxslt python-cherrypy python-cheetah PyPAM m2crypto python-jsonschema python-psutil python-ldap python-lxml openssl python-websockify logrotate

Let's download wok and Kimchi:

bash
wget https://github.com/kimchi-project/wok/releases/download/2.5.0/wok-2.5.0-0.el7.centos.noarch.rpm
wget https://github.com/kimchi-project/kimchi/releases/download/2.5.0/kimchi-2.5.0-0.el7.centos.noarch.rpm

Let's install wok and Kimchi:

bash
yum install wok-2.5.0-0.el7.centos.noarch.rpm kimchi-2.5.0-0.el7.centos.noarch.rpm

The management interface is now accessible from any interface (e.g.: 127.0.0.1:8001). It's also possible to make port 8001 accessible externally with CentOS's firewall:

bash
firewall-cmd --zone=public --add-port=8001/tcp --permanent

Or with UFW:

bash
ufw allow 8001/tcp

Or with iptables:

bash
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT

Installing the dependencies for ginger-base:

bash
yum install  hddtemp libuser-python python-augeas python-netaddr python-ethtool python-ipaddr python-magic tuned lm_sensors python2-crypto

Downloading ginger-base and ginger:

bash
wget http://kimchi-project.github.io/gingerbase/downloads/latest/ginger-base.el7.centos.noarch.rpm
wget http://kimchi-project.github.io/ginger/downloads/latest/ginger.el7.centos.noarch.rpm

Installing ginger-base and ginger:

bash
yum install ginger-base.el7.centos.noarch.rpm ginger.el7.centos.noarch.rpm

Changing wok's listening port in nginx

The wok interface runs on port 8001, here's how to change the listening port:
Let's edit the wok.conf configuration file in nginx:

bash
nano /etc/nginx/conf.d/wok.conf

Let's look for the following line:

nginx
listen 0.0.0.0:8001 ssl;

Let's replace the port with:

nginx
listen 0.0.0.0:443 ssl;

Next, we look for the line:

bash
proxy_redirect http://127.0.0.1:8010/ https://$host:8001/;

Let's replace the port like this:

bash
proxy_redirect http://127.0.0.1:8010/ https://$host:443/;

Let's now edit the wok.conf file in wok:

bash
nano /etc/wok/wok.conf

Let's uncomment proxy_port:

bash
#proxy_port = 8001

Let's change the value:

bash
proxy_port = 443

Let's restart the wokd and nginx services:

bash
service wokd restart
service nginx restart

The wok console is accessible from https://localhost, or if you've opened port 443: https://your\_ip.

Conclusion

Jérémie Kassianoff

Cybernetics team

View profile

Read next

Migrating to PostgreSQL with Veeam Backup & Replication
Linux

Migrating to PostgreSQL with Veeam Backup & Replication

Read the article
Migrating VMware ESXi to Proxmox VE
Linux

Migrating VMware ESXi to Proxmox VE

Read the article
Deploying Microsoft Defender ATP with Ansible
Linux

Deploying Microsoft Defender ATP with Ansible

Read the article