Closed vjau closed 10 years ago
Did you let the provisioner create the apps for you by editing the Vagrantfile? The Chef run will run the mrt create
for you and then mount the .meteor directory to your home directory.
Also did you run with vagrant up --provision
?
Yep, and it seems to work correctly :
Running chef-solo... [2014-02-10T14:04:10+00:00] INFO: Forking chef instance to converge... [2014-02-10T14:04:10+00:00] INFO: * Chef 11.10.0 * [2014-02-10T14:04:10+00:00] INFO: Chef-client pid: 1635 [2014-02-10T14:04:10+00:00] INFO: Setting the run_list to ["recipe[meteor_window s]"] from JSON [2014-02-10T14:04:10+00:00] INFO: Run List is [recipe[meteor_windows]] [2014-02-10T14:04:10+00:00] INFO: Run List expands to [meteor_windows] [2014-02-10T14:04:10+00:00] INFO: Starting Chef Run for vagrant-ubuntu-saucy-64 [2014-02-10T14:04:10+00:00] INFO: Running start handlers [2014-02-10T14:04:10+00:00] INFO: Start handlers complete. [2014-02-10T14:04:11+00:00] WARN: Cloning resource attributes for package[curl] from prior resource (CHEF-3694)
ef-solo-1/cookbooks/nodejs/recipes/npm.rb:23:in `from_file'
ef-solo-1/cookbooks/curl/recipes/default.rb:20:in`from_file' [2014-02-10T14:04:11+00:00] INFO: Install Meteorite: true [2014-02-10T14:04:11+00:00] INFO: Meteor Command: mrt [2014-02-10T14:04:11+00:00] INFO: Config: [2014-02-10T14:04:11+00:00] INFO: Creating Meteor App: Cadendar [2014-02-10T14:04:11+00:00] INFO: Creating Meteor App: cadendar2 [2014-02-10T14:04:11+00:00] INFO: Creating Meteor App: testapp [2014-02-10T14:05:08+00:00] INFO: bash[install npm - package manager for node] r an successfully [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/Cadendar/.meteor] mounted [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/Cadendar/packages] mounted [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/cadendar2/.meteor] mounted [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/cadendar2/packages] mounted [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp] created direc tory /home/vagrant/testapp [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp] owner changed to 1000 [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp] group changed to 1000 [2014-02-10T14:05:09+00:00] INFO: bash[meteor_create_testapp] ran successfully [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/.meteor] created di rectory /vagrant/testapp/.meteor [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/.meteor] owner chan ged to 1000 [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/.meteor] group chan ged to 1000 [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/testapp/.meteor] mounted [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/packages] created d irectory /vagrant/testapp/packages [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/packages] owner cha nged to 1000 [2014-02-10T14:05:09+00:00] INFO: directory[/vagrant/testapp/packages] group cha nged to 1000 [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp/packages] crea ted directory /home/vagrant/testapp/packages [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp/packages] owne r changed to 1000 [2014-02-10T14:05:09+00:00] INFO: directory[/home/vagrant/testapp/packages] grou p changed to 1000 [2014-02-10T14:05:09+00:00] INFO: mount[/vagrant/testapp/packages] mounted [2014-02-10T14:05:09+00:00] INFO: Chef Run complete in 58.982473157 seconds [2014-02-10T14:05:09+00:00] INFO: Running report handlers [2014-02-10T14:05:09+00:00] INFO: Report handlers complete
But the .meteor dir stays empty.
The Synced folder will remain empty, but /vagrant/testapp/.meteor should be bound to /home/vagrant/testapp/.meteor and mrt should be able to run from within the VM, you just won't be able to see those files in the .meteor directory from the host. This is because on Windows, Mongo can't run from there. Does the app run from the VM with mrt run?
If not, can you post your Vagrant file here or to a Gist, and I'll test it later tonight.
Also, it might sound like it's running, just not with your apps once you add them, you might try this person's version which mounts only the .meteor/local. They probably don't have the latest changes for the new vagrant version, so you probably just need their cookbook file. I haven't evaluated this yet, and it wasn't really causing me an issue.
Ok, you are right, the .meteor folder looks empty from the windows host but not from the VM. However, what's still strange is that the project root folder (the folder where .meteor lies), appears full on the windows host (contains usual smart.json, app.html, app.css, and app.js), but appears empty on the linux vm (contains only .meteor and an empty packages directory).
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_plugin "vagrant-vbguest"
Vagrant.require_plugin "vagrant-omnibus"
Vagrant.require_plugin "vagrant-berkshelf"
Vagrant.configure("2") do |config|
# The vbguest and omnibus plugins should make other boxes possible.
config.vm.box = "saucy64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :private_network, ip: "10.11.12.13"
config.berkshelf.enabled = true
config.omnibus.chef_version = :latest
# This VM config option is required in order to be able to create the mount --bind symlink to the sync folder
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant-root", "1"]
end
config.vm.provision :chef_solo do |chef|
chef.add_recipe "meteor_windows"
chef.json = {
:nodejs => {
:install_method => "package",
:npm => "1.3.23"
},
:meteor_windows => {
:apps => [
"Cadendar",
"cadendar2",
"testapp"
]
}
}
end
end
So I just tried your Vagrantfile, and followed these steps, had vagrant plugins, vbguest, omnibus and berkshelf installed. Vagrant 1.4.3, VirtualBox 4.3.6.
Ran vagrant up --provision
, it ran and resulted in Report Handlers Complete, then I ran vagrant ssh
then there, cd /vagrant/cadendar2
, then mrt run
and it installed meteor to the home directory for a while, then was running. On my windows host I navigated to http://10.11.12.13:3000 and saw the default meteor app running.
Here is some other things that I thought could be happening: the whole concept for this was that I wanted to have the Vagrant Synced Folders work for as much as possible. Unfortunately there are certain things, such as the MongoDB in the .meteor that won't work from synced folders, so we build symlinks, which Windows doesn't support, so they are the mount---bind kind, that seem to work from the Linux VM, and Windows can ignore them.
As https://github.com/shoebappa/vagrant-meteor-windows/pull/8 had pointed out that I probably don't need to do this to the entire .meteor folder, but just the Mongo part,
Also, the apps won't provision and mount if there was already a directory in the Vagrant synced folder. Perhaps try renaming your Cadendar, cadendar2, and testapp folders, and run vagrant up --provision
or vagrant provision
to see if you can then run the base app from the linux vm with mrt run.
I'm a bit lost there. I have tried to go back to your original vagrantfile. I have the latest codebase from this git. I have deleted all the meteor test project. I let it recreate the folders. Under Windows host, i see the source files mymeteorapp.css html and js, smart.json. I have also under windows host an empty packages directory and an .meteor directory with .gitignore, package release and an empty local subdirectory. Under vagrant (ubuntu) guest, i see an empty packages directory, an a .meteor directory. Under .meteor directory, i only get an empty local directory. I guess there is a symlink problem somewhere. Now mrt run won't even run, meteorite does it thing, then it says this is not a valid meteor project directory.
I'm not sure what condition this could be in, but because of the symlinks under /home/vagrant/appname, deleting the directories from the Windows host how might not be all that's needed because this wouldn't remove those.
It may be easier to make sure the directories are gone from the Windows host, then vagrant destroy
and then vagrant up --provision
.
Directories (mymeteorapp) deleted from windows host. Vagrant destroy Box reinstalled with vagrant up --provision. But still same problem :-(
I don't see where the mrt create is done ?
[2014-02-21T15:12:53+00:00] INFO: Forking chef instance to converge... [2014-02-21T15:12:53+00:00] INFO: * Chef 11.10.4 * [2014-02-21T15:12:53+00:00] INFO: Chef-client pid: 5532 [2014-02-21T15:12:54+00:00] INFO: Setting the run_list to ["recipe[meteor_windows]"] from JSON [2014-02-21T15:12:54+00:00] INFO: Run List is [recipe[meteor_windows]] [2014-02-21T15:12:54+00:00] INFO: Run List expands to [meteor_windows] [2014-02-21T15:12:54+00:00] INFO: Starting Chef Run for vagrant-ubuntu-saucy-64 [2014-02-21T15:12:54+00:00] INFO: Running start handlers [2014-02-21T15:12:54+00:00] INFO: Start handlers complete. [2014-02-21T15:12:54+00:00] WARN: Cloning resource attributes for package[curl] from prior resource (CHEF-3694)
b:23:in `from_file'
.rb:20:in`from_file' [2014-02-21T15:12:54+00:00] INFO: Install Meteorite: true [2014-02-21T15:12:54+00:00] INFO: Meteor Command: mrt [2014-02-21T15:12:54+00:00] INFO: Config: [2014-02-21T15:12:54+00:00] INFO: Creating Meteor App: mymeteorapp [2014-02-21T15:12:54+00:00] INFO: Creating Meteor App: testapp3 [2014-02-21T15:13:06+00:00] INFO: execute[apt-get-update-periodic] ran successfully [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local] owner changed to 0 [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local] group changed to 0 [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local] mode changed to 755 [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0 [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0 [2014-02-21T15:13:06+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755 [2014-02-21T15:13:38+00:00] INFO: execute[install-key C7917B12] ran successfully [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] created file /etc/apt/sources.list.d/node.j s.list [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] updated file contents /etc/apt/sources.list .d/node.js.list [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] owner changed to 0 [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] group changed to 0 [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] mode changed to 644 [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] sending delete action to file/var/lib/apt/ periodic/update-success-stamp [2014-02-21T15:13:38+00:00] INFO: file[/var/lib/apt/periodic/update-success-stamp] backed up to /var/chef/backup/var/lib /apt/periodic/update-success-stamp.chef-20140221151338.847901 [2014-02-21T15:13:38+00:00] INFO: file[/var/lib/apt/periodic/update-success-stamp] deleted file at /var/lib/apt/periodic /update-success-stamp [2014-02-21T15:13:38+00:00] INFO: file[/etc/apt/sources.list.d/node.js.list] sending run action to executeapt-get updat e [2014-02-21T15:13:44+00:00] INFO: execute[apt-get update] ran successfully [2014-02-21T15:13:44+00:00] INFO: execute[apt-get update] sending run action to executeapt-cache gencaches
[2014-02-21T15:13:45+00:00] INFO: execute[apt-cache gencaches] ran successfully [2014-02-21T15:15:08+00:00] INFO: bash[install npm - package manager for node] ran successfully [2014-02-21T15:15:45+00:00] INFO: bash[install_meteor] ran successfully [2014-02-21T15:16:05+00:00] INFO: bash[install_meteorite] ran successfully [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/.meteor/local] created directory /home/vagrant/mym eteorapp/.meteor/local [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/.meteor/local] owner changed to 1000 [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/.meteor/local] group changed to 1000 [2014-02-21T15:16:05+00:00] INFO: bash[meteor_create_mymeteorapp] ran successfully [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/.meteor/local] created directory /vagrant/mymeteorapp/. meteor/local [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/.meteor/local] owner changed to 1000 [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/.meteor/local] group changed to 1000 [2014-02-21T15:16:05+00:00] INFO: mount[/vagrant/mymeteorapp/.meteor/local] mounted [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/packages] created directory /vagrant/mymeteorapp/packag es [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/packages] owner changed to 1000 [2014-02-21T15:16:05+00:00] INFO: directory[/vagrant/mymeteorapp/packages] group changed to 1000 [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/packages] created directory /home/vagrant/mymeteor app/packages [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/packages] owner changed to 1000 [2014-02-21T15:16:05+00:00] INFO: directory[/home/vagrant/mymeteorapp/packages] group changed to 1000 [2014-02-21T15:16:06+00:00] INFO: mount[/vagrant/mymeteorapp/packages] mounted [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/.meteor/local] created directory /home/vagrant/testap p3/.meteor/local [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/.meteor/local] owner changed to 1000 [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/.meteor/local] group changed to 1000 [2014-02-21T15:16:06+00:00] INFO: bash[meteor_create_testapp3] ran successfully [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/.meteor/local] created directory /vagrant/testapp3/.meteor /local [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/.meteor/local] owner changed to 1000 [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/.meteor/local] group changed to 1000 [2014-02-21T15:16:06+00:00] INFO: mount[/vagrant/testapp3/.meteor/local] mounted [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/packages] created directory /vagrant/testapp3/packages [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/packages] owner changed to 1000 [2014-02-21T15:16:06+00:00] INFO: directory[/vagrant/testapp3/packages] group changed to 1000 [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/packages] created directory /home/vagrant/testapp3/pa ckages [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/packages] owner changed to 1000 [2014-02-21T15:16:06+00:00] INFO: directory[/home/vagrant/testapp3/packages] group changed to 1000 [2014-02-21T15:16:06+00:00] INFO: mount[/vagrant/testapp3/packages] mounted [2014-02-21T15:16:06+00:00] INFO: Chef Run complete in 192.32691789 seconds [2014-02-21T15:16:06+00:00] INFO: Running report handlers [2014-02-21T15:16:06+00:00] INFO: Report handlers complete E:\vagrant\meteor [master +4 ~1 -2 !]> vagrant ssh Welcome to Ubuntu 13.10 (GNU/Linux 3.11.0-15-generic x86_64)
Documentation: https://help.ubuntu.com/
System information as of Fri Feb 21 15:10:01 UTC 2014
System load: 0.46 Processes: 85 Usage of /: 2.6% of 39.34GB Users logged in: 0 Memory usage: 26% IP address for eth0: 10.0.2.15 Swap usage: 0%
Graph this data and manage this system at: https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/business/services/cloud
0 packages can be updated. 0 updates are security updates.
vagrant@vagrant-ubuntu-saucy-64:~$ ls install.sh mymeteorapp testapp3 vagrant@vagrant-ubuntu-saucy-64:~$ cd testapp3/ vagrant@vagrant-ubuntu-saucy-64:~/testapp3$ ls packages vagrant@vagrant-ubuntu-saucy-64:~/testapp3$ ls packages vagrant@vagrant-ubuntu-saucy-64:~/testapp3$ cd .. vagrant@vagrant-ubuntu-saucy-64:~$ ls install.sh mymeteorapp testapp3 vagrant@vagrant-ubuntu-saucy-64:~$ cd mymeteorapp/ vagrant@vagrant-ubuntu-saucy-64:~/mymeteorapp$ ls packages vagrant@vagrant-ubuntu-saucy-64:~/mymeteorapp$ mrt run
Stand back while Meteorite does its thing
Done installing smart packages
Ok, everything's ready. Here comes Meteor!
vagrant, this is your first time using Meteor! Installing a Meteor distribution in your home directory. ####################################################################### 98.9% run: You're not in a Meteor project directory.
To create a new Meteor project:
meteor create
For more help, see 'meteor --help'.
This is where the mrt was run: [2014-02-21T15:16:06+00:00] INFO: bash[meteor_create_testapp3] ran successfully
I don't get the install.sh mymeteorapp testapp3 thing. The provisioner should create the app for you, then symlink the .meteor/local and packages directories.
So the Windows synched folder on the Linux VM is /vagrant/mymeteorapp and this is what you would see on the Windows Host. Because Mongo and symlinks don't work to the synched folder, we have to symlink this to /home/vagrant/mymeteorapp (same as ~/mymeteorapp). You don't run anything from /home/vagrant/mymeteorapp because only the symlinks live there, but from /vagrant/mymeteorapp.
So here are the exact commands I would run:
vagrant destroy
Confirm Y.
Remove the app folders on the Windows host.
vagrant up --provision
vagrant ssh
cd /vagrant/mymeteorapp
mrt run
Then from the Windows host it should be available at http://10.11.12.13:3000/
If this doesn't work I'd be happy to Google Hangout sometime this weekend and watch what's going on, it's hard to diagnose.
!!! I got it ! You must go to the /vagrant/ folder at the root of the box, not at the vagrant folder in the home. I'm sorry to have missed that, it's working correctly now. :) Thank you very much for your help.
I tried your solution, everything seems to run fine (except i don't get the usual "initializing mongo database when doing mrt run), but i get a white page with default project. And then i looked at the .meteor folder, discovering that it's indeed empty.