rjocoleman / vagrant-magento-mirror

Magento (stock) Mirror with support files for Vagrant and Chef. Useful for testing extensions in a clean environment.
Open Software License 3.0
6 stars 4 forks source link

Clean install does not complete #1

Closed gordonknoppe closed 11 years ago

gordonknoppe commented 11 years ago

Interesting looking project! I am unable to complete a default installation. I am getting an error during the chef provisioning, see transcript below. Thank you!

gknop@guidances-macbook-pro-gknop:~/Projects$ git clone https://github.com/rjocoleman/vagrant-magento-mirror.git
Cloning into vagrant-magento-mirror...
remote: Counting objects: 99546, done.
remote: Compressing objects: 100% (27605/27605), done.
remote: Total 99546 (delta 61868), reused 96549 (delta 59448)
Receiving objects: 100% (99546/99546), 40.64 MiB | 1014 KiB/s, done.
Resolving deltas: 100% (61868/61868), done.
gknop@guidances-macbook-pro-gknop:~/Projects$ cd vagrant-magento-mirror/
gknop@guidances-macbook-pro-gknop:~/Projects/vagrant-magento-mirror$ vagrant up
[default] Box precise64 was not found. Fetching box from specified URL...
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://files.vagrantup.com/precise64.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
[default] Importing base box 'precise64'...
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.2.6
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 1080 (adapter 1)
[default] -- 3306 => 13306 (adapter 1)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- v-csr-2: /tmp/vagrant-chef-1/chef-solo-2/roles
[default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
stdin: is not a tty
[2013-02-28T19:27:02+00:00] INFO: *** Chef 10.14.2 ***
[2013-02-28T19:27:02+00:00] INFO: Setting the run_list to ["role[magento_dev]"] from JSON
[2013-02-28T19:27:02+00:00] INFO: Run List is [role[magento_dev]]
[2013-02-28T19:27:02+00:00] INFO: Run List expands to [vagrant_magento]
[2013-02-28T19:27:02+00:00] INFO: Starting Chef Run for precise64
[2013-02-28T19:27:02+00:00] INFO: Running start handlers
[2013-02-28T19:27:02+00:00] INFO: Start handlers complete.
[2013-02-28T19:27:03+00:00] WARN: Missing gem 'right_aws'
[2013-02-28T19:27:03+00:00] INFO: Processing execute[apt-get-update-build-essentials] action run (build-essential::default line 30)
[2013-02-28T19:27:08+00:00] INFO: execute[apt-get-update-build-essentials] ran successfully
[2013-02-28T19:27:08+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2013-02-28T19:27:23+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2013-02-28T19:27:25+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
[2013-02-28T19:27:27+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2013-02-28T19:27:29+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2013-02-28T19:27:31+00:00] INFO: Could not find previously defined grants.sql resource
[2013-02-28T19:27:31+00:00] INFO: Processing execute[apt-get update] action run (mysql::ruby line 23)
[2013-02-28T19:27:34+00:00] INFO: execute[apt-get update] ran successfully
[2013-02-28T19:27:34+00:00] INFO: Processing package[mysql-client] action install (mysql::client line 46)
[2013-02-28T19:27:47+00:00] INFO: Processing package[libmysqlclient-dev] action install (mysql::client line 46)
[2013-02-28T19:27:50+00:00] INFO: Processing chef_gem[mysql] action install (mysql::ruby line 36)
[2013-02-28T19:27:54+00:00] INFO: Processing chef_gem[versionomy] action install (vagrant_magento::default line 13)
[2013-02-28T19:27:54+00:00] INFO: Using Sample Data v1.6.1.0
[2013-02-28T19:27:54+00:00] INFO: Using Sample Data v1.6.1.0
[2013-02-28T19:27:54+00:00] INFO: Using Sample Data v1.6.1.0
[2013-02-28T19:27:54+00:00] INFO: Using Sample Data v1.6.1.0
[2013-02-28T19:27:54+00:00] INFO: Using Sample Data v1.6.1.0

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

NoMethodError
-------------
undefined method `[]' for nil:NilClass

Cookbook Trace:
---------------
  /tmp/vagrant-chef-1/chef-solo-1/cookbooks/vagrant_magento/recipes/default.rb:265:in `from_file'

Relevant File Content:
----------------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/vagrant_magento/recipes/default.rb:

  1:  include_recipe "apt"
  2:  include_recipe "build-essential"
  3:  include_recipe "git"
  4:  include_recipe "mysql::server"
  5:  include_recipe "mysql::ruby"
  6:  include_recipe "php"
  7:  include_recipe "php::module_mysql"
  8:  include_recipe "php::module_gd"
  9:  include_recipe "php::module_curl"

[2013-02-28T19:27:54+00:00] ERROR: Running exception handlers
[2013-02-28T19:27:54+00:00] ERROR: Exception handlers complete
[2013-02-28T19:27:54+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-28T19:27:54+00:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
rjocoleman commented 11 years ago

Pretty sure this issue is fixed in a later version of the cookbook. The organisation of this project is too highly coupled at this point, I'll release a more robust updated version that we've been working on internally soon!

gordonknoppe commented 11 years ago

Nice! Thanks!

adamgotterer commented 11 years ago

I'm also running into this problem with a clean checkout.

adamgotterer commented 11 years ago

I was able to complete the install by chnaging 'deploy_support/chef/cookbooks/vagrant_magento/recipes/default.rb' eth1_ip = node['network']['interfaces']['eth1']['addresses'].select{|key,val| val['family'] == 'inet'}.flatten[0] to

eth1_ip = node['network']['interfaces'].current_automatic['eth0']['addresses'].select{|key,val| val['family'] == 'inet'}.flatten[0]

I'm on osx -> mountain lion

rjocoleman commented 11 years ago

Sorry about this! We're using some more robust versions internally I plan to release soon.

I'm interested in your use cases? It'll tailor how we release this.

adamgotterer commented 11 years ago

Personally, I just needed a quick and dirty environment that I could use to build a Magento plugin for an app I'm working on. Changing the line that I suggested fixed the install for me and everything loads and works great.

My only complaint is how slow it requests are. Not sure if its my systems routing, inefficient magento/apache/mysql settings or something else.

Thanks for this, its exactly what I needed.

rjocoleman commented 11 years ago

I find bumping the RAM for your vm helps a lot, as Vagrant goes quite low by default. I've found that the MySQL server times out a bunch with lower RAM.

adamgotterer commented 11 years ago

I'll throw some more RAM at it and see if it helps. Thanks.

rjocoleman commented 11 years ago

Version 0.2.0 of the vagrant_magento cookbook removes Mailcatcher to resolve this issue.

vagrant-magento-mirror has been updated to use this version.