GithubHelp home page GithubHelp logo

ventriloquist's Introduction

Ventriloquist

Build Status Gem Version Code Climate Gittip

ven·tril·o·quist: (noun) a person who can speak or utter sounds so that they seem to come from somewhere else, esp. an entertainer who makes their voice appear to come from a dummy of a person or animal.

Ventriloquist combines Vagrant and Docker to give developers the ability to configure portable and disposable development environments with ease. It lowers the entry barrier of building a sane working environment without the need to learn tools like Puppet or Chef.

Its core is made of a Vagrant plugin that uses a set of opinionated Docker images + some guest capabilities to provision VMs with services, programming language environments and OS packages, think of it as a "Heroku for Vagrant" where a Dyno is your Vagrant machine and Docker services are its addons.

To give you an idea, this is what it takes to configure a Vagrant VM ready for development on Discourse:

Vagrant.configure("2") do |config|
  config.vm.box = "quantal64"
  config.vm.provision :ventriloquist do |env|
    env.services  << %w( redis-2.8 postgres-9.1 mailcatcher-0.5 )
    env.platforms << %w( nodejs-0.10 ruby-1.9.3 )
  end
end

⚠️ This project is not being actively maintained ⚠️

More information on #63

Project Goals

  • Multi purpose, "zero-conf" development environments that fits into a gist.
  • Production parity for those that have no control of their production machines, like if you are deploying to Heroku or another PaaS.
  • Be the easiest tool for building other tools development environments, for prototyping and also to give a head start to those introducing Vagrant / Docker to legacy projects.

Installation

Make sure you have Vagrant 1.6+ and run:

vagrant plugin install ventriloquist

Usage

Add the provisioner block to your Vagrantfile and vagrant up it:

Vagrant.configure("2") do |config|
  config.vm.provision :ventriloquist do |env|
    # Pick the Docker version you want to use (defaults to 0.9.1)
    # or use :latest to install the latest version available
    env.docker_version = '0.9.1'

    # Pick the services you need to have around
    env.services << %w( redis-2.8 postgres-9.1 memcached-1.4 elasticsearch-1.1 )

    # Configure your development environment
    env.platforms << %w( nodejs-0.10 ruby-2.0.0 go-1.2 )

    # Install random packages
    env.packages << %w( imagemagick htop sqlite3 )
  end
end

If you are using the plugin on a VirtualBox machine, you need to make sure the VM has at least 1gb of RAM, so make sure you have something similar to the code below on your Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--memory", 1024]
  end
end

Available services

Name Notes
elasticsearch-1.1 Runs on port 9200
memcached-1.4 Runs on port 11211
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.
postgres-9.2 Same as above
postgres-9.1 Same as above
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.
mysql-5.5 Same as above
redis-2.8 Runs on port 6379 and installs / compiles the redis-cli excutable
mailcatcher-0.5 SMPT server runs on 1025 and web interface on 1080
rethinkdb-1.12 Uses the 28015 port for the client driver, 29015 for the intracluster connections and 8080 for the administrative web UI

The services parameter passed in on the Vagrantfile are the ones built with the Dockerfiles available under /services that are configured to require no additional configuration for usage with the default vagrant user that usually comes with Vagrant boxes. Apart from that they'll always be available from localhost using the default service port (like 5432 for PostgreSQL).

Some extra steps might be required to simplify the connection with the configured services. As an example, besides running the associated Docker image, setting up PostgreSQL will involve installing the postgresql-client package and adding an export PGHOST=localhost to the guest's /etc/profiles.d/ventriloquist.sh so that the psql client works without any extra params.

Please note that all of the builtin images are available as trusted builds on the Docker index with the fgrehm/ventriloquist- prefix that is ommited on the table above.

For fine grained control over how Ventriloquist runs images:

Vagrant.configure("2") do |config|
  config.vm.provision :ventriloquist do |env|
    env.services << {
      redis:    { image: 'username/redis' },
      postgres: { image: 'otheruser/postgres' }
    }

    # If you need more instances of a service, you'll need to give it a unique
    # name and fine tune it at will, for example:
    env.services << {
      # This is simple Vagrant Docker provisioner container
      api_db: { image: 'otheruser/postgres', args: '-p :5432' },

      # The 'vimage' saves you from typing in `image: 'fgrehm/ventriloquist-redis-2.8'`
      worker_redis: { vimage: 'redis-2.8', type: 'redis', args: '-P' },

      # The 'type' parameter tells Ventriloquist to configure the service with
      # its defaults and does some extra work (like installing additional packages)
      # if the service requires it
      worker_db: { image: 'your-user/your-postgres', type: 'postgres' },
    }
  end
