website/docs: update docs for share
This commit is contained in:
parent
4c9e6e46b2
commit
e279801e64
|
@ -5,6 +5,7 @@ gem "middleman", "~> 3.0.6"
|
|||
gem "middleman-minify-html", "~> 3.0.0"
|
||||
gem "rack-contrib", "~> 1.1.0"
|
||||
gem "redcarpet", "~> 2.2.2"
|
||||
gem "rb-inotify", "~> 0.9"
|
||||
gem "therubyracer", "~> 0.12.0"
|
||||
gem "thin", "~> 1.5.0"
|
||||
|
||||
|
|
|
@ -20,4 +20,5 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
config.vm.box = "precise64"
|
||||
config.vm.network "private_network", ip: "33.33.33.10"
|
||||
config.vm.provision "shell", inline: $script, privileged: false
|
||||
config.vm.synced_folder ".", "/vagrant", type: "rsync"
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ sidebar_current: "share-connect"
|
|||
Vagrant can share any or _every_ port to your Vagrant environment, not
|
||||
just SSH and HTTP. The `vagrant connect` command gives the connecting person
|
||||
a static IP they can use to communicate to the shared Vagrant environment.
|
||||
Any TCP/UDP traffic sent to this IP is sent to the shared Vagrant environment.
|
||||
Any TCP traffic sent to this IP is sent to the shared Vagrant environment.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -21,7 +21,17 @@ teammates, or managers, etc.
|
|||
To use HTTP sharing, simply run `vagrant share`:
|
||||
|
||||
```
|
||||
TODO
|
||||
$ vagrant share
|
||||
==> default: Detecting network information for machine...
|
||||
default: Local machine address: 192.168.163.152
|
||||
default: Local HTTP port: 4567
|
||||
default: Local HTTPS port: disabled
|
||||
==> default: Checking authentication and authorization...
|
||||
==> default: Creating Vagrant Share session...
|
||||
default: Share will be at: ghastly-wombat-4051
|
||||
==> default: Your Vagrant Share is running!
|
||||
default: Name: ghastly-wombat-4051
|
||||
==> default: URL: http://ghastly-wombat-4051.vagrantshare.com
|
||||
```
|
||||
|
||||
Vagrant detects where your HTTP server is running in your Vagrant environment
|
||||
|
@ -46,3 +56,21 @@ If you want to disable the creation of the publicly accessible endpoint,
|
|||
run `vagrant share` with the `--disable-http` flag. This will share your
|
||||
environment using one of the other methods available, and will not create
|
||||
the URL endpoint.
|
||||
|
||||
## Missing Assets
|
||||
|
||||
Shared web applications must use **relative paths** for loading any
|
||||
local assets such as images, stylesheets, javascript.
|
||||
|
||||
The web application under development will be accessed remotely. This means
|
||||
that if you have any hardcoded asset (images, stylesheets, etc.) URLs
|
||||
such as `<img src="http://127.0.0.1/header.png">`, then they won't load
|
||||
for people accessing your share.
|
||||
|
||||
Most web frameworks or toolkits have settings or helpers to generate
|
||||
relative paths. For example, if you're a WordPress developer, the
|
||||
[Root Relative URLs](http://wordpress.org/plugins/root-relative-urls/) plugin
|
||||
will automatically do this for you.
|
||||
|
||||
Relative URLs to assets is generally a best practice in general, so you
|
||||
should do this anyways!
|
||||
|
|
|
@ -30,7 +30,22 @@ us or anyone who may know your share name from easily accessing your machine.
|
|||
After running `vagrant share --ssh`, it will output the name of your share:
|
||||
|
||||
```
|
||||
TODO
|
||||
$ vagrant share --ssh
|
||||
==> default: Detecting network information for machine...
|
||||
default: Local machine address: 192.168.163.152
|
||||
default: Local HTTP port: 4567
|
||||
default: Local HTTPS port: disabled
|
||||
default: SSH Port: 22
|
||||
==> default: Generating new SSH key...
|
||||
default: Please enter a password to encrypt the key:
|
||||
default: Repeat the password to confirm:
|
||||
default: Inserting generated SSH key into machine...
|
||||
==> default: Checking authentication and authorization...
|
||||
==> default: Creating Vagrant Share session...
|
||||
default: Share will be at: itty-bitty-polar-8667
|
||||
==> default: Your Vagrant Share is running!
|
||||
default: Name: itty-bitty-polar-8667
|
||||
...
|
||||
```
|
||||
|
||||
Anyone can then SSH directly to your Vagrant environment by running
|
||||
|
@ -38,7 +53,21 @@ Anyone can then SSH directly to your Vagrant environment by running
|
|||
previously.
|
||||
|
||||
```
|
||||
TODO
|
||||
$ vagrant connect --ssh itty-bitty-polar-8667
|
||||
Loading share 'itty-bitty-polar-8667'...
|
||||
The SSH key to connect to this share is encrypted. You will
|
||||
require the password entered when creating to share to
|
||||
decrypt it. Verify you access to this password before
|
||||
continuing.
|
||||
|
||||
Press enter to continue, or Ctrl-C to exit now.
|
||||
Password for the private key:
|
||||
Executing SSH...
|
||||
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic x86_64)
|
||||
|
||||
* Documentation: https://help.ubuntu.com/
|
||||
Last login: Fri Mar 7 17:44:50 2014 from 192.168.163.1
|
||||
vagrant@vagrant:~$
|
||||
```
|
||||
|
||||
If the private key is encrypted (the default behavior), then the connecting
|
||||
|
|
Loading…
Reference in New Issue