Skip to content

Commit

Permalink
Fix stack.cfg, move pillar examples to doc
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Jackson <ejackson@suse.com>
  • Loading branch information
swiftgist committed Sep 28, 2017
1 parent 40bb187 commit 8baf280
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 41 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ copy-files:
# examples
install -d -m 755 $(DESTDIR)$(DOCDIR)/deepsea/examples
install -m 644 doc/examples/* $(DESTDIR)$(DOCDIR)/deepsea/examples/
# pillar
install -d -m 755 $(DESTDIR)$(DOCDIR)/deepsea/pillar
install -m 644 doc/pillar/* $(DESTDIR)$(DOCDIR)/deepsea/pillar/
# stacky.py (included in salt 2016.3)
install -d -m 755 $(DESTDIR)/srv/modules/pillar
install -m 644 srv/modules/pillar/stack.py $(DESTDIR)/srv/modules/pillar/
Expand Down
2 changes: 2 additions & 0 deletions doc/pillar/rgw-ssl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rgw_configurations:
- rgw-ssl
10 changes: 10 additions & 0 deletions doc/pillar/rgw_configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

rgw_configurations:
- rgw
- silver
- gold

ganesha_configurations:
- silver
- silver-common
- gold
50 changes: 50 additions & 0 deletions srv/pillar/ceph/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
== Default Configuration

The Salt pillar is a key-value store. The file format is yaml. Most of the
configuration is generated automatically by Stages 1 and 2. Stage 2 places the
results under stack/default in a hierarchy.

== Custom Configuration

A separate hierarchy allows the admin to override all settings. The hierarchy
is

stack/global.yml
stack/ceph/cluster.yml
stack/ceph/roles/{{role}}.yml
stack/ceph/minions/{{minion}}.yml

DeepSea currently supports one Ceph cluster, so the cluster.yml is redundant
with the global.yml. The role and minion files allow setting of pillar
variables that are only available to the intended minions. These are rarely
used. When in doubt about the placement of variables, use the global.yml.

For examples of contents, see /usr/share/doc/packages/deepsea/pillar/.

== An Example

The default time server is set to the Salt master. This setting is configured
in stack/default/global.yml. To override, add the following to
stack/global.yml:

time_server: my_ntp_server

Note that the stack/default/global.yml is not changed. To apply the change to
Salt, run

salt '*' saltutil.pillar_refresh

To view the change

salt '*' pillar.items

Notice that the time_server will have your setting. This same strategy can be
applied to any customizations. Normally, an admin makes the change and reruns
Stage 2 which calls the refresh as well.

== Custom Roles

Should you decide to use the custom roles for RadosGW or Ganesha, be sure to
run Stage 1 after updating the pillar. This is an exception until we
reorganize some of the steps between Stage 1 and Stage 2.

9 changes: 0 additions & 9 deletions srv/pillar/ceph/rgw-ssl.sls.example

This file was deleted.

26 changes: 0 additions & 26 deletions srv/pillar/ceph/rgw.sls-example

This file was deleted.

6 changes: 0 additions & 6 deletions srv/pillar/ceph/stack/stack.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ default/{{ pillar.get('cluster') }}/cluster.yml
default/{{ pillar.get('cluster') }}/roles/{{ role }}.yml
{% endfor %}

{# Default ceph.conf settings #}
default/{{ pillar.get('cluster') }}/ceph_conf.yml

{# Default settings per minion #}
default/{{ pillar.get('cluster') }}/minions/{{ minion_id }}.yml

Expand All @@ -28,8 +25,5 @@ global.yml
{{ pillar.get('cluster') }}/roles/{{ role }}.yml
{% endfor %}

{# Custom ceph.conf settings #}
{{ pillar.get('cluster') }}/ceph_conf.yml

{# Customizations per minion #}
{{ pillar.get('cluster') }}/minions/{{ minion_id }}.yml

0 comments on commit 8baf280

Please sign in to comment.