end

See http://docs.vagrantup.com/v2/provisioning/docker.html for other arguments

Available platforms

Name Notes
ruby Uses rvm for installing rubies
go Downloads from https://code.google.com/p/go/downloads/list
nodejs Uses nvm for installing node versions
phantomjs Downloads from https://bitbucket.org/ariya/phantomjs/downloads or https://code.google.com/p/phantomjs/downloads/list
erlang The latest version available at https://packages.erlang-solutions.com/erlang/ (currently 17.0)
elixir Downloads from https://github.com/elixir-lang/elixir/releases
python Uses pyenv for installing python versions

In order to configure the VM for usage with the programming language that your app is written on, the plugin leverages Vagrant's guest capabilities to deal with distribution specifics. Right now things should work just fine on Ubuntu VMs and you'll be warned in case you specify a something that is not supported on your guest machine.

Platforms like ruby, nodejs and python also support installing multiple versions since we rely on tools that take care of that for us:

Vagrant.configure("2") do |config|
  config.vm.provision :ventriloquist do |env|
    env.platforms << {
      # The first version provided will be set as the default
      nodejs: { versions: ['0.10', '0.9']    },
      ruby:   { versions: ['2.1.1', '2.1.0'] }

      # The code above is the same as
      env.platforms << %w( nodejs-0.9 nodejs-0.10 ruby-2.1.1 ruby-2.1.0 )
    }
  end
end

NOTICE: Previous versions of the plugin allowed users to omit the platform version to be installed, but starting with 0.5.0 you need to set it explicitly on your Vagrantfile (ex: env.platforms << 'ruby' becomes env.platforms << 'ruby-2.1.1)

System packages

There are times that you just want to install some random set of packages on the guest machine and frequently you end up writing lots of inline shell scripts with apt-get update && apt-get install ...s all over the place. In order to avoid those long strings polluting your Vagrantfile you can use the packages parameter to save you a few keystrokes.

In other words:

Vagrant.configure("2") do |config|
  # This:
  config.vm.provision :shell, inline: %[
    apt-get update
    apt-get install -y --force-yes -q \
                    -o Dpkg::Options::='--force-confdef' \
                    -o Dpkg::Options::='--force-confold' \
                    htop sqlite3 curl lxc
  ]

  # Becomes this:
  config.vm.provision :ventriloquist do |env|
    env.packages << %w( htop sqlite3 curl lxc )
  end
end

Please note that once the package is instaled it won't ever be upgraded unless you run a apt-get upgrade or the equivalent.

Ideas for improvements

  • Use a Docker container as the dev environment within the Vagrant VM, maybe using Buildstep or something like it to configure it.
  • Support for installing "random" tools / packages from within the Vagrantfile (like git / sqlite3 / heroku toolbelt / ruby gems / npm packages)

Usage with vagrant-lxc

If you are on a Linux machine and want to use vagrant-lxc you'll need to enable container nesting by adding the code below to your Vagrantfile:

Vagrant.configure("2") do |config|
  # vagrant-lxc specific tweaks for getting docker to run inside the container
  config.vm.provider :lxc do |lxc|
    lxc.customize 'aa_profile', 'unconfined'
  end
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

ventriloquist's People

Contributors

edgurgel avatar fgrehm avatar ndrluis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ventriloquist's Issues

Move default port EXPOSE from Dockerfiles out to service classes

While working on a legacy app, I had to configure 2 instances of a Solr service: one to run specs and the other for running the app on development mode.

This is a somewhat big change to do so it will take a while to have it in place.

If you are up for doing this, please raise your hand in case you need more info, otherwise just shoot a PR ;)

Compatible with Mac OS X?

This looks pretty neat. Does it Just Work™ with OS X? What about non-Vbox providers? Is it possible to make it work with Docker inside a VM if set up as per Docker.io's instructions, for example? I don't think I'd use that part (probably straight Parallels instead), but these might be useful things to mention in the wiki or on the project page.

Support Post-Up Hooks

For example: I always want to create a database in postgres, maybe run some migrations, a seed task, and maybe even start the web server when they type vagrant up.

I'm not sure if this is the right place for this kind of issue but it would be nice to have?

Error on vagrant up: Docker client is not running (RuntimeError)

I'm trying to create a vagrant machine based on CentOS 6.5 with ruby and mysql, nothing fancy.
I get an error when running vagrant up and the machine is not created at all.

