Add initial kosmos-postgresql cookbook

This is to install PostgreSQL all in one place instead of for each
service that needs it (Mastodon, ejabberd, ...)
This commit is contained in:
Greg Karékinian 2019-01-09 18:26:50 +01:00
parent 1ef24a2091
commit 85b7278ccc
8 changed files with 186 additions and 0 deletions

View File

@ -0,0 +1,22 @@
.vagrant
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
# Bundler
Gemfile.lock
gems.locked
bin/*
.bundle/*
# test kitchen
.kitchen/
.kitchen.local.yml
# Chef
Berksfile.lock
.zero-knife.rb
Policyfile.lock.json

View File

@ -0,0 +1,4 @@
# frozen_string_literal: true
source 'https://supermarket.chef.io'
metadata

View File

@ -0,0 +1,11 @@
# kosmos-postgresql CHANGELOG
This file is used to list changes made in each version of the kosmos-postgresql cookbook.
# 0.1.0
Initial release.
- change 0
- change 1

View File

@ -0,0 +1,3 @@
Copyright 2019 Kosmos
All rights reserved, do not redistribute.

View File

@ -0,0 +1,4 @@
# kosmos-postgresql
TODO: Enter the cookbook description here.

View File

@ -0,0 +1,104 @@
# Put files/directories that should be ignored in this file when uploading
# to a chef-server or supermarket.
# Lines that start with '# ' are comments.
# OS generated files #
######################
.DS_Store
Icon?
nohup.out
ehthumbs.db
Thumbs.db
# SASS #
########
.sass-cache
# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
*.bak
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log
## COMPILED ##
##############
a.out
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/
# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
examples/*
Guardfile
Procfile
.kitchen*
kitchen.yml*
.rubocop.yml
spec/*
Rakefile
.travis.yml
.foodcritic
.codeclimate.yml
# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.svn
*/.bzr/*
*/.hg/*
*/.svn/*
# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp
# Bundler #
###########
vendor/*
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Cookbooks #
#############
CONTRIBUTING*
CHANGELOG*
TESTING*
# Vagrant #
###########
.vagrant
Vagrantfile

View File

@ -0,0 +1,22 @@
name 'kosmos-postgresql'
maintainer 'Kosmos'
maintainer_email 'ops@5apps.com'
license 'All Rights Reserved'
description 'Installs/Configures kosmos-postgresql'
long_description 'Installs/Configures kosmos-postgresql'
version '0.1.0'
chef_version '>= 12.14' if respond_to?(:chef_version)
# The `issues_url` points to the location where issues for this cookbook are
# tracked. A `View Issues` link will be displayed on this cookbook's page when
# uploaded to a Supermarket.
#
# issues_url 'https://github.com/<insert_org_here>/kosmos-postgresql/issues'
# The `source_url` points to the development repository for this cookbook. A
# `View Source` link will be displayed on this cookbook's page when uploaded to
# a Supermarket.
#
# source_url 'https://github.com/<insert_org_here>/kosmos-postgresql'
depends "postgresql", "= 6.1.1"

View File

@ -0,0 +1,16 @@
#
# Cookbook:: kosmos-postgresql
# Recipe:: default
#
# Copyright:: 2019, Kosmos, All Rights Reserved.
node.override['postgresql']['enable_pgdg_apt'] = false
# See https://github.com/sous-chefs/postgresql/issues/480
node.override['postgresql']['pg_gem']['version'] = '0.21.0'
include_recipe "postgresql::server"
include_recipe "postgresql::ruby"
unless node.chef_environment == "development"
node.override['postgresql']['config_pgtune']['db_type'] = "web"
include_recipe "postgresql::config_pgtune"
end