Вопрос

I have an instance in Engineyard and I want to install postgis.

I tried several things with chef but had no success at all.

Has anyone installed postgis on Engineyard successfully? and can you tell me how you did it?

Это было полезно?

Решение

I installed manually as sudo...

Другие советы

Manually starting services is cumbersome and not a recommended way to do things. If you prefer manual way then dont forget to use supervisors like Systemd daemontools, runit, Initng, Monit.

Using CHEF

The best way is to customize an already existing CHEF recipe if you are new to CHEF recipes and you can create a recipe if you can.

First clone the repo https://github.com/engineyard/ey-cloud-recipes.
Then modify cookbooks/main/recipes/default.rb and uncomment the postgres if block and uncomment the postgresql9_postgis "dbname" and don't forget to change the "dbname"!

  # enable Extension modules for a given Postgresql database
  # if ['solo','db_master', 'db_slave'].include?(node[:instance_role])
  # PostGis 1.5 (use with versions 9.0, 9.1, 9.2 on 2009a/stable-v2)
  # postgresql9_postgis "dbname"

  # PostGis 2.1 (use with version 9.2 on 2009a/stable-v2 and all versions on 12.11/stable-v4)
  # postgresql9_postgis2 "dbname"

Then simply upload and execute the recipe.

ey recipes upload -e environment_name
ey recipes apply -e environment_name
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top