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

Commit 2e1648c

Browse files
authored
Merge pull request #250 from HubbleStack/develop
Merge to master (prep for v2016.9.2)
2 parents 45e372d + 137e8df commit 2e1648c

23 files changed

+791
-756
lines changed

README.rst

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,26 @@ Ensure that this path is defined in your Salt Master's ``file_roots``:
4545
Installation (Packages)
4646
-----------------------
4747

48-
Installation is as easy as downloading and installing a package. (Note: in
48+
Installation is as easy as downloading and installing packages. (Note: in
4949
future releases you'll be able to subscribe directly to our HubbleStack SPM
5050
repo for updates and bugfixes!)
5151

52+
Nova packages have been divided into modules and profiles. This way we can
53+
iterate policy changes separate from the code.
54+
55+
**Nova Modules**
56+
5257
.. code-block:: shell
5358
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
59+
wget http://spm.hubblestack.io/nova/hubblestack_nova-2016.9.2.spm
60+
spm local install hubblestack_nova-2016.9.2.spm
61+
62+
**Nova Profiles**
63+
64+
.. code-block:: shell
65+
66+
wget http://spm.hubblestack.io/nova/hubblestack_nova_profiles-20160909-1.spm
67+
spm local install hubblestack_nova_profiles-20160909-1.spm
5668
5769
You should now be able to sync the new modules to your minion(s) using the
5870
``sync_modules`` Salt utility:
@@ -80,11 +92,32 @@ it to the minions.
8092
mkdir -p /srv/salt/_modules/
8193
cp _modules/hubble.py /srv/salt/_modules/
8294
cp -a hubblestack_nova_profiles /srv/salt/
83-
cp -a hubblestack_nova_modules /srv/salt/
95+
cp -a hubblestack_nova /srv/salt/
8496
8597
salt \* saltutil.sync_modules
8698
salt \* hubble.sync
8799
100+
.. _nova_installation_gitfs:
101+
102+
Installation (GitFS)
103+
--------------------
104+
105+
This installation method subscribes directly to our GitHub repository, pinning
106+
to a tag or branch. This method requires no package installation or manual
107+
checkouts.
108+
109+
Requirements: GitFS support on your Salt Master.
110+
111+
**/etc/salt/master.d/hubblestack-nova.conf**
112+
113+
.. code-block:: diff
114+
115+
gitfs_remotes:
116+
- https://github.com/hubblestack/nova:
117+
- base: v2016.9.1
118+
119+
.. tip:: Remember to restart the Salt Master after applying this change.
120+
88121
.. _nova_usage:
89122

90123
Skip to :ref:`Usage <nova_usage>`.
@@ -94,7 +127,7 @@ Usage
94127

95128
There are four primary functions in the hubble.py module:
96129

97-
1. ``hubble.sync`` will sync the ``hubblestack_nova_profiles/`` and ``hubblestack_nova_modules/`` directories to the minion(s).
130+
1. ``hubble.sync`` will sync the ``hubblestack_nova_profiles/`` and ``hubblestack_nova/`` directories to the minion(s).
98131
2. ``hubble.load`` will load the synced audit modules and their yaml configuration files.
99132
3. ``hubble.audit`` will audit the minion(s) using the YAML profile(s) you provide as comma-separated arguments
100133
4. ``hubble.top`` will audit the minion(s) using the ``top.nova`` configuration.
@@ -243,7 +276,7 @@ configurable via pillar. The defaults are shown below:
243276
hubblestack:
244277
nova:
245278
saltenv: base
246-
module_dir: salt://hubblestack_nova_modules
279+
module_dir: salt://hubblestack_nova
247280
profile_dir: salt://hubblestack_nova_profiles
248281
249282
2. By default, ``hubble.audit`` will call ``hubble.load`` (which in turn calls

_modules/hubble.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def sync(clean=False):
420420
Sync the nova audit modules and profiles from the saltstack fileserver.
421421
422422
The modules should be stored in the salt fileserver. By default nova will
423-
search the base environment for a top level ``hubblestack_nova_modules``
423+
search the base environment for a top level ``hubblestack_nova``
424424
directory, unless otherwise specified via pillar or minion config
425425
(``hubblestack:nova:module_dir``)
426426
@@ -448,7 +448,7 @@ def sync(clean=False):
448448
nova_profile_dir = __salt__['config.get']('hubblestack:nova:profile_dir',
449449
'salt://hubblestack_nova_profiles')
450450
nova_module_dir = __salt__['config.get']('hubblestack:nova:module_dir',
451-
'salt://hubblestack_nova_modules')
451+
'salt://hubblestack_nova')
452452
saltenv = __salt__['config.get']('hubblestack:nova:saltenv', 'base')
453453

454454
# Clean previously synced files
@@ -519,7 +519,7 @@ def _hubble_dir():
519519
nova_profile_dir = __salt__['config.get']('hubblestack:nova:profile_dir',
520520
'salt://hubblestack_nova_profiles')
521521
nova_module_dir = __salt__['config.get']('hubblestack:nova:module_dir',
522-
'salt://hubblestack_nova_modules')
522+
'salt://hubblestack_nova')
523523
dirs = []
524524
# Support optional salt:// in config
525525
for nova_dir in (nova_module_dir, nova_profile_dir):
@@ -630,6 +630,8 @@ def refresh_file_mapping(self):
630630
# in the profiles directory. This is hacky but was a
631631
# quick fix.
632632
nova_module_cache, nova_profile_cache = _hubble_dir()
633+
nova_module_cache = os.path.join(nova_module_cache, '')
634+
nova_profile_cache = os.path.join(nova_profile_cache, '')
633635
if ext == '.py' and fpath.startswith(nova_profile_cache):
634636
continue
635637
if ext == '.yaml' and fpath.startswith(nova_module_cache):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)