OS: Windows 7 x64
VM: VirtualBox 4.3.10
Vagrant 1.6.2

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "chef/centos-6.5"
  config.vm.hostname = "centos"

  config.vm.network "forwarded_port", guest: 80, host: 8001

  config.vm.network "private_network", ip: "192.168.33.10"

  config.vm.provision :ventriloquist do |env|
    env.docker_version = :latest

    env.services << %w( mysql-5.6 )
    env.platforms << %w( ruby-2.1.0 )
  end

  config.vm.provider "virtualbox" do |vb|
    # Don't boot with headless mode
    # vb.gui = true

    # Use VBoxManage to customize the VM. For example to change memory:
    vb.customize ["modifyvm", :id, "--memory", "2048"]
  end
end

vagrant up output:

Bringing machine 'default' up with 'virtualbox' provider...
    ==> default: Importing base box 'chef/centos-6.5'...
    ==> default: Matching MAC address for NAT networking...
    ==> default: Checking if box 'chef/centos-6.5' is up to date...
    ==> default: Setting the name of the VM: CentOS-65_default_1401219040998_99379
    ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
    ==> default: Clearing any previously set network interfaces...
    ==> default: Preparing network interfaces based on configuration...
        default: Adapter 1: nat
        default: Adapter 2: hostonly
    ==> default: Forwarding ports...
        default: 80 => 8001 (adapter 1)
        default: 22 => 2200 (adapter 1)
    ==> default: Running 'pre-boot' VM customizations...
    ==> default: Booting VM...
    ==> default: Waiting for machine to boot. This may take a few minutes...
        default: SSH address: 127.0.0.1:2200
        default: SSH username: vagrant
        default: SSH auth method: private key
        default: Warning: Connection timeout. Retrying...
    ==> default: Machine booted and ready!
    ==> default: Checking for guest additions in VM...
    ==> default: Setting hostname...
    ==> default: Configuring and enabling network interfaces...
    ==> default: Mounting shared folders...
        default: /vagrant => D:/Vagrant/CentOS-6.5
    ==> default: Running provisioner: ventriloquist...
        default: Installing Docker (latest) onto machine...
        default: Configuring Docker to autostart containers...
    ==> default: Forcing shutdown of VM...
    ==> default: Destroying VM and associated drives...
    ==> default: Running cleanup tasks for 'ventriloquist' provisioner...
    D:/Users/Emiliano/.vagrant.d/gems/gems/ventriloquist-0.6.0/lib/ventriloquist/provisioner.rb:55:in `provision_services':
    Docker client is not running (RuntimeError)
            from D:/Users/Emiliano/.vagrant.d/gems/gems/ventriloquist-0.6.0/lib/ventriloquist/provisioner.rb:23:in `provision'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/provision.rb:129:in `run_provisioner'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:346:in `hook'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/provision.rb:117:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/provision.rb:117:in `block in call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/provision.rb:105:in `each'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/provision.rb:105:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/call.rb:53:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/call.rb:53:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/call.rb:53:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/box_check_outdated.rb:68:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/match_mac_address.rb:16:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/import.rb:32:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/customize.rb:40:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/call.rb:53:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builtin/call.rb:53:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/warden.rb:34:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/builder.rb:116:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `block in run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/util/busy.rb:19:in `busy'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/action/runner.rb:66:in `run'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:196:in `action_raw'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:173:in `block in action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:434:in `lock'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `call'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/machine.rb:161:in `action'
            from d:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

PHP Support

Not sure how to go about adding this myself, though I'd love to!

a way to pass arguments to the docker files

I was trying to start up a file using -h and a hostname

moby/moby#243

I don't see a way to pass any option to the docker images when using ventriloquist

basically I have

env.services << {
  graphite: { image: 'nickstenning/graphite' },
  statsd: { image: 'danmayer/statsd' }
}

was thinking

env.services << {
  graphite: { image: 'nickstenning/graphite' },
  statsd: { image: 'danmayer/statsd', h:my.hostname.net }
}

could make statsd run like docker run -h my.hostname.net danmayer/statsd

Or some other way to inject options... Thoughts?

First boot hanging

I was scratching my head lately because I couldn't get Ventriloquist (I'm not sure this is about Ventriloquist though) running, it hangs every time on "Waiting for VM to boot. This can take a few minutes".

To debug the issue I started the VM with config.vm.boot_mode = :gui and it worked!

I have no idea what's going on but I thought this might be useful information for beginners.

Cheers!

Unable to stop services

I've just tried to docker stop some services and Docker immediately restarted them. I'm not sure if it is related to the "-r" we are writing to Docker configs using Vocker or something else. Gonna have to dig deeper into this as well =/

PS: This might be related to #1

A box must be specified

When using your examples from the readme, Vagrant tells me that "a box must be specified". Do you have a particular box you would recommend? I don't see a reference to any box in your examples.

I am using 'phusion-open-ubuntu-14.04-amd64' from https://github.com/phusion/baseimage-docker/blob/master/Vagrantfile.

Vagrant.configure("2") do |config|
  config.vm.box = 'phusion-open-ubuntu-14.04-amd64'

After vagrant up and vagrant ssh, I am unable to curl elasticsearch:

$ curl localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused
$ docker images
REPOSITORY                           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
fgrehm/ventriloquist-redis-2.8       latest              2349ae8b7c86        5 weeks ago         431.3 MB
fgrehm/ventriloquist-es-1.1          latest              407ea49a388d        5 weeks ago         520.6 MB
fgrehm/ventriloquist-memcached-1.4   latest              873accdd08a0        5 weeks ago         431.2 MB
fgrehm/ventriloquist-postgres-9.2    latest              140971af8e35        5 weeks ago         523 MB

Erlang fails to install when choosing elixir

Installing Erlang
Downloading https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb to /tmp/erlang-solutions_1.0_all.deb
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb -O /tmp/erlang-solutions_1.0_all.deb

Stdout from the command:



Stderr from the command:

--2014-01-15 22:53:09--  https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
Resolving packages.erlang-solutions.com (packages.erlang-solutions.com)... 31.172.186.53
Connecting to packages.erlang-solutions.com (packages.erlang-solutions.com)|31.172.186.53|:443... connected.
ERROR: no certificate subject alternative name matches
    requested host name `packages.erlang-solutions.com'.
To connect to packages.erlang-solutions.com insecurely, use `--no-check-certificate'.

Vagrant File

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "quantal64"
  config.vm.box_url = "https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box"
  config.vm.network :forwarded_port, guest: 8000, host: 8000

  config.vm.provision :ventriloquist do |env|
    env.services  << %w( redis pg )
    env.platforms << %w( nodejs elixir )
    env.packages << %w( libcurl3 curl libcurl4-openssl-dev)
  end
end

Ability to set guest's timezone

I always forget how to do that without human interaction with bash and I worked on a few legacy projects that required the timezone to be set to a specific one in order for tests to pass, it one less thing that I'll do with bash :-)

Something like this should do the trick:

config.vm.provision :ventriloquist do |env|
  env.timezone = 'Locality/Region' # Ex: 'America/Sao_Paulo'
end

This and this might be worth looking at

Unable to shut down a vagrant-lxc container when ElasticSearch is running

Doesn't happen all the time but I've experienced it more than once now, not sure if that happens on VBox but might be a good idea to check.

Right now I have no idea what might be causing this but usually a lxc-stop by hand does the trick. Sometimes I have to be a bit more drastic and run a killall -9 lxc-start, which results in a zombie java process.

Python support

Ditto on what I said in PHP. Could be good to have multiple versions of both.

Remove hard coded latest platforms version from the plugin

Because it is a huge PITA to keep updating things and by having the versions specified explicitly on the Vagrantfile will ensure that developers won't have trouble when recreating a VM that ends up with a different version of Ruby (for example) and things end up falling apart.

Ability to set git configs

Some tools that I need to run on the VM gets my email from user.email, it'll be nice to avoid using bash to set that for us as well:

config.vm.provision :ventriloquist do |env|
  env.git_configs = { 
    user: { name: 'John Doe', email: '[email protected]' },
    # OR
    'user.name' => 'John Doe',
    'user.email' => '[email protected]'
  }
end

Trying to run on boot2docker

I'm trying to run ventriloquist on this box: https://github.com/mitchellh/boot2docker-vagrant-box

The guest VM does not support installing packages! Please open an issue
at https://github.com/fgrehm/ventriloquist/issues reporting your guest
distribution.
Vagrant attempted to execute the capability 'git_install'
on the detect guest OS 'tinycore', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

Use Docker trusted builds for services/platforms

Same concerns as fgrehm/docker-provider#5 -- I don't want to run a bunch of images if I can't be assured they're actually built from published Dockerfiles.

I realize this one would be much more onerous for you to set up unless Docker adds support for multiple Dockerfiles in a single GitHub repo. Sadly it looks like there is already a ventriloquist GitHub user, in case you wanted to set up an organization to hold lots of repos 😢

working with vagrant & docker in windows

after clone using command "git clone https://github.com/dotcloud/docker.git"
"cd docker"
following issues are not resolved.... please any one fix the issue....
"vagrant up" command is not working
issues as follows:

D:\docker>vagrant up
Vagrant failed to initialize at a very early stage:

The home directory you specified is not accessible. The home
directory that Vagrant uses must be both readable and writable.

You specified: C:/Users/Acer/.vagrant.d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.