Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

drone (37) Versions 5.2.0

Installs/Configures Drone

Policyfile
Berkshelf
Knife
cookbook 'drone', '= 5.2.0', :supermarket
cookbook 'drone', '= 5.2.0'
knife supermarket install drone
knife supermarket download drone
README
Dependencies
Changelog
Quality 60%

Drone Cookbook

Build Status

Installs Drone, a CI server built on Docker.

More information also @ http://readme.drone.io.

Requirements

Chef

  • Chef 12+

Platforms

This cookbook is tested against:

  • Ubuntu 16.04
  • CentOS 7.x

...but it might work on other platforms.

Usage

Recipes

drone::default

Installs the drone server.

Include recipe[drone::default] in your run list.

drone::agent

Installs and sets up the drone agent.

Include recipe[drone::agent] in your run list.

Attributes

Attribute Description Type Default
node['drone']['agent']['config'] Hash of configuration envvars for Drone Agent Hash See Configuration section below.
node['drone']['agent']['network_mode'] What network mode to start Drone agent with. Default from Docker is bridge. String nil
node['drone']['agent']['vault']['items'] Array of vault items to load from bag for agents Array ['drone_secret']
node['drone']['agent']['volumes'] Volumes to mount to drone from host for agent Array ['/var/run/docker.sock:/var/run/docker.sock']
node['drone']['repo'] Docker repo to pull Drone from String 'drone/drone'
node['drone']['server']['config'] Hash of configuration envvars for Drone Server Hash See Configuration section below.
node['drone']['server']['network_mode'] What network mode to start Drone server with. Default from Docker is bridge. String nil
node['drone']['server']['port'] Docker port configuration for server. Binds container 8000 to host 80 by default. Integer 80:8000
node['drone']['agent']['vault']['items'] Array of vault items to load from bag for server Array ['database_config' 'drone_database_datasource' 'drone_github_client' 'drone_github_secret' 'drone_license' 'drone_secret']
node['drone']['server']['volumes'] Volumes to mount to drone from host for server Array ['/var/lib/drone:/var/lib/drone', '/var/run/docker.sock:/var/run/docker.sock']
node['drone']['vault']['bag'] Name of vault with secrets String 'vault_drone'. See Vault section below.
node['drone']['version'] Version of Drone String '0.5'

Configuration

Drone is configured by setting certain ENV variables in the agent/server containers.

For Drone ENV config settings see:
* http://readme.drone.io/admin/installation-reference/ - Drone 0.5
* http://docs.drone.io/installation/ - Drone 0.6

With this cookbook you can inject ENV variables to your Drone agent/server
containers by using node['drone']['agent']['config']
and node['drone']['server']['config']. The keys after config are the
ENV variable names and the value you set is the value to assign the
ENV variable.

You can find examples of this in use in the [.kitchen.yml](.kitchen.yml)

Secrets With Chef-Vault

This cookbook supports using secrets from chef-vault. The vault bag to use
is controlled by node['drone']['vault']['bag']. Vault items that are loaded
are controlled by the default['drone']['agent']['vault']['items']
and default['drone']['server']['vault']['items'] attributes.

HTTPS Config

Drone has the ability to terminate SSL connections. This cookbook doesn't do
this for you but supports being able to do it.

  1. Add your cert and private key to the host
  2. Expose the certificates to the Drone container using node['drone']['server']['volumes'] ruby node['drone']['server']['volumes'] = [ "/var/lib/drone:/var/lib/drone", "/var/run/docker.sock:/var/run/docker.sock", "/etc/ssl/certs/drone.pem:/etc/ssl/certs/drone.pem", "/etc/ssl/private/drone.key:/etc/ssl/private/drone.key" ]
  3. Configure Drone to use the cert/key pair ruby node['drone']['config']['drone_server_cert'] = '/etc/ssl/certs/drone.pem' node['drone']['config']['drone_server_key'] = '/etc/ssl/private/drone.key'
  4. Expose Drone service via host port 443 ruby node['drone']['server']['port'] = '443:8000'

Docker

See attributes/docker.rb for more options.

Testing

  • Linting - Rubocop and Foodcritic
  • Spec - ChefSpec
  • Integration - Test Kitchen

Testing requires ChefDK be installed using it's native gems.

gem install docker-api
foodcritic -f any -X spec .
rubocop
rspec --color --format progress

If you run into issues testing please first remove any additional gems you may
have installed into your ChefDK environment. Extra gems can be found and removed
at ~/.chefdk/gem.

Drone Cookbook Changelog

v5.2.0

  • Allow specifying bip for docker service

v5.1.1

  • Properly load defined storage driver by restarting Docker if currently not loaded

v5.1.0

  • Parameterize volumes for agent

v5.0.0

  • BREAKING: The behavior of node['drone']['server']['port'] has changed slightly. Before it was the host port to NAT to the container port. Now it is the port value to pass to docker_container('drone') directly.
  • Added ability to set network_mode for server and agent. Default will remain bridge.

v4.1.0

  • Attributize items to load from vault

v4.0.3

  • Allow using drone_database_config as a secret

v4.0.2

  • Allow using drone_database_config as a secret

v4.0.1

  • Remove chef_nginx and ssl_certificate cookbook dependencies.

v4.0.0

  • BREAKING: Remove support for Drone 0.4
  • BREAKING: Remove support for old platforms (Ubuntu 14.x, Centos 6.x)
    • This allows control docker version on RHEL platforms too now!
    • May actually still work on older platforms, just not testing for it anymore.
  • BREAKING: Remove support for reverse proxy
    • Can still [configure HTTPS](README.md#https-config)
  • BREAKING: Remove SSL cert generation for docker
  • BREAKING: Move node['drone']['config'] -> node['drone']['server']['config']
  • Install docker via packages

v3.6.1

  • Updates to work properly in Chef 13

v3.6.0

  • Allow specifying volumes to mount into Drone from host with node['drone']['server']['volumes']
  • Minor Breaking: specifying host port to bind Drone to with node['drone']['server']['port']
    • Decided to do this since 3.5.0 has been released for 30min now and this makes more sense and don't wanna major version bump. Sorry!

v3.5.0

  • Allow specifying host port to bind Drone to with node['drone']['port']

v3.4.0

  • Allow setting drone container to use with node['drone']['repo']. Default is drone/drone which is what was previously hardcoded.

v3.3.0

  • Allow setting node attributes node['drone']['repo_activation_org_whitelist'] to whitelist orgs for repo activation when node['drone']['disable_repo_activation'] is set to true

v3.2.0

  • Allow setting node attribute node['drone']['disable_repo_activation'] to disable ability to activate new repos

v3.1.3

v3.1.2

  • For newer version of Docker need to use new resource in docker cookbook for installing while specifying a version

v3.1.1

  • Fix reverse proxy for Drone 0.5

v3.1.0

  • Add ability to set docker daemon logging level

v3.0.2

  • Allow bypassing loading secrets on chef-vault failure (permissions)

v3.0.1

  • Fix allowing user to specify docker version

v3.0.0

  • BREAKING CHANGE (maybe): No longer pin version of docker to install by default. You still can do it if you want manually though.

v2.5.0

  • Support for CentOS 7.x

v2.4.0

  • Remove DEPRECATED drone token secrets management items
  • Added drone_secret support

v2.3.0

  • Allow drone_github_client to be in a Vault

v2.2.0

  • Attributize logging for Drone containers

v2.1.0

  • Allow specifying version of drone to use
  • Added drone::agent recipe for installing Drone 0.5 agent
  • Added ability to apply secrets drone_agent_secret, drone_token, drone_github_secret and database_config from vault

v2.0.0

  • BREAKING CHANGE: Move Drone app config items to node['drone']['config']
  • BREAKING CHANGE: Removed package install method as it's not supported
  • Added drone::reverse_proxy recipe to be able to front Drone with HTTPS via a reverse proxy
  • Added drone::worker recipe to be able to create additional systems to run drone builds on
  • Version bump on docker community cookbook
  • Make docker_container resource sensitive to prevent displaying secrets passed through ENV to drone

v1.0.0

  • BREAKING CHANGE: Use drone containers rather then installing drone package by default
  • Add ability to deploy drone using drone docker container

v0.7.7

  • Uses docker version from attributes (default 1.8.3)
  • Specify docker tls certs or use self-generated

v0.7.0

  • Deploy Drone v0.4.0 (a dev branch)
  • Add dronerc template
  • Add docker recipe to install docker from cookbook
  • Add update recipe to update docker images
  • For integrations generates docker self-signed certs

v0.6.0

  • Docker can now be disabled (Graham Weldon)
  • Fix registration option - moving to each VCS config (Graham Weldon)
  • Extend / improve README documentation

v0.5.0

  • Configure Drone with TOML (Graham Weldon)
  • Use new Drone package URL (Ke Zhu)

v0.4.0

  • Add Apache 2.0 license
  • Fix options being passed to droned (Ross Timson)
  • Numerous development/test improvements (Ross Timson)

v0.3.1

  • Settable drone_tmp (Eric Buth)

v0.2.0

  • Add ability to specify custom drone options (Brint O'Hearn)

v0.1.0

  • Initial Drone cookbook (Justin Campbell)

Collaborator Number Metric
            

5.2.0 passed this metric

Contributing File Metric
            

5.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

License Metric
            

5.2.0 passed this metric

Testing File Metric
            

5.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

5.2.0 passed this metric