Forked from gabrielhpugliese/meteor-windows-vagrant-tutorial.md
Last active
July 2, 2020 14:47
-
-
Save ahoereth/2607d2ee99103a0a9bc9 to your computer and use it in GitHub Desktop.
Revisions
-
ahoereth revised this gist
Nov 4, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,9 @@ Open cmd: Start > type cmd > ENTER 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared' config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end -
ahoereth revised this gist
Nov 4, 2014 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,10 +17,8 @@ Open cmd: Start > type cmd > ENTER 4. `vagrant init ubuntu/trusty32` (Ubuntu 14.04 32bit - use `ubuntu/trusty64` for x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared' config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end -
ahoereth revised this gist
Oct 30, 2014 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,19 +38,20 @@ Now that you are inside the VM command-line: ### Creating an app This also applies when you clone an app from git. The idea is to move the `.meteor` folder out of the shared directory and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the `~/shared` folder to make their code available to the Windows host. 1. (`cd ~/shared`) 2. `meteor create --example leaderboard` 3. `cd leaderboard` 4. `mkdir -p ~/mock/leaderboard` 5. `mv .meteor ~/mock/leaderboard` 6. `mkdir .meteor` 7. `sudo mount --bind /home/vagrant/mock/leaderboard/.meteor .meteor` 8. `meteor` (finally!) Go to `http://localhost:3000` in Windows browser! ## Hints: * Make sure you do version control INSIDE THE VM, so the software can follow the mounted `.meteor` directory. * You will have to remount (step `7` above) the `.meteor` directory on every vagrant restart. Mount the directory before you do any version control! * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` * You might want to run `sudo apt-get update` in the VM to install the latest Ubuntu security updates -
ahoereth revised this gist
Oct 29, 2014 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ Open cmd: Start > type cmd > ENTER 1. `cd C:\path\to\your\vagrant+meteor\project\folder` 2. `mkdir shared` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh - you should add git to your PATH environmental variable permanently so you don't have to run this everytime) 4. `vagrant init ubuntu/trusty32` (Ubuntu 14.04 32bit - use `ubuntu/trusty64` for x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared', nfs: true @@ -36,7 +36,7 @@ Now that you are inside the VM command-line: 2. `curl https://install.meteor.com | sh` ### Creating an app This also applies when you clone an app from git. The idea is to move the `.meteor` folder out of the shared directory and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the `~/shared` folder to make their code available to the Windows host. 0. (`cd ~/shared`) 1. `meteor create --example leaderboard` @@ -53,6 +53,7 @@ Go to `http://localhost:3000` in Windows browser! * Make sure you do version control INSIDE THE VM, so the software can follow the mounted `.meteor` directory. * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` * You might want to run `sudo apt-get update` in the VM to install the latest Ubuntu security updates --- Original tutorial by [@gabrielsapo](http://twitter.com/gabrielsapo) -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Tutorial: Meteor on Windows using Vagrant Before doing anything else, install those: * VirtualBox: https://www.virtualbox.org/wiki/Downloads * Vagrant: https://www.vagrantup.com/downloads.html * git: http://git-scm.com/download/win ## Steps on Windows command-line: -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,14 @@ Tutorial: Meteor on Windows using Vagrant ==================================== ## Requirements Before doing anything else, install those: * VirtualBox: https://www.virtualbox.org/wiki/Downloads * Vagrant: http://downloads.vagrantup.com/ * git: http://git-scm.com/download/win ## Steps on Windows command-line: Open cmd: Start > type cmd > ENTER 1. `cd C:\path\to\your\vagrant+meteor\project\folder` @@ -30,12 +30,12 @@ Open cmd: Start > type cmd > ENTER Now that you are inside the VM command-line: ## Steps on Ubuntu command-line: 1. `sudo apt-get install curl git` 2. `curl https://install.meteor.com | sh` ### Creating an app This also applies when you clone an app from git. The idea is to move the .meteor folder out of the shared direction and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the ~/shared folder to make them available to your Windows host. 0. (`cd ~/shared`) @@ -49,7 +49,7 @@ This also applies when you clone an app from git. The idea is to move the .meteo Go to `http://localhost:3000` in Windows browser! ## Hints: * Make sure you do version control INSIDE THE VM, so the software can follow the mounted `.meteor` directory. * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Tutorial: Meteor on Windows using Vagrant ==================================== # Requirements @@ -18,7 +18,9 @@ Open cmd: Start > type cmd > ENTER 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared', nfs: true config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,14 +11,13 @@ Before doing anything else, install those: # Steps on Windows command-line: Open cmd: Start > type cmd > ENTER 1. `cd C:\path\to\your\vagrant+meteor\project\folder` 2. `mkdir shared` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh - you should add git to your PATH environmental variable permanently so you don't have to run this everytime) 4. `vagrant init ubuntu/trusty64` (Ubuntu 14.04 x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared', nfs: true config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] @@ -32,7 +31,7 @@ Now that you are inside the VM command-line: # Steps on Ubuntu command-line: 1. `sudo apt-get install curl git` 2. `curl https://install.meteor.com | sh` ## Creating an app This also applies when you clone an app from git. The idea is to move the .meteor folder out of the shared direction and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the ~/shared folder to make them available to your Windows host. -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 10 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,16 +16,14 @@ Open cmd: Start > type cmd > ENTER 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh - you should add git to your PATH environmental variable permanently so you don't have to run this everytime) 4. `vagrant init ubuntu/trusty64` (Ubuntu 14.04 x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared', nfs: true config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` 7. `vagrant up` 8. `vagrant ssh` @@ -55,4 +53,5 @@ Go to `http://localhost:3000` in Windows browser! * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` --- Original tutorial by [@gabrielsapo](http://twitter.com/gabrielsapo) -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Open cmd: Start > type cmd > ENTER 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `mkdir shared` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh - you should add git to your PATH environmental variable permanently so you don't have to run this everytime) 4. `vagrant init ubuntu/trusty64` (Ubuntu 14.04 x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: @@ -34,7 +34,7 @@ Now that you are inside the VM command-line: # Steps on Ubuntu command-line: 1. `sudo apt-get install curl git` 2. `curl https://install.meteor.com | sh` ## Creating an app This also applies when you clone an app from git. The idea is to move the .meteor folder out of the shared direction and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the ~/shared folder to make them available to your Windows host. -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Before doing anything else, install those: # Steps on Windows command-line: Open cmd: Start > type cmd > ENTER 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `mkdir shared` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) @@ -31,6 +32,7 @@ end Now that you are inside the VM command-line: # Steps on Ubuntu command-line: 1. `sudo apt-get install curl git` 2 `curl https://install.meteor.com | sh` @@ -53,5 +55,4 @@ Go to `http://localhost:3000` in Windows browser! * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` Original by [@gabrielsapo](http://twitter.com/gabrielsapo) -
ahoereth revised this gist
Oct 27, 2014 . 1 changed file with 32 additions and 41 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,66 +1,57 @@ Tutorial: Meteor in Windows using Vagrant ==================================== # Requirements Before doing anything else, install those: * VirtualBox: https://www.virtualbox.org/wiki/Downloads * Vagrant: http://downloads.vagrantup.com/ * git: http://git-scm.com/download/win # Steps on Windows command-line: Open cmd: Start > type cmd > ENTER 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `mkdir shared` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init ubuntu/trusty64` (Ubuntu 14.04 x64) 5. Edit the Vagrantfile and add the following inside the `Vagrant.configure(...)` block: ``` config.vm.synced_folder './shared', '/home/vagrant/shared', nfs: true config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` 7. `vagrant up` 8. `vagrant ssh` Now that you are inside the VM command-line: # Steps on Ubuntu command-line: 1. `sudo apt-get install curl git` 2 `curl https://install.meteor.com | sh` ## Creating an app This also applies when you clone an app from git. The idea is to move the .meteor folder out of the shared direction and link it back in. MongoDB cannot run in the shared folder because of permission problems. Create all apps in the ~/shared folder to make them available to your Windows host. 0. (`cd ~/shared`) 1. `meteor create --example leaderboard` 2. `cd leaderboard` 3. `mkdir -p ~/mock/leaderboard` 4. `mv .meteor ~/mock/leaderboard` 5. `mkdir .meteor` 5. `sudo mount --bind /home/vagrant/mock/leaderboard/.meteor .meteor` 6. `meteor` (finally!) Go to `http://localhost:3000` in Windows browser! # Hints: * Make sure you do version control INSIDE THE VM, so the software can follow the mounted `.meteor` directory. * To halt a vagrant VM: `vagrant halt` * To destroy a VM: `vagrant destroy` --- Original by [@gabrielsapo](http://twitter.com/gabrielsapo) -
gabrielhpugliese revised this gist
Apr 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those four lines anywhere inside the `Vagrant.configure(“2”)` block: ``` config.vm.provision :shell, :path => "meteor.sh" -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,4 +63,4 @@ Hope you like it, Gabriel Pugliese [@gabrielsapo](http://twitter.com/gabrielsapo) -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,5 +60,7 @@ The point here is to use the `.meteor` folder of your app pointing to another pl That’s it. There's a project that does it automatically in [win.meteor.com](http://win.meteor.com) Hope you like it, Gabriel Pugliese @gabrielsapo -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the `Vagrant.configure(“2”)` block: ``` config.vm.provision :shell, :path => "meteor.sh" @@ -49,15 +49,15 @@ mrt run 5. Go to `http://localhost:3000` in Windows browser and see it running! :) The point here is to use the `.meteor` folder of your app pointing to another place inside the VM (run `ls -la .meteor/` on command-line and you will see the symbolic link), so Meteor uses the VM folder, not Windows folder, and won’t have permissions problems. You will also need to do all git flow inside Ubuntu command-line, because Windows can’t follow those links. ### Hints: * Make sure you do version control INSIDE THE VM, so the software can follow the symlink. * To halt a vagrant VM: `vagrant halt` * To restart a vagrant VM without running all Meteor installation again: `vagrant reload --no-provision` or just remove the shell path you’ve put on Vagrantfile on line 10. * To destroy a VM: `vagrant destroy` That’s it. There's a project that does it automatically in [win.meteor.com](http://win.meteor.com) Hope you like it, Gabriel Pugliese -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,6 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: ``` config.vm.provision :shell, :path => "meteor.sh" -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,13 +22,15 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` 7. `vagrant up` (It will download box, configure meteor and get it up) 8. `vagrant ssh` (It will connect on the VM and expose its command-line) @@ -39,11 +41,13 @@ Now that you are inside the VM command-line, you can use it as your server: 2. `mrt create ~/meteorapp` 3. `mrt create meteorapp && cd meteorapp && rm -rf .meteor && mkdir .meteor/` (Check your Windows folder you’ve created. It will be there!) 4. Input these lines: ``` sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/ echo “sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/” >> ~/.bashrc && source ~/.bashrc mrt run ``` 5. Go to `http://localhost:3000` in Windows browser and see it running! :) The point here is to use the .meteor folder of your app pointing to another place inside the VM (run ls -la .meteor/ on command-line and you will see the symbolic link), so Meteor uses the VM folder, not Windows folder, and won’t have permissions problems. You will also need to do all git flow inside Ubuntu command-line, because Windows can’t follow those links. -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,9 +21,9 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,9 +21,9 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ```bash config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,16 +35,16 @@ end Now that you are inside the VM command-line, you can use it as your server: ### Steps on Ubuntu command-line: 1. `cd /vagrant` (This is by default shared with the host) 2. `mrt create ~/meteorapp` 3. `mrt create meteorapp && cd meteorapp && rm -rf .meteor && mkdir .meteor/` (Check your Windows folder you’ve created. It will be there!) 4. Input these lines: ``` sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/ echo “sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/” >> ~/.bashrc && source ~/.bashrc mrt run ``` 5. Go to `http://localhost:3000` in Windows browser and see it running! :) The point here is to use the .meteor folder of your app pointing to another place inside the VM (run ls -la .meteor/ on command-line and you will see the symbolic link), so Meteor uses the VM folder, not Windows folder, and won’t have permissions problems. You will also need to do all git flow inside Ubuntu command-line, because Windows can’t follow those links. -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,22 +29,22 @@ config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` 7. `vagrant up` (It will download box, configure meteor and get it up) 8. `vagrant ssh` (It will connect on the VM and expose its command-line) Now that you are inside the VM command-line, you can use it as your server: ### Steps on Ubuntu command-line: 9. `cd /vagrant` (This is by default shared with the host) 10. `mrt create ~/meteorapp` 11. `mrt create meteorapp && cd meteorapp && rm -rf .meteor && mkdir .meteor/` (Check your Windows folder you’ve created. It will be there!) 12. Input these lines: ``` sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/ echo “sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/” >> ~/.bashrc && source ~/.bashrc mrt run ``` 13. Go to `http://localhost:3000` in Windows browser and see it running! :) The point here is to use the .meteor folder of your app pointing to another place inside the VM (run ls -la .meteor/ on command-line and you will see the symbolic link), so Meteor uses the VM folder, not Windows folder, and won’t have permissions problems. You will also need to do all git flow inside Ubuntu command-line, because Windows can’t follow those links. -
gabrielhpugliese revised this gist
Jun 25, 2013 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,16 +20,19 @@ If you have no idea what I’m talking about, I’ve made a tutorial to install 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) 5. Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: 6. ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` 7. `vagrant up` (It will download box, configure meteor and get it up) 8. `vagrant ssh` (It will connect on the VM and expose its command-line) Now that you are inside the VM command-line, you can use it as your server: ### Steps on Ubuntu command-line: -
gabrielhpugliese created this gist
Jun 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ Tutorial: Meteor in Windows using Vagrant ==================================== These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working). Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on steps 8 to 15. If you have no idea what I’m talking about, I’ve made a tutorial to install Ubuntu Precise x86 through Windows command-line with Meteor very simple to follow: ### Requirements * Download VirtualBox: https://www.virtualbox.org/wiki/Downloads (Vagrant runs on top of VirtualBox, so you need it) * Download latest Vagrant: http://downloads.vagrantup.com/ * Download git: http://git-scm.com/download/win (It will install ssh binaries required by Vagrant and let you connect to the VM) * Create a folder to store your Vagrant files + Meteor project * Download this script and save it as meteor.sh into that folder: https://gist.github.com/gabrielhpugliese/5471763/raw/6bc6f616842c75669d1c6f28ce7cd714fa28967e/meteor.sh ### Steps on Windows command-line: 1. Go to Start Menu > Type cmd > SHIFT + ENTER (to login as Administrator) 2. `cd C:\path\to\your\vagrant+meteor\project\folder` 3. `set PATH=%PATH%;C:\Program Files (x86)\Git\bin` (Append git binaries to path so vagrant can run ssh) 4. `vagrant init precise32 http://files.vagrantup.com/precise32.box` (To install Ubuntu 10.04 x86) Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block: ``` config.vm.provision :shell, :path => "meteor.sh" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end ``` `vagrant up` (It will download box, configure meteor and get it up) `vagrant ssh` (It will connect on the VM and expose its command-line) Now that you are inside the VM command-line, you can use it as your server: ### Steps on Ubuntu command-line: . `cd /vagrant` (This is by default shared with the host) `mrt create ~/meteorapp` `mrt create meteorapp && cd meteorapp && rm -rf .meteor && mkdir .meteor/` (Check your Windows folder you’ve created. It will be there!) ``` sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/ echo “sudo mount --bind /home/vagrant/meteorapp/.meteor/ /vagrant/meteorapp/.meteor/” >> ~/.bashrc && source ~/.bashrc mrt run ``` Go to `http://localhost:3000` in Windows browser and see it running! :) The point here is to use the .meteor folder of your app pointing to another place inside the VM (run ls -la .meteor/ on command-line and you will see the symbolic link), so Meteor uses the VM folder, not Windows folder, and won’t have permissions problems. You will also need to do all git flow inside Ubuntu command-line, because Windows can’t follow those links. ### Hints: * Make sure you do version control INSIDE THE VM, so the software can follow the symlink. * To halt a vagrant VM: vagrant halt * To restart a vagrant VM without running all Meteor installation again: vagrant reload --no-provision or just remove the shell path you’ve put on Vagrantfile on line 10. * To destroy a VM: vagrant destroy That’s it. I know it can be improved with chef/puppet or whatever, but this is very simple steps that you can do in less than 30min if you have a fast connection. Hope you like it, Gabriel Pugliese @gabrielsapo