Bumping Postgres version on Vagrant + CentOS + Chef + postgresql cookbook

Today I was trying to bump the Postgres on my Vagrant to 9.4. The cookbook I’m using: https://supermarket.chef.io/cookbooks/postgresql.

Thing is that the cookbook defines a recipe yum_pgdg_postgresql. So to configure everything just add attributes, here’s example from my cookbook attributes default.rb file:

First line is very important. Current version of cookbook postgresql provides up to 9.2 (source https://github.com/ngs/chef-postgresql/blob/master/attributes/default.rb#L200) version so we have to specify URL to fetch v9.4. As you can see it must specify all required data, postgresql version, os version and os technology used. All available versions for rpm are here http://yum.postgresql.org.

Second lines ensures that recipe yum_pgdg_postgresql will be included.

The last is obvious, version of postgresql to use.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *