Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 04ba36f

Browse files
authored
Merge pull request #233 from HubbleStack/develop
Merge develop to master
2 parents 4bea33b + a47e4ad commit 04ba36f

File tree

3 files changed

+61
-10
lines changed

3 files changed

+61
-10
lines changed

FORMULA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: hubblestack_nova
22
os: RedHat, CentOS, Debian, Ubuntu
33
os_family: RedHat, Debian
4-
version: 2016.7.0_RC2
4+
version: 2016.7.1
55
release: 1
66
summary: HubbleStack Nova
77
description: HubbleStack Nova

README.rst

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _nova_introduction:
2+
13
Introduction
24
============
35

@@ -12,13 +14,17 @@ track versioned, packaged updates to Hubble's components.
1214
The second method installs directly from git. It should be considered bleeding
1315
edge and possibly unstable.
1416

17+
.. _nova_installation:
18+
1519
Installation
1620
============
1721

1822
Each of the four HubbleStack components have been packaged for use with Salt's
1923
Package Manager (SPM). Note that all SPM installation commands should be done
2024
on the *Salt Master*.
2125

26+
.. _nova_installation_config:
27+
2228
**Required Configuration**
2329

2430
Salt's Package Manager (SPM) installs files into ``/srv/spm/{salt,pillar}``.
@@ -34,6 +40,8 @@ Ensure that this path is defined in your Salt Master's ``file_roots``:
3440

3541
.. tip:: Remember to restart the Salt Master after making this change to the configuration.
3642

43+
.. _nova_installation_packages:
44+
3745
Installation (Packages)
3846
-----------------------
3947

@@ -43,8 +51,8 @@ repo for updates and bugfixes!)
4351

4452
.. code-block:: shell
4553
46-
wget https://spm.hubblestack.io/2016.7.0/hubblestack_nova-2016.7.0-1.spm
47-
spm local install hubblestack_nova-2016.7.0-1.spm
54+
wget https://spm.hubblestack.io/2016.7.1/hubblestack_nova-2016.7.1-1.spm
55+
spm local install hubblestack_nova-2016.7.1-1.spm
4856
4957
You should now be able to sync the new modules to your minion(s) using the
5058
``sync_modules`` Salt utility:
@@ -53,9 +61,11 @@ You should now be able to sync the new modules to your minion(s) using the
5361
5462
salt \* saltutil.sync_modules
5563
56-
Once these modules are synced you are ready to run a HubbleStack Nova audit.
64+
Once these modules are synced you are ready to run a HubbleStack Nova audit.
5765

58-
Skip to [Usage].
66+
Skip to :ref:`Usage <nova_usage>`.
67+
68+
.. _nova_installation_manual:
5969

6070
Installation (Manual)
6171
---------------------
@@ -74,13 +84,17 @@ it to the minions.
7484
salt \* saltutil.sync_modules
7585
salt \* hubble.sync
7686
87+
.. _nova_usage:
88+
89+
Skip to :ref:`Usage <nova_usage>`.
90+
7791
Usage
7892
=====
7993

8094
There are four primary functions in the hubble.py module:
8195

8296
1. ``hubble.sync`` will sync the ``hubblestack_nova/`` directory to the minion(s).
83-
2. ``hubble.load`` will load the synced audit modules and their yaml configuration files.
97+
2. ``hubble.load`` will load the synced audit modules and their yaml configuration files.
8498
3. ``hubble.audit`` will audit the minion(s) using the YAML profile(s) you provide as comma-separated arguments
8599
4. ``hubble.top`` will audit the minion(s) using the ``top.nova`` configuration.
86100

@@ -110,6 +124,7 @@ Here are some example calls:
110124
# with "CIS"
111125
salt \* hubble.audit foo,bar tags='CIS*'
112126
127+
.. _nova_usage_topfile:
113128

114129
Nova Topfiles
115130
-------------
@@ -148,6 +163,7 @@ Examples:
148163
salt '*' hubble.top foo/bar/top.nova
149164
salt '*' hubble.top foo/bar.nova verbose=True
150165
166+
.. _nova_usage_control:
151167

