Giter Site home page Giter Site logo

aderyabin / rove Goto Github PK

View Code? Open in Web Editor NEW
636.0 24.0 63.0 254 KB

Rove is a service that allows you to pregenerate typical Vagrant builds

Home Page: rove.io

License: MIT License

Ruby 65.29% CoffeeScript 4.09% CSS 4.86% Shell 0.22% HTML 25.54%

rove's Introduction

Rove

Rove - visual online Vagrant configurator. Code Climate

Usage

Run rake server to bootstrap Sinatra or rake console to have some command line fun.

Please contribute

We are doing our best to add more useful packages to Rove. But that's not enough. If you are an author of a nice Vagrant cookbook โ€“ you are very welcome to add its support!

To make this job easier we wrapped packages and patterns into a tiny DSL described below. You can find all the packages located at /packages directory, patterns at /patterns and vagrant configuration in vagrant_settings accordingly.

Feel free to add some more and create a shiny pull request!

DSL Description

Packages

Packages are atomic parts of the config. They are, typically, either one recipe or a single tool/service be it a programming language like Ruby or a database like PostgreSQL.

Each package consists of nested options, switches and inputs that will affect resulting Vagrant configuration and also the set of cookbooks that will be added to resulting Cheffile.

Here is the base of a package:

Rove.package :foobar do
  title 'FooBar' # can be skipped and will be defaulted to :foobar.to_s.humanize
  category 'Something'
end

This is the least possible description. You need to specify an unique keyword for the package you work on (:foobar) and also a category. Omitting any of those will result into an exception.

Options

To make configuration possible, Rove defines three kinds of possible user inputs: options, inputs and selects. Each of them can be nested into any other.

option is your infantry:

Rove.package :foobar do
  category 'Something'

  option :important_flag do
    title 'Set important flag' # can be skipped and will be defaulted to :important_flag.to_s.humanize

    # This option will become available as soon as the parent is enabled
    option :important_subflag
  end

  option :enable_autostart
end

Options give you ability to make particular features switchable. On the other hand select gives an ability to force user to choose between possible options:

Rove.package :foobar do
  category 'Something'

  option :enable_autostart do
    select 'Select launcher to use' do
      option :launcher1 do
        option :deliver_crash_reports do
          title 'Deliver crash reports?'
        end
      end
      option :launcher2
    end
  end
end

As you can see you can freely nest options in any order. Note however that options have to have unique keywords in the context of package no matter how deeply they nested.

Sometimes you might want to get some custom textual user input. It's possible with input method. It behaves absolutely identical to option.

Rove.package :foobar do
  category 'Something'

  option :enable_autostart do
    select 'Select launcher to use' do
      option :launcher1 do
        option :deliver_crash_reports do
          title 'Deliver crash reports?'

          input :deliver_email do
            title 'Deliver to'
          end
        end
      end
      option :launcher2
    end
  end
end

Additionaly you can specify a default value like this:

Rove.package :foobar do
  category 'Something'

  input :password do
    default 'ololo'

    config do |value|
      # this block runs with any configuration: default value is used if input was not enabled manually
    end
  end
end

In case you know list of all possible values you can specify them using enum:

Rove.package :foobar do
  category 'Something'

  input :log_type do
    default 'warning'
    enum 'info', 'warning', 'error'

    config do |value|
      # ...
    end
  end

Configuration

Now that you described your package's options we can use them to affect the resulting configuration. Rove defines three methods that will help you to achieve that: cookbook, recipe and config. They can be called from any option, select or input and also from the package itself.

Rove.package :foobar do
  category 'Something'

  # Adds cookbook dependency. Every given option will be proxied to Librarian as-is.
  cookbook 'foobar', :option => 'value'

  # Activates recipe at provisioning
  recipe 'foobar'

  option :enable_autostart do
    # A hash returning from this method will be merged into provisioning configuration
    # Note that this is going to happen only while `:enable_autostart` option is enabled.
    config do
      {
        :foobar => {
          :user => 'ololo'
        }
      }
    end

    select 'Select launcher to use' do
      option :launcher1 do
        option :deliver_crash_reports do
          # Another cookbook that will be required as long as `:deliver_crash_reports` is enabled
          cookbook 'foobar_emails'

          title 'Deliver crash reports?'
        end
      end
      option :launcher2
    end
  end
end

While cookbook and recipe methods are pretty straightforward, the config method has some overloads to handle tough cases.

Rove.package :foobar do
  category 'Something'

  # Typically it can accept up to two arguments
  config do |config, build|
    config # contains current config condition at the moment of block evaluation
    build  # details of build that was requested by user: complete list of required packages and options
  end

  # While being called from an input it gets up to three parameters
  input :option do
    config do |value, config, build|
      value  # a textual input that was provided by user
      config # contains current config condition at the moment of block evaluation
      build  # details of build that was requested by user: complete list of required packages and options
    end
  end
end

Sometimes it might be useful to define a helper:

Rove.package :foobar do
  category 'Something'

  config do
    specific_configurator
  end

  def specific_configurator
  end
end

An order of merge between options is not declared. They have to be isolated and it plays well in most cases. But sometimes it doesn't. In these dark times finalizer comes to save you. Consider it an after-filter of a package configuration.

Rove.package :foobar do
  category 'Something'

  config
    {:a => 'b'}
  end

  input :option do
    config do
      {:b => 'c'}
    end
  end

  finalizer do |config|
    config # {:a => 'b', :b => 'c'}
  end
end

Finalizer can only be defined at a package level.

Vagrant Settings

Vagrant Settings are also atomic parts of the config, follow a similar pattern to Packages and support altering the default Vagrant configuration. They inherit the same user input options as Packages along with default values.

Here is an example of a setting taking two input values and being applied to create a line of configuration for Vagrant:

Rove.vagrant_setting :my_setting do

  # Provide a block returning a line of config.
  # Values appear in the order of input specification below
  config do |first_value, second_value|
    "vagrant.config :i_want_to_set, this: #{first_value}, and_this: #{second_value}"
  end

  input :option_1 do
    title 'Please set me'
    default 'foo'
    config do |value|
      {
        my_setting: {
          config: {
            option_1: value
          }
        }
      }
    end
  end

  input :option_2 do
    title 'I need to be set too'
    default 'bar'
    config do |value|
      {
        my_setting: {
          config: {
            option_2: value
          }
        }
      }
    end
  end

end

Patterns

Pattern is a build template. It lists pre-enabled packages and corresponding internal options for each of them. Patterns are powered by the configuration objects listed previously as commands such as package or vagrant_setting.

Rove.pattern :rails do
  title 'Rails' # can be skipped and will be defaulted to :rails.to_s.humanize

  # First argument is a keyword of package
  # Other arguments are options that should be enabled
  package :ruby, 'rbenv', 'rbenv_193', 'rbenv_200'

  # Note that sometimes you might require to pass values for inputs
  # Here is the alternative syntax for options
  package :ruby, {:ruby => true, :rbenv => true, :something_to_input => 'Yes, I do!'}

  # And some other packages
  package :postgresql
  package :redis
  package :git

  # Add Vagrant configuration if necessary
  vagrant_setting :port_forward, {:guest_port => 3000, :host_port => 3000}
end

Examples

Since Rove is a working service โ€“ just go and look through packages, patterns or vagrant_settings directories. It's full of packages we already use.

Credits

Special Thanks

===

Sponsored by Evil Martians

rove's People

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  avatar  avatar

rove's Issues

Outdated chef version causing errors?

Running vagrant up on a rove.io generated VagrantFile, I was getting the error FATAL: NameError: undefined local variable or methoduse_inline_resources' for #Class:0x7fb7f8f83330`

This seems to be caused by an outdated version of chef running in the VM. Following this stackoverflow answer I fixed this by adding config.vm.provision :shell, :inline => "gem install chef --version 11 --no-rdoc --no-ri --conservative" in the VagrantFile before the rest of the provisioning.

Chef failing due to MongoDB - NoMethodError: undefined method `helpers'

ShareID = 92eac5e2df71f6c651f7e4d5b9d31a08

Doing a manual install and it fails on vagrant up, something to do with mongo, wonder if there is a version issue?

From cli output

Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mongodb/recipes/default.rb

Relevant File Content:
/tmp/vagrant-chef-3/chef-solo-1/cookbooks/mongodb/recipes/install.rb:
23>> helpers MongoDBConfigHelpers

FATAL: NoMethodError: undefined method `helpers' for Chef::Resource::Template

Apache and mysql not installed

The current predefined LAMP setup is not installing Apache and MySQL

==> default: [2015-01-25T15:45:37+00:00] INFO: Run List expands to [apt, vim, apache2, git, php, mysql::server]
==> default: [2015-01-25T15:45:37+00:00] INFO: Starting Chef Run for vagrant.vm
==> default: [2015-01-25T15:45:37+00:00] INFO: Running start handlers
==> default: [2015-01-25T15:45:37+00:00] INFO: Start handlers complete.
==> default: [2015-01-25T15:45:40+00:00] INFO: Ignoring apache2::mod_authn_core. not available until apache 2.4
==> default:
==> default: ================================================================================
==> default: Recipe Compile Error
==> default: ================================================================================
==> default:
==> default:
==> default: Chef::Exceptions::RecipeNotFound
==> default: --------------------------------
==> default: could not find recipe server for cookbook mysql
==> default:
==> default:
==> default: [2015-01-25T15:45:40+00:00] ERROR: Running exception handlers
==> default: [2015-01-25T15:45:40+00:00] ERROR: Exception handlers complete
==> default: [2015-01-25T15:45:40+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-25T15:45:40+00:00] FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe server for cookbook mysql
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Vagrant configuration version

What is the reason to use Vagrant v1 instead of v2?

I can see the following block: Vagrant::Config.run in Hospice resulted config files.
But Vagrant documentation v2 tells about Vagrant.configure("2") instead.

From my point of view it's only way to use multiple-machines setup via public/private networks (config.vm.network)

Use a self-contained librarian installation

You can use multiple provisioners to remove the need to have anything other than virtualbox/vagrant installed as follows:

# add the following before the `Vagrant.configure` line
$script = <<-SCRIPT
cat > /root/.gemrc << 'EOF'
gem: --no-ri --no-rdoc
EOF

if ! grep -q cd-to-directory "/home/vagrant/.bashrc"; then
  echo "- setting up auto chdir on ssh"
  echo "\n[ -n \\"\\$SSH_CONNECTION\\" ] && cd /vagrant # cd-to-directory" >> "/home/vagrant/.bashrc"
fi

cd /vagrant

if [ ! -f /opt/chef/embedded/bin/librarian-chef ]; then
  echo "- installing librarian-chef"
  /opt/chef/embedded/bin/gem install librarian-chef > /dev/null
fi

echo "- running librarian-chef"
/opt/chef/embedded/bin/librarian-chef install > /dev/null

SCRIPT

And then place this before the existing config.vm.provision block:

  config.vm.provision :shell, inline: $script

This removes the need to install gems outside of the vagrant vm.

A few notes:

  • Other than git, I don't run any code outside of a vm on my mac. It's a way to ensure that all development environments can be replicated anywhere without my poking/prodding, since I regularly rebuild my vms.
  • This requires the use of the opscode ruby to install things. A bit annoying, and there should be some fallbacks, but still good to note.
  • This sort of pollutes the embedded opscode ruby. We could install ruby1.9 (I do that for other vms) but it doesn't matter that much.

Add Ruby 2.1.2

Ruby 2.1.2 has released, can we get an update to show that version as selectable?

Got troubles with chef on new vagrant setup

Here is the failing part of logs:

[default] Running provisioner: chef_solo...
The chef binary (either `chef-solo` or `chef-client`) was not found on
the VM and is required for chef provisioning. Please verif

The only change I made to config is:

config.vm.box_url = "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-i386-disk1.box"

Cookbook error while provisioning the Rails machine

I'm getting this error while trying to bring up the Rails machine. It is generated by clicking the Rails button on the homepage, downloading & unpacking, running librarian-chef install and then vagrant up:

[2013-11-24T10:06:24+00:00] INFO: *** Chef 10.14.2 ***
[2013-11-24T10:06:25+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[git]", "recipe[postgresql::server]", "recipe[redis]", "recipe[ruby_build]", "recipe[rbenv::user]"] from JSON
[2013-11-24T10:06:25+00:00] INFO: Run List is [recipe[apt], recipe[git], recipe[postgresql::server], recipe[redis], recipe[ruby_build], recipe[rbenv::user]]
[2013-11-24T10:06:25+00:00] INFO: Run List expands to [apt, git, postgresql::server, redis, ruby_build, rbenv::user]
[2013-11-24T10:06:25+00:00] INFO: Starting Chef Run for precise64
[2013-11-24T10:06:25+00:00] INFO: Running start handlers
[2013-11-24T10:06:25+00:00] INFO: Start handlers complete.

================================================================================
Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/dmg/resources/package.rb
================================================================================

SyntaxError
-----------
compile error
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/dmg/resources/package.rb:21: syntax error, unexpected ':', expecting $end
attribute :app, kind_of: String, name_attribute: true
                        ^

Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/dmg/resources/package.rb:21:in `class_from_file'

Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/dmg/resources/package.rb:

  1:  # Encoding: utf-8
  2:  # Cookbook Name:: dmg
  3:  # Resource:: package
  4:  #
  5:  # Copyright 2011, Joshua Timberman
  6:  #
  7:  # Licensed under the Apache License, Version 2.0 (the "License");
  8:  # you may not use this file except in compliance with the License.
  9:  # You may obtain a copy of the License at

[2013-11-24T10:06:25+00:00] ERROR: Running exception handlers
[2013-11-24T10:06:25+00:00] ERROR: Exception handlers complete
[2013-11-24T10:06:25+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-11-24T10:06:25+00:00] FATAL: SyntaxError: compile error
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/dmg/resources/package.rb:21: syntax error, unexpected ':', expecting $end
attribute :app, kind_of: String, name_attribute: true
                        ^
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I tried on both my Windows and Mac machines, same result. I'm guessing it is related to the Chef or Ruby version but I haven't been able to find a working solution.

The VM failed to remain in running state.

I am running a latest Mac OS X Mountain Lion update 10.8.3 , as well as the latest version of Oracle VirtualBox.

Every second-third "vagrant up" on multiple rove.io configurations throw an error:

The VM failed to remain in running state, while attempting to boot. This is normally caused by misconfiguration or host system incompatibilities.

This is probably not the correct place to post this, but couldn't find any help or information from Vagrant community.

P.S. Sorry for posting an empty issue, accidently hit the post button.

Chef fails

There is the Cheffile

# encoding: utf-8

site 'http://community.opscode.com/api/v1'

cookbook "apt"
cookbook "git", {}
cookbook "nodejs", {:github=>"mdxp/nodejs-cookbook"}
cookbook "nginx", {}
cookbook "mysql", {}
cookbook "vim", {}

Here is the Vagrantfile

# encoding: utf-8
# This file originally created at http://rove.io/1830e30d8791ee5734a7513a0433ec8c

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

Vagrant.configure("2") do |config|

  config.vm.box = "opscode-ubuntu-12.04_chef-11.4.0"
  config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.0.box"
  config.ssh.forward_agent = true

  config.vm.network :forwarded_port, guest: 80, host: 8888

  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = ["cookbooks"]
    chef.add_recipe :apt
    chef.add_recipe 'git'
    chef.add_recipe 'nodejs'
    chef.add_recipe 'nginx'
    chef.add_recipe 'mysql::server'
    chef.add_recipe 'vim'
    chef.json = {
      :git   => {
        :prefix => "/usr/local"
      },
      :nginx => {
        :dir                => "/etc/nginx",
        :log_dir            => "/var/log/nginx",
        :binary             => "/usr/sbin/nginx",
        :user               => "www-data",
        :init_style         => "runit",
        :pid                => "/var/run/nginx.pid",
        :worker_connections => "1024"
      },
      :mysql => {
        :server_root_password   => "password",
        :server_repl_password   => "password",
        :server_debian_password => "password",
        :service_name           => "mysql",
        :basedir                => "/usr",
        :data_dir               => "/var/lib/mysql",
        :root_group             => "root",
        :mysqladmin_bin         => "/usr/bin/mysqladmin",
        :mysql_bin              => "/usr/bin/mysql",
        :conf_dir               => "/etc/mysql",
        :confd_dir              => "/etc/mysql/conf.d",
        :socket                 => "/var/run/mysqld/mysqld.sock",
        :pid_file               => "/var/run/mysqld/mysqld.pid",
        :grants_path            => "/etc/mysql/grants.sql"
      }
    }
  end
end

I get the following:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'opscode-ubuntu-12.04_chef-11.4.0' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'opscode-ubuntu-12.04_chef-11.4.0' (v0) for provider: virtualbox
    default: Downloading: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.0.box
==> default: Successfully added box 'opscode-ubuntu-12.04_chef-11.4.0' (v0) for 'virtualbox'!
==> default: Importing base box 'opscode-ubuntu-12.04_chef-11.4.0'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: rove-1830e30d8791ee5734a7513a0433ec8c_default_1440108155858_27198
==> default: Clearing any previously set forwarded ports...
==> default: The cookbook path '/Users/user1/Downloads/rove-1830e30d8791ee5734a7513a0433ec8c/cookbooks' doesn't exist. Ignoring...

In the downloaded zip, the Vagrantfile and Cheffile were both in the same, base directory. So next I created a cookbooks directory and moved the Cheffile into there. Running vagrant up again:

==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: Starting Chef Client, version 11.4.0
==> default: [2015-08-20T22:03:52+00:00] INFO: *** Chef 11.4.0 ***
==> default: [2015-08-20T22:03:53+00:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[git]", "recipe[nodejs]", "recipe[nginx]", "recipe[mysql::server]", "recipe[vim]"] from JSON
==> default: [2015-08-20T22:03:53+00:00] INFO: Run List is [recipe[apt], recipe[git], recipe[nodejs], recipe[nginx], recipe[mysql::server], recipe[vim]]
==> default: [2015-08-20T22:03:53+00:00] INFO: Run List expands to [apt, git, nodejs, nginx, mysql::server, vim]
==> default: [2015-08-20T22:03:53+00:00] INFO: Starting Chef Run for vagrant.vm
==> default: [2015-08-20T22:03:53+00:00] INFO: Running start handlers
==> default: [2015-08-20T22:03:53+00:00] INFO: Start handlers complete.
==> default: [2015-08-20T22:03:53+00:00] ERROR: Running exception handlers
==> default: [2015-08-20T22:03:53+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated
==> default: [2015-08-20T22:03:53+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-08-20T22:03:53+00:00] FATAL: ArgumentError: You must specify at least one cookbook repo path
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

And here is that stack trace:

sudo cat /var/chef/cache/chef-stacktrace.out
Generated at 2015-08-20 22:03:53 +0000
ArgumentError: You must specify at least one cookbook repo path
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/cookbook_loader.rb:43:in `initialize'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:212:in `new'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:212:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:467:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/client.rb:200:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:190:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:239:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application/solo.rb:231:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/lib/chef/application.rb:73:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.0/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'

What am I missing here?

Add ruby gems support?

I'm not a ruby developer, but I'm using some ruby gems (sass, coffeescript). It would be great if the rove DSL would support installing different gems, so this could be done through rove.

Error with apt cookbook

On new clean instalation for rails

  1:  #
  2:  # Cookbook Name:: apt
  3:  # Provider:: repository
  4:  #
  5:  # Copyright 2010-2011, Opscode, Inc.
  6:  #
  7:  # Licensed under the Apache License, Version 2.0 (the "License");
  8:  # you may not use this file except in compliance with the License.
  9:  # You may obtain a copy of the License at

[2013-08-03T18:49:11+00:00] ERROR: Running exception handlers
[2013-08-03T18:49:11+00:00] ERROR: Exception handlers complete
[2013-08-03T18:49:11+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-08-03T18:49:11+00:00] FATAL: NameError: undefined local variable or method `use_inline_resources' for #<Class:0x7fab6c0e3b88>
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Run Vagrant errors

Probably some Vagrant file syntax error

the line
Vagrant.configure("2") do |config|

I changed to
Vagrant::Config.run do |config|

And now its working.

MySQL Install Fails

With a default (rove-generated) selection including MySQL:

FATAL: Chef::Exceptions::RecipeNotFound: could not find recipe server for cookbook mysql

This is apparently unavoidable without version locking to < 6.

hashicorp/vagrant#5061

Allow choosing ubuntu version

There are a few different versions for ubuntu, and using a more up-to-date distro like 13.10 would be nice to get 5.5 support.

Not sure how to go about this.

rove.io

vhost definition is lacking and probably others since it still is not working
Apache still doesn't work
also would be nice to make one for centos not only for debian

Chef version issue

I have followed the exact same steps as mentioned on rove.io website, first vagrant up was showing some issue which i resolved by installing some dependency. Now i am getting a runtime error every time i run vagrant reload or vagrant reload --provision

my code stuck near here:

==> default: Compiling Cookbooks...
==> default: 
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef/cc9e1c118b8a6e466bd05ed1363cda86/cookbooks/compat_resource/libraries/autoload.rb
==> default: ================================================================================
==> default: 
==> default: 
==> default: RuntimeError
==> default: ------------
==> default: This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade.
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef/cc9e1c118b8a6e466bd05ed1363cda86/cookbooks/compat_resource/libraries/autoload.rb:2:in `<top (required)>'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/cc9e1c118b8a6e466bd05ed1363cda86/cookbooks/compat_resource/libraries/autoload.rb:
==> default: 
==> default:   1:  unless Gem::Requirement.new(">= 12.0").satisfied_by?(Gem::Version.new(Chef::VERSION))
==> default:   2>>   raise "This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade."
==> default:   3:  end
==> default:   4:  
==> default:   5:  # If users are on old verisons of ChefDK which activates an (old) gem via cheffish before this cookbook loads, then
==> default:   6:  # we just try to monkeypatch over the top of a monkeypatch.  Its possible that we have checks in this cookbook which
==> default:   7:  # will defeat that purpose and fail to monkeypatch on top of monkeypatches -- in which case those checks should be
==> default:   8:  # removed -- this cookbook needs to win when it gets into a fight with the old gem versions.
==> default:   9:  if Gem.loaded_specs["compat_resource"]
==> default:  10:    Chef.log_deprecation "using compat_resource as a gem is deprecated;  please update cheffish and chef-provisioning gems (or use the latest Chef/ChefDK packages) or else manually pin your compat_resource cookbook version to the same version as the gem you are using to remove this warning"
==> default:  11:  end
==> default: 
==> default: 
==> default: 
==> default: [2018-01-02T21:58:43+00:00] ERROR: Running exception handlers
==> default: [2018-01-02T21:58:43+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated
==> default: [2018-01-02T21:58:43+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2018-01-02T21:58:43+00:00] FATAL: RuntimeError: This resource is written with Chef 12.5 custom resources, and requires at least Chef 12.0 used with the compat_resource cookbook, it will not work with Chef 11.x clients, and those users must pin their cookbooks to older versions or upgrade.
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Please help asap.

Generate v2 configs instead of v1 configs

This should be simple, just change the config block from:

Vagrant::Config.run do |config|

to:

Vagrant.configure("2") do |config|

As far as I can tell, there are no significant implications to this, but it makes using things like vagrant-omnibus easier as you don't have to manually change the configuration.

The chef binary (either `chef-solo` or `chef-client`) was not found on VM

I've downloaded the build with ID 0a5973b6146a707f1fd6ff054f30f699 and trying to get it working, but it seems the provisioner can't find chef executables on the VM.

I'm running vagrant 1.1.5 @ vb 4.2 @ OSX 10.8.3

rails3/pulse (develop_) [INS] โžค librarian-chef install Installing apt (1.9.2)
Installing build-essential (1.3.4)
Installing chef_handler (1.1.4)
Installing dmg (1.1.0)
Installing yum (2.2.0)
Installing runit (1.1.2)
Installing windows (1.8.4)
Installing git (2.3.0)
Installing openssl (1.0.2)
Installing mysql (2.1.2)
Installing ohai (1.1.8)
Installing sqlite (1.0.0)
Installing sysctl (0.1.0)
Installing rvm (0.9.0)
Installing redis (4.0.1)
Installing nginx (1.4.0)
rails3/pulse (develop_) [INS] โžค vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.

Guest Additions Version: 4.1.12
VirtualBox Version: 4.2
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Running provisioner: VagrantPlugins::Chef::Provisioner::ChefSolo...
The chef binary (either chef-solo or chef-client) was not found on
the VM and is required for chef provisioning. Please verify that chef
is installed and that the binary is available on the PATH.

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.