ventriloquist 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +3 -3
- data/README.md +7 -4
- data/development/Vagrantfile +1 -1
- data/lib/ventriloquist/cap/debian/erlang_install.rb +39 -0
- data/lib/ventriloquist/platforms/erlang.rb +11 -0
- data/lib/ventriloquist/platforms_builder.rb +2 -0
- data/lib/ventriloquist/plugin.rb +5 -0
- data/lib/ventriloquist/version.rb +1 -1
- data/services/build-all.sh +2 -0
- data/services/mailcatcher/Dockerfile +13 -0
- data/spec/unit/service_spec.rb +3 -1
- data/ventriloquist.gemspec +1 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82064f44e25d2e9a5ee7ea37eabb54ad37c6c2d1
|
4
|
+
data.tar.gz: 6935426176d13de57a75f25f657a000da4b702aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5811c24a91a30e7f14c409e7f9aeccc91a68ea619e865d815194676397e131330ecb2c86d4b8ef0b33e5dde71b6d24880d63e0f8519a0d08b909b2347a62ef8c
|
7
|
+
data.tar.gz: 0d68175655d58a09e2a38d69a1f98aa3a75f0cc80780c47a60cdf8e231b7c551f3ae8530398539e96706e8f5b9ed32f124e163220a269ab69c00761d77fc5160
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## [0.2.0](https://github.com/fgrehm/ventriloquist/compare/v0.1.0...v0.2.0) (October 3, 2013)
|
2
|
+
|
3
|
+
FEATURES:
|
4
|
+
|
5
|
+
- Erlang support [[GH-12]]
|
6
|
+
- Solr service [[GH-13]]
|
7
|
+
- MailCatcher service [[GH-8]]
|
8
|
+
|
9
|
+
BUG FIXES:
|
10
|
+
|
11
|
+
- Bump dependency on Vocker to ~> 0.3.1 in order to fix errors when trying to
|
12
|
+
provision a machine that already have a service / container running.
|
13
|
+
|
1
14
|
## 0.1.0 (September 10, 2013)
|
2
15
|
|
3
16
|
- Initial public release.
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
[GH-12]: https://github.com/fgrehm/ventriloquist/issues/12
|
21
|
+
[GH-13]: https://github.com/fgrehm/ventriloquist/issues/13
|
22
|
+
[GH-8]: https://github.com/fgrehm/ventriloquist/issues/8
|
data/Gemfile.lock
CHANGED
@@ -38,8 +38,8 @@ GIT
|
|
38
38
|
PATH
|
39
39
|
remote: .
|
40
40
|
specs:
|
41
|
-
ventriloquist (0.
|
42
|
-
vocker (~> 0.3.
|
41
|
+
ventriloquist (0.2.0)
|
42
|
+
vocker (~> 0.3.1)
|
43
43
|
|
44
44
|
GEM
|
45
45
|
remote: https://rubygems.org/
|
@@ -99,7 +99,7 @@ GEM
|
|
99
99
|
simplecov-html (0.7.1)
|
100
100
|
slop (3.4.6)
|
101
101
|
thor (0.18.1)
|
102
|
-
vocker (0.3.
|
102
|
+
vocker (0.3.1)
|
103
103
|
|
104
104
|
PLATFORMS
|
105
105
|
ruby
|
data/README.md
CHANGED
@@ -23,8 +23,8 @@ for development on [Discourse](http://www.discourse.org/):
|
|
23
23
|
Vagrant.configure("2") do |config|
|
24
24
|
config.vm.box = "quantal64"
|
25
25
|
config.vm.provision :ventriloquist do |env|
|
26
|
-
env.services
|
27
|
-
env.platforms
|
26
|
+
env.services << %w( redis pg:9.1 mailcatcher )
|
27
|
+
env.platforms << %w( nodejs ruby:1.9.3 )
|
28
28
|
end
|
29
29
|
end
|
30
30
|
```
|
@@ -40,6 +40,7 @@ end
|
|
40
40
|
languages / tools.
|
41
41
|
|
42
42
|
|
43
|
+
|
43
44
|
## Status
|
44
45
|
|
45
46
|
Early development, the feature set and configuration format might change rapidly
|
@@ -52,10 +53,11 @@ and has only been tested on the following Ubuntu 13.04 Vagrant VMs using Docker
|
|
52
53
|
_Please note that in order to use the plugin on [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)
|
53
54
|
containers you need some extra steps described below_
|
54
55
|
|
55
|
-
On its current state is
|
56
|
+
On its current state is an "stable experiment", I've been using a setup with the
|
56
57
|
plugin without issues for more than a week now.
|
57
58
|
|
58
59
|
|
60
|
+
|
59
61
|
## Installation
|
60
62
|
|
61
63
|
Make sure you have Vagrant 1.2+ and run:
|
@@ -95,7 +97,7 @@ PostgreSQL will involve installing the `postgresql-client` package and adding an
|
|
95
97
|
`export PGHOST=localhost` to the guest's `/etc/profiles.d/ventriloquist.sh` so that
|
96
98
|
the `psql` client works without any extra params.
|
97
99
|
|
98
|
-
Please note that all of the builtin images are available on the Docker
|
100
|
+
Please note that all of the builtin images are available on the [Docker index](https://index.docker.io/)
|
99
101
|
with the `fgrehm/ventriloquist-` prefix that is ommited on the table below:
|
100
102
|
|
101
103
|
| Name | Provides | Notes |
|
@@ -106,6 +108,7 @@ with the `fgrehm/ventriloquist-` prefix that is ommited on the table below:
|
|
106
108
|
| pg:9.1 | PostgreSQL 9.1 | Same as above |
|
107
109
|
| mysql | 5.5 | Runs on port 3306 and creates a `/home/vagrant/.my.conf`. It will also install the `mysql-client` and `libmysqlclient-dev` packages on the guest. |
|
108
110
|
| redis | 2.4.15 | Runs on port 6379 and installs / compiles the `redis-cli` excutable |
|
111
|
+
| mailcatcher | 0.5.12 | SMPT server runs on 1025 and web interface on 1080 |
|
109
112
|
|
110
113
|
Since services are just Docker images, you can build your own image, push to the
|
111
114
|
registry and use it on your Vagrantfile, you'll just need to specify its fully
|
data/development/Vagrantfile
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Ventriloquist
|
3
|
+
module Cap
|
4
|
+
module Debian
|
5
|
+
module ErlangInstall
|
6
|
+
ERLANG_SOLUTIONS_PKG = "https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb"
|
7
|
+
|
8
|
+
def self.erlang_install(machine)
|
9
|
+
machine.communicate.tap do |comm|
|
10
|
+
if ! comm.test('which erl > /dev/null')
|
11
|
+
machine.env.ui.info('Installing Erlang')
|
12
|
+
|
13
|
+
path = download_path(comm)
|
14
|
+
unless comm.test("test -f #{path}")
|
15
|
+
machine.guest.capability(:download, ERLANG_SOLUTIONS_PKG, path)
|
16
|
+
end
|
17
|
+
comm.sudo("dpkg -i #{path}")
|
18
|
+
|
19
|
+
comm.sudo('apt-get update')
|
20
|
+
comm.sudo('apt-get -y install erlang')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def self.download_path(comm)
|
28
|
+
# If vagrant-cachier apt cache bucket is available, drop it there
|
29
|
+
if comm.test("test -d /tmp/vagrant-cache/apt")
|
30
|
+
"/tmp/vagrant-cache/apt/erlang-solutions_1.0_all.deb"
|
31
|
+
else
|
32
|
+
"/tmp/erlang-solutions_1.0_all.deb"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -3,6 +3,7 @@ require_relative 'platforms/ruby'
|
|
3
3
|
require_relative 'platforms/nodejs'
|
4
4
|
require_relative 'platforms/phantomjs'
|
5
5
|
require_relative 'platforms/go'
|
6
|
+
require_relative 'platforms/erlang'
|
6
7
|
|
7
8
|
module VagrantPlugins
|
8
9
|
module Ventriloquist
|
@@ -12,6 +13,7 @@ module VagrantPlugins
|
|
12
13
|
'nodejs' => Platforms::NodeJS,
|
13
14
|
'phantomjs' => Platforms::PhantomJS,
|
14
15
|
'go' => Platforms::Go,
|
16
|
+
'erlang' => Platforms::Erlang
|
15
17
|
}
|
16
18
|
|
17
19
|
def initialize(platforms, mapping = MAPPING)
|
data/lib/ventriloquist/plugin.rb
CHANGED
@@ -114,6 +114,11 @@ module VagrantPlugins
|
|
114
114
|
require_relative "cap/linux/rvm_install_ruby"
|
115
115
|
Cap::Linux::RvmInstallRuby
|
116
116
|
end
|
117
|
+
|
118
|
+
guest_capability("debian", "erlang_install") do
|
119
|
+
require_relative "cap/debian/erlang_install"
|
120
|
+
Cap::Debian::ErlangInstall
|
121
|
+
end
|
117
122
|
end
|
118
123
|
end
|
119
124
|
end
|
data/services/build-all.sh
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
# MailCatcher X.X.X
|
2
|
+
#
|
3
|
+
# VERSION 0.0.1
|
4
|
+
|
5
|
+
FROM fgrehm/ventriloquist-base
|
6
|
+
MAINTAINER Fabio Rehm "fgrehm@gmail.com"
|
7
|
+
|
8
|
+
RUN apt-get install -y ruby ruby-dev sqlite3 libsqlite3-dev && apt-get clean
|
9
|
+
RUN gem install mailcatcher --no-ri --no-rdoc
|
10
|
+
|
11
|
+
EXPOSE 1025:1025
|
12
|
+
EXPOSE 1080:1080
|
13
|
+
CMD ["/usr/local/bin/mailcatcher", "-f", "--ip", "0.0.0.0"]
|
data/spec/unit/service_spec.rb
CHANGED
@@ -10,7 +10,9 @@ describe VagrantPlugins::Ventriloquist::Service do
|
|
10
10
|
|
11
11
|
fake(:docker_client)
|
12
12
|
fake(:communicator) { VagrantPlugins::CommunicatorSSH::Communicator }
|
13
|
-
|
13
|
+
fake(:ui) { Vagrant::UI::Interface }
|
14
|
+
let(:env) { fake(:environment, ui: ui) }
|
15
|
+
let(:machine) { fake(:machine, communicate: communicator, env: env) }
|
14
16
|
|
15
17
|
let(:service_name) { 'dbserver' }
|
16
18
|
let(:service_conf) { { image: 'user/dbserver', tag: 'latest' } }
|
data/ventriloquist.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ventriloquist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vocker
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
19
|
+
version: 0.3.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.
|
26
|
+
version: 0.3.1
|
27
27
|
description: Vagrant development environments made easy
|
28
28
|
email:
|
29
29
|
- fgrehm@gmail.com
|
@@ -33,6 +33,7 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- .gitignore
|
35
35
|
- .rspec
|
36
|
+
- .travis.yml
|
36
37
|
- CHANGELOG.md
|
37
38
|
- Gemfile
|
38
39
|
- Gemfile.lock
|
@@ -42,6 +43,7 @@ files:
|
|
42
43
|
- Rakefile
|
43
44
|
- development/Vagrantfile
|
44
45
|
- lib/ventriloquist.rb
|
46
|
+
- lib/ventriloquist/cap/debian/erlang_install.rb
|
45
47
|
- lib/ventriloquist/cap/debian/git_install.rb
|
46
48
|
- lib/ventriloquist/cap/debian/go_install.rb
|
47
49
|
- lib/ventriloquist/cap/debian/install_build_tools.rb
|
@@ -63,6 +65,7 @@ files:
|
|
63
65
|
- lib/ventriloquist/config.rb
|
64
66
|
- lib/ventriloquist/errors.rb
|
65
67
|
- lib/ventriloquist/platform.rb
|
68
|
+
- lib/ventriloquist/platforms/erlang.rb
|
66
69
|
- lib/ventriloquist/platforms/go.rb
|
67
70
|
- lib/ventriloquist/platforms/nodejs.rb
|
68
71
|
- lib/ventriloquist/platforms/phantomjs.rb
|
@@ -80,6 +83,7 @@ files:
|
|
80
83
|
- services/base/Dockerfile
|
81
84
|
- services/build-all.sh
|
82
85
|
- services/elasticsearch/Dockerfile
|
86
|
+
- services/mailcatcher/Dockerfile
|
83
87
|
- services/memcached/Dockerfile
|
84
88
|
- services/mysql/Dockerfile
|
85
89
|
- services/mysql/config/bin/add-mysql-user
|