Skip to content

Commit

Permalink
docs(readme): note basic post-formula integration
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Jul 3, 2019
1 parent 3035ab7 commit b4bb933
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,138 @@ This state will remove the deepsea package repository.
This state will remove the deepsea package and has a depency on
``deepsea.config.clean`` via include list.

DeepSea Integration
-------------------

See official documentation at https://github.com/SUSE/DeepSea/blob/master/README.md

For example on Ubuntu 18.04-

.. code-block:: bash
root@ubuntu1804:~# salt-run state.orch ceph.stage.0
[WARNING ] All minions are ready
ubuntu1804.localdomain_master:
Name: crc_method master - Function: salt.state - Result: Changed Started: - 17:52:31.051226 Duration: 361.594 ms
Name: sync master - Function: salt.state - Result: Changed Started: - 17:52:31.412976 Duration: 1028.128 ms
Name: salt-api - Function: salt.state - Result: Changed Started: - 17:52:32.441213 Duration: 5332.9 ms
Name: repo master - Function: salt.state - Result: Clean Started: - 17:52:37.774260 Duration: 355.654 ms
Name: metapackage master - Function: salt.state - Result: Clean Started: - 17:52:38.130062 Duration: 416.05 ms
Name: prepare master - Function: salt.state - Result: Changed Started: - 17:52:38.546320 Duration: 298157.407 ms
Name: filequeue.remove - Function: salt.runner - Result: Changed Started: - 17:57:36.704571 Duration: 5699.659 ms
Name: filequeue.enqueue - Function: salt.runner - Result: Changed Started: - 17:57:42.404364 Duration: 227.791 ms
Name: minions.ready - Function: salt.runner - Result: Changed Started: - 17:57:42.632279 Duration: 429.608 ms
Name: crc_method minion - Function: salt.state - Result: Changed Started: - 17:57:43.062130 Duration: 1479.336 ms
Name: set apparmor - Function: salt.state - Result: Changed Started: - 17:57:44.541611 Duration: 9515.847 ms
Name: repo - Function: salt.state - Result: Clean Started: - 17:57:54.057601 Duration: 328.778 ms
Name: metapackage minions - Function: salt.state - Result: Clean Started: - 17:57:54.386546 Duration: 408.039 ms
Name: common packages - Function: salt.state - Result: Changed Started: - 17:57:54.794863 Duration: 100374.387 ms
Name: sync - Function: salt.state - Result: Changed Started: - 17:59:35.169364 Duration: 1385.293 ms
Name: mines - Function: salt.state - Result: Changed Started: - 17:59:36.554764 Duration: 382.213 ms
Name: updates - Function: salt.state - Result: Clean Started: - 17:59:36.937185 Duration: 26453.162 ms
Name: No Ceph cluster - Function: test.nop - Result: Clean Started: - 18:00:03.390498 Duration: 0.368 ms
Summary for ubuntu1804.localdomain_master
-------------
Succeeded: 18 (changed=12)
Failed: 0
-------------
Total states run: 18
Total run time: 452.336 s
root@ubuntu1804:~# salt-run state.orch ceph.stage.1
[WARNING ] All minions are ready
ubuntu1804.localdomain_master:
Name: minions.ready - Function: salt.runner - Result: Changed Started: - 18:08:30.748189 Duration: 380.759 ms
Name: refresh_pillar0 - Function: salt.state - Result: Changed Started: - 18:08:31.129184 Duration: 283.682 ms
Name: populate.proposals - Function: salt.runner - Result: Changed Started: - 18:08:31.413219 Duration: 2859.894 ms
Summary for ubuntu1804.localdomain_master
------------
Succeeded: 3 (changed=3)
Failed: 0
------------
Total states run: 3
Total run time: 3.524 s
root@ubuntu1804:~# curl -o /srv/pillar/ceph/proposals/policy.cfg https://raw.githubusercontent.com/SUSE/DeepSea/master/doc/examples/policy.cfg-rolebased
root@ubuntu1804:~# vi /srv/pillar/ceph/proposals/policy.cfg
root@ubuntu1804:~# vi /srv/pillar/ceph/proposals/config/stack/default/ceph/cluster.yml
root@ubuntu1804:~# salt-run state.orch ceph.stage.2
[WARNING ] role-ubuntu1804.localdomain/cluster/ubuntu1804.localdomain*.sls matched no files
[WARNING ] role-mon/cluster/mon*.sls matched no files
[WARNING ] role-mgr/cluster/mon*.sls matched no files
[WARNING ] role-mds/cluster/mds*.sls matched no files
[WARNING ] role-igw/cluster/igw*.sls matched no files
[WARNING ] role-rgw/cluster/rgw*.sls matched no files
[WARNING ] role-ganesha/cluster/ganesha*.sls matched no files
[WARNING ] role-storage/cluster/data*.sls matched no files
deepsea_minions : valid
yaml_syntax : valid
[WARNING ] role-ubuntu1804.localdomain/cluster/ubuntu1804.localdomain*.sls matched no files
[WARNING ] role-mon/cluster/mon*.sls matched no files
[WARNING ] role-mgr/cluster/mon*.sls matched no files
[WARNING ] role-mds/cluster/mds*.sls matched no files
[WARNING ] role-igw/cluster/igw*.sls matched no files
[WARNING ] role-rgw/cluster/rgw*.sls matched no files
[WARNING ] role-ganesha/cluster/ganesha*.sls matched no files
[WARNING ] role-storage/cluster/data*.sls matched no files
public network : 192.168.1.0/24
cluster network : 10.0.2.0/24
ubuntu1804.localdomain_master:
Name: push.proposal - Function: salt.runner - Result: Changed Started: - 18:16:31.747204 Duration: 251.938 ms
Name: refresh_pillar1 - Function: salt.state - Result: Changed Started: - 18:16:31.999265 Duration: 278.968 ms
Name: advise.networks - Function: salt.runner - Result: Changed Started: - 18:16:32.278340 Duration: 553.336 ms
Name: install ceph packages - Function: salt.state - Result: Clean Started: - 18:16:32.831855 Duration: 4164.183 ms
Name: admin key - Function: salt.state - Result: Changed Started: - 18:16:36.996254 Duration: 421.106 ms
Name: osd key - Function: salt.state - Result: Changed Started: - 18:16:37.417542 Duration: 434.585 ms
Name: mon key - Function: salt.state - Result: Changed Started: - 18:16:37.852339 Duration: 455.217 ms
----------
ID: mgr key
Function: salt.state
Result: False
Comment: Run failed on minions: ubuntu1804.localdomain
Started: 18:16:38.307711
Duration: 465.578 ms
Changes:
ubuntu1804.localdomain:
Data failed to compile:
----------
Rendering SLS 'base:ceph.mgr.key.default' failed: Jinja error: 'select.minions'
KeyError: 'select.minions'
; line 5
---
prevent empty rendering:
test.nop:
- name: skip
{% for host in salt.saltutil.runner('select.minions', cluster='ceph', roles='mgr', host=True) %} <======================
{% set client = "mgr." + host %}
{% set keyring_file = salt['keyring.file']('mgr', host) %}
{{ keyring_file}}:
file.managed:
- source:
[...]
---
Summary for ubuntu1804.localdomain_master
------------
Succeeded: 7 (changed=6)
Failed: 1
------------
Total states run: 8
Total run time: 7.025 s
Testing
-------
Expand Down

0 comments on commit b4bb933

Please sign in to comment.