Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. gabrieljenik revised this gist Dec 24, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mtimv
    Original file line number Diff line number Diff line change
    @@ -36,4 +36,4 @@ chmod +x ~/shared/$1/mt.sh

    # Start App
    cd ~/shared/$1
    mt.sh
    ./mt.sh
  2. gabrieljenik revised this gist Dec 24, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ Open cmd: Start > type cmd > ENTER
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
    end
    ```
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file can be found here: https://gist.github.com/gabrieljenik/d926cbb90706d95abdee#file-mtimv
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file can be found in below or using the following link: https://gist.github.com/gabrieljenik/d926cbb90706d95abdee#file-mtimv
    7. `vagrant up`
    8. `vagrant ssh`
    @@ -52,7 +52,7 @@ Next time you want to launch it, just follow these steps:
    1. (`cd ~/shared/leaderboard`)
    2. Run ./mt.sh
    ### Creating an app and mounting the .meteor folder manually
    ### Recipe #2 - Creating an app and mounting the .meteor folder manually
    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.
    To create the app:
  3. gabrieljenik revised this gist Dec 24, 2014. 1 changed file with 1 addition and 42 deletions.
    43 changes: 1 addition & 42 deletions meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -25,48 +25,7 @@ Open cmd: Start > type cmd > ENTER
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
    end
    ```
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file as follows:
    ```
    #!/bin/sh
    # ------------------------------------------------------------------
    # [Gabriel Jenik] Meteor internal move
    #
    # Meteor-Vagrant-Win Environment.
    # After meteor create app script to move .meteor dir to VM FS.
    #
    # 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.
    #
    # Install: 1) Put it in the ~/shared dir.
    # 2) run: chmod +x mtimv
    # ------------------------------------------------------------------
    VERSION=0.1.0
    SUBJECT=gj_meteor_after_create
    USAGE="Usage: mtimv app_name"
    # Move meteor internal directory
    cd $1
    mkdir -p ~/mock/$1
    mv .meteor ~/mock/$1
    mkdir .meteor
    # Add mount to the all-apps mount shell script.
    echo "#-------------" >> ~/shared/mtimnt.sh
    echo "#$1 internal meteor directory mount" >> ~/shared/mtimnt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor ~/shared/$1/.meteor" >> ~/shared/mtimnt.sh
    # Create a meteor-start shell script that performs individual mount and runs meteor.
    echo "#-------------" > ~/shared/$1/mt.sh
    echo "#$1 applictaion meteor start replacement" >> ~/shared/$1/mt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor .meteor" >> ~/shared/$1/mt.sh
    echo "meteor" >> ~/shared/$1/mt.sh
    chmod +x ~/shared/$1/mt.sh
    # Start App
    cd ~/shared/$1
    mt.sh
    ```
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file can be found here: https://gist.github.com/gabrieljenik/d926cbb90706d95abdee#file-mtimv
    7. `vagrant up`
    8. `vagrant ssh`
  4. gabrieljenik revised this gist Dec 24, 2014. 2 changed files with 40 additions and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -26,7 +26,7 @@ Open cmd: Start > type cmd > ENTER
    end
    ```
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file as follows:
    ```
    ```
    #!/bin/sh
    # ------------------------------------------------------------------
    # [Gabriel Jenik] Meteor internal move
    39 changes: 39 additions & 0 deletions mtimv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    #!/bin/sh
    # ------------------------------------------------------------------
    # [Gabriel Jenik] Meteor internal move
    #
    # Meteor-Vagrant-Win Environment.
    # After meteor create app script to move .meteor dir to VM FS.
    #
    # 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.
    #
    # Install: 1) Put it in the ~/shared dir.
    # 2) run: chmod +x mtimv
    # ------------------------------------------------------------------
    VERSION=0.1.0
    SUBJECT=gj_meteor_after_create
    USAGE="Usage: mtimv app_name"

    # Move meteor internal directory
    cd $1
    mkdir -p ~/mock/$1
    mv .meteor ~/mock/$1
    mkdir .meteor

    # Add mount to the all-apps mount shell script.
    echo "#-------------" >> ~/shared/mtimnt.sh
    echo "#$1 internal meteor directory mount" >> ~/shared/mtimnt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor ~/shared/$1/.meteor" >> ~/shared/mtimnt.sh

    # Create a meteor-start shell script that performs individual mount and runs meteor.
    echo "#-------------" > ~/shared/$1/mt.sh
    echo "#$1 applictaion meteor start replacement" >> ~/shared/$1/mt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor .meteor" >> ~/shared/$1/mt.sh
    echo "meteor" >> ~/shared/$1/mt.sh
    chmod +x ~/shared/$1/mt.sh

    # Start App
    cd ~/shared/$1
    mt.sh
  5. gabrieljenik revised this gist Dec 24, 2014. 1 changed file with 67 additions and 4 deletions.
    71 changes: 67 additions & 4 deletions meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,48 @@ Open cmd: Start > type cmd > ENTER
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
    end
    ```
    6. Create a new file named mtimv inside the new "shared" folder created on step #2. The contents of the file as follows:
    ```
    #!/bin/sh
    # ------------------------------------------------------------------
    # [Gabriel Jenik] Meteor internal move
    #
    # Meteor-Vagrant-Win Environment.
    # After meteor create app script to move .meteor dir to VM FS.
    #
    # 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.
    #
    # Install: 1) Put it in the ~/shared dir.
    # 2) run: chmod +x mtimv
    # ------------------------------------------------------------------
    VERSION=0.1.0
    SUBJECT=gj_meteor_after_create
    USAGE="Usage: mtimv app_name"
    # Move meteor internal directory
    cd $1
    mkdir -p ~/mock/$1
    mv .meteor ~/mock/$1
    mkdir .meteor
    # Add mount to the all-apps mount shell script.
    echo "#-------------" >> ~/shared/mtimnt.sh
    echo "#$1 internal meteor directory mount" >> ~/shared/mtimnt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor ~/shared/$1/.meteor" >> ~/shared/mtimnt.sh
    # Create a meteor-start shell script that performs individual mount and runs meteor.
    echo "#-------------" > ~/shared/$1/mt.sh
    echo "#$1 applictaion meteor start replacement" >> ~/shared/$1/mt.sh
    echo "sudo mount --bind /home/vagrant/mock/$1/.meteor .meteor" >> ~/shared/$1/mt.sh
    echo "meteor" >> ~/shared/$1/mt.sh
    chmod +x ~/shared/$1/mt.sh
    # Start App
    cd ~/shared/$1
    mt.sh
    ```
    7. `vagrant up`
    8. `vagrant ssh`
    @@ -34,20 +76,41 @@ Now that you are inside the VM command-line:
    1. `sudo apt-get install curl git`
    2. `curl https://install.meteor.com | sh`
    3. `chmod +x ~/shared/mtimv`
    ### Creating an app
    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. This also applies when you clone an app from git.
    Below 2 recipes are given to perform the steps described below.
    ### Recipe #1 - Automatically treating .meteor directory
    1. (`cd ~/shared`)
    2. Create an app. Example: `meteor create --example leaderboard`
    3. Run mtimv: `./mtimv leaderboard`
    The app will be automatically launched.
    Next time you want to launch it, just follow these steps:
    1. (`cd ~/shared/leaderboard`)
    2. Run ./mt.sh
    ### Creating an app and mounting the .meteor folder manually
    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.
    To create the app:
    1. (`cd ~/shared`)
    2. `meteor create --example leaderboard`
    To move and mount .meteor directory:
    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!
    To launch the app
    7. `cd leaderboard`
    8. `sudo mount --bind /home/vagrant/mock/leaderboard/.meteor .meteor`
    9. `meteor` (finally!)
    10. 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.
  6. @ahoereth ahoereth revised this gist Nov 4, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions meteor-windows-vagrant-tutorial.md
    Original 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
  7. @ahoereth ahoereth revised this gist Nov 4, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions meteor-windows-vagrant-tutorial.md
    Original 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', nfs: true
    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
  8. @ahoereth ahoereth revised this gist Oct 30, 2014. 1 changed file with 9 additions and 8 deletions.
    17 changes: 9 additions & 8 deletions meteor-windows-vagrant-tutorial.md
    Original 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.
    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!)
    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
  9. @ahoereth ahoereth revised this gist Oct 29, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions meteor-windows-vagrant-tutorial.md
    Original 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/trusty64` (Ubuntu 14.04 x64)
    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 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.
    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)
  10. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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: http://downloads.vagrantup.com/
    * Vagrant: https://www.vagrantup.com/downloads.html
    * git: http://git-scm.com/download/win

    ## Steps on Windows command-line:
  11. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    Tutorial: Meteor on Windows using Vagrant
    ====================================

    # Requirements
    ## 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:
    ## 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:
    ## Steps on Ubuntu command-line:
    1. `sudo apt-get install curl git`
    2. `curl https://install.meteor.com | sh`
    ## Creating an app
    ### 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:
    ## 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`
  12. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Tutorial: Meteor in Windows using Vagrant
    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
  13. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions meteor-windows-vagrant-tutorial.md
    Original 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

    2. `cd C:\path\to\your\vagrant+meteor\project\folder`
    3. `mkdir shared`
    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.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"]
    @@ -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`
    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.
  14. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions meteor-windows-vagrant-tutorial.md
    Original 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
    ```

    ```
    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 by [@gabrielsapo](http://twitter.com/gabrielsapo)
    ---
    Original tutorial by [@gabrielsapo](http://twitter.com/gabrielsapo)
  15. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions meteor-windows-vagrant-tutorial.md
    Original 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)
    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`
    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.
  16. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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)
  17. @ahoereth ahoereth revised this gist Oct 27, 2014. 1 changed file with 32 additions and 41 deletions.
    73 changes: 32 additions & 41 deletions meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -1,66 +1,57 @@
    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).
    # Requirements
    Before doing anything else, install those:

    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.
    * VirtualBox: https://www.virtualbox.org/wiki/Downloads
    * Vagrant: http://downloads.vagrantup.com/
    * git: http://git-scm.com/download/win

    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)
    # 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 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:
    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` (It will download box, configure meteor and get it up)
    8. `vagrant ssh` (It will connect on the VM and expose its command-line)
    7. `vagrant up`
    8. `vagrant ssh`

    Now that you are inside the VM command-line, you can use it as your server:
    Now that you are inside the VM command-line:

    ### 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:
    # Steps on Ubuntu command-line:
    1. `sudo apt-get install curl git`
    2 `curl https://install.meteor.com | sh`

    ```
    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
    ```
    ## 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.

    5. Go to `http://localhost:3000` in Windows browser and see it running! :)
    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!)

    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.
    Go to `http://localhost:3000` in Windows browser!

    ### Hints:
    * Make sure you do version control INSIDE THE VM, so the software can follow the symlink.
    # 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 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

    [@gabrielsapo](http://twitter.com/gabrielsapo)
    ---
    Original by [@gabrielsapo](http://twitter.com/gabrielsapo)
  18. @gabrielhpugliese gabrielhpugliese revised this gist Apr 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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:
    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"
  19. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original file line number Diff line number Diff line change
    @@ -63,4 +63,4 @@ Hope you like it,

    Gabriel Pugliese

    @gabrielsapo
    [@gabrielsapo](http://twitter.com/gabrielsapo)
  20. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions meteor-windows-vagrant-tutorial.md
    Original 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
  21. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions meteor-windows-vagrant-tutorial.md
    Original 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:
    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.
    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
    * 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.
    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
  22. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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:
    6.

    ```
    config.vm.provision :shell, :path => "meteor.sh"
  23. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions meteor-windows-vagrant-tutorial.md
    Original 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.
  24. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions meteor-windows-vagrant-tutorial.md
    Original 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. ```
    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"]
  25. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions meteor-windows-vagrant-tutorial.md
    Original 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.
    ```
    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"]
  26. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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|
  27. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion meteor-windows-vagrant-tutorial.md
    Original 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|
  28. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions meteor-windows-vagrant-tutorial.md
    Original 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:
    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:
    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
    ```
    13. Go to `http://localhost:3000` in Windows browser and see it running! :)
    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.

  29. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions meteor-windows-vagrant-tutorial.md
    Original 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:
    . `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!)
    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
    ```
    Go to `http://localhost:3000` in Windows browser and see it running! :)
    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.

  30. @gabrielhpugliese gabrielhpugliese revised this gist Jun 25, 2013. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions meteor-windows-vagrant-tutorial.md
    Original 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)
    Edit the Vagrantfile with your preferred editor and add those two lines anywhere inside the Vagrant.configure(“2”) block:
    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
    ```
    `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)

    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: