-
Notifications
You must be signed in to change notification settings - Fork 285
Improve the osmapping defaults in osmap.yaml #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
97b82cd
0fe31a6
12dab82
3ba9c85
cb16d8c
78f6f74
e79bb6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,17 @@ Debian: | |
| pkg_dev: postgresql-server-dev-all | ||
| pkg_libpq_dev: libpq-dev | ||
|
|
||
| pkg: 'postgresql-{{ repo.version }}' | ||
| pkg_client: 'postgresql-client-{{ repo.version }}' | ||
| pkgs_extra: [ postgresql-contrib, postgresql-plpython-{{ repo.version }}, libpostgresql-jdbc-java] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure everybody wants all the optional stuff, additional Python and Java dependencies by default?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree - we should support pkgs_extra without forcing it. But I think "
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My point is that the formula by default should provide minimum working installation. And in many use cases a user just don't need to wait and download a half of the distribution just to get a separate DB for WordPress backend or something. |
||
| python: python-psycopg2 | ||
| {% set data_dir = '/var/lib/postgresql/data' %} | ||
| conf_dir: {{ data_dir }} | ||
| prepare_cluster: | ||
| command: /usr/lib/postgresql/9.6/bin/initdb --pgdata={{ data_dir }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You definitely should not do it here. Especially with hard-coded values like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree. The default postgres.server state did not work properly. Fixing in pillar.example is considered wrong (see discussion at #156) so where should this be handled? Yes, This should read {{ repo.version }} not 9.6. |
||
| test: test -f {{ data_dir }}/PG_VERSION | ||
| user: postgres | ||
|
|
||
| FreeBSD: | ||
| user: pgsql | ||
|
|
||
|
|
@@ -39,12 +50,6 @@ RedHat: | |
|
|
||
| pkg: postgresql{{ release }}-server | ||
| pkg_client: postgresql{{ release }} | ||
| conf_dir: /var/lib/pgsql/{{ repo.version }}/data | ||
| service: postgresql-{{ repo.version }} | ||
|
|
||
| prepare_cluster: | ||
| command: initdb --pgdata='{{ data_dir }}' | ||
| test: test -f '{{ data_dir }}/PG_VERSION' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole section is here for the purpose: the values should be set like this only when
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct. Note however that |
||
|
|
||
| # Directory containing PostgreSQL client executables | ||
| bin_dir: /usr/pgsql-{{ repo.version }}/bin | ||
|
|
@@ -85,15 +90,30 @@ RedHat: | |
|
|
||
| {% else %} | ||
|
|
||
| {% set data_dir = '/var/lib/pgsql/data' %} | ||
| pkg: postgresql-server | ||
| pkg_client: postgresql | ||
|
|
||
| {% endif %} | ||
|
|
||
| service: postgresql-{{ repo.version }} | ||
| pkgs_extra: [ postgresql-contrib, postgresql-plpython, postgresql-jdbc, postgresql-docs] | ||
| conf_dir: {{ data_dir }} | ||
| prepare_cluster: | ||
| command: initdb --pgdata='{{ data_dir }}' | ||
| test: test -f '{{ data_dir }}/PG_VERSION' | ||
| user: postgres | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these lines are unnecessary, please see
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. But
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you just moved the section that should be defined for upstream PostgreSQL distribution. |
||
|
|
||
| Suse: | ||
| pkg: postgresql-server | ||
| pkg_client: postgresql | ||
| pkg_libpq_dev: postgresql | ||
| pkgs_extra: [ postgresql-contrib, postgresql-plpython, postgresql-jdbc, postgresql-docs] | ||
|
|
||
| {% set data_dir = '/var/lib/pgsql/data' %} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're going to set global variable, better to put it on top of the file. It would be redefined in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed. |
||
| prepare_cluster: | ||
| command: /usr/lib/postgresql/bin/initdb --pgdata={{ data_dir }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this is the only required change for Suse. Are you sure that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The command failed on SuSE so that is path. |
||
| test: test -f {{ data_dir }}/PG_VERSION | ||
| user: postgres | ||
|
|
||
| # vim: ft=sls | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do it here. We have special file
codenamemap.yamlto take care of this. The package names are really depending onuse_upstream_reposetting.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree - The dilemma arises because these are defined in pillar.example for Debian, and osmap.yaml for RedHat and I don't like the inconsistency. I moved the Debian variables to osmap.yaml for consistency; but open to suggestions here. Looking at codenamemap.yaml Debian and Fedora are defined today.