stacksondeck 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaba33fcc27c4639f0795e308e59f00e995b3220
4
- data.tar.gz: ba4961ed10eac27f86da17fbe529982006fdafff
3
+ metadata.gz: 5b74bc0768e9bbc1fee2f741b53e37d9b869a712
4
+ data.tar.gz: 8c6f2b9d22e9aca61137f0c80285fd9de0e2ac64
5
5
  SHA512:
6
- metadata.gz: 06056d91ffa4d8204c12a25ac40de9f95e33719b1ee78fe74b4f6b660aa035e01f72313b8bcbb5e4d30011210896983757368a7270e86913c865b9182b7812e9
7
- data.tar.gz: 1a0ac276bd06bfc68599a7a4ccae1aec1d5fdb14c37c0a6631b1a93d3f117ccfafc5348c16c25a3ac8435e8e13572bad70aa87ea1426727f15aac2886d02bee2
6
+ metadata.gz: 1175e07fdff8ba66eee5005467b678d3e153b43cab19927607621b9b0ed06d59b52aaf2edce75d2c91efe19c01944462d70928c601038182da91951edb65788e
7
+ data.tar.gz: 38b8e48726f8a8fc4f6495dda9eb49fc95a759f3194577da59ac73a66a0fcbfff1126dcb4815fdcdbca23a9391b3509b988f1170e53ded58d7d10609b14c1041
data/Readme.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Stupid simple Chef-Rundeck integration.
4
4
 
5
+ Stacks on Deck (SOD) serves up a single endpoint, which may be used as URL
6
+ Resource Model Source in Rundeck. In the background, SOD searches for nodes on a
7
+ Chef server using the provided knife credentials (`--config`); results are cached
8
+ for a configurable amount of time (`--refresh`). SOD is [crash-only software](https://www.usenix.org/legacy/events/hotos03/tech/full_papers/candea/candea.pdf);
9
+ application state is backed up to disk (`--database`). You may also wish to
10
+ override the Rundeck user name to suit your environment (`--username`).
11
+
5
12
 
6
13
  ## Usage
7
14
 
@@ -32,9 +39,22 @@ You're most likely inteterested in `server`:
32
39
  -u, [--username=USERNAME] # Username value for Rundeck node
33
40
  # Default: ${job.username}
34
41
  -r, [--refresh=N] # Refresh interval in seconds
35
- # Default: 900
42
+ # Default: 60
36
43
  -l, [--log=LOG] # Log to file instead of STDOUT
37
44
  -v, [--debug], [--no-debug] # Enable DEBUG-level logging
38
45
  -z, [--trace], [--no-trace] # Enable TRACE-level logging
39
46
 
40
- Start application web server
47
+ Start application web server
48
+
49
+ ## API
50
+
51
+ ### Node Resources `GET /`
52
+
53
+ Renders Chef nodes as a Rundeck Resource Model in YAML format.
54
+
55
+
56
+ ## Changelog
57
+
58
+ #### v1.0.0
59
+
60
+ - Stupid simple Chef-Rundeck integration
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -42,14 +42,14 @@ module StacksOnDeck
42
42
 
43
43
  def self.db_copy
44
44
  @@db.lock do
45
- @@db.map { |_,v| v }
45
+ @@db.inject({}) { |h,(k,v)| h[k] = v }
46
46
  end
47
47
  end
48
48
 
49
49
 
50
50
  def self.open!
51
51
  reopen!
52
- log.debug event: 'open!', db: settings.database
52
+ log.info event: 'open!', db: settings.database
53
53
  @@db_dump = YAML.dump db_copy
54
54
  end
55
55
 
@@ -62,14 +62,12 @@ module StacksOnDeck
62
62
 
63
63
 
64
64
  def self.close!
65
- log.debug event: 'close!', db: settings.database
65
+ log.info event: 'close!', db: settings.database
66
66
  @@db.close
67
67
  end
68
68
 
69
69
 
70
70
  def self.refresh!
71
- log.debug event: 'refresh!', config: settings.config
72
-
73
71
  started = Time.now
74
72
 
75
73
  ridley = Ridley.from_chef_config settings.config
@@ -104,7 +102,6 @@ module StacksOnDeck
104
102
  tags.compact!
105
103
 
106
104
  node_resources[name] = {
107
- 'nodename' => name,
108
105
  'hostname' => n.hostname,
109
106
  'description' => n.fqdn,
110
107
  'osArch' => n.kernel.machine,
@@ -125,9 +122,9 @@ module StacksOnDeck
125
122
 
126
123
  reopen!
127
124
 
128
- @@db_dump = YAML.dump node_resources.values
125
+ @@db_dump = YAML.dump node_resources
129
126
 
130
- log.debug event: 'refreshed!', elapsed: (Time.now - started)
127
+ log.info event: 'refreshed!', elapsed: (Time.now - started)
131
128
 
132
129
  return node_resources
133
130
 
@@ -86,7 +86,7 @@ module StacksOnDeck
86
86
  Thread.abort_on_exception = true
87
87
  end
88
88
 
89
- log.debug event: 'server starting', options: options
89
+ log.info event: 'server', options: options
90
90
  App.run!
91
91
  end
92
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stacksondeck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer