Dear piler users,
a virtual machine is not the only way to try or deploy piler. Docker
may
be another way to go.
Docker is not a virtualization technique, rather it uses containers,
and the
technology is based on lxc (more or less).
To deploy the dockerized version of piler, download the docker
container I've
created based on the latest developer build:
Here's what you need.
Stage #1: prepare the host
---------------------------
- get a 64-bit Linux (any Linux for the matter)
- install docker (see http://www.docker.com/)
- install your choice of mysql (or mariadb or percona mysql) on the
host
- create a directory for piler data, eg. /data with lots of disk space
Stage #2: deploy piler
-----------------------
- get the docker build:
https://bitbucket.org/jsuto/piler/downloads/docker-896.tar.gz
# cat docker-896.tar.gz | docker import - piler:build_896
# docker run --name temp1 -ti -p 0.0.0.0:2222:22 -p 0.0.0.0:80:80 -p
0.0.0.0:25:25 \
-v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock \
-v /data:/var/piler -v /usr/local/etc:/usr/local/etc
piler:build_896 /bin/bash
(inside the container) execute: # docker-first-time-fix.sh
(outside the container, ie. on the host) execute: # docker commit
-m='fixes' temp1 piler:build_896
(inside the container) execute: # exit
# docker rm temp1
Stage #3:
----------
# docker run --name piler -d -p 0.0.0.0:2222:22 -p 0.0.0.0:80:80 -p
0.0.0.0:25:25 \
-v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock \
-v /data:/var/piler -v /usr/local/etc:/usr/local/etc
piler:build_896 /usr/local/bin/docker-start.sh
That's it! You have a working piler installation. But what exactly
happened here?
After installing or importing the container we started it, and mapped a
few network ports
and paths to the container. Notice the mysql socket, it may be
different if you use a distribution
other the Debian.
Then we performed an initial configuration, creating piler related
configs, and writing them to /usr/local/etc.
We also changed the root password within the container allowing you to
ssh into it on port 2222.
Finally we committed the changes to the piler docker image.
After running the command in stage #3 you have everything running
inside the container (piler, cron, nginx, searchd,
rsyslog, and sshd)
And when a new piler version comes out, upgrading it simple: just drop
the old container, and deploy the new one,
and just start it. All your data will be available since all persistent
data is written outside the container.
I encourage you to experiment with it, and share your experiences.
Janos