mist.io is an open platform for managing heterogeneous infrastructures
JavaScript Python HTML CSS Erlang Gherkin Shell
Latest commit ee67564 Sep 12, 2016 @mgogoulos mgogoulos buildout dependency
Permalink
Failed to load latest commit information.
docs renamed backend to cloud in filenames and content Nov 17, 2015
scripts ec2 images Mar 8, 2016
src/mist Merge pull request #709 from mistio/svg_logo_new Mar 17, 2016
templates add rabbitmq environment configuration Jul 7, 2014
.gitignore updated gitignore to ignore temp py.test dir Feb 22, 2016
.sprite_generator Give better folder names for sprites Jul 24, 2014
CHANGES.txt renamed backend to cloud in filenames and content Nov 17, 2015
Gruntfile.js remove scheduler code Mar 3, 2016
LICENSE Create LICENSE Feb 6, 2014
MANIFEST.in initial import Nov 7, 2011
README.rst Create .rst symlink of README.txt Jul 26, 2013
README.txt add docker installation section (#750) May 10, 2016
behave.ini added the behave.ini file for using the pdb with behave and did some … Sep 1, 2015
bootstrap.py warn and exit in case bootstrap is run as root Nov 4, 2015
bower.json get sockjs from cdn Dec 21, 2015
buildout.cfg Merge pull request #682 from mistio/pre_prod_tests Feb 10, 2016
cacert.pem fix certs issues in osx Jan 29, 2014
development.ini add npm, bower & grunt to the buildout Jul 15, 2015
haproxy.conf pin dependencies, remove uwsgi log-drain Sep 12, 2015
package.json fix yamls dependency Nov 30, 2015
requirements.txt buildout dependency Sep 12, 2016
serve.py Improve open sockjs channels debugging Dec 21, 2015
setup.cfg removed the nosetest part from setup.cfg because it's not used anymore Feb 25, 2016
setup.py Remove requires and fix hardcoded urls Sep 24, 2015
uwsgi.ini improve logging configuration Jul 16, 2014

README.rst

mist.io

Mist.io helps you manage and monitor your virtual machines, across different clouds, using any device that can access the web. It is provided under the GNU AGPL v3.0 License. Check out the freemium service at https://mist.io

Installation

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. Although we use 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 do:

sudo aptitude install gcc python-dev build-essential git erlang libpcre3-dev python-lxml python-virtualenv

In Red Hat based systems the following packages need to be installed:

sudo yum install git python-virtualenv python-dev erlang pcre python-lxml gcc libxml2 libxml2-python libxml2-devel python-zc-buildout

If you run the command erl after that and it is not found, then package erlang might be missing from the official repos so it needs to be installed manually:

sudo yum install wget -y
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo rpm -Uvh remi-release-7.rpm  epel-release-7-5.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

Supposing you have all the above, the steps are simple. 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/python bootstrap.py
./bin/buildout -v

If you plan to support KVM you should install libvirt library:

For Debian systems:

sudo aptitude install libvirt-bin libvirt-dev
./bin/pip install libvirt-python

While for Redhat based:

yum install libvirt-devel -y
./bin/pip install libvirt-python

For vSphere support, you should install pyvmomi library:

./bin/pip install pyvmomi

In case you are using an older version of setuptools, bootstrap will fail. To solve this you need to:

./bin/pip install setuptools --upgrade

If you are using Python 2.6 you'll have to install ipython version 1, otherwise buildout will fail:

./bin/pip install ipython==1

In MacOSX in case you are using Xcode 7 buildout will fail. To solve this you need to:

CFLAGS='-std=c99' ./bin/buildout -v

Deployment

Mist.io comes with supervisor in order to handle all the processes.

To get it up and running:

./bin/supervisord

For development you can tail the logs:

tail -f var/log/*.log

You can also monitor that all the processes are up and running:

./bin/supervisorctl status

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 you are ready to roll!

FAQ

I install mist.io and visit http://localhost:8000 but I don't see anything

make sure all services are running:

user@user:~/mist.io$ ./bin/supervisorctl status
celery                           RUNNING   pid 15169, uptime 0:00:02
haproxy                          RUNNING   pid 15165, uptime 0:00:02
hub-shell                        RUNNING   pid 15172, uptime 0:00:02
memcache                         RUNNING   pid 15170, uptime 0:00:02
rabbitmq                         RUNNING   pid 15168, uptime 0:00:02
sockjs                           RUNNING   pid 15166, uptime 0:00:02
uwsgi                            RUNNING   pid 15167, uptime 0:00:02

if you don't see a service as RUNNING then mist.io won't be able to start properly. Make sure that all dependencies have been added to the system before running the buildout, if not install them and re-run the buildout. Also have a look on the logs that are on var/log dir:

user@user:~/mist.io$ tail -f var/log/*.log

How to change mist.io listen address

By default mist.io binds on the localhost interface, if you want to change this behavior edit haproxy.conf and change the line:

frontend www localhost:8000

to:

frontend www 0.0.0.0:8000

then restart haproxy:

user@user:~/mist.io$ ./bin/supervisorctl restart haproxy

Make sure that no other service has already binded on port 8000. It should now load on http://your_ip:8000

If this does not load check if a local firewall policy denies incoming access to port 8000, or if your provider denies incoming access to port 8000 (eg the default ec2 policy for some regions)

Process rabbitmq is not running

First make sure that erlang is installed, otherwise it won't be able to start (on RedHat based OS you might have to install it manually, see the install section). On some Ubuntu systems there's an error that prevents rabbitmq from starting correctly, if that's the case for you try to start epmd manually and then restart rabbitmq:

user@user:~/mist.io$ ./bin/supervisorctl status rabbitmq
rabbitmq                         STARTING
user@user:~/mist.io$ epmd -daemon && ./bin/supervisorctl restart rabbitmq
user@user:~/mist.io$ ./bin/supervisorctl status rabbitmq
rabbitmq                         RUNNING   pid 18808, uptime 0:00:06

Do you have an official mist.io docker image?

Sure, find it on https://registry.hub.docker.com/u/mist/mistio/

With docker installed on your system, you just need to pull it and start a container:

root@client-monit:~$ docker pull mist/mistio
Pulling repository mist/mistio
...
...
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://104.236.188.180:8000/ and you should see the Mist.io UI.

You can find more info on http://docs.mist.io/article/39-installation

How to add authentication to mist.io dashboard

By default mist.io listens on port 8000 on the localhost interface. You can use nginx and expose this port to port 80 and add http basic authentication there, or you can expose port 8000 on external interfaces (see the seconds section on the FAQ for this) and add http basic authentication there. The last one can be achieved with editing haproxy.conf file and adding 4 lines, as it has been suggested by @paimpozhil here https://github.com/mistio/mist.io/pull/213/files. Make sure you restart haproxy after the edits:

user@user:~/mist.io$ ./bin/supervisorctl restart haproxy