First, read this post: http://jipiboily.com/2014/from-zero-to-fully-working-ci-server-in-less-than-10-minutes-with-drone-docker
To use the custom service (as I did with elasticsearch) you have to install drone from source using my fork (https://github.com/xpepper/drone) which BTW merges the work done by @yosssi (yosssi/custom-services).
So prepare to install Go 1.2: use godeb if you want an easy way to do that, or follow this guide.
Than add these two lines in your .profile
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
To install Drone from source, follow their guide: http://drone.readthedocs.org/en/latest/install.html#from-source.
Remember though, the cloned repo should be https://github.com/xpepper/drone and it should be put under go/src/github.com/drone
so that the make
command can succeeed.
Executing make install
will install drone in
/usr/local/bin
/etc/init/drone.conf
/etc/defaults/drone
While make dpkg
will build the .deb package.
groupadd docker
useradd --system -d /var/lib/drone -s /bin/false -G docker drone
- restart docker with
service docker restart
- add these lines in
/etc/init.drone.conf
(under"console log"
)
setuid drone
setgid drone
To run Drone easily, we symlinked the two binaries (drone and droned)
ln -s $GOPATH/src/github.com/drone/drone/bin/drone $GOPATH/bin/
ln -s $GOPATH/src/github.com/drone/drone/bin/droned $GOPATH/bin/
To start Drone, we use the start-droned.sh
script listed below.
To configure Drone to send email using a Gmail account, fill the Settings
section with there values
- SMTP Server:
smtp.gmail.com
- SMTP Port:
587
- SMTP From Address:
<my_account>@gmail.com
- SMTP Username and Password:
<my_account>@gmail.com
/<my_password>
Then follow this link to allow Drone to send mail: https://accounts.google.com/b/0/DisplayUnlockCaptcha
Logs are under /var/log/upstart/drone.log
and /var/log/upstart/docker.log
.