landrush 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +12 -178
  3. data/.travis.yml +6 -1
  4. data/CHANGELOG.md +18 -1
  5. data/CONTRIBUTING.adoc +112 -0
  6. data/Gemfile +6 -9
  7. data/Guardfile +10 -0
  8. data/README.adoc +100 -0
  9. data/Rakefile +14 -2
  10. data/appveyor.yml +20 -0
  11. data/doc/Development.adoc +112 -0
  12. data/doc/ProxyMobile.adoc +66 -0
  13. data/doc/Troubleshooting.adoc +42 -0
  14. data/doc/Usage.adoc +271 -0
  15. data/features/commands.feature +35 -0
  16. data/features/dns_resolution.feature +6 -5
  17. data/features/{landrush-ip.feature → landrush_ip.feature} +0 -0
  18. data/features/step_definitions/landrush_custom_steps.rb +48 -0
  19. data/features/support/env.rb +25 -1
  20. data/landrush.gemspec +3 -3
  21. data/lib/landrush/action/common.rb +3 -11
  22. data/lib/landrush/action/install_prerequisites.rb +2 -3
  23. data/lib/landrush/action/redirect_dns.rb +1 -1
  24. data/lib/landrush/action/setup.rb +25 -30
  25. data/lib/landrush/action/teardown.rb +8 -11
  26. data/lib/landrush/cap/guest/all/read_host_visible_ip_address.rb +28 -4
  27. data/lib/landrush/cap/guest/linux/add_iptables_rule.rb +1 -1
  28. data/lib/landrush/cap/guest/linux/redirect_dns.rb +2 -2
  29. data/lib/landrush/cap/guest/suse/add_iptables_rule.rb +20 -0
  30. data/lib/landrush/cap/guest/suse/install_iptables.rb +14 -0
  31. data/lib/landrush/cap/guest/suse/iptables_installed.rb +11 -0
  32. data/lib/landrush/cap/host/suse/dnsmasq_installed.rb +11 -0
  33. data/lib/landrush/cap/host/suse/install_dnsmasq.rb +14 -0
  34. data/lib/landrush/cap/host/suse/restart_dnsmasq.rb +21 -0
  35. data/lib/landrush/cap/host/windows/configure_visibility_on_host.rb +1 -1
  36. data/lib/landrush/command.rb +42 -17
  37. data/lib/landrush/config.rb +29 -14
  38. data/lib/landrush/plugin.rb +30 -0
  39. data/lib/landrush/server.rb +96 -138
  40. data/lib/landrush/start_server.rb +11 -0
  41. data/lib/landrush/store.rb +6 -2
  42. data/lib/landrush/util/path.rb +32 -0
  43. data/lib/landrush/util/process_helper.rb +46 -0
  44. data/lib/landrush/util/retry.rb +2 -2
  45. data/lib/landrush/version.rb +1 -1
  46. data/test/landrush/action/setup_test.rb +19 -25
  47. data/test/landrush/action/teardown_test.rb +18 -15
  48. data/test/landrush/cap/guest/all/read_host_visible_ip_address_test.rb +35 -1
  49. data/test/landrush/cap/guest/linux/configured_dns_servers_test.rb +8 -8
  50. data/test/landrush/cap/guest/linux/redirect_dns_test.rb +4 -4
  51. data/test/landrush/config_test.rb +23 -2
  52. data/test/landrush/dependent_vms_test.rb +5 -5
  53. data/test/landrush/issues/255.rb +115 -0
  54. data/test/landrush/server_test.rb +22 -4
  55. data/test/landrush/store_test.rb +28 -13
  56. data/test/support/test_server_daemon.rb +2 -4
  57. data/test/test_helper.rb +37 -14
  58. metadata +30 -15
  59. data/CONTRIBUTING.md +0 -103
  60. data/NOTES.md +0 -28
  61. data/README.md +0 -406
  62. data/doc/proxy-mobile/README.md +0 -50
  63. data/features/step_definitions/dns.rb +0 -19
  64. data/features/step_definitions/ip.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 138a75389ee8136d6e3238acfe4b5c0f519a4a76
