Mist.io is not only offered as SaaS but also as an open source software component for standalone installations, so that organizations and engineers can manage their infrastructure internally.
The open source component can connect to the Mist.io service for monitoring. Currently it is lacking some functionality offered by the SaaS, namely the logs section and the ability to create and run scripts.
The easiest way to install the open source component is through a docker image. If you're not familiar with docker, you may also install it through buildout.
In both cases the minimum spec for a Mist.io installation to perform well is 1G of RAM.
Installing Mist.io using the docker image
With docker installed on your system, you just need to install the Mist.io docker image ( https://registry.hub.docker.com/u/mist/mistio/)
root@client-monit:~$ docker pull mist/mistio Pulling repository mist/mistio fd5036edd05c: Download complete 83e4dde6b9cf: Download complete ...Status: Downloaded newer image for mist/mistio:latest root@client-monit:~$ docker run -d -p 8000:8000 mist/mistio 8da5cc47bca22a5d1da729c4b23382c90ae0aaec50bcc2d608e9bea783b5b8a3
The above commands, pulled the docker image, started it as a daemon, and exposed it to port 8000. You can now launch a browser on your ip:8000, eg http://184.108.40.206:8000/ and you should see the Mist.io UI.
If Mist.io is not there, you can check the logs to see what went wrong by running: docker logs -f ID, e.g.
root@client-monit:~# docker logs -f b883c6a75373
You can also access the container with bash by using docker exec -it ID /bin/bash
root@client-monit:~# docker exec -it b883c6a75373 /bin/bash root@b883c6a75373:/home/mist/mist.io# sudo su mist mist@b883c6a75373:/home/mist/mist.io$ free total used free shared buffers cached Mem: 4048280 3158128 890152 2020 66092 1965348 -/+ buffers/cache: 1126688 2921592 Swap: 0 0 0 mist@b883c6a75373:/home/mist/mist.io$ pwd /home/mist/mist.io mist@b883c6a75373:/home/mist/mist.io$ tail -f var/log/*.log mist@b883c6a75373:/home/mist/mist.io$ git pull Already up-to-date.
To get an updated image of Mist.io, you can docker pull the mistio image and start a new container.
root@client-monit:~$ docker pull mist/mistio
Installing Mist.io with buildout
Mist.io is written in Python. Currently it is tested and developed using Python 2.7. The only system wide requirements are Python, Python header files and some basic build tools. Git is used for revision control. Every other dependency is build automatically via zc.buildout. It is recommended to install Mist.io in a virtualenv to avoid conflicts with eggs in the system's Python.
To install the basic requirements in a Debian based distro you should run:
sudo aptitude install python-dev build-essential git erlang libpcre3-dev
If you wish to install it in a virtual environment you'll also need:
sudo aptitude install python-virtualenv
If you plan to support KVM via libvirt, you should also install the libvirt library:
sudo aptitude install libvirt-bin libvirt-dev ./bin/pip install libvirt-python
For vSphere support, you should also install pyvmomi library:
./bin/pip install pyvmomi
In Red Hat based systems the following packages need to be installed:
sudo yum install git python-virtualenv python-devel erlang pcre python-lxml gcc libxml2 libxml2-python libxml2-devel python-zc-buildout
More specifically for Centos 7 you will need the following packages to be installed:
sudo yum install python-devel build-essential git libpcre3-dev python-virtualenv git pcre python-lxml gcc libxml2 libxml2-python libxml2-devel libvirt-python wget python-zc-buildout -y
and then download and install manually erlang since it is missing from the system repositories
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm sudo rpm -Uvh remi-release-7.rpm epel-release-7-8.noarch.rpm sudo yum install erlang -y
For openSUSE distibution, you'll have to additionally install:
sudo zypper in python-gevent libevent-devel
In MacOSX you have to install Xcode and its command line tools. For virtualenv you simply run:
sudo easy_install virtualenv
Once you've installed the prerequisites, login as user, clone the repository, create a virtualenv and run buildout. This will fail if you run it as root or with sudo, so make sure you run it as user:
git clone https://github.com/mistio/mist.io.git cd mist.io virtualenv --no-site-packages . ./bin/pip install ansible ./bin/python bootstrap.py ./bin/buildout -v
If you are using an older version of setuptools, bootstrap might fail. To solve this you should:
./bin/pip install setuptools --upgrade
Finally, if you are using Python 2.6 you'll have to install ipython version 1, otherwise buildout will fail. To install it, run:
./bin/pip install ipython==1
To stay up to date with the latest mist.io you can use git pull to get the updates:
user@user:~/mist.io$ git branch * master user@user:~/mist.io$ git pull
You will need to restart the services to make sure changes are applied:
user@user:~/mist.io$ ./bin/supervisorctl restart all
If Mist.io misbehaves, new dependencies might have been added with the update. To get the dependenices you'll have to re-run buildout:
user@user:~/mist.io$ ./bin/buildout -vN
Mist.io comes with supervisor in order to handle all the processes.
To get it up and running:
To check what is going on under the hood, you can tail the logs:
tail -f var/log/*.log
To see which processes are up and running:
Finally, you can start, stop or restart a specific process:
./bin/supervisorctl restart uwsgi
Point your browser to http://127.0.0.1:8000 and Mist.io should be updated and ready.
If mist.io does not open on your browser, check that all services are started
user@user:~/mist.io$ ./bin/supervisorctl status celery RUNNING pid 29575, uptime 0:24:55 haproxy RUNNING pid 29562, uptime 0:24:57 memcache RUNNING pid 29624, uptime 0:24:55 rabbitmq RUNNING pid 29585, uptime 0:24:55 socketio RUNNING pid 29563, uptime 0:24:57 uwsgi RUNNING pid 29568, uptime 0:24:57
If any of the services have not started, have a look at the logs by running:
tail -f var/log/*.log
If you can't get supervisorctl running
user@user:~/mist.io$ ./bin/supervisorctl status http://localhost:9003 refused connection
make sure supervisord is started