Skip to content
This repository was archived by the owner on Nov 17, 2017. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ platforms:
run_list:
- recipe[apt]

- name: ubuntu-16.04
run_list:
- recipe[apt]

verifier:
name: inspec

suites:
- name: default
run_list:
- recipe[postgis::default]
verifier:
inspec_tests:
- test/smoke/default
attributes:
postgresql:
password:
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source 'https://rubygems.org'
gem 'berkshelf'
gem 'test-kitchen'
gem 'kitchen-vagrant'
gem 'kitchen-inspec'
gem 'busser-serverspec'

# Uncomment these lines if you want to live on the Edge:
Expand Down
291 changes: 207 additions & 84 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,111 +1,234 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
berkshelf (3.1.3)
addressable (~> 2.3.4)
berkshelf-api-client (~> 1.2)
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
faraday (~> 0.9.0)
minitar (~> 0.5.4)
octokit (~> 3.0)
retryable (~> 1.3.3)
ridley (~> 4.0)
solve (~> 1.1)
thor (~> 0.18)
berkshelf-api-client (1.2.0)
faraday (~> 0.9.0)
buff-config (1.0.0)
buff-extensions (~> 1.0)
varia_model (~> 0.4)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.1)
buff-ruby_engine (~> 0.1.0)
busser (0.6.0)
thor
busser-serverspec (0.2.6)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
artifactory (2.8.1)
berkshelf (5.6.4)
addressable (~> 2.3, >= 2.3.4)
berkshelf-api-client (>= 2.0.2, < 4.0)
buff-config (~> 2.0)
buff-extensions (~> 2.0)
buff-shell_out (~> 1.0)
cleanroom (~> 1.0)
faraday (~> 0.9)
httpclient (~> 2.7)
minitar (~> 0.5, >= 0.5.4)
mixlib-archive (~> 0.4)
octokit (~> 4.0)
retryable (~> 2.0)
ridley (~> 5.0)
solve (> 2.0, < 4.0)
thor (~> 0.19, < 0.19.2)
berkshelf-api-client (3.0.0)
faraday (~> 0.9)
httpclient (~> 2.7)
ridley (>= 4.5, < 6.0)
blankslate (2.1.2.4)
buff-config (2.0.0)
buff-extensions (~> 2.0)
varia_model (~> 0.6)
buff-extensions (2.0.0)
buff-ignore (1.2.0)
buff-ruby_engine (1.0.0)
buff-shell_out (1.1.0)
buff-ruby_engine (~> 1.0)
builder (3.2.3)
busser (0.7.1)
thor (<= 0.19.0)
busser-serverspec (0.5.10)
busser
celluloid (0.16.0.pre)
timers (~> 2.0.0)
celluloid-io (0.16.0.pre)
celluloid (>= 0.16.0.pre)
nio4r (>= 1.0.0)
dep-selector-libgecode (1.0.1)
dep_selector (1.0.3)
dep-selector-libgecode (~> 1.0)
ffi (~> 1.9)
rake
rspec-core
celluloid (0.16.0)
timers (~> 4.0.0)
celluloid-io (0.16.2)
celluloid (>= 0.16.0)
nio4r (>= 1.1.0)
chef-config (13.0.113)
addressable
fuzzyurl
mixlib-config (~> 2.0)
mixlib-shellout (~> 2.0)
cleanroom (1.0.0)
coderay (1.1.1)
diff-lcs (1.3)
docker-api (1.33.4)
excon (>= 0.38.0)
json
erubis (2.7.0)
faraday (0.9.0)
excon (0.55.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.3)
hashie (2.1.2)
hitimes (1.2.1)
json (1.8.1)
kitchen-vagrant (0.15.0)
test-kitchen (~> 1.0)
minitar (0.5.4)
mixlib-authentication (1.3.0)
ffi (1.9.18)
fuzzyurl (0.9.0)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (3.5.5)
hitimes (1.2.4)
httpclient (2.8.3)
inspec (1.19.2)
addressable (~> 2.4)
faraday (>= 0.9.0)
hashie (~> 3.4)
json (>= 1.8, < 3.0)
method_source (~> 0.8)
mixlib-log
parallel (~> 1.9)
pry (~> 0)
rainbow (~> 2)
rspec (~> 3)
rspec-its (~> 1.2)
rubyzip (~> 1.1)
sslshake (~> 1)
thor (~> 0.19)
toml (~> 0.1)
train (>= 0.22.0, < 1.0)
json (2.0.4)
kitchen-inspec (0.17.0)
hashie (~> 3.4)
inspec (>= 0.34.0, < 2.0.0)
test-kitchen (~> 1.6)
kitchen-vagrant (1.1.0)
test-kitchen (~> 1.4)
little-plugger (1.1.4)
logging (2.2.1)
little-plugger (~> 1.1)
multi_json (~> 1.10)
method_source (0.8.2)
minitar (0.6.1)
mixlib-archive (0.4.1)
mixlib-log
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
mixlib-authentication (1.4.1)
mixlib-log
mixlib-config (2.2.4)
mixlib-install (2.1.12)
artifactory
mixlib-shellout
mixlib-versioning
thor
mixlib-log (1.7.1)
mixlib-shellout (2.2.7)
mixlib-versioning (1.1.0)
molinillo (0.5.7)
multi_json (1.12.1)
multipart-post (2.0.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
nio4r (1.0.0)
octokit (3.1.2)
sawyer (~> 0.5.3)
retryable (1.3.5)
ridley (4.0.0)
net-ssh (4.1.0)
net-ssh-gateway (1.3.0)
net-ssh (>= 2.6.5)
nio4r (2.0.0)
nori (2.6.0)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
parallel (1.11.1)
parslet (1.5.0)
blankslate (~> 2.0)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (2.0.5)
rainbow (2.2.1)
rake (12.0.0)
retryable (2.0.4)
ridley (5.1.0)
addressable
buff-config (~> 1.0)
buff-extensions (~> 1.0)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.16.0.pre)
celluloid-io (~> 0.16.0.pre)
buff-config (~> 2.0)
buff-extensions (~> 2.0)
buff-ignore (~> 1.2)
buff-shell_out (~> 1.0)
celluloid (~> 0.16.0)
celluloid-io (~> 0.16.1)
chef-config (>= 12.5.0)
erubis
faraday (~> 0.9.0)
hashie (>= 2.0.2, < 3.0.0)
hashie (>= 2.0.2, < 4.0.0)
httpclient (~> 2.7)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
retryable
semverse (~> 1.1)
varia_model (~> 0.4)
safe_yaml (1.0.3)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
semverse (1.1.0)
solve (1.2.0)
dep_selector (~> 1.0)
semverse (~> 1.1)
test-kitchen (1.2.1)
mixlib-shellout (~> 1.2)
retryable (~> 2.0)
semverse (~> 2.0)
varia_model (~> 0.6)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubyntlm (0.6.1)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
semverse (2.0.0)
slop (3.6.0)
solve (3.1.0)
molinillo (>= 0.5)
semverse (>= 1.1, < 3.0)
sslshake (1.1.0)
test-kitchen (1.16.0)
mixlib-install (>= 1.2, < 3.0)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (~> 2.7)
net-ssh (>= 2.9, < 5.0)
net-ssh-gateway (~> 1.2)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
timers (2.0.0)
thor (~> 0.19, < 0.19.2)
thor (0.19.0)
timers (4.0.4)
hitimes
varia_model (0.4.0)
buff-extensions (~> 1.0)
hashie (>= 2.0.2, < 3.0.0)
toml (0.1.2)
parslet (~> 1.5.0)
train (0.23.0)
docker-api (~> 1.26)
json (>= 1.8, < 3.0)
mixlib-shellout (~> 2.0)
net-scp (~> 1.2)
net-ssh (>= 2.9, < 5.0)
winrm (~> 2.0)
winrm-fs (~> 1.0)
varia_model (0.6.0)
buff-extensions (~> 2.0)
hashie (>= 2.0.2, < 4.0.0)
winrm (2.2.1)
builder (>= 2.1.2)
erubis (~> 2.7)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0, >= 0.6.1)
winrm-fs (1.0.1)
erubis (~> 2.7)
logging (>= 1.6.1, < 3.0)
rubyzip (~> 1.1)
winrm (~> 2.0)

