diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..50f4094 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.kitchen/ +.kitchen.local.yml +tmp/ +.librarian/ diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000..70d3ae9 --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,21 @@ +--- +driver: + name: vagrant + network: + - ["forwarded_port", {guest: 9000, host: 9000}] + +provisioner: + name: chef_solo + +platforms: + - name: ubuntu-12.04 + run_list: + - recipe[apt] + - name: centos-6.4 + run_list: + - recipe[yum] + +suites: + - name: default + run_list: + - recipe[sentry::instance] diff --git a/Cheffile b/Cheffile new file mode 100644 index 0000000..e9cccec --- /dev/null +++ b/Cheffile @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +#^syntax detection + +site 'http://community.opscode.com/api/v1' + +cookbook 'apt' +cookbook 'yum' +cookbook 'sentry', :path => '.' diff --git a/Cheffile.lock b/Cheffile.lock new file mode 100644 index 0000000..29d0f50 --- /dev/null +++ b/Cheffile.lock @@ -0,0 +1,21 @@ +SITE + remote: http://community.opscode.com/api/v1 + specs: + apt (2.3.0) + build-essential (1.4.2) + python (1.4.4) + build-essential (>= 0.0.0) + yum (>= 0.0.0) + yum (3.0.0) + +PATH + remote: . + specs: + sentry (0.1.5) + python (>= 0.0.0) + +DEPENDENCIES + apt (>= 0) + sentry (>= 0) + yum (>= 0) + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..9b571f2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +# A sample Gemfile +source "https://rubygems.org" + +gem "test-kitchen" +gem "kitchen-vagrant" +gem "librarian-chef" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..2ff9a99 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,98 @@ +GEM + remote: https://rubygems.org/ + specs: + archive-tar-minitar (0.5.2) + chef (11.8.2) + chef-zero (~> 1.6, >= 1.6.2) + diff-lcs (~> 1.2, >= 1.2.4) + erubis (~> 2.7) + highline (~> 1.6, >= 1.6.9) + json (>= 1.4.4, <= 1.7.7) + mime-types (~> 1.16) + mixlib-authentication (~> 1.3) + mixlib-cli (~> 1.3) + mixlib-config (~> 2.0) + mixlib-log (~> 1.3) + mixlib-shellout (~> 1.2) + net-ssh (~> 2.6) + net-ssh-multi (~> 1.1.0) + ohai (~> 6.0) + pry (~> 0.9) + puma (~> 1.6) + rest-client (>= 1.0.4, < 1.7.0) + yajl-ruby (~> 1.1) + chef-zero (1.7.2) + hashie (~> 2.0) + json + mixlib-log (~> 1.3) + moneta (< 0.7.0) + rack + coderay (1.1.0) + diff-lcs (1.2.5) + erubis (2.7.0) + hashie (2.0.5) + highline (1.6.20) + ipaddress (0.8.0) + json (1.7.7) + kitchen-vagrant (0.14.0) + test-kitchen (~> 1.0) + librarian (0.1.1) + highline + thor (~> 0.15) + librarian-chef (0.0.2) + archive-tar-minitar (>= 0.5.2) + chef (>= 0.10) + librarian (~> 0.1.0) + method_source (0.8.2) + mime-types (1.25.1) + mixlib-authentication (1.3.0) + mixlib-log + mixlib-cli (1.4.0) + mixlib-config (2.1.0) + mixlib-log (1.6.0) + mixlib-shellout (1.3.0) + moneta (0.6.0) + net-scp (1.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.7.0) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + net-ssh-multi (1.1) + net-ssh (>= 2.1.4) + net-ssh-gateway (>= 0.99.0) + ohai (6.20.0) + ipaddress + mixlib-cli + mixlib-config + mixlib-log + mixlib-shellout + systemu (~> 2.5.2) + yajl-ruby + pry (0.9.12.4) + coderay (~> 1.0) + method_source (~> 0.8) + slop (~> 3.4) + puma (1.6.3) + rack (~> 1.2) + rack (1.5.2) + rest-client (1.6.7) + mime-types (>= 1.16) + safe_yaml (0.9.7) + slop (3.4.7) + systemu (2.5.2) + test-kitchen (1.1.1) + mixlib-shellout (~> 1.2) + net-scp (~> 1.1) + net-ssh (~> 2.7) + safe_yaml (~> 0.9) + thor (~> 0.18) + thor (0.18.1) + yajl-ruby (1.1.0) + +PLATFORMS + ruby + +DEPENDENCIES + kitchen-vagrant + librarian-chef + test-kitchen diff --git a/definitions/sentry_conf.rb b/definitions/sentry_conf.rb index 266f686..fcd7582 100644 --- a/definitions/sentry_conf.rb +++ b/definitions/sentry_conf.rb @@ -27,8 +27,7 @@ class Chef::Recipe :settings => {} do Chef::Log.info("Making sentry config for: #{params[:name]}") - include_recipe "python::virtualenv" - include_recipe "python::pip" + include_recipe "python" include_recipe "sentry::default" virtualenv_dir = params[:virtualenv_dir] or node["sentry"]["virtulenv"] @@ -92,6 +91,8 @@ class Chef::Recipe end elsif db_options['ENGINE'] == 'django.db.backends.oracle' driver_name = 'cx_Oracle' + elsif db_options['ENGINE'] == 'django.db.backends.sqlite3' + # noop else raise "You need specify database ENGINE" end