152168
Compensating Control Configuration
153169
----------------------------------
@@ -188,6 +204,7 @@ still run, but if any of the controlled checks fail, they will be removed from
188204
``Failure`` and added to ``Controlled``, and will be treated as a Success for
189205
the purposes of compliance percentage.
190206

207+
.. _nova_usage_schedule:
191208

192209
Schedule
193210
--------
@@ -200,10 +217,19 @@ In order to run the audits once daily, you can use the following schedule:
200217
nova_day:
201218
function: hubble.top
202219
seconds: 86400
220+
kwargs:
221+
verbose: True
222+
show_profile: True
223+
returner: splunk_nova_return
224+
return_job: False
225+
226+
.. _nova_configuration:
203227

204228
Configuration
205229
=============
206230

231+
.. _nova_under_the_hood:
232+
207233
Under the Hood
208234
==============
209235

@@ -230,12 +256,16 @@ shown, change to False to disable behaviors):
230256
autosync: True
231257
autoload: True
232258
259+
.. _nova_development:
260+
233261
Development
234262
===========
235263

236264
If you're interested in contributing to this project this section outlines the
237265
structure and requirements for Nova audit module development.
238266

267+
.. _nova_development_anatomy:
268+
239269
Anatomy of a Nova audit module
240270
------------------------------
241271

@@ -257,7 +287,6 @@ Anatomy of a Nova audit module
257287
All Nova plugins should include the above header, expanding the docstring to
258288
include full documentation
259289

260-
261290
.. code-block:: python
262291
263292
import fnmatch
@@ -315,6 +344,8 @@ one-key dictionaries in the form of ``{<tag>: <string_description>}``, or a
315344
list of one-key dictionaries in the form of ``{<tag>: <data_dict>}`` (in the
316345
case of ``verbose``).
317346

347+
.. _nova_contribute:
348+
318349
Contribute
319350
==========
320351

_modules/hubble.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def audit(configs=None,
105105
if configs is None:
106106
return top(verbose=verbose,
107107
show_success=show_success,
108-
show_compliance=show_compliance)
108+
show_compliance=show_compliance,
109+
show_profile=show_profile,
110+
debug=debug)
109111

110112
if __salt__['config.get']('hubblestack:nova:autoload', True):
111113
load()
@@ -260,7 +262,9 @@ def audit(configs=None,
260262
def top(topfile='top.nova',
261263
verbose=None,
262264
show_success=None,
263-
show_compliance=None):
265+
show_compliance=None,
266+
show_profile=None,
267+
debug=None):
264268
'''
265269
Compile and run all yaml data from the specified nova topfile.
266270
@@ -313,6 +317,16 @@ def top(topfile='top.nova',
313317
by total checks). Defaults to True. Configurable via
314318
`hubblestack:nova:show_compliance` in minion config/pillar.
315319
320+
show_profile
321+
Whether to add the profile path to the verbose output for audits.
322+
Defaults to False. Configurable via `hubblestack:nova:show_profile`
323+
in minion config/pillar.
324+
325+
debug
326+
Whether to log additional information to help debug nova. Defaults to
327+
False. Configurable via `hubblestack:nova:debug` in minion
328+
config/pillar.
329+
316330
CLI Examples:
317331
318332
.. code-block:: bash
@@ -332,6 +346,10 @@ def top(topfile='top.nova',
332346
show_success = __salt__['config.get']('hubblestack:nova:show_success', True)
333347
if show_compliance is None:
334348
show_compliance = __salt__['config.get']('hubblestack:nova:show_compliance', True)
349+
if show_profile is None:
350+
show_profile = __salt__['config.get']('hubblestack:nova:show_profile', False)
351+
if debug is None:
352+
debug = __salt__['config.get']('hubblestack:nova:debug', False)
335353

336354
results = {}
337355

@@ -367,7 +385,9 @@ def top(topfile='top.nova',
367385
verbose=verbose,
368386
show_success=True,
369387
show_compliance=False,
370-
called_from_top=True)
388+
show_profile=show_profile,
389+
called_from_top=True,
390+
debug=debug)
371391

372392
# Merge in the results
373393
for key, val in ret.iteritems():

0 commit comments

Comments
 (0)