4
- data.tar.gz: f5ce9a01e50b7f78a372d7b08f53866f3ee87f02
3
+ metadata.gz: fc436bab040df9eb7c4b2d72c6dbed5d939e07da
4
+ data.tar.gz: d152964c54984aa6a4b93fe968a2dc66cb361105
5
5
  SHA512:
6
- metadata.gz: 1237352f45ac98629612def4706944481ad311bb1c51b08bbaab452e0b754a62af6b4ed25d6f2aecc0e27050ddec5ab1f40f5e7e505b5c30dbb7f69c0667aec1
7
- data.tar.gz: 5a2fd9a12b9960c5630327fcffd2662ee75c7c84fcd15d95fda6288afb6fc668e07e8e689372a284d167843049b1493a57daecf14ef48782ba248612b39f89fe
6
+ metadata.gz: e036f50d31cbe851b787a7ca37de97550a8e2e1dc2abafb7b936bc50150675cc9419675740c13f9fbbbe409b7a29085cd1f5ca5388175cac0082ba0b270ca821
7
+ data.tar.gz: 048b080367798a7cf2f684b1f2fabd18b936c27bc6a80e4db3a3740c5e8056a37d4cdd8cb49acbd27ac7e385b5d3463835d21bb952036b4a92b0e052cccbf45d
@@ -1,80 +1,40 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-01-18 12:44:48 +0100 using RuboCop version 0.36.0.
3
+ # on 2016-10-04 22:36:56 +0200 using RuboCop version 0.38.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
-
10
- # Offense count: 3
11
- # Cop supports --auto-correct.
12
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
13
- Lint/UnusedMethodArgument:
14
- Exclude:
15
- - 'lib/landrush/action/common.rb'
16
- - 'lib/landrush/config.rb'
17
- - 'test/support/fake_ui.rb'
18
-
19
- # Offense count: 8
9
+ # Offense count: 12
20
10
  Metrics/AbcSize:
21
- Max: 36
22
- Exclude:
23
- - 'lib/landrush/command.rb'
24
- - 'lib/landrush/cap/guest/all/read_host_visible_ip_address.rb'
11
+ Max: 47
25
12
 
26
- # Offense count: 1
13
+ # Offense count: 3
27
14
  # Configuration parameters: CountComments.
28
15
  Metrics/ClassLength:
29
- Max: 250
16
+ Max: 218
30
17
 
31
- # Offense count: 2
18
+ # Offense count: 3
32
19
  Metrics/CyclomaticComplexity:
33
20
  Max: 12
34
21
 
35
- # Offense count: 57
22
+ # Offense count: 144
36
23
  # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
37
24
  # URISchemes: http, https
38
25
  Metrics/LineLength:
39
- Max: 157
26
+ Max: 154
40
27
 
41
- # Offense count: 9
28
+ # Offense count: 14
42
29
  # Configuration parameters: CountComments.
43
30
  Metrics/MethodLength:
44
- Max: 30
31
+ Max: 29
45
32
 
46
- # Offense count: 1
33
+ # Offense count: 3
47
34
  Metrics/PerceivedComplexity:
48
35
  Max: 14
49
36
 
50
- # Offense count: 1
51
- # Cop supports --auto-correct.
52
- # Configuration parameters: EnforcedStyle, SupportedStyles.
53
- # SupportedStyles: prefer_alias, prefer_alias_method
54
- Style/Alias:
55
- EnforcedStyle: prefer_alias_method
56
-
57
- # Offense count: 2
58
- # Cop supports --auto-correct.
59
- # Configuration parameters: EnforcedStyle, SupportedStyles.
60
- # SupportedStyles: percent_q, bare_percent
61
- Style/BarePercentLiterals:
62
- Exclude:
63
- - 'lib/landrush/cap/linux/add_iptables_rule.rb'
64
- - 'lib/landrush/cap/linux/read_host_visible_ip_address.rb'
65
-
66
- # Offense count: 2
67
- # Cop supports --auto-correct.
68
- # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
69
- # SupportedStyles: case, end
70
- Style/CaseIndentation:
71
- Enabled: false
72
-
73
- Style/ConditionalAssignment:
74
- Exclude:
75
- - 'lib/landrush/server.rb'
76
-
77
- # Offense count: 21
37
+ # Offense count: 32
78
38
  Style/Documentation:
79
39
  Enabled: false
80
40
 
@@ -84,129 +44,3 @@ Style/DoubleNegation:
84
44
  - 'lib/landrush/config.rb'
85
45
  - 'lib/landrush/server.rb'
86
46
 
87
- # Offense count: 4
88
- # Configuration parameters: MinBodyLength.
89
- Style/GuardClause:
90
- Exclude:
91
- - 'lib/landrush/action/teardown.rb'
92
- - 'lib/landrush/server.rb'
93
- - 'test/support/test_server_daemon.rb'
94
-
95
- # Offense count: 13
96
- # Cop supports --auto-correct.
97
- # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
98
- # SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
99
- Style/HashSyntax:
100
- Enabled: false
101
-
102
- # Offense count: 9
103
- # Cop supports --auto-correct.
104
- # Configuration parameters: MaxLineLength.
105
- Style/IfUnlessModifier:
106
- Exclude:
107
- - 'lib/landrush/action/common.rb'
108
- - 'lib/landrush/config.rb'
109
- - 'lib/landrush/server.rb'
110
- - 'test/support/test_server_daemon.rb'
111
-
112
- # Offense count: 4
113
- # Cop supports --auto-correct.
114
- # Configuration parameters: SupportedStyles, IndentationWidth.
115
- # SupportedStyles: special_inside_parentheses, consistent, align_brackets
116
- Style/IndentArray:
117
- EnforcedStyle: consistent
118
-
119
- # Offense count: 1
120
- # Cop supports --auto-correct.
121
- # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
122
- # SupportedStyles: skip_modifier_ifs, always
123
- Style/Next:
124
- Exclude:
125
- - 'lib/landrush/action/setup.rb'
126
-
127
- # Offense count: 4
128
- # Cop supports --auto-correct.
129
- # Configuration parameters: PreferredDelimiters.
130
- Style/PercentLiteralDelimiters:
131
- Exclude:
132
- - 'landrush.gemspec'
133
- - 'lib/landrush/cap/guest/linux/redirect_dns.rb'
134
- - 'test/landrush/action/setup_test.rb'
135
- - 'test/landrush/store_test.rb'
136
-
137
- # Offense count: 1
138
- # Cop supports --auto-correct.
139
- # Configuration parameters: EnforcedStyle, SupportedStyles.
140
- # SupportedStyles: lower_case_q, upper_case_q
141
- Style/PercentQLiterals:
142
- Exclude:
143
- - 'lib/landrush/cap/guest/linux/read_host_visible_ip_address.rb'
144
-
145
-
146
- # Offense count: 7
147
- # Cop supports --auto-correct.
148
- Style/RescueModifier:
149
- Exclude:
150
- - 'lib/landrush/server.rb'
151
- - 'lib/landrush/store.rb'
152
- - 'test/landrush/server_test.rb'
153
-
154
- # Offense count: 6
155
- # Cop supports --auto-correct.
156
- # Configuration parameters: EnforcedStyle, SupportedStyles.
157
- # SupportedStyles: space, no_space
158
- Style/SpaceAroundEqualsInParameterDefault:
159
- Enabled: false
160
-
161
- # Offense count: 4
162
- # Cop supports --auto-correct.
163
- # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
164
- # SupportedStyles: space, no_space
165
- Style/SpaceInsideBlockBraces:
166
- Enabled: false
167
-
168
- # Offense count: 2
169
- # Cop supports --auto-correct.
170
- # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
171
- # SupportedStyles: space, no_space
172
- Style/SpaceInsideHashLiteralBraces:
173
- Enabled: false
174
-
175
- # Offense count: 3
176
- # Cop supports --auto-correct.
177
- # Configuration parameters: EnforcedStyle, SupportedStyles.
178
- # SupportedStyles: use_perl_names, use_english_names
179
- Style/SpecialGlobalVars:
180
- Enabled: false
181
-
182
- # Offense count: 62
183
- # Cop supports --auto-correct.
184
- # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
185
- # SupportedStyles: single_quotes, double_quotes
186
- Style/StringLiterals:
187
- Enabled: false
188
-
189
- # Offense count: 1
190
- # Cop supports --auto-correct.
191
- # Configuration parameters: IgnoredMethods.
192
- # IgnoredMethods: respond_to
193
- Style/SymbolProc:
194
- Exclude:
195
- - 'lib/landrush/cap/guest/linux/read_host_visible_ip_address.rb'
196
-
197
- # Offense count: 2
198
- # Cop supports --auto-correct.
199
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
200
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
201
- Style/TrivialAccessors:
202
- Exclude:
203
- - 'lib/landrush/config.rb'
204
- - 'lib/landrush/server.rb'
205
-
206
- # Offense count: 3
207
- # Cop supports --auto-correct.
208
- Style/UnneededPercentQ:
209
- Exclude:
210
- - 'landrush.gemspec'
211
- - 'lib/landrush/cap/guest/linux/add_iptables_rule.rb'
212
- - 'lib/landrush/cap/guest/linux/read_host_visible_ip_address.rb'
@@ -1,12 +1,17 @@
1
1
  language: ruby
