ventriloquist 0.4.1 → 0.5.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 +0 -4
- data/CHANGELOG.md +31 -0
- data/DEVELOPMENT.md +37 -0
- data/Gemfile +13 -13
- data/Gemfile.lock +48 -50
- data/LICENSE.txt +1 -1
- data/README.md +65 -114
- data/development/Vagrantfile +20 -55
- data/lib/ventriloquist/cap/platforms/debian/elixir_install.rb +23 -16
- data/lib/ventriloquist/cap/platforms/debian/erlang_install.rb +13 -10
- data/lib/ventriloquist/cap/platforms/debian/go_install.rb +18 -3
- data/lib/ventriloquist/cap/platforms/debian/phantomjs_install.rb +22 -4
- data/lib/ventriloquist/cap/platforms/debian/python.rb +2 -0
- data/lib/ventriloquist/cap/platforms/linux/nvm_install_nodejs.rb +2 -0
- data/lib/ventriloquist/cap/platforms/linux/rvm_install_ruby.rb +2 -0
- data/lib/ventriloquist/cap/services/debian/ventriloquist_containers_upstart.rb +1 -1
- data/lib/ventriloquist/cap/utils/debian/prepare_container_for_docker.rb +35 -0
- data/lib/ventriloquist/cap/utils/linux/download.rb +24 -10
- data/lib/ventriloquist/cap/utils.rb +5 -0
- data/lib/ventriloquist/config.rb +1 -1
- data/lib/ventriloquist/platforms/elixir.rb +7 -2
- data/lib/ventriloquist/platforms/erlang.rb +3 -0
- data/lib/ventriloquist/platforms/go.rb +7 -2
- data/lib/ventriloquist/platforms/nodejs.rb +9 -2
- data/lib/ventriloquist/platforms/phantomjs.rb +7 -2
- data/lib/ventriloquist/platforms/python.rb +9 -2
- data/lib/ventriloquist/platforms/ruby.rb +9 -2
- data/lib/ventriloquist/platforms_builder.rb +7 -2
- data/lib/ventriloquist/plugin.rb +0 -4
- data/lib/ventriloquist/provisioner.rb +10 -5
- data/lib/ventriloquist/service.rb +4 -5
- data/lib/ventriloquist/services/elastic_search.rb +1 -1
- data/lib/ventriloquist/services/mail_catcher.rb +1 -1
- data/lib/ventriloquist/services/memcached.rb +1 -1
- data/lib/ventriloquist/services/mysql.rb +1 -1
- data/lib/ventriloquist/services/postgresql.rb +1 -1
- data/lib/ventriloquist/services/redis.rb +2 -2
- data/lib/ventriloquist/services/rethink_db.rb +1 -5
- data/lib/ventriloquist/services_builder.rb +10 -7
- data/lib/ventriloquist/version.rb +1 -1
- data/services/base/Dockerfile +19 -11
- data/services/build-all.sh +11 -11
- data/services/elasticsearch/Dockerfile +4 -1
- data/services/mailcatcher/Dockerfile +11 -1
- data/services/memcached/Dockerfile +9 -4
- data/services/mysql/5.5/Dockerfile +1 -0
- data/services/mysql/5.6/Dockerfile +8 -4
- data/services/openjdk7/Dockerfile +6 -1
- data/services/postgresql/9.1/Dockerfile +8 -5
- data/services/postgresql/9.1/config/bin/prepare-postgres +2 -0
- data/services/postgresql/9.2/Dockerfile +7 -5
- data/services/postgresql/9.2/config/bin/prepare-postgres +2 -0
- data/services/postgresql/9.3/Dockerfile +5 -5
- data/services/postgresql/9.3/config/bin/prepare-postgres +2 -0
- data/services/redis/Dockerfile +7 -4
- data/services/rethinkdb/Dockerfile +8 -1
- data/spec/spec_helper.rb +7 -9
- data/spec/unit/platforms_builder_spec.rb +5 -9
- data/spec/unit/service_spec.rb +14 -16
- data/spec/unit/services_builder_spec.rb +10 -20
- data/ventriloquist.gemspec +0 -2
- metadata +11 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb79b6f3f2aca4996289263b71f00b7c287d2147
|
4
|
+
data.tar.gz: c7fa55870588d8600bebf38e98e34b4afe6ee6e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edf98aed4a75d4c6b8cb77069fc90d5fc358a364950819e509e331f64d41cc70791ac6f0bb640b08fa69f50535c9bc481becdffae3d12d24aa2d6f2e0702a38a
|
7
|
+
data.tar.gz: 96e17b1498023728c600b1e00399d84513141de538072dbde3c159e719dc16d1acf7091878cdf76d88a81c584b404a4bfaaeadf621d505a968b9abec4d1d233c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
## [0.5.0](https://github.com/fgrehm/ventriloquist/compare/v0.4.1...v0.5.0) (Apr 06, 2014)
|
2
|
+
|
3
|
+
BACKWARDS INCOMPATIBILITY:
|
4
|
+
|
5
|
+
- Support for Vagrant < 1.5 has been removed, please try to use a previous plugin
|
6
|
+
version if you can't upgrade.
|
7
|
+
- Services / platforms versions are now required to be specified from Vagrantfile
|
8
|
+
to increase reproducibility / reduce the chances of surprises and simplify plugin
|
9
|
+
maintenance.
|
10
|
+
- _All_ of the services images have been rebuilt from scratch and are now
|
11
|
+
trusted builds.
|
12
|
+
- The base image for services was changed from Ubuntu Quantal 12.10 to Debian Jessie.
|
13
|
+
|
14
|
+
FEATURES:
|
15
|
+
|
16
|
+
- Added shortcut for installing multiple ruby / nodejs / python versions from `Vagrantfile`
|
17
|
+
|
18
|
+
IMPROVEMENTS:
|
19
|
+
|
20
|
+
- core: Bumped docker to 0.9.1
|
21
|
+
- core: Removed dependency on [vocker]
|
22
|
+
- core: Simplified usage with vagrant-lxc
|
23
|
+
- platforms: Improved handling of multiple versions specifications
|
24
|
+
- platforms: Show message when already installed instead of keeping silent
|
25
|
+
- platforms/phantomjs: Leverage vagrant-cachier on installation
|
26
|
+
- platforms/phantomjs: Fix installation of recent versions
|
27
|
+
- platforms/go: Leverage vagrant-cachier on installation
|
28
|
+
- platforms/elixir: Fix installation of recent versions
|
29
|
+
- services/postgres: Rename ventriloquist-pg images to ventriloquist-postgres
|
30
|
+
|
31
|
+
|
1
32
|
## [0.4.1](https://github.com/fgrehm/ventriloquist/compare/v0.4.0...v0.4.1) (December 13, 2013)
|
2
33
|
|
3
34
|
BUG FIXES:
|
data/DEVELOPMENT.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Development notes
|
2
|
+
|
3
|
+
[Vagrantfile for testing](/development/Vagrantfile)
|
4
|
+
|
5
|
+
## Testing services
|
6
|
+
|
7
|
+
```sh
|
8
|
+
redis-cli ping
|
9
|
+
psql
|
10
|
+
mysql -e 'SHOW DATABASES'
|
11
|
+
|
12
|
+
# Memcached: run STATS then QUIT
|
13
|
+
telnet localhost 11211
|
14
|
+
|
15
|
+
# MailCatcher
|
16
|
+
curl localhost:1080
|
17
|
+
|
18
|
+
# RethinkDB
|
19
|
+
curl localhost:8080
|
20
|
+
|
21
|
+
# ElasticSearch
|
22
|
+
curl $(docker port $(cat /var/lib/ventriloquist/cids/es) 9200)
|
23
|
+
```
|
24
|
+
|
25
|
+
## Testing platforms
|
26
|
+
|
27
|
+
```sh
|
28
|
+
rvm list
|
29
|
+
ruby -v
|
30
|
+
nvm list
|
31
|
+
node -v
|
32
|
+
pyenv versions
|
33
|
+
python --version
|
34
|
+
phantomjs -v
|
35
|
+
iex --version
|
36
|
+
erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
|
37
|
+
```
|
data/Gemfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
|
7
|
-
gem '
|
8
|
-
gem 'vagrant',
|
9
|
-
gem 'rspec'
|
10
|
-
gem 'simplecov', require: false
|
11
|
-
gem 'bogus'
|
3
|
+
group :plugins do
|
4
|
+
# Specify your gem's dependencies in ventriloquist.gemspec
|
5
|
+
gemspec
|
6
|
+
gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
|
7
|
+
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
8
|
+
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
12
9
|
end
|
13
10
|
|
14
11
|
group :development do
|
15
|
-
gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
|
16
|
-
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
17
|
-
gem 'vagrant-global-status', github: 'fgrehm/vagrant-global-status'
|
18
|
-
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
19
12
|
gem 'guard-rspec'
|
20
13
|
end
|
14
|
+
|
15
|
+
group :development, :test do
|
16
|
+
gem 'rake'
|
17
|
+
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.5.2'
|
18
|
+
gem 'rspec', '3.0.0.beta2'
|
19
|
+
gem 'simplecov', require: false
|
20
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,121 +1,119 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/fgrehm/vagrant-cachier.git
|
3
|
-
revision:
|
3
|
+
revision: 2df1e319408a7e6f1c6e75d48e36591199e98527
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (0.
|
6
|
-
|
7
|
-
GIT
|
8
|
-
remote: git://github.com/fgrehm/vagrant-global-status.git
|
9
|
-
revision: 2f1eb13b35567e04f3b5ee51996960199fc0c3e2
|
10
|
-
specs:
|
11
|
-
vagrant-global-status (0.1.3.dev)
|
5
|
+
vagrant-cachier (0.6.1.dev)
|
12
6
|
|
13
7
|
GIT
|
14
8
|
remote: git://github.com/fgrehm/vagrant-lxc.git
|
15
|
-
revision:
|
9
|
+
revision: 69ba4d8f7089150a417b53c14b05fdde557cd53c
|
16
10
|
specs:
|
17
|
-
vagrant-lxc (0.
|
11
|
+
vagrant-lxc (1.0.0.beta1.dev)
|
18
12
|
|
19
13
|
GIT
|
20
14
|
remote: git://github.com/fgrehm/vagrant-pristine.git
|
21
|
-
revision:
|
15
|
+
revision: 503dbc47848c81d0fbfa6840491856f518d244a1
|
22
16
|
specs:
|
23
17
|
vagrant-pristine (0.3.0)
|
24
18
|
|
25
19
|
GIT
|
26
20
|
remote: git://github.com/mitchellh/vagrant.git
|
27
|
-
revision:
|
28
|
-
tag: v1.
|
21
|
+
revision: d19047908cc2d20fe2b954eff5b6ef9e94f8cfbc
|
22
|
+
tag: v1.5.2
|
29
23
|
specs:
|
30
|
-
vagrant (1.
|
31
|
-
|
24
|
+
vagrant (1.5.2)
|
25
|
+
bundler (~> 1.5.2)
|
26
|
+
childprocess (~> 0.5.0)
|
32
27
|
erubis (~> 2.7.0)
|
33
28
|
i18n (~> 0.6.0)
|
34
|
-
|
29
|
+
listen (~> 2.4.0)
|
30
|
+
log4r (~> 1.1.9, < 1.1.11)
|
35
31
|
net-scp (~> 1.1.0)
|
36
|
-
net-ssh (
|
32
|
+
net-ssh (>= 2.6.6, < 2.8.0)
|
33
|
+
rb-kqueue (~> 0.2.0)
|
34
|
+
wdm (~> 0.1.0)
|
37
35
|
|
38
36
|
PATH
|
39
37
|
remote: .
|
40
38
|
specs:
|
41
|
-
ventriloquist (0.
|
42
|
-
vocker (~> 0.4.1)
|
39
|
+
ventriloquist (0.5.0)
|
43
40
|
|
44
41
|
GEM
|
45
42
|
remote: https://rubygems.org/
|
46
43
|
specs:
|
47
|
-
bogus (0.1.4)
|
48
|
-
dependor (>= 0.0.4)
|
49
44
|
celluloid (0.15.2)
|
50
45
|
timers (~> 1.1.0)
|
51
|
-
childprocess (0.
|
46
|
+
childprocess (0.5.2)
|
52
47
|
ffi (~> 1.0, >= 1.0.11)
|
53
48
|
coderay (1.1.0)
|
54
|
-
dependor (1.0.1)
|
55
49
|
diff-lcs (1.2.5)
|
56
|
-
docile (1.1.
|
50
|
+
docile (1.1.3)
|
57
51
|
erubis (2.7.0)
|
58
52
|
ffi (1.9.3)
|
59
53
|
formatador (0.2.4)
|
60
|
-
guard (2.
|
54
|
+
guard (2.4.0)
|
61
55
|
formatador (>= 0.2.4)
|
62
56
|
listen (~> 2.1)
|
63
57
|
lumberjack (~> 1.0)
|
64
58
|
pry (>= 0.9.12)
|
65
59
|
thor (>= 0.18.1)
|
66
|
-
guard-rspec (4.
|
67
|
-
guard (
|
68
|
-
rspec (
|
60
|
+
guard-rspec (4.2.8)
|
61
|
+
guard (~> 2.1)
|
62
|
+
rspec (>= 2.14, < 4.0)
|
69
63
|
i18n (0.6.9)
|
70
|
-
listen (2.
|
64
|
+
listen (2.4.1)
|
71
65
|
celluloid (>= 0.15.2)
|
72
66
|
rb-fsevent (>= 0.9.3)
|
73
67
|
rb-inotify (>= 0.9)
|
74
68
|
log4r (1.1.10)
|
75
|
-
lumberjack (1.0.
|
69
|
+
lumberjack (1.0.5)
|
76
70
|
method_source (0.8.2)
|
77
|
-
multi_json (1.
|
71
|
+
multi_json (1.9.2)
|
78
72
|
net-scp (1.1.2)
|
79
73
|
net-ssh (>= 2.6.5)
|
80
|
-
net-ssh (2.
|
81
|
-
pry (0.9.12.
|
74
|
+
net-ssh (2.7.0)
|
75
|
+
pry (0.9.12.6)
|
82
76
|
coderay (~> 1.0)
|
83
77
|
method_source (~> 0.8)
|
84
78
|
slop (~> 3.4)
|
85
|
-
rake (10.
|
86
|
-
rb-fsevent (0.9.
|
87
|
-
rb-inotify (0.9.
|
79
|
+
rake (10.2.2)
|
80
|
+
rb-fsevent (0.9.4)
|
81
|
+
rb-inotify (0.9.3)
|
82
|
+
ffi (>= 0.5.0)
|
83
|
+
rb-kqueue (0.2.2)
|
88
84
|
ffi (>= 0.5.0)
|
89
|
-
rspec (
|
90
|
-
rspec-core (
|
91
|
-
rspec-expectations (
|
92
|
-
rspec-mocks (
|
93
|
-
rspec-core (
|
94
|
-
|
95
|
-
|
96
|
-
|
85
|
+
rspec (3.0.0.beta2)
|
86
|
+
rspec-core (= 3.0.0.beta2)
|
87
|
+
rspec-expectations (= 3.0.0.beta2)
|
88
|
+
rspec-mocks (= 3.0.0.beta2)
|
89
|
+
rspec-core (3.0.0.beta2)
|
90
|
+
rspec-support (= 3.0.0.beta2)
|
91
|
+
rspec-expectations (3.0.0.beta2)
|
92
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
93
|
+
rspec-support (= 3.0.0.beta2)
|
94
|
+
rspec-mocks (3.0.0.beta2)
|
95
|
+
rspec-support (= 3.0.0.beta2)
|
96
|
+
rspec-support (3.0.0.beta2)
|
97
97
|
simplecov (0.8.2)
|
98
98
|
docile (~> 1.1.0)
|
99
99
|
multi_json
|
100
100
|
simplecov-html (~> 0.8.0)
|
101
101
|
simplecov-html (0.8.0)
|
102
|
-
slop (3.
|
103
|
-
thor (0.
|
102
|
+
slop (3.5.0)
|
103
|
+
thor (0.19.1)
|
104
104
|
timers (1.1.0)
|
105
|
-
|
105
|
+
wdm (0.1.0)
|
106
106
|
|
107
107
|
PLATFORMS
|
108
108
|
ruby
|
109
109
|
|
110
110
|
DEPENDENCIES
|
111
|
-
bogus
|
112
111
|
guard-rspec
|
113
112
|
rake
|
114
|
-
rspec
|
113
|
+
rspec (= 3.0.0.beta2)
|
115
114
|
simplecov
|
116
115
|
vagrant!
|
117
116
|
vagrant-cachier!
|
118
|
-
vagrant-global-status!
|
119
117
|
vagrant-lxc!
|
120
118
|
vagrant-pristine!
|
121
119
|
ventriloquist!
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Ventriloquist
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/fgrehm/ventriloquist.png?branch=master)](https://travis-ci.org/fgrehm/ventriloquist) [![Gem Version](https://badge.fury.io/rb/ventriloquist.png)](http://badge.fury.io/rb/ventriloquist) [![Code Climate](https://codeclimate.com/github/fgrehm/ventriloquist.png)](https://codeclimate.com/github/fgrehm/ventriloquist) [![Gittip](http://img.shields.io/gittip/fgrehm.svg)](https://www.gittip.com/fgrehm/)
|
4
|
+
|
3
5
|
> **ven·tril·o·quist**: _(noun)_ a person who can speak or utter sounds so that
|
4
6
|
they seem to come from somewhere else, esp. an entertainer who makes their voice
|
5
7
|
appear to come from a dummy of a person or animal.
|
@@ -23,8 +25,8 @@ for development on [Discourse](http://www.discourse.org/):
|
|
23
25
|
Vagrant.configure("2") do |config|
|
24
26
|
config.vm.box = "quantal64"
|
25
27
|
config.vm.provision :ventriloquist do |env|
|
26
|
-
env.services << %w( redis
|
27
|
-
env.platforms << %w( nodejs ruby
|
28
|
+
env.services << %w( redis-2.8 postgres-9.1 mailcatcher-0.5 )
|
29
|
+
env.platforms << %w( nodejs-0.10 ruby-1.9.3 )
|
28
30
|
end
|
29
31
|
end
|
30
32
|
```
|
@@ -40,22 +42,9 @@ end
|
|
40
42
|
to legacy projects.
|
41
43
|
|
42
44
|
|
43
|
-
## Status
|
44
|
-
|
45
|
-
Basically a "stable experiment", I've been using VMs configured with the plugin
|
46
|
-
for the last 3 months and I tested it against the following Ubuntu VMs using
|
47
|
-
Docker 0.6.5+ and Vagrant 1.3.0+:
|
48
|
-
|
49
|
-
* http://bit.ly/vagrant-lxc-raring64-2013-10-23 (yes! LXC inception :)
|
50
|
-
* http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box
|
51
|
-
|
52
|
-
_Please note that in order to use the plugin on [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)
|
53
|
-
containers you need some [extra steps](#usage-with-vagrant-lxc) described below_
|
54
|
-
|
55
|
-
|
56
45
|
## Installation
|
57
46
|
|
58
|
-
Make sure you have Vagrant 1.
|
47
|
+
Make sure you have Vagrant 1.5+ and run:
|
59
48
|
|
60
49
|
```
|
61
50
|
vagrant plugin install ventriloquist
|
@@ -69,15 +58,15 @@ Add the provisioner block to your Vagrantfile and `vagrant up` it:
|
|
69
58
|
```ruby
|
70
59
|
Vagrant.configure("2") do |config|
|
71
60
|
config.vm.provision :ventriloquist do |env|
|
72
|
-
# Pick the Docker version you want to use (defaults to 0.
|
61
|
+
# Pick the Docker version you want to use (defaults to 0.9.1)
|
73
62
|
# or use :latest to install the latest version available
|
74
|
-
env.docker_version = '0.
|
63
|
+
env.docker_version = '0.9.1'
|
75
64
|
|
76
65
|
# Pick the services you need to have around
|
77
|
-
env.services << %w( redis
|
66
|
+
env.services << %w( redis-2.8 postgres-9.1 memcached-1.4 elasticsearch-1.1 )
|
78
67
|
|
79
68
|
# Configure your development environment
|
80
|
-
env.platforms << %w( nodejs ruby
|
69
|
+
env.platforms << %w( nodejs-0.10 ruby-2.0.0 go-1.2 )
|
81
70
|
|
82
71
|
# Install random packages
|
83
72
|
env.packages << %w( imagemagick htop sqlite3 )
|
@@ -100,18 +89,18 @@ end
|
|
100
89
|
|
101
90
|
## Available services
|
102
91
|
|
103
|
-
| Name
|
104
|
-
|
|
105
|
-
| elasticsearch |
|
106
|
-
| memcached
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
| mysql
|
111
|
-
| mysql
|
112
|
-
| redis
|
113
|
-
| mailcatcher
|
114
|
-
| rethinkdb
|
92
|
+
| Name | Notes |
|
93
|
+
| ----------------- | ----- |
|
94
|
+
| elasticsearch-1.1 | Runs on port 9200 |
|
95
|
+
| memcached-1.4 | Runs on port 11211 |
|
96
|
+
| postgres-9.3 | Runs on port 5432 and adds an `export PGHOST=localhost` to the guest's `/etc/profile.d/ventriloquist`. It will also install the `postgresql-client` and `libpq-dev` packages on the guest. |
|
97
|
+
| postgres-9.2 | Same as above |
|
98
|
+
| postgres-9.1 | Same as above |
|
99
|
+
| mysql-5.6 | 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. |
|
100
|
+
| mysql-5.5 | Same as above |
|
101
|
+
| redis-2.8 | Runs on port 6379 and installs / compiles the `redis-cli` excutable |
|
102
|
+
| mailcatcher-0.5 | SMPT server runs on 1025 and web interface on 1080 |
|
103
|
+
| rethinkdb-1.12 | Uses the 28015 port for the client driver, 29015 for the intracluster connections and 8080 for the administrative web UI |
|
115
104
|
|
116
105
|
The `services` parameter passed in on the Vagrantfile are the ones built with the
|
117
106
|
Dockerfiles available under [_/services_](services) that are configured to require
|
@@ -125,59 +114,52 @@ PostgreSQL will involve installing the `postgresql-client` package and adding an
|
|
125
114
|
`export PGHOST=localhost` to the guest's `/etc/profiles.d/ventriloquist.sh` so that
|
126
115
|
the `psql` client works without any extra params.
|
127
116
|
|
128
|
-
Please note that all of the builtin images are available on the
|
129
|
-
with the `fgrehm/ventriloquist-` prefix
|
117
|
+
Please note that all of the builtin images are available as trusted builds on the
|
118
|
+
[Docker index](https://index.docker.io/) with the `fgrehm/ventriloquist-` prefix
|
119
|
+
that is ommited on the table above.
|
130
120
|
|
131
|
-
|
132
|
-
registry and use it on your Vagrantfile, you'll just need to specify its fully
|
133
|
-
qualified name and the corresponding Ventriloquist service:
|
121
|
+
For fine grained control over how Ventriloquist runs images:
|
134
122
|
|
135
123
|
```ruby
|
136
124
|
Vagrant.configure("2") do |config|
|
137
125
|
config.vm.provision :ventriloquist do |env|
|
138
126
|
env.services << {
|
139
|
-
redis:
|
140
|
-
|
127
|
+
redis: { image: 'username/redis' },
|
128
|
+
postgres: { image: 'otheruser/postgres' }
|
141
129
|
}
|
142
130
|
|
143
131
|
# If you need more instances of a service, you'll need to give it a unique
|
144
132
|
# name and fine tune it at will, for example:
|
145
133
|
env.services << {
|
146
|
-
# This is
|
147
|
-
api_db: { image: 'otheruser/
|
134
|
+
# This is simple Vagrant Docker provisioner container
|
135
|
+
api_db: { image: 'otheruser/postgres', args: '-p :5432' },
|
148
136
|
|
149
|
-
# The 'vimage' saves you from typing in `image: 'fgrehm/ventriloquist-redis'`
|
150
|
-
worker_redis: { vimage: 'redis' },
|
137
|
+
# The 'vimage' saves you from typing in `image: 'fgrehm/ventriloquist-redis-2.8'`
|
138
|
+
worker_redis: { vimage: 'redis-2.8', type: 'redis', args: '-P' },
|
151
139
|
|
152
140
|
# The 'type' parameter tells Ventriloquist to configure the service with
|
153
141
|
# its defaults and does some extra work (like installing additional packages)
|
154
142
|
# if the service requires it
|
155
|
-
worker_db: { image: 'your-user/your-
|
143
|
+
worker_db: { image: 'your-user/your-postgres', type: 'postgres' },
|
156
144
|
}
|
157
145
|
end
|
158
146
|
end
|
159
147
|
```
|
160
148
|
|
161
|
-
|
162
|
-
at [Vocker](https://github.com/fgrehm/vocker)'s documentation.
|
163
|
-
|
164
|
-
If you want to build your own service and don't have plans to deploy your
|
165
|
-
containers to production, make sure you "[inherit](services/redis/Dockerfile#L5)"
|
166
|
-
your services from the [`fgrehm/ventriloquist-base`](services/base/Dockerfile)
|
167
|
-
image in order to save on some disk space.
|
149
|
+
_See http://docs.vagrantup.com/v2/provisioning/docker.html for other arguments_
|
168
150
|
|
169
151
|
|
170
152
|
## Available platforms
|
171
153
|
|
172
|
-
| Name |
|
154
|
+
| Name | Notes |
|
173
155
|
| --------- | ----------------- |
|
174
|
-
| ruby | rvm
|
175
|
-
| go |
|
176
|
-
| nodejs | nvm
|
177
|
-
| phantomjs |
|
178
|
-
| erlang | The latest version available at https://packages.erlang-solutions.com/erlang/ (currently
|
179
|
-
| elixir |
|
180
|
-
| python | pyenv
|
156
|
+
| ruby | Uses rvm for installing rubies |
|
157
|
+
| go | Downloads from https://code.google.com/p/go/downloads/list |
|
158
|
+
| nodejs | Uses nvm for installing node versions |
|
159
|
+
| phantomjs | Downloads from https://bitbucket.org/ariya/phantomjs/downloads or https://code.google.com/p/phantomjs/downloads/list |
|
160
|
+
| erlang | The latest version available at https://packages.erlang-solutions.com/erlang/ (currently R16B03-1) |
|
161
|
+
| elixir | Downloads from https://github.com/elixir-lang/elixir/releases |
|
162
|
+
| python | Uses pyenv for installing python versions |
|
181
163
|
|
182
164
|
In order to configure the VM for usage with the programming language that your
|
183
165
|
app is written on, the plugin leverages Vagrant's [guest capabilities](http://docs.vagrantup.com/v2/plugins/guest-capabilities.html)
|
@@ -185,10 +167,27 @@ to deal with distribution specifics. Right now things should work just fine on
|
|
185
167
|
Ubuntu VMs and you'll be warned in case you specify a something that is not supported
|
186
168
|
on your guest machine.
|
187
169
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
170
|
+
Platforms like `ruby`, `nodejs` and `python` also support installing multiple
|
171
|
+
versions since we rely on tools that take care of that for us:
|
172
|
+
|
173
|
+
```ruby
|
174
|
+
Vagrant.configure("2") do |config|
|
175
|
+
config.vm.provision :ventriloquist do |env|
|
176
|
+
env.platforms << {
|
177
|
+
# The first version provided will be set as the default
|
178
|
+
nodejs: { versions: ['0.10', '0.9'] },
|
179
|
+
ruby: { versions: ['2.1.1', '2.1.0'] }
|
180
|
+
|
181
|
+
# The code above is the same as
|
182
|
+
env.platforms << %w( nodejs-0.9 nodejs-0.10 ruby-2.1.1 ruby-2.1.0 )
|
183
|
+
}
|
184
|
+
end
|
185
|
+
end
|
186
|
+
```
|
187
|
+
|
188
|
+
_NOTICE: Previous versions of the plugin allowed users to omit the platform version
|
189
|
+
to be installed, but starting with 0.5.0 you need to set it explicitly on your
|
190
|
+
`Vagrantfile` (ex: `env.platforms << 'ruby'` becomes `env.platforms << 'ruby-2.1.1`)_
|
192
191
|
|
193
192
|
|
194
193
|
## System packages
|
@@ -227,70 +226,24 @@ you run a `apt-get upgrade` or the equivalent.
|
|
227
226
|
* Use a Docker container as the dev environment within the Vagrant VM, maybe using
|
228
227
|
[Buildstep](https://github.com/progrium/buildstep) or something like it to
|
229
228
|
configure it.
|
230
|
-
* Allow services configuration from the Vagrantfile (like setting the max memory
|
231
|
-
used by memcached for example)
|
232
|
-
* Saner defaults for services (none of the provided services have memory / connection
|
233
|
-
limits or the like)
|
234
|
-
* Make use of Docker data volumes for services to avoid loosing data
|
235
|
-
* Introduce "profiles" - `heroku:free` for example would limit postgresql / memcached
|
236
|
-
/ etc resources (like max memory / connections) to what people will get there.
|
237
229
|
* Support for installing "random" tools / packages from within the Vagrantfile
|
238
230
|
(like git / sqlite3 / heroku toolbelt / ruby gems / npm packages)
|
239
|
-
* Leverage [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) during
|
240
|
-
provisioning
|
241
|
-
* Convert provisioning code to a set of bash scripts so that it can be reused
|
242
|
-
outside of Vagrant environments as well (maybe use them for building [Packer](http://www.packer.io/)
|
243
|
-
images)
|
244
231
|
|
245
232
|
|
246
233
|
### Usage with [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)
|
247
234
|
|
248
|
-
If you are on a Linux machine
|
249
|
-
|
250
|
-
containers that were capable of using Docker without issues multiple times on
|
251
|
-
an up to date Ubuntu 13.04 host and guest.
|
252
|
-
|
253
|
-
In order to allow a vagrant-lxc container to boot nested Docker containers you'll
|
254
|
-
just need to `apt-get install apparmor-utils && aa-complain /usr/bin/lxc-start`
|
255
|
-
and add the code below to your Vagrantfile:
|
235
|
+
If you are on a Linux machine and want to use vagrant-lxc you'll need to enable
|
236
|
+
container nesting by adding the code below to your Vagrantfile:
|
256
237
|
|
257
238
|
```ruby
|
258
239
|
Vagrant.configure("2") do |config|
|
240
|
+
# vagrant-lxc specific tweaks for getting docker to run inside the container
|
259
241
|
config.vm.provider :lxc do |lxc|
|
260
242
|
lxc.customize 'aa_profile', 'unconfined'
|
261
243
|
end
|
262
|
-
|
263
|
-
config.vm.provision :shell, inline: %[
|
264
|
-
if ! [ -f /etc/default/lxc ]; then
|
265
|
-
cat <<STR > /etc/default/lxc
|
266
|
-
LXC_AUTO="true"
|
267
|
-
USE_LXC_BRIDGE="true"
|
268
|
-
LXC_BRIDGE="lxcbr0"
|
269
|
-
LXC_ADDR="10.0.252.1"
|
270
|
-
LXC_NETMASK="255.255.255.0"
|
271
|
-
LXC_NETWORK="10.0.252.0/24"
|
272
|
-
LXC_DHCP_RANGE="10.0.252.2,10.0.252.254"
|
273
|
-
LXC_DHCP_MAX="253"
|
274
|
-
LXC_SHUTDOWN_TIMEOUT=120
|
275
|
-
STR
|
276
|
-
fi
|
277
|
-
]
|
278
244
|
end
|
279
245
|
```
|
280
246
|
|
281
|
-
The LXC networking configs are only required if you are on an Ubuntu host as
|
282
|
-
it automatically creates the `lxcbr0` bridge for you on the host machine and
|
283
|
-
if you don't do that the vagrant-lxc container will end up crashing as it
|
284
|
-
will collide with the host's `lxcbr0`.
|
285
|
-
|
286
|
-
|
287
|
-
## Support
|
288
|
-
|
289
|
-
Support this project and [others by fgrehm](https://github.com/fgrehm)
|
290
|
-
via [gittip](https://www.gittip.com/fgrehm/).
|
291
|
-
|
292
|
-
[![Support via Gittip](https://rawgithub.com/twolfson/gittip-badge/0.1.0/dist/gittip.png)](https://www.gittip.com/fgrehm/)
|
293
|
-
|
294
247
|
|
295
248
|
## Contributing
|
296
249
|
|
@@ -299,5 +252,3 @@ via [gittip](https://www.gittip.com/fgrehm/).
|
|
299
252
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
300
253
|
4. Push to the branch (`git push origin my-new-feature`)
|
301
254
|
5. Create new Pull Request
|
302
|
-
|
303
|
-
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/fgrehm/ventriloquist/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|