org-converge 0.0.15 → 0.0.16

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: 0d79849925c29871f3955a60256beec94327117a
4
- data.tar.gz: c15b7b0962388cb85bc8ac2344b7ff21326b37f7
3
+ metadata.gz: f820b2bd05b18d9597ca859f80704b1375b8e78b
4
+ data.tar.gz: 150113c16bad5a6aa993e2dd6ab20aad39e78620
5
5
  SHA512:
6
- metadata.gz: 951731210970f8ea7b3274c39309545cdab786b8743e8b6757e703e6cc2cf0f8e399d51846aef7f39e303b3e72d231b438dad853e84411661f3be47b0cffcf85
7
- data.tar.gz: 555a85dd9f830ef9303670f527f7c560408314be273e4d58bc14fd6e2fca11d57c31e8eda652c1075e0390c7b238e297e94ddfe6662cee28ce836427c14e270f
6
+ metadata.gz: f9d49510cbafe950e8e846ef3bc4113c5cacc647ed26e0c2dff5f1d8183b79ebe1eef613a79cb7906230d276a91db15e9d6d5b5a50803b49b5a727106800d9b2
7
+ data.tar.gz: df152bb016b5438a2fc8cd919fc4b7cbb9647c9f5791b0ff060caa0dce9728103df833db07825ea143b16ecc2b9fd01be400dca825c719c7229fe9177db16bbf
data/README.org CHANGED
@@ -3,229 +3,306 @@
3
3
 
4
4
  * Org Converge
5
5
 
6
- [[https://secure.travis-ci.org/wallyqs/org-converge.png?branch=master]]
6
+ [[https://secure.travis-ci.org/wallyqs/org-converge.png?branch=master]]
7
7
 
8
8
  ** Description
9
9
 
10
- This is an experiment of using Org mode to
11
- create documentable reproducible runs, borrowing some ideas
12
- of what is possible to do with tools like =chef-solo=,
13
- =rake=, =foreman=, etc...
10
+ A framework to create documented reproducible runs using [[http://orgmode.org/worg/org-contrib/babel/Org Babel][Org Mode]],
11
+ borrowing several ideas of what is possible to do with tools
12
+ like =chef-solo=, =rake=, =foreman= and =capistrano=.
14
13
 
15
- ** Installing
14
+ ** Install
16
15
 
17
- : gem install org-converge
16
+ : gem install org-converge
18
17
 
19
18
  ** Motivation
20
19
 
21
- [[http://orgmode.org/worg/org-contrib/babel/Org Babel][Org Mode]] has proven to be flexible enough to write
22
- [[http://www.jstatsoft.org/v46/i03][reproducible research papers]].
23
- Then, I believe that configuring and setting up
24
- a server for example, is something that could also be done using
25
- the same approach, given that /converging/ the configuration
26
- is a kind of run that one ought to be able to reproduce.
20
+ [[http://orgmode.org/worg/org-contrib/babel/Org Babel][Org Mode]] has proven to be flexible enough to write [[http://www.jstatsoft.org/v46/i03][reproducible research papers]],
21
+ then I believe that configuring and setting up a server for
22
+ example, is something that could also be done using
23
+ the same approach, given that /converging/ the configuration
24
+ is a kind of run that one ought to be able to reproduce.
27
25
 
28
- ** Usage
26
+ Taking the original Emacs implementation as reference,
27
+ Org Converge uses the [[https://github.com/wallyqs/org-ruby][Ruby implementation of the Org mode parser]]
28
+ to implement and enhance the functionality from Org Babel
29
+ by adding helpers to define the properties of a run while taking advantage
30
+ of what is already there in the Ruby ecosystem.
29
31
 
30
- To run the blocks in parallel:
32
+ ** Usage examples
31
33
 
32
- #+begin_src sh
33
- org-converge path/to/setup-file.org --runmode=parallel
34
- #+end_src
34
+ Org Converge supports the following kind of runs below:
35
+
36
+ *** Parallel runs
37
+
38
+ Each one of the code blocks is run on an independent process.
39
+ This is akin to having a =Procfile= based application, where
40
+ one of the runner command would be to start a web application
41
+ and the other one to start the a worker processes.
35
42
 
36
- or sequentially...
43
+ In the following example, we are defining 2 code blocks, one
44
+ that would be run using Ruby and one more that would be run in Python.
45
+ Notice that the Python block has =:procs= set to 2, meaning that
46
+ it would spawn 2 processes for this.
37
47
 
38
48
  #+begin_src sh
39
- org-converge path/to/setup-file.org --runmode=sequential
49
+ ,#+TITLE: Sample parallel run
50
+
51
+ ,#+name: infinite-worker-in-ruby
52
+ ,#+begin_src ruby
53
+ $stdout.sync = true
54
+ loop { puts "working!"; sleep 1; }
55
+ ,#+end_src
56
+
57
+ ,#+name: infinite-worker-in-python
58
+ ,#+begin_src python :procs 2
59
+ import sys
60
+ import time
61
+
62
+ while True:
63
+ print "working too"
64
+ sys.stdout.flush()
65
+ time.sleep(1)
66
+ ,#+end_src
40
67
  #+end_src
41
68
 
42
- By including ~:after~ or ~:before~ arguments to a block,
43
- it is possible to make the blocks depend on one another.
69
+ The above example can be run with the following:
70
+
71
+ : org-run procfile-example.org
72
+
73
+ Sample output of the run:
44
74
 
45
75
  #+begin_src sh
46
- org-converge path/to/setup-file.org --runmode=chained
76
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-ruby -- started with pid 19648
77
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-python:1 -- started with pid 19649
78
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-python:2 -- started with pid 19650
79
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-python:1 -- working too
80
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-python:2 -- working too
81
+ [2014-06-07T18:05:48 +0900] infinite-worker-in-ruby -- working!
82
+ [2014-06-07T18:05:49 +0900] infinite-worker-in-python:1 -- working too
83
+ [2014-06-07T18:05:49 +0900] infinite-worker-in-python:2 -- working too
47
84
  #+end_src
48
85
 
49
- In case the blocks have results blocks, it is possible to run
50
- the blocks and matched against the results with the ~org-spec~ helper command:
86
+ *** Sequential runs
87
+
88
+ In case the code blocks form part of a runlist that should be
89
+ ran sequentially, it is possible to do this by specifying the
90
+ ~runmode=sequential~ option.
51
91
 
52
92
  #+begin_src sh
53
- org-spec path/to/file-spec.org
93
+ ,#+TITLE: Sample sequential run
94
+ ,#+runmode: sequential
95
+
96
+ ,#+name: first
97
+ ,#+begin_src sh
98
+ echo "first"
99
+ ,#+end_src
100
+
101
+ ,#+name: second
102
+ ,#+begin_src sh
103
+ echo "second"
104
+ ,#+end_src
105
+
106
+ ,#+name: third
107
+ ,#+begin_src sh
108
+ echo "third"
109
+ ,#+end_src
110
+
111
+ ,#+name: fourth
112
+ ,#+begin_src sh
113
+ echo "fourth"
114
+ ,#+end_src
54
115
  #+end_src
55
116
 
56
- *** Other commands available
117
+ In order to specify that this is to be run sequentially,
118
+ we set the runmode option in the command line:
57
119
 
58
- : org-run # alias for org-converge
59
- : org-tangle # just tangles the contents without running the blocks
120
+ : org-run runlist-example.org --runmode=sequential
60
121
 
61
- ** How it works
122
+ Another way of specifying this is via the Org mode file itself:
62
123
 
63
- Org Converge uses a liberally extended version of Org Babel
64
- features in order to give support for converging the configuration
65
- of a server, and the [[https://github.com/wallyqs/org-ruby][Ruby implementation of the Org mode parser]]
66
- which makes integrating with useful Ruby tools like foreman, rake, rspec and ohai more straightforward.
124
+ #+begin_src org
125
+ ,#+TITLE: Defining the runmode as an in buffer setting
126
+ ,#+runmode: sequential
127
+ #+end_src
67
128
 
68
- For example, using Org Babel we can easily spread config
69
- files on a server by writing the following on a ~server.org~ file.
129
+ Sample output:
70
130
 
71
131
  #+begin_src sh
72
- ,#+begin_src yaml :tangle /etc/component.yml
73
- multitenant: false
74
- status_port: 10004
75
- ,#+end_src
132
+ [2014-06-07T18:10:33 +0900] first -- started with pid 19845
133
+ [2014-06-07T18:10:33 +0900] first -- first
134
+ [2014-06-07T18:10:33 +0900] first -- exited with code 0
135
+ [2014-06-07T18:10:33 +0900] second -- started with pid 19846
136
+ [2014-06-07T18:10:33 +0900] second -- second
137
+ [2014-06-07T18:10:33 +0900] second -- exited with code 0
138
+ [2014-06-07T18:10:33 +0900] third -- started with pid 19847
139
+ [2014-06-07T18:10:33 +0900] third -- third
140
+ [2014-06-07T18:10:33 +0900] third -- exited with code 0
141
+ [2014-06-07T18:10:33 +0900] fourth -- started with pid 19848
142
+ [2014-06-07T18:10:33 +0900] fourth -- fourth
143
+ [2014-06-07T18:10:33 +0900] fourth -- exited with code 0
76
144
  #+end_src
77
145
 
78
- And then configure it by running it as follows, (considering we have
79
- the correct permissions for tangling at =/etc/component.yml=):
146
+ *** Configuration management runs
147
+
148
+ For example, using Org Babel tangling functionality we can spread
149
+ config files on a server by writing the following on a ~server.org~ file...
80
150
 
81
151
  #+begin_src sh
82
- sudo org-converge server.org
83
- #+end_src
84
152
 
85
- Next, let's say that we no only one want to set the configured templates,
86
- but that we also want to install some packages. In that case, we
87
- should be able to do the following:
88
- (Note: Currently, only named blocks would be run)
153
+ Configuration for a component that shoul be run in multitenant mode:
89
154
 
90
- #+begin_src sh
91
- ,** Configuring the component
92
-  
93
155
  ,#+begin_src yaml :tangle /etc/component.yml
94
156
  multitenant: false
95
157
  status_port: 10004
96
- ,#+end_src
97
-
98
- ,** Installing the dependencies
99
-
100
- Need the following so that ~bundle install~ can compile
101
- the native extensions correctly.
102
-
103
- # Giving the block a name would make it run
104
-  
105
- ,#+name: build_essentials
106
- ,#+begin_src sh
107
- apt-get install build-essentials -y
108
- ,#+end_src
109
-  
110
- Then the following should work:
111
-  
112
- ,#+name: bundle_install 
113
- ,#+begin_src sh
114
- cd project_path
115
- bundle install
116
158
  ,#+end_src
117
159
  #+end_src
118
160
 
119
- Since we are using Org mode syntax, it is possible to reuse this setup file by including it.
161
+ Then run:
120
162
 
121
- #+begin_src sh
122
- ,#+TITLE: Another setup
163
+ : sudo org-tangle server.org
123
164
 
124
- Include the code blocks from the server into this:
125
- ,#+include: "server.org"
165
+ *** Idempotent runs
126
166
 
127
- ,#+name: install_org_mode
128
- ,#+begin_src sh
129
- apt-get install org-mode -y
130
- ,#+end_src
131
- #+end_src
167
+ A run can have idempotency checks (similar to how the execute resource from [[http://docs.opscode.com/resource_execute.html][Chef]] works).
132
168
 
133
- #+end_src
169
+ An example of this, would be when installing packages. In this example,
170
+ we want to install the =build-essential= package once, and skip it in following runs:
134
171
 
135
- ** Examples
172
+ #+begin_src sh
173
+ ,** Installing the dependencies
174
+
175
+ Need the following so that ~bundle install~ can compile
176
+ the native extensions correctly.
177
+  
178
+ ,#+name: build-essential-installed
179
+ ,#+begin_src sh
180
+ dpkg -l | grep build-essential
181
+ ,#+end_src
182
+  
183
+ ,#+name: build_essentials
184
+ ,#+begin_src sh :unless build-essential-installed
185
+ apt-get install build-essential -y
186
+ ,#+end_src
136
187
 
137
- Currently there is support for the following kind of runs:
188
+ ,#+name: bundle_install
189
+ ,#+begin_src sh
190
+ cd project_path
191
+ bundle install
192
+ ,#+end_src
193
+ #+end_src
138
194
 
139
- - runs where the blocks need to run sequentially (~--runmode=sequential~) ::
140
-
141
- Each code block is part of a step to be ran
142
-
143
- - runs where the blocks need to be run in parallel (~--runmode=parallel~) ::
144
-
145
- One example of this is having what is supposed to be a distributed system running locally for development (where ~foreman~ would be used).
146
-
147
- - runs where the blocks need to be run in sequence according to defined dependencies (~--runmode=chained~) ::
148
-
149
- Set of runs that are usually covered by using something like rake, make, etc...
195
+ Furthermore,since we are using Org mode syntax, it is possible
196
+ to reuse this setup file by including it into another Org file:
150
197
 
151
- - runs where the blocks are run and matched against the expected results for testing (~--runmode=spec~) ::
198
+ #+begin_src sh
199
+ ,#+TITLE: Another setup
152
200
 
153
- Each block is run and there is an assertion to check whether the contents in ~#+RESULTS~ block match
201
+ Include the code blocks from the server into this:
202
+  
203
+ ,#+include: "server.org"
154
204
 
155
- Besides being able to specify which kind of run to use through an option, it is also possible
156
- to define this within the Org mode file itself as an in buffer setting:
157
-
158
- #+begin_src org
159
- ,#+TITLE: Defining the runmode as an in buffer setting
160
- ,#+runmode: sequential
205
+ ,#+name: install_org_mode
206
+ ,#+begin_src sh
207
+ apt-get install org-mode -y
208
+ ,#+end_src
209
+ #+end_src
161
210
  #+end_src
162
211
 
163
- *** Parallel runs
212
+ Since this a run that involves converging into a state,
213
+ it would be run sequentially with idempotency checks applied:
214
+
215
+ : sudo org-converge setup.org
164
216
 
165
- The following is an example of running 3 processes
166
- in parallel by defining them as code blocks from
167
- an Org mode file:
217
+ *** Dependencies based runs
218
+
219
+ In this type of runs we use the =:after= and =:before=
220
+ header arguments to specify the prerequisites for a code block to run,
221
+ similar to some of the functioality provided by tools like =rake=
222
+ (Behind the scenes, these arguments create =Rake= tasks)
223
+
224
+ In order for this kind of run to work, it has to be specified
225
+ what is the task that we are converging to by using
226
+ the =#+final_task:= in buffer setting:
168
227
 
169
228
  #+begin_src sh
170
- ,#+TITLE: Running Org babel processes in parallel
171
-  
172
- ,* Print with different languages
173
-   
174
- ,#+name: hello_from_bash
175
- ,#+begin_src sh :shebang #!/bin/bash
176
- while true; do echo "hello world from bash"; sleep 1; done
229
+ ,#+TITLE: Linked tasks example
230
+ ,#+runmode: tasks
231
+ ,#+final_task: final
232
+
233
+ ,#+name: second
234
+ ,#+begin_src sh :after first
235
+ for i in `seq 5 10`; do
236
+ echo $i >> out.log
237
+ done
177
238
  ,#+end_src
178
-    
179
- ,#+name: hello_from_ruby
180
- ,#+begin_src ruby :shebang #!/usr/local/bin/ruby
181
- $stdout.sync = true
182
- loop { puts "hello world from ruby" ; sleep 1 }
239
+
240
+ ,#+name: first
241
+ ,#+begin_src ruby
242
+ 5.times { |n| File.open("out.log", "a") {|f| f.puts n } }
243
+ ,#+end_src
244
+
245
+ ,#+name: final
246
+ ,#+begin_src python :after second :results output
247
+ print "Wrapping up with Python in the end"
248
+ f = open('out.log', 'a')
249
+ f.write('11')
250
+ f.close()
251
+ ,#+end_src
252
+
253
+ ,#+name: prologue
254
+ ,#+begin_src sh :before first :results output
255
+ echo "init" > out.log
183
256
  ,#+end_src
184
-    
185
- ,#+name: hello_from_python
186
- ,#+begin_src python :shebang #!/usr/bin/python
187
- import time
188
- import sys
189
- for i in range(0,100):
190
- print "hello world from python"
191
- sys.stdout.flush()
192
- time.sleep(1)
193
- ,#+end_src
194
257
  #+end_src
195
258
 
196
- We store this in a file named =hello.org= and then run it as follows:
259
+ : org-spec chained-example.org --runmode=chained
197
260
 
198
- #+begin_src sh
199
- org-run hello.org
200
- #+end_src
261
+ Instead of using =--runmode= options, it is also possible to just declare in buffer
262
+ that the Org file should be run chained mode.
201
263
 
202
- This would produce an output similar to the following:
264
+ #+begin_src org
265
+ ,#+TITLE: Defining the runmode as an in buffer setting
266
+ ,#+runmode: chained
267
+ #+end_src
268
+
269
+ Sample output:
203
270
 
204
271
  #+begin_src sh
205
- [2014-05-04T19:23:40 +0900] Tangling 0 files...
206
- [2014-05-04T19:23:40 +0900] Tangling succeeded!
207
- [2014-05-04T19:23:40 +0900] Tangling 3 scripts within directory: /Users/wallyqs/repos/org-converge/run...
208
- [2014-05-04T19:23:40 +0900] Running code blocks now! (3 runnable blocks found in total)
209
- [2014-05-04T19:23:40 +0900] hello_from_bash (4664) -- started with pid 4664
210
- [2014-05-04T19:23:40 +0900] hello_from_ruby (4665) -- started with pid 4665
211
- [2014-05-04T19:23:40 +0900] hello_from_python (4666) -- started with pid 4666
212
- [2014-05-04T19:23:40 +0900] hello_from_bash (4664) -- hello world from bash
213
- [2014-05-04T19:23:41 +0900] hello_from_ruby (4665) -- hello world from ruby
214
- [2014-05-04T19:23:41 +0900] hello_from_python (4666) -- hello world from python
215
- [2014-05-04T19:23:42 +0900] hello_from_ruby (4665) -- hello world from ruby
272
+ [2014-06-07T18:14:25 +0900] Running final task: final
273
+ [2014-06-07T18:14:25 +0900] prologue -- started with pid 20035
274
+ [2014-06-07T18:14:25 +0900] prologue -- exited with code 0
275
+ [2014-06-07T18:14:25 +0900] first -- started with pid 20036
276
+ [2014-06-07T18:14:26 +0900] first -- exited with code 0
277
+ [2014-06-07T18:14:26 +0900] second -- started with pid 20038
278
+ [2014-06-07T18:14:26 +0900] second -- exited with code 0
279
+ [2014-06-07T18:14:26 +0900] final -- started with pid 20040
280
+ [2014-06-07T18:14:26 +0900] final -- Wrapping up with Python in the end
281
+ [2014-06-07T18:14:26 +0900] final -- exited with code 0
216
282
  #+end_src
217
283
 
218
- Also possible to specify the name of the block to be ran:
284
+ *** Remote runs
285
+
286
+ For any of the cases above, it is also possible to specify
287
+ whether the code blocks should be run remotely on another node.
288
+ This is done by using =:dir= in the code block header argument.
219
289
 
220
290
  #+begin_src sh
221
- org-run hello.org --name from_ruby
291
+ ,#+sshidentifyfile: vagrant/keys/vagrant
292
+ ,#+name: remote-bash-code-block
293
+ ,#+begin_src sh :results output :dir /vagrant@127.0.0.1#2222:/tmp
294
+ random_number=$RANDOM
295
+ for i in `seq 1 10`; do echo "[$random_number] Running script is $0 being run from `pwd`"; done
296
+ ,#+end_src
222
297
  #+end_src
223
298
 
224
- *** Spec mode
299
+ Note that in order for the above to work, it is also needed to set identity to be used by ssh.
225
300
 
226
- In case the Org mode file has a results block which represents the expected result,
227
- there is an ~org-spec~ command which can be useful to check whether there is change.
228
- For example, given the following file stored in ~test.org~:
301
+ *** Asserted runs
302
+
303
+ In case the Org mode file has a results block which represents the expected result,
304
+ there is an ~org-spec~ command which can be useful to check whether there was a change
305
+ that no longer makes the results from the Org file valid. Example:
229
306
 
230
307
  #+begin_src sh
231
308
  ,#+TITLE: Expected results example
@@ -252,14 +329,17 @@ For example, given the following file stored in ~test.org~:
252
329
  ,#+end_example
253
330
  #+end_src
254
331
 
255
- We can be able to verify whether this is still correct by running ~org-spec test.org~
332
+ We can be able to verify whether this is still correct by running:
333
+
334
+ : org-spec test.org
256
335
 
257
336
  #+begin_src sh
258
337
  Checking results from 'hello' code block: OK
259
338
  #+end_src
260
339
 
261
- As an example, let's say that the behavior of the original code block changed, and now says hello 5 times instead.
262
- In that case the output would be as follows:
340
+ As an example, let's say that the behavior of the original code block changed,
341
+ and now says hello 5 times instead.
342
+ In that case the output would be as follows:
263
343
 
264
344
  #+begin_src diff
265
345
  Checking results from 'hello' code block: DIFF
@@ -283,6 +363,6 @@ Checking results from 'hello' code block: DIFF
283
363
 
284
364
  ** Contributing
285
365
 
286
- The project is in very early development at this moment, but if you
287
- feel that it is interesting enough, please create a ticket to start
366
+ The project is still in very early development and a proof of concept at this moment.
367
+ But if you feel that it is interesting enough, please create a ticket to start
288
368
  the discussion.
data/TODO CHANGED
@@ -17,6 +17,7 @@ Some of these need further work on the Org Ruby parser.
17
17
  : org-converge setupfile.org --dry-run
18
18
  - [ ] Bugfix for when results blocks have only inline examples or images
19
19
  - [ ] Bugfix for when the result from a ~org-spec~ run has non-zero exit status
20
+ - [ ] Tangling should be idempotent as well...
20
21
  - [ ] =:eval=
21
22
  For evaling blocks (off by default)
22
23
  - [ ] =:onerror=
@@ -35,6 +36,10 @@ Some of these need further work on the Org Ruby parser.
35
36
  Also part of the idempotency checks.
36
37
  - [ ] =:env= and =#+envfile:=
37
38
 
39
+ * [1/1] 0.0.16
40
+
41
+ - [X] Remove timeout feature.
42
+
38
43
  * [1/1] 0.0.15
39
44
 
40
45
  - [X] Can use =:dir= for running a process remotely via ssh.
@@ -0,0 +1,18 @@
1
+ #+TITLE: Sample parallel run
2
+
3
+ #+name: infinite-worker-in-ruby
4
+ #+begin_src ruby
5
+ $stdout.sync = true
6
+ loop { puts "working!"; sleep 1; }
7
+ #+end_src
8
+
9
+ #+name: infinite-worker-in-python
10
+ #+begin_src python :procs 2
11
+ import sys
12
+ import time
13
+
14
+ while True:
15
+ print "working too"
16
+ sys.stdout.flush()
17
+ time.sleep(1)
18
+ #+end_src
@@ -0,0 +1,22 @@
1
+ #+TITLE: Sample sequential run
2
+ #+runmode: sequential
3
+
4
+ #+name: first
5
+ #+begin_src sh
6
+ echo "first"
7
+ #+end_src
8
+
9
+ #+name: second
10
+ #+begin_src sh
11
+ echo "second"
12
+ #+end_src
13
+
14
+ #+name: third
15
+ #+begin_src sh
16
+ echo "third"
17
+ #+end_src
18
+
19
+ #+name: fourth
20
+ #+begin_src sh
21
+ echo "fourth"
22
+ #+end_src
@@ -277,14 +277,15 @@ module OrgConverge
277
277
  else
278
278
  pid = process.call
279
279
  end
280
- if timeout > 0
281
- sleep timeout
282
- # FIXME: Kill children properly
283
- o = `ps -ef | awk '$3 == #{pid} { print $2 }'`
284
- o.each_line { |cpid| Process.kill(:TERM, cpid.to_i) }
285
- Process.kill(:TERM, pid)
286
- Thread.current.kill
287
- end
280
+ # TODO: This doesn't work
281
+ # if timeout > 0
282
+ # sleep timeout
283
+ # # FIXME: Kill children properly
284
+ # o = `ps -ef | awk '$3 == #{pid} { print $2 }'`
285
+ # o.each_line { |cpid| Process.kill(:TERM, cpid.to_i) }
286
+ # Process.kill(:TERM, pid)
287
+ # Thread.current.kill
288
+ # end
288
289
  end
289
290
  else
290
291
  pid = process.call
@@ -1,3 +1,3 @@
1
1
  module OrgConverge
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -3,7 +3,7 @@
3
3
  We have the following process, but it will take 5 seconds to start...
4
4
 
5
5
  #+name: waits-5-seconds
6
- #+begin_src sh :sleep 2
6
+ #+begin_src sh :sleep 1
7
7
  echo "Wait..."
8
8
  for i in `seq 1 4`;
9
9
  do
@@ -21,7 +21,16 @@ This one on the other hand starts as soon as possible:
21
21
  echo "whoosh" > out.log
22
22
  #+end_src
23
23
 
24
- ** COMMENT Fails sometimes
24
+ *** TODO The following should not be necessary
25
+
26
+ Need to fix this:
27
+
28
+ #+name: just-sleeps
29
+ #+begin_src sh
30
+ sleep 5
31
+ #+end_src
32
+
33
+ ** COMMENT Fails sometimes....
25
34
 
26
35
  #+name: timeout-in-3-seconds
27
36
  #+begin_src sh :timeout 5
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org-converge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Waldemar Quevedo
@@ -133,7 +133,6 @@ executables:
133
133
  extensions: []
134
134
  extra_rdoc_files: []
135
135
  files:
136
- - .gitmodules
137
136
  - .travis.yml
138
137
  - Gemfile
139
138
  - LICENSE
@@ -147,6 +146,8 @@ files:
147
146
  - examples/apt-get-install/setup.org
148
147
  - examples/fluentd/setup.org
149
148
  - examples/macro-config/setup.org
149
+ - examples/parallel/run.org
150
+ - examples/sequential/run.org
150
151
  - examples/simple/setup.org
151
152
  - lib/org-converge.rb
152
153
  - lib/org-converge/babel.rb
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "org-ruby"]
2
- path = org-ruby
3
- url = https://github.com/wallyqs/org-ruby