2015-04-06 23:10:45 +00:00
|
|
|
[![Stories in Ready](https://badge.waffle.io/drone/drone.png?label=ready&title=Ready)](https://waffle.io/drone/drone)
|
2015-01-10 06:22:03 +00:00
|
|
|
[![Build Status](http://test.drone.io/api/badge/github.com/drone/drone/status.svg?style=flat)](http://test.drone.io/github.com/drone/drone)
|
|
|
|
[![GoDoc](https://godoc.org/github.com/drone/drone?status.svg)](https://godoc.org/github.com/drone/drone)
|
2014-10-12 00:50:52 +00:00
|
|
|
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/drone/drone?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
2014-07-14 02:53:59 +00:00
|
|
|
|
2014-11-10 08:24:47 +00:00
|
|
|
## Documentation
|
|
|
|
|
|
|
|
* [Installation](http://readme.drone.io/setup/install/ubuntu/)
|
|
|
|
* [User Guide](http://readme.drone.io/usage/overview/)
|
|
|
|
* [API Reference](http://readme.drone.io/api/overview/)
|
|
|
|
|
2014-08-02 18:21:39 +00:00
|
|
|
## System Requirements
|
2014-02-13 22:43:02 +00:00
|
|
|
|
2014-08-02 18:21:39 +00:00
|
|
|
* Docker
|
|
|
|
* AUFS
|
|
|
|
|
2014-10-16 20:16:22 +00:00
|
|
|
|
2014-08-02 18:21:39 +00:00
|
|
|
We highly recommend running Docker with the AUFS storage driver. You can verify Docker is using
|
|
|
|
the AUFS storage driver with the following command `sudo docker info | grep Driver:`
|
|
|
|
|
2014-10-14 04:37:59 +00:00
|
|
|
## Upgrading
|
|
|
|
|
|
|
|
If you are upgrading from `0.2` I would recommend waiting a few weeks for the master
|
2014-10-15 04:41:48 +00:00
|
|
|
branch to stabilize. There was a huge amount of refactoring that destabilized the codebase
|
2014-10-14 04:37:59 +00:00
|
|
|
and I'd hate for that to impact any real world installations.
|
|
|
|
|
2014-10-14 14:48:13 +00:00
|
|
|
If you still want to upgrade to `0.2` please know that the databases are not compatible and
|
|
|
|
there is no automated migration due to some fundamental structural changes. You will need
|
|
|
|
to start with a fresh instance.
|
|
|
|
|
2014-08-02 18:21:39 +00:00
|
|
|
## Installation
|
|
|
|
|
2014-10-11 23:56:03 +00:00
|
|
|
**This is project is alpha stage. Consider yourself warned**
|
|
|
|
|
|
|
|
We have optimized the installation process for Ubuntu since that is what we test with internally.
|
|
|
|
You can run the following commands to quickly download an install Drone on an Ubuntu machine.
|
2014-08-02 18:21:39 +00:00
|
|
|
|
|
|
|
```sh
|
2014-10-12 16:22:51 +00:00
|
|
|
# Ubuntu, Debian
|
2014-10-11 23:56:03 +00:00
|
|
|
wget downloads.drone.io/master/drone.deb
|
2014-08-02 18:21:39 +00:00
|
|
|
sudo dpkg -i drone.deb
|
2014-10-12 16:22:51 +00:00
|
|
|
|
|
|
|
# CentOS, RedHat
|
|
|
|
wget downloads.drone.io/master/drone.rpm
|
|
|
|
sudo yum localinstall drone.rpm
|
2014-08-02 18:21:39 +00:00
|
|
|
```
|
|
|
|
|
2014-10-01 18:58:27 +00:00
|
|
|
## Database
|
|
|
|
|
|
|
|
By default, Drone will create a SQLite database. Drone also supports Postgres and MySQL
|
|
|
|
databases. You can customize the database settings using the configuration options
|
|
|
|
described in the **Setup** section.
|
|
|
|
|
|
|
|
Below are some example configurations that you can use as reference:
|
|
|
|
|
2014-10-12 00:50:52 +00:00
|
|
|
```toml
|
2014-10-01 18:58:27 +00:00
|
|
|
# to use postgres
|
2014-10-11 23:34:53 +00:00
|
|
|
[database]
|
2014-10-01 18:58:27 +00:00
|
|
|
driver="postgres"
|
2014-10-11 23:56:03 +00:00
|
|
|
datasource="host=127.0.0.1 user=postgres dbname=drone sslmode=disable"
|
2014-10-01 18:58:27 +00:00
|
|
|
|
|
|
|
# to use mysql
|
2014-10-11 23:34:53 +00:00
|
|
|
[database]
|
2014-10-01 18:58:27 +00:00
|
|
|
driver="mysql"
|
2014-10-11 23:56:03 +00:00
|
|
|
datasource="root@tcp(127.0.0.1:3306)/drone"
|
2014-10-01 18:58:27 +00:00
|
|
|
```
|
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
## Setup
|
2014-08-02 18:21:39 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
We are in the process of moving configuration out of the UI and into configuration
|
|
|
|
files and/or environment variables (your choice which). If you prefer configuration files
|
|
|
|
you can provide Drone with the path to your configuration file:
|
2014-03-08 22:22:49 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
```sh
|
2014-10-11 23:56:03 +00:00
|
|
|
droned --config=/path/to/drone.toml
|
2014-09-03 07:23:36 +00:00
|
|
|
```
|
2014-08-02 18:21:39 +00:00
|
|
|
|
2014-10-11 23:56:03 +00:00
|
|
|
The configuration file is in TOML format. If installed using the `drone.deb` file
|
|
|
|
will be located in `/etc/drone/drone.toml`.
|
2014-09-03 07:23:36 +00:00
|
|
|
|
2015-02-19 18:20:14 +00:00
|
|
|
You can find the current config of the master branch [here](https://github.com/drone/drone/blob/master/packaging/root/etc/drone/drone.toml).
|
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
```toml
|
2014-09-05 03:53:32 +00:00
|
|
|
|
2014-10-11 21:30:51 +00:00
|
|
|
[server]
|
|
|
|
port=""
|
|
|
|
|
|
|
|
[server.ssl]
|
|
|
|
key=""
|
|
|
|
cert=""
|
|
|
|
|
2014-10-12 03:33:06 +00:00
|
|
|
[session]
|
|
|
|
secret=""
|
2014-10-19 02:13:44 +00:00
|
|
|
expires=""
|
2014-10-12 03:33:06 +00:00
|
|
|
|
2014-10-01 19:01:02 +00:00
|
|
|
[database]
|
2014-10-01 18:58:27 +00:00
|
|
|
driver=""
|
2014-10-11 23:34:53 +00:00
|
|
|
datasource=""
|
2014-10-01 18:58:27 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
[github]
|
|
|
|
client=""
|
|
|
|
secret=""
|
2015-01-15 14:39:44 +00:00
|
|
|
orgs=[]
|
2015-02-19 18:20:14 +00:00
|
|
|
open=false
|
2014-09-03 07:23:36 +00:00
|
|
|
|
|
|
|
[github_enterprise]
|
|
|
|
client=""
|
|
|
|
secret=""
|
|
|
|
api=""
|
|
|
|
url=""
|
2015-01-15 14:39:44 +00:00
|
|
|
orgs=[]
|
2014-09-07 18:26:16 +00:00
|
|
|
private_mode=false
|
2015-02-19 18:20:14 +00:00
|
|
|
open=false
|
2014-09-03 07:23:36 +00:00
|
|
|
|
|
|
|
[bitbucket]
|
|
|
|
client=""
|
|
|
|
secret=""
|
2015-02-19 18:20:14 +00:00
|
|
|
open=false
|
2014-09-03 07:23:36 +00:00
|
|
|
|
2014-09-04 03:48:13 +00:00
|
|
|
[gitlab]
|
|
|
|
url=""
|
2015-01-23 18:51:37 +00:00
|
|
|
client=""
|
|
|
|
secret=""
|
2014-11-26 22:21:52 +00:00
|
|
|
skip_verify=false
|
2015-02-19 18:20:14 +00:00
|
|
|
open=false
|
2014-09-04 03:48:13 +00:00
|
|
|
|
2015-01-12 02:16:48 +00:00
|
|
|
[gogs]
|
|
|
|
url=""
|
|
|
|
secret=""
|
2015-02-19 18:20:14 +00:00
|
|
|
open=false
|
2015-01-12 02:16:48 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
[smtp]
|
|
|
|
host=""
|
|
|
|
port=""
|
|
|
|
from=""
|
|
|
|
user=""
|
|
|
|
pass=""
|
2014-09-07 21:55:37 +00:00
|
|
|
|
2014-12-10 14:57:39 +00:00
|
|
|
[docker]
|
2014-10-23 06:23:05 +00:00
|
|
|
cert=""
|
|
|
|
key=""
|
2014-12-10 14:57:39 +00:00
|
|
|
|
|
|
|
[worker]
|
2014-09-07 21:55:37 +00:00
|
|
|
nodes=[
|
|
|
|
"unix:///var/run/docker.sock",
|
|
|
|
"unix:///var/run/docker.sock"
|
|
|
|
]
|
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
```
|
2014-08-02 18:21:39 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
Or you can use environment variables
|
2014-02-07 10:10:01 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
```sh
|
2014-09-07 18:26:16 +00:00
|
|
|
|
2014-10-14 02:33:42 +00:00
|
|
|
# custom http server settings
|
2014-10-11 21:30:51 +00:00
|
|
|
export DRONE_SERVER_PORT=""
|
|
|
|
export DRONE_SERVER_SSL_KEY=""
|
|
|
|
export DRONE_SERVER_SSL_CERT=""
|
|
|
|
|
2014-10-19 02:13:44 +00:00
|
|
|
# session settings
|
|
|
|
export DRONE_SESSION_SECRET=""
|
|
|
|
export DRONE_SESSION_EXPIRES=""
|
|
|
|
|
2014-10-01 18:58:27 +00:00
|
|
|
# custom database settings
|
2014-10-01 19:01:02 +00:00
|
|
|
export DRONE_DATABASE_DRIVER=""
|
2014-10-11 23:34:53 +00:00
|
|
|
export DRONE_DATABASE_DATASOURCE=""
|
2014-10-01 18:58:27 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
# github configuration
|
|
|
|
export DRONE_GITHUB_CLIENT=""
|
2014-09-04 03:48:13 +00:00
|
|
|
export DRONE_GITHUB_SECRET=""
|
2015-02-19 18:20:14 +00:00
|
|
|
export DRONE_GITHUB_OPEN=false
|
2014-09-03 07:23:36 +00:00
|
|
|
|
|
|
|
# github enterprise configuration
|
|
|
|
export DRONE_GITHUB_ENTERPRISE_CLIENT=""
|
|
|
|
export DRONE_GITHUB_ENTERPRISE_SECRET=""
|
|
|
|
export DRONE_GITHUB_ENTERPRISE_API=""
|
|
|
|
export DRONE_GITHUB_ENTERPRISE_URL=""
|
2014-09-07 18:26:16 +00:00
|
|
|
export DRONE_GITHUB_ENTERPRISE_PRIVATE_MODE=false
|
2015-02-19 18:20:14 +00:00
|
|
|
export DRONE_GITHUB_ENTERPRISE_OPEN=false
|
2014-09-03 07:23:36 +00:00
|
|
|
|
|
|
|
# bitbucket configuration
|
|
|
|
export DRONE_BITBUCKET_CLIENT=""
|
|
|
|
export DRONE_BITBUCKET_SECRET=""
|
2015-02-19 18:20:14 +00:00
|
|
|
export DRONE_BITBUCKET_OPEN=false
|
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
|
2014-09-04 03:48:13 +00:00
|
|
|
# gitlab configuration
|
|
|
|
export DRONE_GITLAB_URL=""
|
2015-01-23 18:51:37 +00:00
|
|
|
export DRONE_GITLAB_CLIENT=""
|
|
|
|
export DRONE_GITLAB_SECRET=""
|
2014-11-26 22:21:52 +00:00
|
|
|
export DRONE_GITLAB_SKIP_VERIFY=false
|
2015-02-19 18:20:14 +00:00
|
|
|
export DRONE_GITLAB_OPEN=false
|
2014-09-04 03:48:13 +00:00
|
|
|
|
2014-09-03 07:23:36 +00:00
|
|
|
# email configuration
|
|
|
|
export DRONE_SMTP_HOST=""
|
|
|
|
export DRONE_SMTP_PORT=""
|
|
|
|
export DRONE_SMTP_FROM=""
|
|
|
|
export DRONE_SMTP_USER=""
|
|
|
|
export DRONE_SMTP_PASS=""
|
2014-09-07 21:55:37 +00:00
|
|
|
|
|
|
|
# worker nodes
|
|
|
|
# these are optional. If not specified Drone will add
|
|
|
|
# two worker nodes that connect to $DOCKER_HOST
|
|
|
|
export DRONE_WORKER_NODES="tcp://0.0.0.0:2375,tcp://0.0.0.0:2375"
|
2014-09-03 07:23:36 +00:00
|
|
|
```
|
2014-08-02 18:22:49 +00:00
|
|
|
|
2014-09-04 03:48:13 +00:00
|
|
|
Or a combination of the two:
|
|
|
|
|
|
|
|
```sh
|
2014-10-11 23:56:03 +00:00
|
|
|
DRONE_GITLAB_URL="https://gitlab.com" droned --config=/path/to/drone.conf
|
2014-09-04 03:48:13 +00:00
|
|
|
```
|
|
|
|
|
2014-10-01 04:35:30 +00:00
|
|
|
## GitHub
|
|
|
|
|
|
|
|
In order to setup with GitHub you'll need to register your local Drone installation
|
|
|
|
with GitHub (or GitHub Enterprise). You can read more about registering an application here:
|
|
|
|
https://github.com/settings/applications/new
|
|
|
|
|
|
|
|
Below are example values when running Drone locally. If you are running Drone on a server
|
|
|
|
you should replace `localhost` with your server hostname or address.
|
|
|
|
|
|
|
|
Homepage URL:
|
2014-10-01 04:44:15 +00:00
|
|
|
|
|
|
|
```
|
2014-10-01 04:35:30 +00:00
|
|
|
http://localhost:8000/
|
2014-10-01 04:44:15 +00:00
|
|
|
```
|
2014-10-01 04:35:30 +00:00
|
|
|
|
|
|
|
Authorization callback URL:
|
2014-10-01 04:44:15 +00:00
|
|
|
|
|
|
|
```
|
2014-10-01 04:35:30 +00:00
|
|
|
http://localhost:8000/api/auth/github.com
|
2014-10-01 04:44:15 +00:00
|
|
|
```
|
2014-10-22 07:26:52 +00:00
|
|
|
|
|
|
|
## Build Configuration
|
|
|
|
|
|
|
|
You will need to include a `.drone.yml` file in the root of your repository in order to
|
|
|
|
configure a build. I'm still working on updated documentation, so in the meantime please refer
|
|
|
|
to the `0.2` README to learn more about the `.drone.yml` format:
|
|
|
|
|
2014-11-26 22:21:52 +00:00
|
|
|
https://github.com/drone/drone/blob/v0.2.1/README.md#builds
|