pups 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +69 -27
- data/lib/pups/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf30e6638af5d5e6618c872c48c916485a8d75f2
|
4
|
+
data.tar.gz: 28da8c64dc283ad29a17cfd02cdb92703c91e296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6f37ce6dff5423dcae7b9e92816d6618693d6bb9fdd4e8af70e6e052f6ef31bc4c8397920b183ff985b1a4b0ee42150c812f0a4f5a48c922f9cc818b1ff885c
|
7
|
+
data.tar.gz: b3bdbd36b7a2cb327c27f7fc691296ded3a9e63044665939845b0165727259eee49a5664ea5de4674c68ca1f9024bdb16ce7b686397e51522b7eac1d83900a9e
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# pups
|
2
2
|
|
3
|
-
Simple
|
3
|
+
Simple YAML--based bootstrapper
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -28,55 +28,70 @@ params:
|
|
28
28
|
hello: hello world
|
29
29
|
|
30
30
|
run:
|
31
|
-
exec: /bin/bash -c 'echo $hello >>> hello'
|
31
|
+
- exec: /bin/bash -c 'echo $hello >>> hello'
|
32
32
|
```
|
33
33
|
|
34
|
-
Running: `pups somefile.yaml` will execute the shell script resulting in a file called "hello" with the "hello world"
|
34
|
+
Running: `pups somefile.yaml` will execute the shell script resulting in a file called "hello" with the contents "hello world".
|
35
35
|
|
36
|
-
### Features
|
36
|
+
### Features
|
37
37
|
|
38
|
-
####
|
38
|
+
#### Environment Variables
|
39
|
+
|
40
|
+
By default, pups automatically imports your environment variables and includes them as params.
|
41
|
+
|
42
|
+
```
|
43
|
+
# In bash
|
44
|
+
export SECRET_KEY="secret value"
|
45
|
+
|
46
|
+
# In somefile.yaml
|
47
|
+
run:
|
48
|
+
- exec: echo "$SECRET_KEY"
|
49
|
+
```
|
50
|
+
|
51
|
+
Running the above code with pups will produce `secret value`.
|
52
|
+
|
53
|
+
#### Execution
|
39
54
|
|
40
55
|
Run multiple commands in one path:
|
41
56
|
|
42
57
|
```
|
43
58
|
run:
|
44
|
-
exec:
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
59
|
+
- exec:
|
60
|
+
cd: some/path
|
61
|
+
cmd:
|
62
|
+
- echo 1
|
63
|
+
- echo 2
|
49
64
|
```
|
50
65
|
|
51
66
|
Run commands in the background (for services etc)
|
52
67
|
|
53
68
|
```
|
54
69
|
run:
|
55
|
-
exec:
|
56
|
-
|
57
|
-
|
58
|
-
```
|
70
|
+
- exec:
|
71
|
+
cmd: /usr/bin/sshd
|
72
|
+
background: true
|
73
|
+
```
|
59
74
|
|
60
75
|
Suppress exceptions on certain commands
|
61
76
|
|
62
77
|
```
|
63
78
|
run:
|
64
|
-
|
65
|
-
|
66
|
-
|
79
|
+
- exec:
|
80
|
+
cmd: /test
|
81
|
+
raise_on_fail: false
|
67
82
|
```
|
68
83
|
|
69
|
-
####Replacements:
|
84
|
+
#### Replacements:
|
70
85
|
|
71
86
|
```
|
72
87
|
run:
|
73
|
-
replace:
|
74
|
-
|
75
|
-
|
76
|
-
|
88
|
+
- replace:
|
89
|
+
filename: "/etc/redis/redis.conf"
|
90
|
+
from: /^pidfile.*$/
|
91
|
+
to: ""
|
77
92
|
```
|
78
93
|
|
79
|
-
Will
|
94
|
+
Will substitute the regex with blank, removing the pidfile line
|
80
95
|
|
81
96
|
```
|
82
97
|
run:
|
@@ -88,9 +103,34 @@ run:
|
|
88
103
|
}"
|
89
104
|
```
|
90
105
|
|
91
|
-
|
106
|
+
Additional params:
|
92
107
|
|
93
|
-
|
108
|
+
Global replace (as opposed to first match)
|
109
|
+
```
|
110
|
+
global: true
|
111
|
+
```
|
112
|
+
|
113
|
+
#### Hooks
|
114
|
+
|
115
|
+
Execute commands before and after a specific command by defining a hook.
|
116
|
+
|
117
|
+
```
|
118
|
+
run
|
119
|
+
- exec:
|
120
|
+
hook: hello
|
121
|
+
cmd: echo 'Hello'
|
122
|
+
|
123
|
+
hooks:
|
124
|
+
before_hello:
|
125
|
+
- exec:
|
126
|
+
cmd: echo 'Starting...'
|
127
|
+
|
128
|
+
after_hello:
|
129
|
+
- exec:
|
130
|
+
cmd: echo 'World'
|
131
|
+
```
|
132
|
+
|
133
|
+
#### Merge yaml files
|
94
134
|
|
95
135
|
```
|
96
136
|
home: /var/www/my_app
|
@@ -105,9 +145,11 @@ run:
|
|
105
145
|
|
106
146
|
```
|
107
147
|
|
108
|
-
Will merge the yaml file with the inline contents
|
148
|
+
Will merge the yaml file with the inline contents.
|
149
|
+
|
150
|
+
#### A common environment
|
109
151
|
|
110
|
-
|
152
|
+
This is implemented in discourse_docker's launcher, not in pups - therefore it does not work in standalone pups.
|
111
153
|
|
112
154
|
```
|
113
155
|
env:
|
data/lib/pups/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.5.1
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: Process orchestrator
|