ventriloquist 0.3.2 → 0.4.0
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/.gitignore +1 -1
- data/CHANGELOG.md +47 -2
- data/Gemfile +2 -1
- data/Gemfile.lock +36 -28
- data/README.md +116 -41
- data/base_box/README.md +3 -0
- data/base_box/Vagrantfile +66 -0
- data/development/Vagrantfile +32 -11
- data/lib/ventriloquist/cap/platforms.rb +55 -0
- data/lib/ventriloquist/cap/{debian → platforms/debian}/elixir_install.rb +1 -0
- data/lib/ventriloquist/cap/{debian → platforms/debian}/erlang_install.rb +0 -0
- data/lib/ventriloquist/cap/{debian → platforms/debian}/go_install.rb +1 -1
- data/lib/ventriloquist/cap/{debian → platforms/debian}/phantomjs_install.rb +1 -1
- data/lib/ventriloquist/cap/{debian → platforms/debian}/python.rb +1 -0
- data/lib/ventriloquist/cap/{linux → platforms/linux}/nvm_install.rb +0 -0
- data/lib/ventriloquist/cap/{linux → platforms/linux}/nvm_install_nodejs.rb +0 -0
- data/lib/ventriloquist/cap/platforms/linux/rvm_install.rb +17 -0
- data/lib/ventriloquist/cap/{linux → platforms/linux}/rvm_install_ruby.rb +2 -3
- data/lib/ventriloquist/cap/services.rb +40 -0
- data/lib/ventriloquist/cap/{debian → services/debian}/mysql_install_client.rb +1 -1
- data/lib/ventriloquist/cap/{debian → services/debian}/mysql_install_headers.rb +1 -1
- data/lib/ventriloquist/cap/{debian → services/debian}/pg_install_client.rb +1 -1
- data/lib/ventriloquist/cap/{debian → services/debian}/pg_install_headers.rb +1 -1
- data/lib/ventriloquist/cap/{debian → services/debian}/ventriloquist_containers_upstart.rb +0 -0
- data/lib/ventriloquist/cap/{linux → services/linux}/mysql_configure_client.rb +0 -0
- data/lib/ventriloquist/cap/{linux → services/linux}/pg_export_pghost.rb +0 -0
- data/lib/ventriloquist/cap/utils.rb +40 -0
- data/lib/ventriloquist/cap/utils/debian/git_install.rb +13 -0
- data/lib/ventriloquist/cap/utils/debian/install_build_tools.rb +13 -0
- data/lib/ventriloquist/cap/utils/debian/install_packages.rb +47 -0
- data/lib/ventriloquist/cap/utils/debian/mercurial_install.rb +13 -0
- data/lib/ventriloquist/cap/utils/linux/download.rb +39 -0
- data/lib/ventriloquist/cap/{linux → utils/linux}/make.rb +0 -0
- data/lib/ventriloquist/cap/{linux → utils/linux}/untar.rb +0 -0
- data/lib/ventriloquist/config.rb +6 -3
- data/lib/ventriloquist/platforms/elixir.rb +1 -1
- data/lib/ventriloquist/platforms/go.rb +1 -1
- data/lib/ventriloquist/platforms/nodejs.rb +1 -0
- data/lib/ventriloquist/platforms/phantomjs.rb +1 -1
- data/lib/ventriloquist/platforms/ruby.rb +1 -0
- data/lib/ventriloquist/plugin.rb +3 -114
- data/lib/ventriloquist/provisioner.rb +12 -1
- data/lib/ventriloquist/service.rb +14 -7
- data/lib/ventriloquist/services/elastic_search.rb +12 -0
- data/lib/ventriloquist/services/mail_catcher.rb +12 -0
- data/lib/ventriloquist/services/memcached.rb +12 -0
- data/lib/ventriloquist/services/mysql.rb +5 -0
- data/lib/ventriloquist/services/postgresql.rb +5 -0
- data/lib/ventriloquist/services/redis.rb +12 -6
- data/lib/ventriloquist/services/rethink_db.rb +16 -0
- data/lib/ventriloquist/services_builder.rb +14 -5
- data/lib/ventriloquist/version.rb +1 -1
- data/locales/en.yml +6 -1
- data/services/base/Dockerfile +8 -7
- data/services/build-all.sh +6 -3
- data/services/elasticsearch/Dockerfile +6 -7
- data/services/mailcatcher/Dockerfile +3 -6
- data/services/memcached/Dockerfile +11 -12
- data/services/mysql/5.5/Dockerfile +17 -0
- data/services/mysql/{config → 5.5/config}/bin/add-mysql-user +0 -5
- data/services/mysql/5.6/Dockerfile +32 -0
- data/services/mysql/5.6/config/bin/add-mysql-user +15 -0
- data/services/mysql/5.6/config/etc/my.cnf +129 -0
- data/services/openjdk7/Dockerfile +1 -5
- data/services/postgresql/9.1/Dockerfile +5 -10
- data/services/postgresql/9.2/Dockerfile +7 -6
- data/services/postgresql/9.3/Dockerfile +16 -0
- data/services/postgresql/9.3/config/bin/prepare-postgres +25 -0
- data/services/postgresql/9.3/config/bin/start-postgres +6 -0
- data/services/postgresql/9.3/config/etc/postgresql/9.3/main/postgresql.conf +591 -0
- data/services/redis/Dockerfile +10 -6
- data/services/rethinkdb/Dockerfile +17 -0
- data/spec/unit/service_spec.rb +22 -12
- data/spec/unit/services_builder_spec.rb +26 -8
- data/ventriloquist.gemspec +1 -1
- metadata +46 -28
- data/lib/ventriloquist/cap/debian/git_install.rb +0 -18
- data/lib/ventriloquist/cap/debian/install_build_tools.rb +0 -18
- data/lib/ventriloquist/cap/debian/mercurial_install.rb +0 -18
- data/lib/ventriloquist/cap/linux/download.rb +0 -26
- data/lib/ventriloquist/cap/linux/rvm_install.rb +0 -17
- data/services/mysql/Dockerfile +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c799387674e146e0396a38b5422e26a4dcfb073
|
4
|
+
data.tar.gz: 2b0e29b91d5e21013fec771db8c3e6662db998da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e32700321ef1eeb72aa9d128cd39cacb2276ebc8c142e9f959694aa54d90ce4b8d323f509bbb61fbe0fd597d84a3bc186bae1557a78360daa65336af10acf90c
|
7
|
+
data.tar.gz: e04b3481a587aa7f2b8047aa3b69dfdb0a173ac2f8e9da6a809968264986bbdbfbead51bdb476ec2a84d1905d10b79ab2b2c9876fac0d0f77ac923be3ed827b0
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,46 @@
|
|
1
|
-
## [0.
|
1
|
+
## [0.4.0](https://github.com/fgrehm/ventriloquist/compare/v0.3.2...v0.4.0) (December 3, 2013)
|
2
|
+
|
3
|
+
FEATURES:
|
4
|
+
|
5
|
+
- Added support for RethinkDB [[GH-4]]
|
6
|
+
- Support for installing guest specific packages (aka `apt-get install`)
|
7
|
+
- Introduce `:type` and `:vimage` parameters for services allowing us to provision
|
8
|
+
multiple containers of the same kind with less pain.
|
9
|
+
- Docker containers are now named after the services configured on the Vagrantfile
|
10
|
+
|
11
|
+
BACKWARDS INCOMPATIBILITY:
|
12
|
+
|
13
|
+
- _All_ of the services images have been rebuilt from scratch. The reason behind
|
14
|
+
it is that we inlined `RUN` instructions in order to reduce the amount of AUFS
|
15
|
+
layers and disk space taken by images.
|
16
|
+
- From now on we'll lock Docker installation to a "known to work version"
|
17
|
+
by default (currently 0.7.0). Things are moving pretty fast over there and it
|
18
|
+
is pretty hard to keep up with all the changes and to ensure things are
|
19
|
+
running smooth. You can still specify the version on your `Vagrantfile` but
|
20
|
+
by default it will be a specific version.
|
21
|
+
- The Docker images that make up for services no longer exposes host ports by
|
22
|
+
default in order to aling with Docker's [recent changes](http://blog.docker.io/2013/10/docker-0-6-5-links-container-naming-advanced-port-redirects-host-integration)
|
23
|
+
related to the way exposed ports work.
|
24
|
+
|
25
|
+
IMPROVEMENTS:
|
26
|
+
|
27
|
+
- core: Bumped [vocker] dependency to 0.4.0
|
28
|
+
- core: Provide feedback during provisioning whether a service is already running
|
29
|
+
- platforms/go: Bumped to 1.2
|
30
|
+
- platforms/elixir: Bumped to 0.11.2 [[GH-34]]
|
31
|
+
- platforms/phantomjs: Bumped to 1.9.2
|
32
|
+
- platforms/rvm: Install globally [[GH-24]]
|
33
|
+
- services: Most images had the `RUN` instructions inlined in order to reduce the amount
|
34
|
+
of AUFS layers
|
35
|
+
- services/elasticsearch: Bumped to 0.90.7
|
36
|
+
- services/memcached: Bumped to 1.4.15
|
37
|
+
- services/redis: Bumped to 2.8.2
|
38
|
+
- services/mysql: Support for 5.6
|
39
|
+
- services/postgresql: Support for 9.3
|
40
|
+
- services/postgresql: Make use of packages from http://apt.postgresql.org/pub/repos/apt
|
41
|
+
instead of the deprecated `ppa:pitti/postgresql`
|
42
|
+
|
43
|
+
## [0.3.2](https://github.com/fgrehm/ventriloquist/compare/v0.3.1...v0.3.2) (October 28, 2013)
|
2
44
|
|
3
45
|
BUG FIXES:
|
4
46
|
|
@@ -21,7 +63,7 @@ FEATURES:
|
|
21
63
|
|
22
64
|
IMPROVEMENTS:
|
23
65
|
|
24
|
-
- Bump [vocker] dependency to 0.3.
|
66
|
+
- Bump [vocker] dependency to 0.3.2
|
25
67
|
|
26
68
|
## [0.2.1](https://github.com/fgrehm/ventriloquist/compare/v0.2.0...v0.2.1) (October 12, 2013)
|
27
69
|
|
@@ -48,6 +90,9 @@ BUG FIXES:
|
|
48
90
|
|
49
91
|
|
50
92
|
|
93
|
+
[GH-4]: https://github.com/fgrehm/ventriloquist/issues/4
|
94
|
+
[GH-34]: https://github.com/fgrehm/ventriloquist/issues/24
|
95
|
+
[GH-24]: https://github.com/fgrehm/ventriloquist/issues/24
|
51
96
|
[GH-9]: https://github.com/fgrehm/ventriloquist/issues/9
|
52
97
|
[GH-19]: https://github.com/fgrehm/ventriloquist/issues/19
|
53
98
|
[GH-3]: https://github.com/fgrehm/ventriloquist/issues/3
|
data/Gemfile
CHANGED
@@ -5,7 +5,7 @@ gemspec
|
|
5
5
|
|
6
6
|
group :development, :test do
|
7
7
|
gem 'rake'
|
8
|
-
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.
|
8
|
+
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.3.5'
|
9
9
|
gem 'rspec'
|
10
10
|
gem 'simplecov', require: false
|
11
11
|
gem 'bogus'
|
@@ -16,5 +16,6 @@ group :development do
|
|
16
16
|
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
17
17
|
gem 'vagrant-global-status', github: 'fgrehm/vagrant-global-status'
|
18
18
|
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
19
|
+
gem 'vocker', github: 'fgrehm/vocker'
|
19
20
|
gem 'guard-rspec'
|
20
21
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/fgrehm/vagrant-cachier.git
|
3
|
-
revision:
|
3
|
+
revision: 56b86a0debd6c899e92c10e403c4623b0d304fc1
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (0.
|
5
|
+
vagrant-cachier (0.5.1.dev)
|
6
6
|
|
7
7
|
GIT
|
8
8
|
remote: git://github.com/fgrehm/vagrant-global-status.git
|
9
|
-
revision:
|
9
|
+
revision: 2f1eb13b35567e04f3b5ee51996960199fc0c3e2
|
10
10
|
specs:
|
11
|
-
vagrant-global-status (0.1.
|
11
|
+
vagrant-global-status (0.1.3.dev)
|
12
12
|
|
13
13
|
GIT
|
14
14
|
remote: git://github.com/fgrehm/vagrant-lxc.git
|
15
|
-
revision:
|
15
|
+
revision: c7fff4d9354b8c8fc4d75625dca3dfc411729032
|
16
16
|
specs:
|
17
|
-
vagrant-lxc (0.
|
17
|
+
vagrant-lxc (0.7.1.dev)
|
18
18
|
|
19
19
|
GIT
|
20
20
|
remote: git://github.com/fgrehm/vagrant-pristine.git
|
@@ -22,12 +22,18 @@ GIT
|
|
22
22
|
specs:
|
23
23
|
vagrant-pristine (0.3.0)
|
24
24
|
|
25
|
+
GIT
|
26
|
+
remote: git://github.com/fgrehm/vocker.git
|
27
|
+
revision: d9539e7d6c2f377957bf7be3cf2184a5400de79b
|
28
|
+
specs:
|
29
|
+
vocker (0.4.1.dev)
|
30
|
+
|
25
31
|
GIT
|
26
32
|
remote: git://github.com/mitchellh/vagrant.git
|
27
|
-
revision:
|
28
|
-
tag: v1.
|
33
|
+
revision: a40522f5fabccb9ddabad03d836e120ff5d14093
|
34
|
+
tag: v1.3.5
|
29
35
|
specs:
|
30
|
-
vagrant (1.
|
36
|
+
vagrant (1.3.5)
|
31
37
|
childprocess (~> 0.3.7)
|
32
38
|
erubis (~> 2.7.0)
|
33
39
|
i18n (~> 0.6.0)
|
@@ -38,8 +44,8 @@ GIT
|
|
38
44
|
PATH
|
39
45
|
remote: .
|
40
46
|
specs:
|
41
|
-
ventriloquist (0.
|
42
|
-
vocker (~> 0.
|
47
|
+
ventriloquist (0.4.0)
|
48
|
+
vocker (~> 0.4.0)
|
43
49
|
|
44
50
|
GEM
|
45
51
|
remote: https://rubygems.org/
|
@@ -50,23 +56,24 @@ GEM
|
|
50
56
|
timers (~> 1.1.0)
|
51
57
|
childprocess (0.3.9)
|
52
58
|
ffi (~> 1.0, >= 1.0.11)
|
53
|
-
coderay (1.0
|
59
|
+
coderay (1.1.0)
|
54
60
|
dependor (1.0.1)
|
55
|
-
diff-lcs (1.2.
|
61
|
+
diff-lcs (1.2.5)
|
62
|
+
docile (1.1.1)
|
56
63
|
erubis (2.7.0)
|
57
|
-
ffi (1.9.
|
64
|
+
ffi (1.9.3)
|
58
65
|
formatador (0.2.4)
|
59
|
-
guard (2.2.
|
66
|
+
guard (2.2.4)
|
60
67
|
formatador (>= 0.2.4)
|
61
68
|
listen (~> 2.1)
|
62
69
|
lumberjack (~> 1.0)
|
63
70
|
pry (>= 0.9.12)
|
64
71
|
thor (>= 0.18.1)
|
65
|
-
guard-rspec (4.0
|
72
|
+
guard-rspec (4.1.0)
|
66
73
|
guard (>= 2.1.1)
|
67
74
|
rspec (~> 2.14)
|
68
|
-
i18n (0.6.
|
69
|
-
listen (2.
|
75
|
+
i18n (0.6.9)
|
76
|
+
listen (2.3.1)
|
70
77
|
celluloid (>= 0.15.2)
|
71
78
|
rb-fsevent (>= 0.9.3)
|
72
79
|
rb-inotify (>= 0.9)
|
@@ -77,8 +84,8 @@ GEM
|
|
77
84
|
net-scp (1.1.2)
|
78
85
|
net-ssh (>= 2.6.5)
|
79
86
|
net-ssh (2.6.8)
|
80
|
-
pry (0.9.12.
|
81
|
-
coderay (~> 1.0
|
87
|
+
pry (0.9.12.4)
|
88
|
+
coderay (~> 1.0)
|
82
89
|
method_source (~> 0.8)
|
83
90
|
slop (~> 3.4)
|
84
91
|
rake (10.1.0)
|
@@ -89,18 +96,18 @@ GEM
|
|
89
96
|
rspec-core (~> 2.14.0)
|
90
97
|
rspec-expectations (~> 2.14.0)
|
91
98
|
rspec-mocks (~> 2.14.0)
|
92
|
-
rspec-core (2.14.
|
93
|
-
rspec-expectations (2.14.
|
99
|
+
rspec-core (2.14.7)
|
100
|
+
rspec-expectations (2.14.4)
|
94
101
|
diff-lcs (>= 1.1.3, < 2.0)
|
95
102
|
rspec-mocks (2.14.4)
|
96
|
-
simplecov (0.
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
103
|
+
simplecov (0.8.2)
|
104
|
+
docile (~> 1.1.0)
|
105
|
+
multi_json
|
106
|
+
simplecov-html (~> 0.8.0)
|
107
|
+
simplecov-html (0.8.0)
|
108
|
+
slop (3.4.7)
|
101
109
|
thor (0.18.1)
|
102
110
|
timers (1.1.0)
|
103
|
-
vocker (0.3.3)
|
104
111
|
|
105
112
|
PLATFORMS
|
106
113
|
ruby
|
@@ -117,3 +124,4 @@ DEPENDENCIES
|
|
117
124
|
vagrant-lxc!
|
118
125
|
vagrant-pristine!
|
119
126
|
ventriloquist!
|
127
|
+
vocker!
|
data/README.md
CHANGED
@@ -6,14 +6,14 @@
|
|
6
6
|
|
7
7
|
Ventriloquist combines [Vagrant](http://www.vagrantup.com/) and [Docker](http://www.docker.io/)
|
8
8
|
to give **developers** the ability to configure portable and disposable development
|
9
|
-
|
10
|
-
the need to learn tools like [Puppet](http://puppetlabs.com/puppet/what-is-puppet)
|
9
|
+
environments with ease. It lowers the entry barrier of building a sane working environment
|
10
|
+
without the need to learn tools like [Puppet](http://puppetlabs.com/puppet/what-is-puppet)
|
11
11
|
or [Chef](http://www.opscode.com/chef/).
|
12
12
|
|
13
13
|
Its core is made of a Vagrant plugin that uses a set of opinionated Docker
|
14
14
|
images + some [guest capabilities](http://docs.vagrantup.com/v2/plugins/guest-capabilities.html)
|
15
|
-
to provision VMs with services
|
16
|
-
it as a "Heroku for Vagrant" where a Dyno is your Vagrant machine and Docker
|
15
|
+
to provision VMs with services, programming language environments and OS packages,
|
16
|
+
think of it as a "Heroku for Vagrant" where a Dyno is your Vagrant machine and Docker
|
17
17
|
services are its addons.
|
18
18
|
|
19
19
|
To give you an idea, this is what it takes to configure a Vagrant VM ready
|
@@ -40,23 +40,17 @@ end
|
|
40
40
|
to legacy projects.
|
41
41
|
|
42
42
|
|
43
|
-
|
44
43
|
## Status
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
0.6.
|
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+:
|
49
48
|
|
49
|
+
* http://bit.ly/vagrant-lxc-raring64-2013-10-23 (yes! LXC inception :)
|
50
50
|
* http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box
|
51
|
-
* http://bit.ly/vagrant-lxc-raring64-2013-07-12 (yes! LXC inception :)
|
52
51
|
|
53
52
|
_Please note that in order to use the plugin on [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)
|
54
|
-
containers you need some extra steps described below_
|
55
|
-
|
56
|
-
On its current state is a "stable experiment", I've been using a setup with the
|
57
|
-
plugin without hitting [major issues](https://github.com/fgrehm/ventriloquist/issues?labels=bug&page=1&state=open)
|
58
|
-
for a while now.
|
59
|
-
|
53
|
+
containers you need some [extra steps](#usage-with-vagrant-lxc) described below_
|
60
54
|
|
61
55
|
|
62
56
|
## Installation
|
@@ -70,15 +64,35 @@ vagrant plugin install ventriloquist
|
|
70
64
|
|
71
65
|
## Usage
|
72
66
|
|
73
|
-
|
67
|
+
Add the provisioner block to your Vagrantfile and `vagrant up` it:
|
74
68
|
|
75
69
|
```ruby
|
76
70
|
Vagrant.configure("2") do |config|
|
77
71
|
config.vm.provision :ventriloquist do |env|
|
72
|
+
# Pick the Docker version you want to use (defaults to 0.7.0)
|
73
|
+
# or use :latest to install the latest version available
|
74
|
+
env.docker_version = '0.6.7'
|
75
|
+
|
78
76
|
# Pick the services you need to have around
|
79
77
|
env.services << %w( redis pg:9.1 memcached elasticsearch )
|
78
|
+
|
80
79
|
# Configure your development environment
|
81
80
|
env.platforms << %w( nodejs ruby:2.0.0 go )
|
81
|
+
|
82
|
+
# Install random packages
|
83
|
+
env.packages << %w( imagemagick htop sqlite3 )
|
84
|
+
end
|
85
|
+
end
|
86
|
+
```
|
87
|
+
|
88
|
+
If you are using the plugin on a VirtualBox machine, you need to make sure the
|
89
|
+
VM has at least 1gb of RAM, so make sure you have something similar to the code
|
90
|
+
below on your `Vagrantfile`:
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
Vagrant.configure("2") do |config|
|
94
|
+
config.vm.provider "virtualbox" do |vb|
|
95
|
+
vb.customize ["modifyvm", :id, "--memory", 1024]
|
82
96
|
end
|
83
97
|
end
|
84
98
|
```
|
@@ -86,11 +100,24 @@ end
|
|
86
100
|
|
87
101
|
## Available services
|
88
102
|
|
103
|
+
| Name | Provides | Notes |
|
104
|
+
| ------------- | -------------- | ----- |
|
105
|
+
| elasticsearch | 0.90.7 | Runs on port 9200 |
|
106
|
+
| memcached | 1.4.15 | Runs on port 11211 |
|
107
|
+
| pg | PostgreSQL 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. |
|
108
|
+
| pg:9.2 | PostgreSQL 9.2 | Same as above |
|
109
|
+
| pg:9.1 | PostgreSQL 9.1 | Same as above |
|
110
|
+
| 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. |
|
111
|
+
| mysql:5.5 | 5.5 | Same as above |
|
112
|
+
| redis | 2.8.2 | Runs on port 6379 and installs / compiles the `redis-cli` excutable |
|
113
|
+
| mailcatcher | 0.5.12 | SMPT server runs on 1025 and web interface on 1080 |
|
114
|
+
| rethinkdb | 1.11.0 | Uses the 28015 port for the client driver, 29015 for the intracluster connections and 8080 for the administrative web UI |
|
115
|
+
|
89
116
|
The `services` parameter passed in on the Vagrantfile are the ones built with the
|
90
117
|
Dockerfiles available under [_/services_](services) that are configured to require
|
91
118
|
no additional configuration for usage with the default `vagrant` user that usually
|
92
|
-
comes with Vagrant boxes
|
93
|
-
default service port (like 5432 for PostgreSQL).
|
119
|
+
comes with Vagrant boxes. Apart from that they'll always be available from `localhost`
|
120
|
+
using the default service port (like 5432 for PostgreSQL).
|
94
121
|
|
95
122
|
Some extra steps might be required to simplify the connection with the configured
|
96
123
|
services. As an example, besides running the associated Docker image, setting up
|
@@ -99,17 +126,7 @@ PostgreSQL will involve installing the `postgresql-client` package and adding an
|
|
99
126
|
the `psql` client works without any extra params.
|
100
127
|
|
101
128
|
Please note that all of the builtin images are available on the [Docker index](https://index.docker.io/)
|
102
|
-
with the `fgrehm/ventriloquist-` prefix that is ommited on the table
|
103
|
-
|
104
|
-
| Name | Provides | Notes |
|
105
|
-
| ------------- | -------------- | ----- |
|
106
|
-
| elasticsearch | 0.90.3 | Runs on port 9200 |
|
107
|
-
| memcached | 1.4.14 | Runs on port 11211 |
|
108
|
-
| pg | PostgreSQL 9.2 | 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. |
|
109
|
-
| pg:9.1 | PostgreSQL 9.1 | Same as above |
|
110
|
-
| 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. |
|
111
|
-
| redis | 2.4.15 | Runs on port 6379 and installs / compiles the `redis-cli` excutable |
|
112
|
-
| mailcatcher | 0.5.12 | SMPT server runs on 1025 and web interface on 1080 |
|
129
|
+
with the `fgrehm/ventriloquist-` prefix that is ommited on the table above.
|
113
130
|
|
114
131
|
Since services are just Docker images, you can build your own image, push to the
|
115
132
|
registry and use it on your Vagrantfile, you'll just need to specify its fully
|
@@ -122,16 +139,46 @@ Vagrant.configure("2") do |config|
|
|
122
139
|
redis: { image: 'username/redis' },
|
123
140
|
pg: { image: 'otheruser/pg', tag: 'latest' }
|
124
141
|
}
|
142
|
+
|
143
|
+
# If you need more instances of a service, you'll need to give it a unique
|
144
|
+
# name and fine tune it at will, for example:
|
145
|
+
env.services << {
|
146
|
+
# This is basically a Vocker container definition
|
147
|
+
api_db: { image: 'otheruser/pg', ports: [':5432'] },
|
148
|
+
|
149
|
+
# The 'vimage' saves you from typing in `image: 'fgrehm/ventriloquist-redis'`
|
150
|
+
worker_redis: { vimage: 'redis' },
|
151
|
+
|
152
|
+
# The 'type' parameter tells Ventriloquist to configure the service with
|
153
|
+
# its defaults and does some extra work (like installing additional packages)
|
154
|
+
# if the service requires it
|
155
|
+
worker_db: { image: 'your-user/your-pg', type: 'pg' },
|
156
|
+
}
|
125
157
|
end
|
126
158
|
end
|
127
159
|
```
|
128
160
|
|
129
|
-
|
161
|
+
For more information on creating / running Docker containers please have a look
|
130
162
|
at [Vocker](https://github.com/fgrehm/vocker)'s documentation.
|
131
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.
|
168
|
+
|
132
169
|
|
133
170
|
## Available platforms
|
134
171
|
|
172
|
+
| Name | Provides |
|
173
|
+
| --------- | ----------------- |
|
174
|
+
| ruby | rvm + Ruby 2.0.0 |
|
175
|
+
| go | 1.2 |
|
176
|
+
| nodejs | nvm + Nodejs 0.10 |
|
177
|
+
| phantomjs | 1.9.2 |
|
178
|
+
| erlang | The latest version available at https://packages.erlang-solutions.com/erlang/ (currently R16B02) |
|
179
|
+
| elixir | 0.11.2 |
|
180
|
+
| python | pyenv + 3.3.2 |
|
181
|
+
|
135
182
|
In order to configure the VM for usage with the programming language that your
|
136
183
|
app is written on, the plugin leverages Vagrant's [guest capabilities](http://docs.vagrantup.com/v2/plugins/guest-capabilities.html)
|
137
184
|
to deal with distribution specifics. Right now things should work just fine on
|
@@ -143,19 +190,37 @@ example above), the latest version of the available platforms will be installed.
|
|
143
190
|
For example, if you omit the Ruby version you want to use, Ventriloquist will
|
144
191
|
install 2.0.0 with the latest path level.
|
145
192
|
|
146
|
-
So far I've only set up the stuff I need to work but feel free to submit a Pull
|
147
|
-
Request with the scripts required to set things for other platforms:
|
148
193
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
194
|
+
## System packages
|
195
|
+
|
196
|
+
There are times that you just want to install some random set of packages on the guest
|
197
|
+
machine and frequently you end up writing lots of inline shell scripts with
|
198
|
+
`apt-get update && apt-get install ...`s all over the place. In order to avoid those
|
199
|
+
long strings polluting your Vagrantfile you can use the `packages` parameter to save
|
200
|
+
you a few keystrokes.
|
201
|
+
|
202
|
+
In other words:
|
203
|
+
|
204
|
+
```ruby
|
205
|
+
Vagrant.configure("2") do |config|
|
206
|
+
# This:
|
207
|
+
config.vm.provision :shell, inline: %[
|
208
|
+
apt-get update
|
209
|
+
apt-get install -y --force-yes -q \
|
210
|
+
-o Dpkg::Options::='--force-confdef' \
|
211
|
+
-o Dpkg::Options::='--force-confold' \
|
212
|
+
htop sqlite3 curl lxc
|
213
|
+
]
|
214
|
+
|
215
|
+
# Becomes this:
|
216
|
+
config.vm.provision :ventriloquist do |env|
|
217
|
+
env.packages << %w( htop sqlite3 curl lxc )
|
218
|
+
end
|
219
|
+
end
|
220
|
+
```
|
158
221
|
|
222
|
+
Please note that once the package is instaled it won't ever be upgraded unless
|
223
|
+
you run a `apt-get upgrade` or the equivalent.
|
159
224
|
|
160
225
|
## Ideas for improvements
|
161
226
|
|
@@ -219,6 +284,14 @@ if you don't do that the vagrant-lxc container will end up crashing as it
|
|
219
284
|
will collide with the host's `lxcbr0`.
|
220
285
|
|
221
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
|
+
[](https://www.gittip.com/fgrehm/)
|
293
|
+
|
294
|
+
|
222
295
|
## Contributing
|
223
296
|
|
224
297
|
1. Fork it
|
@@ -226,3 +299,5 @@ will collide with the host's `lxcbr0`.
|
|
226
299
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
227
300
|
4. Push to the branch (`git push origin my-new-feature`)
|
228
301
|
5. Create new Pull Request
|
302
|
+
|
303
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|