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 +4 -4
- data/Readme.md +22 -2
- data/VERSION +1 -1
- data/lib/stacksondeck/app.rb +5 -8
- data/lib/stacksondeck/main.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b74bc0768e9bbc1fee2f741b53e37d9b869a712
|
4
|
+
data.tar.gz: 8c6f2b9d22e9aca61137f0c80285fd9de0e2ac64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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.
|
1
|
+
1.0.1
|
data/lib/stacksondeck/app.rb
CHANGED
@@ -42,14 +42,14 @@ module StacksOnDeck
|
|
42
42
|
|
43
43
|
def self.db_copy
|
44
44
|
@@db.lock do
|
45
|
-
@@db.
|
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.
|
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.
|
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
|
125
|
+
@@db_dump = YAML.dump node_resources
|
129
126
|
|
130
|
-
log.
|
127
|
+
log.info event: 'refreshed!', elapsed: (Time.now - started)
|
131
128
|
|
132
129
|
return node_resources
|
133
130
|
|
data/lib/stacksondeck/main.rb
CHANGED