All Projects → jmccann → chef-drone

jmccann / chef-drone

Licence: Apache-2.0 license
Chef cookbook for Drone

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to chef-drone

postgresql lwrp
Express 42 postgresql cookbook
Stars: ✭ 57 (+147.83%)
Mutual labels:  chef, cookbooks
cookbook-redmine
Chef's Cookbook for installing Redmine
Stars: ✭ 25 (+8.7%)
Mutual labels:  chef, cookbooks
chef-icinga2
Icinga 2 Chef Cookbook
Stars: ✭ 42 (+82.61%)
Mutual labels:  chef, cookbooks
Kitchen Dokken
Test Kitchen driver/provisioner for lightning faster Chef Infra cookbook testing with Docker
Stars: ✭ 172 (+647.83%)
Mutual labels:  chef
Libchef
🍀 c++ standalone header-only basic library. || c++头文件实现无第三方依赖基础库
Stars: ✭ 178 (+673.91%)
Mutual labels:  chef
Chef Bcpc
Bloomberg Clustered Private Cloud distribution
Stars: ✭ 205 (+791.3%)
Mutual labels:  chef
Windows
Development repository for Chef Cookbook windows
Stars: ✭ 251 (+991.3%)
Mutual labels:  chef
Knife Zero
Run chef-client/cinc-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.
Stars: ✭ 161 (+600%)
Mutual labels:  chef
Nodejs
Development repository for the nodejs cookbook
Stars: ✭ 225 (+878.26%)
Mutual labels:  chef
Knife Vsphere
Chef knife plug-in for VMware vSphere
Stars: ✭ 200 (+769.57%)
Mutual labels:  chef
Supermarket
Chef's community platform
Stars: ✭ 192 (+734.78%)
Mutual labels:  chef
Macos Cookbook
A Chef cookbook used to provision macOS
Stars: ✭ 183 (+695.65%)
Mutual labels:  chef
Kitchen Ec2
A Test Kitchen Driver for Amazon EC2
Stars: ✭ 211 (+817.39%)
Mutual labels:  chef
Chef Server
Cookbook to install standalone Chef Server
Stars: ✭ 173 (+652.17%)
Mutual labels:  chef
Arcgis Cookbook
Chef cookbooks for ArcGIS
Stars: ✭ 227 (+886.96%)
Mutual labels:  chef
Cassandra Chef Cookbook
Chef cookbook for Apache Cassandra, DataStax Enterprise (DSE) and DataStax agent
Stars: ✭ 162 (+604.35%)
Mutual labels:  chef
Oh My Vpn
Setup your own OpenVPN server in 30 seconds!
Stars: ✭ 220 (+856.52%)
Mutual labels:  chef
Consul
Development repository for the consul cookbook
Stars: ✭ 188 (+717.39%)
Mutual labels:  chef
Mcw Cloud Native Applications
MCW Cloud-native applications
Stars: ✭ 184 (+700%)
Mutual labels:  chef
Apt
Development repository for the apt cookbook
Stars: ✭ 201 (+773.91%)
Mutual labels:  chef

Drone Cookbook

Build Status

Installs Drone, a CI server built on Docker.

More information also @ http://docs.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::agent

Installs and sets up the drone agent. Assumes you have already setup and configured docker.

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

drone::server

Installs the drone server. Assumes you have already setup and configured docker.

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

drone::standalone_agent

Installs the drone agent. Also will install and configure docker with jmccann-docker-host cookbook.

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

drone::standalone_server

Installs the drone server. Also will install and configure docker with jmccann-docker-host cookbook.

Include recipe[drone::standalone_server] 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']['repo'] Docker repo to pull Drone Agent from String 'drone/agent'
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']['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 and exposes port 9000 by default. Array ['80:8000', '9000:9000']
node['drone']['server']['repo'] Docker repo to pull Drone Server from String 'drone/drone'
node['drone']['server']['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.8'

Configuration

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

For Drone ENV config settings see:

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

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
  1. Expose the certificates to the Drone container using node['drone']['server']['volumes']
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"
]
  1. Configure Drone to use the cert/key pair
node['drone']['config']['drone_server_cert'] = '/etc/ssl/certs/drone.pem'
node['drone']['config']['drone_server_key'] = '/etc/ssl/private/drone.key'
  1. Expose Drone service via host port 443
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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].