PLATFORMS
ruby

DEPENDENCIES
berkshelf
busser-serverspec
kitchen-inspec
kitchen-vagrant
test-kitchen

BUNDLED WITH
1.14.6
11 changes: 9 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@
when 'debian'
if node['platform'] == 'ubuntu' && node['platform_version'].to_f <= 12.04
default['postgis']['package'] = 'postgresql-9.1-postgis2'
else
default['postgis']['package'] = 'postgresql-9.3-postgis-2.1'
elsif node['platform'] == 'ubuntu' && node['platform_version'].to_f == 14.04
default['postgis']['package'] = "postgresql-#{node['postgresql']['version']}-postgis-2.1"
elsif node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 16.04
if node['postgresql']['enable_pgdg_apt'] == true
postgis_version = '2.3'
else
postgis_version = '2.2'
end
default['postgis']['package'] = "postgresql-#{node['postgresql']['version']}-postgis-#{postgis_version}"
end
end
4 changes: 4 additions & 0 deletions chefignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,7 @@ Vagrantfile
# Travis #
##########
.travis.yml

# Kitchen #
###########
.kitchen
8 changes: 6 additions & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@
end
end

package node['postgis']['package']

if node['postgis']['include_postgresql_cookbook']
include_recipe 'postgresql::server'
end

package node['postgis']['package']

if node['postgresql']['enable_pgdg_apt'] == true and node['platform_family'] == 'debian'
package "#{node['postgis']['package']}-scripts"
end

if node['postgis']['template_name']
include_recipe 'postgis::_init_database_template'
end
Loading