Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Merge pull request #40 from blinkreaction/develop
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
lmakarov committed Sep 14, 2015
2 parents 0a049df + ae95ebe commit 5b38fec
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 36 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.0.0 (2015-09-14)

- SMB mounts on Windows
- Added `smb2_auto: true/false` option to allow switching to manual provisioning of the smb user and share.
- Fixed share permissions
- Added Troubleshooting docs

## 1.0.0-rc2 (2015-08-18)

- Upgrade to Docker 1.8.1 base box
Expand Down
22 changes: 0 additions & 22 deletions LICENSE

This file was deleted.

31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Prerequisites are installed using **babun** and **chocolatey** (chocolatey will
Run the following command within your `<Projects>` (shared boo2docker VM for multiple projects, recommended) or `<Project>` (dedicated boot2docker VM) directory:
bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/develop/setup.sh)
bash <(curl -s https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/master/setup.sh)
### Manual installation (Mac and Windows)
Expand Down Expand Up @@ -255,3 +255,32 @@ Add this to your user settings (Sublime Text > Preferences > Settings - User):
}

ST3 does not update the ctime extended file attribute when saving a file. This leads to NFS not seeing the changes in a file unless the file size changes as well (i.e. changing a single symbol in a file with ST3 will not be visible over NFS). The setting above fixes that.

<a name="troubleshooting"></a>
## troubleshooting

See [Troubleshooting](docs/troubleshooting.md) section of the docs.

## License

The MIT License (MIT)

Copyright (c) 2015 BlinkReaction

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-rc2
1.0.0
27 changes: 15 additions & 12 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,26 +129,29 @@ Vagrant.configure("2") do |config|
smb_password: synced_folders['smb_password']
# smb2: experimental, does not require running vagrant as admin.
elsif synced_folders['type'] == "smb2" && is_windows
# Create the share before 'up'.
config.trigger.before :up, :stdout => true, :force => true do
info 'Setting up SMB user and share'
windows_net_share vagrant_folder_name, vagrant_root
end

# Remove the share after 'halt'.
config.trigger.after :destroy, :stdout => true, :force => true do
info 'Removing SMB user and share'
windows_net_share_remove vagrant_folder_name

if $vconfig['synced_folders']['smb2_auto']
# Create the share before 'up'.
config.trigger.before :up, :stdout => true, :force => true do
info 'Setting up SMB user and share'
windows_net_share vagrant_folder_name, vagrant_root
end

# Remove the share after 'halt'.
config.trigger.after :destroy, :stdout => true, :force => true do
info 'Removing SMB user and share'
windows_net_share_remove vagrant_folder_name
end
end

# Mount the share in boot2docker.
config.vm.provision "shell", run: "always" do |s|
s.inline = <<-SCRIPT
mkdir -p vagrant $2
mount -t cifs -o uid=`id -u docker`,gid=`id -g docker`,sec=ntlm,username=$3,pass=$4 //192.168.10.1/$1 $2
mount -t cifs -o uid=`id -u docker`,gid=`id -g docker`,sec=ntlm,username=$3,pass=$4,dir_mode=0755,file_mode=0644 //192.168.10.1/$1 $2
SCRIPT
s.args = "#{vagrant_folder_name} #{vagrant_mount_point} #{$vconfig['synced_folders']['smb_username']} #{$vconfig['synced_folders']['smb_password']}"
end
end
# rsync: the best performance, cross-platform platform, one-way only. Run `vagrant rsync-auto` to start auto sync.
elsif synced_folders['type'] == "rsync"
# Only sync explicitly listed folders.
Expand Down
Binary file added docs/img/b2d-connection-timeout-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/b2d-connection-timeout-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/b2d-connection-timeout-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/network-adapter-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/network-adapter-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Troubleshooting

## Boot2docker connection timeout

**Symptoms**

Boot2docker VM fails to boot after multiple "Warning: Connection timeout. Retrying..." messages.

<img src="img/b2d-connection-timeout-1.png" />


**Cause**

Host machine does not have virtualization support (VT-x) or has it disabled.
Confirm by attaching to the VM console.

<img src="img/b2d-connection-timeout-2.png" />

<img src="img/b2d-connection-timeout-3.png" />

**Solution**

Enable VT-x in BIOS.
Machines without VT-x support won't work with Drude / boot2docker-vagrant / 64bit VirtualBox VMs.

## Various networking issues

**Symptoms**

- "Layer already being pulled by another client"
- [Permission Denied while mounting NFS shared folders](https://github.com/blinkreaction/boot2docker-vagrant/issues/27)
- [Stale NFS handle error](https://github.com/blinkreaction/drude/issues/20)

**Cause**

VirtualBox ships with a preconfigured DHCP server which gets in the way, sometimes in very unobvious cases.
Sometimes the cause may not be the DHCP server, but a corrupt VM network adapter.

**Solution**

1. Note the Host-only Adapter name used by the VM.

<img src="img/network-adapter-1.png" />

2. Open VirtualBox Preferences > Network > Host-only Netowrks and kill that adapter.

<img src="img/network-adapter-2.png" />

3. Restart the VM.
3 changes: 3 additions & 0 deletions vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ synced_folders:
# If using the 'smb2' type above the user and share will be configured automatically.
smb_username: 'vagrant'
smb_password: 'vagrant'
# Create smb share on vagrant up (if type smb2). Set to false if you want to or already created the user and the smb share manually.
# If false, the share name should be equal to the directory name in which Vagrantfile is located.
smb2_auto: true
# List of folders to sync with rsync. These should be subfolder names within the <Projects> folder (e.g. "drupal7")
# Uncomment and add folders per the example below as neccessary.
# Note: you'll have to run `vagrant rsync-auto` in the background to keep the files in sync as you make changes
Expand Down

0 comments on commit 5b38fec

Please sign in to comment.