{"id":13905730,"url":"https://github.com/fgrehm/ventriloquist","last_synced_at":"2025-07-18T03:31:15.490Z","repository":{"id":10540160,"uuid":"12735692","full_name":"fgrehm/ventriloquist","owner":"fgrehm","description":"Development environments made easy","archived":true,"fork":false,"pushed_at":"2014-08-22T00:16:36.000Z","size":724,"stargazers_count":359,"open_issues_count":20,"forks_count":20,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-08T00:52:05.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgrehm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-10T17:16:24.000Z","updated_at":"2024-07-31T17:24:03.000Z","dependencies_parsed_at":"2022-08-28T17:20:22.366Z","dependency_job_id":null,"html_url":"https://github.com/fgrehm/ventriloquist","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fventriloquist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fventriloquist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fventriloquist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fventriloquist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgrehm","download_url":"https://codeload.github.com/fgrehm/ventriloquist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226336659,"owners_count":17608868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-06T23:01:22.376Z","updated_at":"2024-11-25T13:31:43.334Z","avatar_url":"https://github.com/fgrehm.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Ventriloquist\n\n[![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/)\n\n\u003e **ven·tril·o·quist**: _(noun)_ a person who can speak or utter sounds so that\n  they seem to come from somewhere else, esp. an entertainer who makes their voice\n  appear to come from a dummy of a person or animal.\n\nVentriloquist combines [Vagrant](http://www.vagrantup.com/) and [Docker](http://www.docker.io/)\nto give **developers** the ability to configure portable and disposable development\nenvironments with ease. It lowers the entry barrier of building a sane working environment\nwithout the need to learn tools like [Puppet](http://puppetlabs.com/puppet/what-is-puppet)\nor [Chef](http://www.opscode.com/chef/).\n\nIts core is made of a Vagrant plugin that uses a set of opinionated Docker\nimages + some [guest capabilities](http://docs.vagrantup.com/v2/plugins/guest-capabilities.html)\nto provision VMs with services, programming language environments and OS packages,\nthink of it as a \"Heroku for Vagrant\" where a Dyno is your Vagrant machine and Docker\nservices are its addons.\n\nTo give you an idea, this is what it takes to configure a Vagrant VM ready\nfor development on [Discourse](http://www.discourse.org/):\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"quantal64\"\n  config.vm.provision :ventriloquist do |env|\n    env.services  \u003c\u003c %w( redis-2.8 postgres-9.1 mailcatcher-0.5 )\n    env.platforms \u003c\u003c %w( nodejs-0.10 ruby-1.9.3 )\n  end\nend\n```\n\n## :warning: This project is not being actively maintained :warning:\n\nMore information on https://github.com/fgrehm/ventriloquist/issues/63\n\n\n## Project Goals\n\n* Multi purpose, \"zero-conf\" development environments that fits into a gist.\n* Production parity for those that have no control of their production machines,\n  like if you are deploying to Heroku or another PaaS.\n* Be the easiest tool for building other tools development environments, for\n  prototyping and also to give a head start to those introducing Vagrant / Docker\n  to legacy projects.\n\n\n## Installation\n\nMake sure you have Vagrant 1.6+ and run:\n\n```\nvagrant plugin install ventriloquist\n```\n\n\n## Usage\n\nAdd the provisioner block to your Vagrantfile and `vagrant up` it:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.provision :ventriloquist do |env|\n    # Pick the Docker version you want to use (defaults to 0.9.1)\n    # or use :latest to install the latest version available\n    env.docker_version = '0.9.1'\n\n    # Pick the services you need to have around\n    env.services \u003c\u003c %w( redis-2.8 postgres-9.1 memcached-1.4 elasticsearch-1.1 )\n\n    # Configure your development environment\n    env.platforms \u003c\u003c %w( nodejs-0.10 ruby-2.0.0 go-1.2 )\n\n    # Install random packages\n    env.packages \u003c\u003c %w( imagemagick htop sqlite3 )\n  end\nend\n```\n\nIf you are using the plugin on a VirtualBox machine, you need to make sure the\nVM has at least 1gb of RAM, so make sure you have something similar to the code\nbelow on your `Vagrantfile`:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.provider \"virtualbox\" do |vb|\n    vb.customize [\"modifyvm\", :id, \"--memory\", 1024]\n  end\nend\n```\n\n\n## Available services\n\n| Name              | Notes |\n| ----------------- | ----- |\n| elasticsearch-1.1 | Runs on port 9200 |\n| memcached-1.4     | Runs on port 11211 |\n| 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. |\n| postgres-9.2      | Same as above |\n| postgres-9.1      | Same as above |\n| 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. |\n| mysql-5.5         | Same as above |\n| redis-2.8         | Runs on port 6379 and installs / compiles the `redis-cli` excutable |\n| mailcatcher-0.5   | SMPT server runs on 1025 and web interface on 1080 |\n| rethinkdb-1.12    | Uses the 28015 port for the client driver, 29015 for the intracluster connections and 8080 for the administrative web UI |\n\nThe `services` parameter passed in on the Vagrantfile are the ones built with the\nDockerfiles available under [_/services_](services) that are configured to require\nno additional configuration for usage with the default `vagrant` user that usually\ncomes with Vagrant boxes. Apart from that they'll always be available from `localhost`\nusing the default service port (like 5432 for PostgreSQL).\n\nSome extra steps might be required to simplify the connection with the configured\nservices. As an example, besides running the associated Docker image, setting up\nPostgreSQL will involve installing the `postgresql-client` package and adding an\n`export PGHOST=localhost` to the guest's `/etc/profiles.d/ventriloquist.sh` so that\nthe `psql` client works without any extra params.\n\nPlease note that all of the builtin images are available as trusted builds on the\n[Docker index](https://index.docker.io/) with the `fgrehm/ventriloquist-` prefix\nthat is ommited on the table above.\n\nFor fine grained control over how Ventriloquist runs images:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.provision :ventriloquist do |env|\n    env.services \u003c\u003c {\n      redis:    { image: 'username/redis' },\n      postgres: { image: 'otheruser/postgres' }\n    }\n\n    # If you need more instances of a service, you'll need to give it a unique\n    # name and fine tune it at will, for example:\n    env.services \u003c\u003c {\n      # This is simple Vagrant Docker provisioner container\n      api_db: { image: 'otheruser/postgres', args: '-p :5432' },\n\n      # The 'vimage' saves you from typing in `image: 'fgrehm/ventriloquist-redis-2.8'`\n      worker_redis: { vimage: 'redis-2.8', type: 'redis', args: '-P' },\n\n      # The 'type' parameter tells Ventriloquist to configure the service with\n      # its defaults and does some extra work (like installing additional packages)\n      # if the service requires it\n      worker_db: { image: 'your-user/your-postgres', type: 'postgres' },\n    }\n  end\nend\n```\n\n_See http://docs.vagrantup.com/v2/provisioning/docker.html for other arguments_\n\n\n## Available platforms\n\n| Name      | Notes             |\n| --------- | ----------------- |\n| ruby      | Uses rvm for installing rubies |\n| go        | Downloads from https://code.google.com/p/go/downloads/list |\n| nodejs    | Uses nvm for installing node versions |\n| phantomjs | Downloads from https://bitbucket.org/ariya/phantomjs/downloads or https://code.google.com/p/phantomjs/downloads/list |\n| erlang    | The latest version available at https://packages.erlang-solutions.com/erlang/ (currently 17.0) |\n| elixir    | Downloads from https://github.com/elixir-lang/elixir/releases |\n| python    | Uses pyenv for installing python versions |\n\nIn order to configure the VM for usage with the programming language that your\napp is written on, the plugin leverages Vagrant's [guest capabilities](http://docs.vagrantup.com/v2/plugins/guest-capabilities.html)\nto deal with distribution specifics. Right now things should work just fine on\nUbuntu VMs and you'll be warned in case you specify a something that is not supported\non your guest machine.\n\nPlatforms like `ruby`, `nodejs` and `python` also support installing multiple\nversions since we rely on tools that take care of that for us:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  config.vm.provision :ventriloquist do |env|\n    env.platforms \u003c\u003c {\n      # The first version provided will be set as the default\n      nodejs: { versions: ['0.10', '0.9']    },\n      ruby:   { versions: ['2.1.1', '2.1.0'] }\n\n      # The code above is the same as\n      env.platforms \u003c\u003c %w( nodejs-0.9 nodejs-0.10 ruby-2.1.1 ruby-2.1.0 )\n    }\n  end\nend\n```\n\n_NOTICE: Previous versions of the plugin allowed users to omit the platform version\nto be installed, but starting with 0.5.0 you need to set it explicitly on your\n`Vagrantfile` (ex: `env.platforms \u003c\u003c 'ruby'` becomes `env.platforms \u003c\u003c 'ruby-2.1.1`)_\n\n\n## System packages\n\nThere are times that you just want to install some random set of packages on the guest\nmachine and frequently you end up writing lots of inline shell scripts with\n`apt-get update \u0026\u0026 apt-get install ...`s all over the place. In order to avoid those\nlong strings polluting your Vagrantfile you can use the `packages` parameter to save\nyou a few keystrokes.\n\nIn other words:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  # This:\n  config.vm.provision :shell, inline: %[\n    apt-get update\n    apt-get install -y --force-yes -q \\\n                    -o Dpkg::Options::='--force-confdef' \\\n                    -o Dpkg::Options::='--force-confold' \\\n                    htop sqlite3 curl lxc\n  ]\n\n  # Becomes this:\n  config.vm.provision :ventriloquist do |env|\n    env.packages \u003c\u003c %w( htop sqlite3 curl lxc )\n  end\nend\n```\n\nPlease note that once the package is instaled it won't ever be upgraded unless\nyou run a `apt-get upgrade` or the equivalent.\n\n## Ideas for improvements\n\n* Use a Docker container as the dev environment within the Vagrant VM, maybe using\n  [Buildstep](https://github.com/progrium/buildstep) or something like it to\n  configure it.\n* Support for installing \"random\" tools / packages from within the Vagrantfile\n  (like git / sqlite3 / heroku toolbelt / ruby gems / npm packages)\n\n\n### Usage with [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)\n\nIf you are on a Linux machine and want to use vagrant-lxc you'll need to enable\ncontainer nesting by adding the code below to your Vagrantfile:\n\n```ruby\nVagrant.configure(\"2\") do |config|\n  # vagrant-lxc specific tweaks for getting docker to run inside the container\n  config.vm.provider :lxc do |lxc|\n    lxc.customize 'aa_profile', 'unconfined'\n  end\nend\n```\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Fventriloquist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgrehm%2Fventriloquist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Fventriloquist/lists"}