-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add vagrant port forwarding and ssh info
as per #76
- Loading branch information
1 parent
7737bb1
commit 72c1474
Showing
1 changed file
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,17 +40,43 @@ to remove the old host key, then try again. | |
|
||
This should not happen if you're using the generated vbox_host.cfg, as it turns of Ansible's host key checking. | ||
|
||
Testing | ||
------- | ||
Using the Vagrant | ||
----------------- | ||
|
||
To use your Vagrant, you must use SSH. | ||
|
||
Vagrant maps host ports into the guest VirtualBox OS. | ||
|
||
The standard mapping takes host port 2222 to the guest's SSH port, 22. | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
To SSH to your Vagrant: | ||
|
||
.. code-block:: bash | ||
vagrant ssh | ||
Port Mapping | ||
------------ | ||
|
||
Vagrant maps host ports into the guest VirtualBox OS. The standard mapping takes host port 2222 to the guest's SSH port, 22. | ||
|
||
The Vagrantfile included with this kit maps several more ports. The general rule is to map each guest port to a host port 1000 higher:: | ||
|
||
config.vm.network "forwarded_port", guest: 80, host: 1080 | ||
config.vm.network "forwarded_port", guest: 1080, host: 2080 | ||
config.vm.network "forwarded_port", guest: 4949, host: 5949 | ||
config.vm.network "forwarded_port", guest: 6081, host: 7081 | ||
config.vm.network "forwarded_port", guest: 8080, host: 9080 | ||
config.vm.network "forwarded_port", guest: 4949, host: 5949 | ||
|
||
You can find these forwarded port settings by opening VirtualBox, selecting your Vagrant (will be called something like `ansible-playbook`), right-clicking, choosing "Settings", clicking "Network", expanding the "Advanced" widget, and clicking the button "Port Forwarding". | ||
This comment has been minimized.
Sorry, something went wrong.
stevepiercy
Contributor
|
||
|
||
Here is what the forwarded ports are used for and where they are defined: | ||
|
||
- 80, 443: nginx (`roles/nginx/templates/host.j2`) | ||
- 1080: haproxy (`roles/haproxy/defaults/main.yml`) | ||
- 4949: munin_node (`roles/munin-node/defaults/main.yml`) | ||
- 6081: varnish (`roles/varnish/defaults/main.yml`) | ||
- 8100: zeo_port (`roles/plone.plone_server/defaults/main.yml`) | ||
- 8081: client_base_port (`roles/plone.plone_server/defaults/main.yml`) | ||
This comment has been minimized.
Sorry, something went wrong.
stevepiercy
Contributor
|
||
|
||
Note that when you use host port 1080 to connect to guest port 80, the virtual hosting will not work correctly. You'll get the homepage, but links -- including those to stylesheets and JS resources, will be wrong. So, you can't really test virtual host rewriting via Vagrant. |
remove comma or make consistent with host port 2222.