baleen 0.1.0 → 0.1.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 +64 -7
- data/bin/baleen-server +1 -1
- data/lib/baleen/version.rb +1 -1
- data/poc/features/step_definitions/fake_test_steps.rb +2 -2
- data/poc/features/t1.feature +6 -6
- metadata +2 -4
- data/poc/features/cpu_bound.feature +0 -3
- data/poc/features/io_bound.feature +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2926ffd6301f080fb74885a2d760a53d5155bef7
|
4
|
+
data.tar.gz: 7ab9916383f64ee4fa05c409aeab5dd026b3dc79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ea677e359b427e402a1b061221063f24435c7805ff96ce12f3d308454ddbb96ecb8ced0184c0b334b51c13ad0e70b2c7a3d6ee5124f297381e9851d0b048d3
|
7
|
+
data.tar.gz: 7784401b71d0e19d4ef0ad49a72a7c73f509e110cd7b89cc4bd97778fe8d365f4363d238d0fb6b50ceb6c75feb1bd2a789f2bc5a30ee9cca77ce708a8cecb96c
|
data/README.md
CHANGED
@@ -2,22 +2,79 @@
|
|
2
2
|
Baleen is a test runner powered by Docker and Celluloid::IO.
|
3
3
|
Baleen allows you to run ruby standard tests such as Cucumber or Rspec in totally isolated environment and parallel.
|
4
4
|
|
5
|
-
By using Baleen, you can
|
5
|
+
By using Baleen, you can tests in a dedicated linux container, so each test will not affect the state of other tests.
|
6
6
|
Also, Baleen will speed up your tests since multiple containers run their tests in parallel.
|
7
7
|
|
8
8
|
## Requirement
|
9
|
-
Linux machine with Docker installed
|
9
|
+
* Linux machine with Docker installed
|
10
|
+
* ruby-2.0.0 or later
|
10
11
|
|
11
12
|
## Installation
|
12
13
|
|
13
|
-
|
14
|
+
gem install baleen
|
14
15
|
|
15
16
|
## Usage
|
17
|
+
Baleen is server-client model. You need to run baleen-server which talks Docker API and baleen (client) to put your request to the server.
|
16
18
|
|
19
|
+
#### Running Baleen server
|
20
|
+
You can run baleen server with baleen-server command.
|
17
21
|
|
18
|
-
|
22
|
+
$ baleen-server start
|
19
23
|
|
20
|
-
|
24
|
+
baleen-server will take below options
|
25
|
+
|
26
|
+
* --docker_host: specify url or ip of server where Docker server is running. Default: 127.0.0.1
|
27
|
+
* --docker_port: specify port that Docker server is listening to. Default: 4243
|
28
|
+
* --port: specify port that Baleen server is listening to. Default: 5533
|
29
|
+
* --debug: you can specify this option to enable debug mode to print out debug message to console. No argument is required. Default: disabled
|
30
|
+
|
31
|
+
#### Running Baleen client
|
32
|
+
You can run baleen client with simply baleen command. baleen command will take one subcommand to specify which kind of test you want to run on baleen server. With v0.0,1. only cucucmber subcommand is available.
|
33
|
+
|
34
|
+
$ baleen cucumber --image kimh/baleen-poc --files features --work_dir /git/baleen/poc --before_command "source /etc/profile" --concurrency 6
|
35
|
+
|
36
|
+
baleen command wil take below options
|
37
|
+
|
38
|
+
* --port: specify port number of baleen server. Default: 5533
|
39
|
+
* --image: specify the name of image that you want to use to run your tests. Mandatory option
|
40
|
+
* --files: specify directory or file of tests that you want to run. Default is /features with v0.0.1
|
41
|
+
* --work_dir: specify working directory. Default: ./
|
42
|
+
* --before_command: specify commands that you want to execute before running your tests. Default: nil
|
43
|
+
* --concurrency: specify number of containers that you want to run at the same time. Default: 2
|
44
|
+
|
45
|
+
## Try Baleen with POC app
|
46
|
+
If you pull kimh/baleen-poc image to your Docker, you can see how baleen works. In this example, you are running Docker at 192.168.0.1, baleen-server @192.168.0.2 that points to the Docker server, and baleen client to point to the baleen server.
|
47
|
+
|
48
|
+
First, pull the image at Docker server
|
49
|
+
|
50
|
+
$ docker pull kimh/baleen-poc
|
51
|
+
|
52
|
+
By pulling kimh/baleen-poc, you will have a container that has the latest baleen project, installed under /git.
|
53
|
+
You need to run Docker with API enabled (Docker server listens 127.0.0.1 by default) by modifying /etc/init/docker.conf.
|
54
|
+
|
55
|
+
$ vi /etc/init/docker.conf
|
56
|
+
|
57
|
+
description "Docker daemon"
|
58
|
+
|
59
|
+
start on filesystem or runlevel [2345]
|
60
|
+
stop on runlevel [!2345]
|
61
|
+
|
62
|
+
respawn
|
63
|
+
|
64
|
+
script
|
65
|
+
/usr/bin/docker -d -H=tcp://0.0.0.0:4243/ # Add this line
|
66
|
+
#/usr/bin/docker -d # and comment out this line
|
67
|
+
end script
|
68
|
+
|
69
|
+
And restart your machine to apply the new configuration.
|
70
|
+
|
71
|
+
Next, run baleen-server. Make sure you specify correct ip of the machine that is running Docker.
|
72
|
+
|
73
|
+
$ baleen-server --docker-host 192.168.0.1
|
74
|
+
|
75
|
+
Finally, run baleen. Make sure to specify correct ip of the machine that is running baleen-server. Below command will run all features under /git/baleen/poc with three containers.
|
76
|
+
|
77
|
+
$ baleen cucumber --host 192.168.0.2 --image kimh/baleen-poc --work_dir /git/baleen/poc --before_command "export RAILS_ENV=test; source /etc/profile" --concurrency 3
|
21
78
|
[Summary]
|
22
79
|
Result: Pass
|
23
80
|
Time: 0min 38sec
|
@@ -58,8 +115,6 @@ Baleen is server-client model. You need to run baleen-server which talks Docker
|
|
58
115
|
|
59
116
|
....snip.....
|
60
117
|
|
61
|
-
|
62
|
-
|
63
118
|
## Contributing
|
64
119
|
|
65
120
|
1. Fork it
|
@@ -68,3 +123,5 @@ Baleen is server-client model. You need to run baleen-server which talks Docker
|
|
68
123
|
4. Push to the branch (`git push origin my-new-feature`)
|
69
124
|
5. Create new Pull Request
|
70
125
|
|
126
|
+
|
127
|
+
|
data/bin/baleen-server
CHANGED
data/lib/baleen/version.rb
CHANGED
data/poc/features/t1.feature
CHANGED
@@ -2,11 +2,11 @@ Feature: t1
|
|
2
2
|
Scenario: Benchmark for IO bound operation
|
3
3
|
Then io intensive operation
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
Scenario: Benchmark for CPU bound operation
|
6
|
+
Then cpu intensive operation
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
Scenario: Benchmark for IO bound operation
|
9
|
+
Then io intensive operation
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
Scenario: Benchmark for CPU bound operation
|
12
|
+
Then cpu intensive operation
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baleen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim, Hirokuni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -217,8 +217,6 @@ files:
|
|
217
217
|
- poc/db/migrate/20130914144710_create_ar_profiles.rb
|
218
218
|
- poc/db/schema.rb
|
219
219
|
- poc/db/seeds.rb
|
220
|
-
- poc/features/cpu_bound.feature
|
221
|
-
- poc/features/io_bound.feature
|
222
220
|
- poc/features/step_definitions/fake_test_steps.rb
|
223
221
|
- poc/features/support/env.rb
|
224
222
|
- poc/features/support/ruby_prof_cucumber.rb
|