From c190deb0eb41786d40d85c998b80cceacc2da32f Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 24 May 2015 14:13:56 -0700 Subject: [PATCH] moving documentation to the repository --- doc/install-docker.md | 4 ++-- doc/install-source.md | 6 ++--- doc/setup-bitbucket.md | 29 ++++++++++++++++++++++- doc/setup-database.md | 36 ++++++++++++++++++++++++++++- doc/setup-github.md | 50 +++++++++++++++++++++++++++++++++++++++- doc/setup-gitlab.md | 52 +++++++++++++++++++++++++++++++++++++++++- 6 files changed, 167 insertions(+), 10 deletions(-) diff --git a/doc/install-docker.md b/doc/install-docker.md index 0abe45d5..97146c94 100644 --- a/doc/install-docker.md +++ b/doc/install-docker.md @@ -10,7 +10,7 @@ An example command to run your Drone instance with GitHub enabled: sudo docker run -d \ -v /var/lib/drone:/var/lib/drone \ -e DRONE_GITHUB_CLIENT=c0aaff74c060ff4a950d \ - -e DRONE_GITHUB_SECRET=1ac1eae5ff1b490892f5546f837f306265032412 \ + -e DRONE_GITHUB_SECRET=1ac1eae5ff1b490892f5 \ -p 80:80 --name=drone drone/drone ``` @@ -31,6 +31,6 @@ When running Drone inside Docker we recommend using environment variables to con ```bash sudo docker run \ -e DRONE_GITHUB_CLIENT=c0aaff74c060ff4a950d \ - -e DRONE_GITHUB_SECRET=1ac1eae5ff1b490892f5546f837f306265032412 \ + -e DRONE_GITHUB_SECRET=1ac1eae5ff1b490892f5 \ --name=drone drone/drone ``` diff --git a/doc/install-source.md b/doc/install-source.md index 1b6a8517..1da0b9a1 100644 --- a/doc/install-source.md +++ b/doc/install-source.md @@ -8,7 +8,7 @@ This document provides a brief overview of Drone's build process, so that you ca ### Build and Test -We use `make` to build and package Drone. You can execute the following commands to build compile Drone locally: +We use `make` to build and package Drone. You can execute the following commands to compile the Drone binary: ```bash make deps @@ -18,9 +18,7 @@ make test The `all` directive compiles binary files to the `bin/` directory and embeds all static content (ie html, javascript, css files) directly into the binary for simplified distribution. -The `test` directive runs the `go vet` tool for simple linting and executes the suite of unit tests. - -**NOTE** if you experience slow compile times you can `go install` the `go-sqlite3` library from the vendored dependencies. This will prevent Drone from re-compiling on every build: +Note: if you experience slow compile times you can `go install` the `go-sqlite3` library from the vendored dependencies. This will prevent Drone from re-compiling on every build: ```bash go install github.com/drone/drone/Godeps/_workspace/src/github.com/mattn/go-sqlite3 diff --git a/doc/setup-bitbucket.md b/doc/setup-bitbucket.md index df13b856..e6b6e289 100644 --- a/doc/setup-bitbucket.md +++ b/doc/setup-bitbucket.md @@ -1 +1,28 @@ -setup-bitbucket.md \ No newline at end of file +You may configure Drone to integrate with Bitbucket. This can be configured in the `/etc/drone/drone.toml` configuration file: + +```ini +[bitbucket] +client = "c0aaff74c060ff4a950d" +secret = "1ac1eae5ff1b490892f5546f837f306265032412" +open = false +``` + +Please note this has security implications. This setting should only be enabled if you are running Drone behind a firewall. + +### Environment Variables + +You may also configure Bitbucket using environment variables. This is useful when running Drone inside Docker containers, for example. + +```bash +DRONE_BITBUCKET_CLIENT="c0aaff74c060ff4a950d" +DRONE_BITBUCKET_SECRET="1ac1eae5ff1b490892f5546f837f306265032412" +``` + +### User Registration + +User registration is closed by default and new accounts must be provisioned in the user interface. You may allow users to self-register with the following configuration flag: + +```ini +[bitbucket] +open = true +``` \ No newline at end of file diff --git a/doc/setup-database.md b/doc/setup-database.md index adeab537..6a64f6a4 100644 --- a/doc/setup-database.md +++ b/doc/setup-database.md @@ -1 +1,35 @@ -setup-database.md \ No newline at end of file +SQLite is the default database driver. Drone will automatically create a database file at `/var/lib/drone/drone.sqlite` and will handle database schema setup and migration. You can further customize the database driver and configuration in the `drone.toml` file: + +```ini +[database] +driver = "sqlite3" +datasource = "/var/lib/drone/drone.sqlite" +``` + +You may also configure the database using environment variables: + +```bash +DRONE_DATABASE_DRIVER="sqlite3" +DRONE_DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite" +``` + +### Postgres + +You may alternatively configure Drone to use a Postgres database: + +```ini +[database] +driver = "postgres" +datasource = "host=127.0.0.1 user=postgres dbname=drone sslmode=disable" +``` + +For more details about how to configure the datasource string please see the official driver documentation: + +http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING + + +### MySQL + +Drone does not include support for MySQL at this time. We hope to include support for MySQL in the future, once the following issue is resolved: + +https://github.com/go-sql-driver/mysql/issues/257 \ No newline at end of file diff --git a/doc/setup-github.md b/doc/setup-github.md index 455e3acf..403de810 100644 --- a/doc/setup-github.md +++ b/doc/setup-github.md @@ -1 +1,49 @@ -github.md \ No newline at end of file +You may configure Drone to integrate with GitHub or GitHub enterprise. This can be configured in the `/etc/drone/drone.toml` configuration file: + +```ini +[github] +client = "c0aaff74c060ff4a950d" +secret = "1ac1eae5ff1b490892f5546f837f306265032412" +``` + +### Environment Variables + +You may also configure GitHub using environment variables. This is useful when running Drone inside Docker containers, for example. + +```bash +DRONE_GITHUB_CLIENT="c0aaff74c060ff4a950d" +DRONE_GITHUB_SECRET="1ac1eae5ff1b490892f5546f837f306265032412" +``` + +### Github Enterprise + +You may also configure Drone to integrate with GitHub Enterprise. Note that if you are running GitHub Enterprise in private mode you should set `private_mode=true`, forcing Drone to clone public repositories with git+ssh. + +```ini +[github_enterprise] +url = "https://github.drone.io" +api = "https://github.drone.io/api/v3/" +client = "c0aaff74c060ff4a950d" +secret = "1ac1eae5ff1b490892f5546f837f306265032412" +private_mode = false +``` + +### User Registration + +User registration is closed by default and new accounts must be provisioned in the user interface. You may allow users to self-register with the following configuration flag: + +```ini +[github] +open = true +``` + +Please note this has security implications. This setting should only be enabled if you are running Drone behind a firewall. + +### Organization Whitelists + +When specified, only users belonging to these organization may login to the system. Use this option to enable self-registration while still limiting access to the general public. + +```ini +[github] +orgs = [ "drone", "docker" ] +``` diff --git a/doc/setup-gitlab.md b/doc/setup-gitlab.md index ef13714c..4576f39b 100644 --- a/doc/setup-gitlab.md +++ b/doc/setup-gitlab.md @@ -1 +1,51 @@ -setup-gitlab.md \ No newline at end of file +You may configure Drone to integrate with GitLab (version 7.9 or higher). This can be configured in the `/etc/drone/drone.toml` configuration file: + +```ini +[gitlab] +url = "https://gitlab.com" +client = "c0aaff74c060ff4a950d" +secret = "1ac1eae5ff1b490892f5546f837f306265032412" +skip_verify=false +open=false +``` + +Or a custom installation: + +```ini +[gitlab] +url = "http://gitlab.drone.io" +client = "c0aaff74c060ff4a950d" +secret = "1ac1eae5ff1b490892f5546f837f306265032412" +skip_verify=false +open=false +``` + +### Environment Variables + +You may also configure Gitlab using environment variables. This is useful when running Drone inside Docker containers, for example. + +```bash +DRONE_GITLAB_URL="https://gitlab.com" +DRONE_GITLAB_CLIENT="c0aaff74c060ff4a950d" +DRONE_GITLAB_SECRET="1ac1eae5ff1b490892f5546f837f306265032412" +``` + +### User Registration + +User registration is closed by default and new accounts must be provisioned in the user interface. You may allow users to self-register with the following configuration flag: + +```ini +[gitlab] +open = true +``` + +Please note this has security implications. This setting should only be enabled if you are running Drone behind a firewall. + +### Self-Signed Certs + +If your Gitlab installation uses a self-signed certificate you may need to instruct Drone to skip TLS verification. This is not recommended, but if you have no other choice you can include the following: + +```ini +[gitlab] +skip_verify=true +``` \ No newline at end of file