2
2
 
3
3
  before_install:
4
+ - rvm gemset use global
5
+ - gem uninstall bundler -Iax --version '<1.14'
4
6
  - gem install bundler -v 1.12.5
5
7
 
8
+ script:
9
+ - bundle exec rake clean rubocop test install TESTOPTS='--verbose'
10
+
6
11
  cache: bundler
7
12
 
8
13
  rvm:
9
- - 2.0.0
14
+ - 2.2
10
15
 
11
16
  sudo: required
12
17
 
@@ -1,7 +1,22 @@
1
+ ## [1.2.0] - 2016-12-07
2
+
3
+ - Issue [#298](https://github.com/vagrant-landrush/landrush/issues/298) - Travis CI used wrong Bundler version
4
+ - Issue [#288](https://github.com/vagrant-landrush/landrush/issues/288) - Landrush 1.1.2 failing to start - OSX 10.11, Vagrant 1.8.6
5
+ - Issue [#284](https://github.com/vagrant-landrush/landrush/issues/284) - Inconsistent command layout in README.md
6
+ - Issue [#282](https://github.com/vagrant-landrush/landrush/issues/282) - Add support for Suse
7
+ - Issue [#280](https://github.com/vagrant-landrush/landrush/issues/280) - Configure CI build on Windows using AppVeyor
8
+ - Issue [#271](https://github.com/vagrant-landrush/landrush/issues/271) - Update landrush ip dependency
9
+ - Issue [#268](https://github.com/vagrant-landrush/landrush/issues/268) - "host_interface" ignored if only 1 private interface is configured
10
+ - Issue [#264](https://github.com/vagrant-landrush/landrush/issues/264) - Convert documentation to asciidoc
11
+ - Issue [#262](https://github.com/vagrant-landrush/landrush/issues/262) - Add command to clear all entries at once
12
+ - Issue [#259](https://github.com/vagrant-landrush/landrush/issues/259) - Landrush daemon stopped after a 'vagrant reload'
13
+ - Issue [#255](https://github.com/vagrant-landrush/landrush/issues/255) - read_host_visible_ip_address failure in presence of interface without IPv4, with IPv6 address
14
+ - Issue [#216](https://github.com/vagrant-landrush/landrush/issues/216) - Apply Rubocop auto corrections
15
+
1
16
  ## [1.1.2] - 2016-08-24
2
17
 
3
18
  - Issue [#249](https://github.com/vagrant-landrush/landrush/issues/249) - Spawned DNS server holds vagrant executable's stderr, stdout open
4
- - PR [#243](https://github.com/vagrant-landrush/landrush/pull/243) - Vagrant would print error message "The system cannot find the path
19
+ - PR [#243](https://github.com/vagrant-landrush/landrush/pull/243) - Vagrant would print error message "The system cannot find the path
5
20
 
6
21
  ## [1.1.1] - 2016-08-07
7
22
 
@@ -53,6 +68,8 @@
53
68
  ## [0.16.0] - 2015-01-18
54
69
  - Added: Support for IN::PTR records (#98)
55
70
 
71
+ [1.2.0]: https://github.com/phinze/landrush/compare/v1.1.2...v1.2.0
72
+ [1.1.2]: https://github.com/phinze/landrush/compare/v1.1.1...v1.1.2
56
73
  [1.1.1]: https://github.com/phinze/landrush/compare/v1.1.0...v1.1.1
57
74
  [1.1.0]: https://github.com/phinze/landrush/compare/v1.0.0...v1.1.0
58
75
  [1.0.0]: https://github.com/phinze/landrush/compare/v0.19.0...v1.0.0
@@ -0,0 +1,112 @@
1
+ = Contributing to Landrush
2
+ :toc:
3
+ :toc-placement!:
4
+
5
+ The following is a set of guidelines for contributing to the Landrush plugin.
6
+
7
+ '''
8
+ toc::[]
9
+ '''
10
+
11
+ == Submitting issues
12
+
13
+ You can submit issues with respect to the Landrush plugin
14
+ https://github.com/vagrant-landrush/landrush/issues[here].
15
+ Make sure you include all the relevant details pertaining the issue.
16
+
17
+ Before submitting a new issue, it is suggested to check the
18
+ https://github.com/vagrant-landrush/landrush/issues[existing issues] in order to avoid duplication.
19
+
20
+ == Submitting pull requests
21
+
22
+ === Get Started
23
+
24
+ If you are just getting started with Git and GitHub there are a few
25
+ prerequisite steps.
26
+
27
+ * Make sure you have a https://github.com/signup/free[GitHub account].
28
+ * https://help.github.com/articles/fork-a-repo/[Fork] the
29
+ Landrush repository. As discussed in the linked page, this also includes:
30
+ ** https://help.github.com/articles/set-up-git[Setting up] your local
31
+ git install.
32
+ ** Cloning your fork.
33
+
34
+ === Create a topic branch
35
+
36
+ Create a http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches[topic branch]
37
+ on which you will work. The convention is to name the branch
38
+ using the issue key you are working on. If there is not already an issue
39
+ covering the work you want to do, create one. Assuming for example you
40
+ will be working from the master branch and working on the GitHub issue 123 : `git checkout -b issue-123 master`
41
+
42
+ === Code
43
+
44
+ Do your work! Refer to the link:doc/Development.adoc#development[development guide] to get started.
45
+
46
+ === Commit
47
+
48
+ * Make commits of logical units.
49
+ * Be sure to use the GitHub issue key in the commit message, eg `Issue #123 ...`.
50
+ * Make sure your code conforms to the coding style
51
+ * Make sure you have added the necessary tests for your changes.
52
+ * Make sure you have added appropriate documentation updates.
53
+ * Run _all_ the tests to assure nothing else was accidentally broken.
54
+
55
+ === Submit
56
+
57
+ * Push your changes to the topic branch in your fork of the repository.
58
+ * Initiate a https://help.github.com/articles/using-pull-requests/[pull
59
+ request].
60
+
61
+ == Merging pull requests
62
+
63
+ A project maintainer will merge the pull request. Here is an example work-flow
64
+ of a merge assuming issue 123 from above:
65
+
66
+ -------------------------------------------------------------------------
67
+ # Create a local branch for the pull request
68
+ $ git checkout -b fix-123 master
69
+
70
+ # Pull the changes
71
+ $ git pull <remote of the pull request> fix-123
72
+
73
+ # If necessary rebase changes on master to ensure we have a fast forward.
74
+ $ git rebase -i master
75
+
76
+ # Merge changes into master
77
+ $ git checkout master
78
+ $ git merge fix-123
79
+
80
+ # Push to origin
81
+ $ git push origin master
82
+ -------------------------------------------------------------------------
83
+
84
+ == Releasing
85
+
86
+ * Make sure the HEAD of development builds and passes all tests:
87
+ `bundle exec rake clean rubocop test features install`.
88
+ * Review https://github.com/vagrant-landrush/landrush/milestones[milestone] for the current release
89
+ ** Make sure all issues are resolved
90
+ ** Move unresolved issues into an upcoming release
91
+ ** Close milestone
92
+ * Update the link:CHANGELOG.md[CHANGELOG]
93
+ * Update link:lib/landrush/version.rb[version.rb] with the correct
94
+ release version. Consider http://semver.org/:[Semantic Versioning] guidelines
95
+ when deciding on the release version
96
+ * Commit _CHANGELOG_ and _version.rb_ using commit message of the form:
97
+ `cut v<version>`
98
+ * Push commit to upstream
99
+ * Release the gem: `bundle exec rake release`
100
+ * Update link:lib/landrush/version.rb[version.rb] with the next anticipated release version, eg _1.4.0.dev_
101
+ * Commit with message: `setting dev version <version>.dev`
102
+ * Push upstream
103
+
104
+ == Maintainers
105
+
106
+ * Brian Exelbierd (@bexelbie)
107
+ * Eric Sorenson (@ahpook)
108
+ * Florian Holzhauer (@fh)
109
+ * Hardy Ferentschik (@hferentschik)
110
+ * Josef Strzibny (@strzibny)
111
+ * Paul Hinze (@phinze)
112
+ * Reto Kaiser (@njam)
data/Gemfile CHANGED
@@ -1,20 +1,14 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Can't use `gemspec` to pull in dependencies, because the landrush gem needs
4
- # to be in the :plugins group for Vagrant to detect and load it in development
5
-
6
- gemspec
7
-
8
3
  # Vagrant's special group
9
4
  group :plugins do
10
- gem 'landrush', path: '.'
5
+ gemspec
11
6
  end
12
7
 
13
8
  group :development do
14
9
  gem 'vagrant',
15
- :git => 'git://github.com/mitchellh/vagrant.git',
16
- :ref => 'v1.8.4'
17
-
10
+ git: 'https://github.com/mitchellh/vagrant.git',
11
+ ref: 'v1.8.6'
18
12
  gem 'rake', '~> 10'
19
13
  gem 'rubocop', '~> 0.38.0'
20
14
  gem 'byebug'
@@ -23,4 +17,7 @@ group :development do
23
17
  gem 'cucumber', '~> 2.1'
24
18
  gem 'aruba', '~> 0.13'
25
19
  gem 'komenda', '~> 0.1.6'
20
+ gem 'guard-rake'
21
+ gem 'guard-livereload', '~> 2.5', require: false
22
+ gem 'asciidoctor'
26
23
  end
@@ -0,0 +1,10 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ guard 'rake', task: 'html' do
5
+ watch(/^.*.adoc/)
6
+ end
7
+
8
+ guard 'livereload' do
9
+ watch(/^.*.html/)
10
+ end
@@ -0,0 +1,100 @@
1
+ = Landrush: DNS for Vagrant
2
+ :toc:
3
+ :toc-placement!:
4
+
5
+ https://travis-ci.org/vagrant-landrush/landrush[image:https://travis-ci.org/vagrant-landrush/landrush.png[Build Status]]
6
+ https://ci.appveyor.com/project/hferentschik/landrush-3agrx/branch/master[image:https://ci.appveyor.com/api/projects/status/3iv8sv5v73s15mt6/branch/master?svg=true[Build Status]]
7
+
8
+ Landrush is a simple cross-platform DNS for Vagrant VMs that is visible
9
+ on both, the guest and the host.
10
+
11
+ It spins up a small DNS server and redirects DNS traffic from your VMs
12
+ to use it, automatically registering/unregistering IP addresses of
13
+ guests as they come up and go down.
14
+
15
+ '''
16
+ toc::[]
17
+ '''
18
+
19
+ == Installation
20
+
21
+ Install under Vagrant (1.1 or later):
22
+
23
+ ....
24
+ $ vagrant plugin install landrush
25
+ ....
26
+
27
+ == Getting started
28
+
29
+ . Enable the plugin in your `Vagrantfile`:
30
+ +
31
+ ....
32
+ config.landrush.enabled = true
33
+ ....
34
+ . Bring up a machine.
35
+ +
36
+ ....
37
+ $ vagrant up
38
+ ....
39
+ . You are able to get your VM's hostname resolved on your host:
40
+ +
41
+ ....
42
+ $ dig -p 10053 @localhost myhost.vagrant.test
43
+ ....
44
+ . If you shut down your guest, the entries associated with it will be removed.
45
+
46
+ Landrush retrieves your VM's hostname from either the vagrant config or
47
+ it uses the system's actual hostname by running the `hostname` command.
48
+ A default hostname of "guest-vm" is assumed if the hostname is otherwise not
49
+ available.
50
+
51
+ A Landrush example configuration could look like this:
52
+
53
+ ....
54
+ Vagrant.configure("2") do |config|
55
+ config.vm.box = "hashicorp/precise64"
56
+
57
+ config.landrush.enabled = true
58
+
59
+ config.vm.hostname = "myhost.vagrant.test"
60
+
61
+ config.landrush.host 'static1.example.com', '1.2.3.4'
62
+ config.landrush.host 'static2.example.com', '2.3.4.5'
63
+ end
64
+ ....
65
+
66
+ See the link:doc/Usage.adoc[Usage guide] for further information.
67
+
68
+ == Available CLI commands
69
+
70
+ Check out `vagrant landrush help` for the available commands.
71
+
72
+ ....
73
+ vagrant landrush <command>
74
+
75
+ commands:
76
+ {start|stop|restart|status}
77
+ control the landrush server daemon
78
+ list, ls
79
+ list all DNS entries known to landrush
80
+ dependentvms, vms
81
+ list vms currently dependent on the landrush server
82
+ set { <host> <ip> | <alias> <host> }
83
+ adds the given host-to-ip or alias-to-hostname mapping.
84
+ Existing host ip addresses will be overwritten
85
+ rm, del { <host> | <alias> | --all }
86
+ delete the given hostname or alias from the server.
87
+ --all removes all entries
88
+ help
89
+ you're lookin at it!
90
+ ....
91
+
92
+ == Troubleshooting
93
+
94
+ See the link:doc/Troubleshooting.adoc[Troubleshooting guide] to resolve issues you face while using Landrush.
95
+
96
+ == Help Out!
97
+
98
+ This project needs your feedback and help! Please do not hesitate to open issues or submit pull requests. We welcome your input.
99
+ If you wish to contribute to the development of Landrush, refer to the link:CONTRIBUTING.adoc[Contributing guide] for details
100
+ on how you can contribute. The link:doc/Development.adoc[Development guide] will help you setup your development environment.