vagrant-nfs_guest 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66cdfd9f758ab3bc1e50e9ea5d4343947c7fe997
4
- data.tar.gz: de8345cf62d07dc961fd16ac526ee5d51088e5f7
3
+ metadata.gz: f52967e02fc94ba4d117547cc137677bc1de3ab5
4
+ data.tar.gz: bf88cca048c195f8badc8b6073261668b2e7aa04
5
5
  SHA512:
6
- metadata.gz: 2b9e37681172389e4e1e4f0e32fd3aabd16301aeba887899a170bea43f510663ab30840d59d40548a9f4001b911cc9f898ebd2e97630f6f36586b8eabe25acba
7
- data.tar.gz: f9f80edd7590c1e1f7f784fdd367bdcf2f6cc371e62de03da28522343c8ad26599d3097209e185aea1e733b269173818111030e60a5b7d3253a98afcb6e22261
6
+ metadata.gz: e60fd214879b914bae527a3081e043fe7d3c8f28d8d61cba3c4ea1e29ab79e88dbf3302d74705f0adf779d82582ab66db17d572d3ab4f66acac271d5c425f098
7
+ data.tar.gz: 11d291a12f596f24fc04640038f6ffcc31edf71abd5ac5d2054e9da4f0367be8cc2d281ad50efd793dc815d7b5e5779ebdc93b6a484446718dfa09a58e765d85
@@ -0,0 +1,46 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to creating a positive environment include:
10
+
11
+ * Using welcoming and inclusive language
12
+ * Being respectful of differing viewpoints and experiences
13
+ * Gracefully accepting constructive criticism
14
+ * Focusing on what is best for the community
15
+ * Showing empathy towards other community members
16
+
17
+ Examples of unacceptable behavior by participants include:
18
+
19
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+ * Trolling, insulting/derogatory comments, and personal or political attacks
21
+ * Public or private harassment
22
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Our Responsibilities
26
+
27
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource@learnosity.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+ ## Attribution
42
+
43
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44
+
45
+ [homepage]: http://contributor-covenant.org
46
+ [version]: http://contributor-covenant.org/version/1/4/
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,37 @@
1
+ ## How can I contribute?
2
+
3
+ #### I think I've found a bug
4
+
5
+ * Firstly cool! We can hopefully make the project better by your discovery.
6
+
7
+ * Before you submit an **Issue** please have a scan through any existing or closed Issues to make sure you've found something unique and unreported.
8
+
9
+ * If your issue seems unique and unreported, you should open a GitHub **Issue**.
10
+
11
+ * In your Issue report, please include as much information as you can.
12
+ * A detailed summary of the error you are seeing, and any information you think is relevant.
13
+ * A snippet of your Vagrantfile showing your `vagrant-nfs_guest` share, and the network settings used.
14
+ * The version of Vagrant, the host and guest operating system, which VM provider and it's version.
15
+ * A simple example Vagrantfile that demonstrates the error (this would be super useful if possible).
16
+
17
+ * [You should then create a new issue](https://github.com/Learnosity/vagrant-nfs_guest/issues/new)
18
+
19
+ #### I've found a bug and I've fixed it!
20
+
21
+ * Wow, awesome! This will help greatly!
22
+
23
+ * Open a new GitHub pull request with the patch.
24
+
25
+ * Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
26
+
27
+ * **Please send us a PR, all input and suggestions welcome. All assistance greatfully accepted and appreciated.**
28
+
29
+ #### I have an idea for a feature, can you please add it?
30
+
31
+ `vagrant-nfs_guest` is used daily by our in-house team and is well used and tested. So any new feature that doesn't impact our daily usage or is very specific to your use-case probably won't get the investment in time you might require.
32
+
33
+ We don't want to disappoint you, but the facts of life are sometimes _"if you want it done, you have to do it yourself"_. We will happily help you where we can, and we will joyfully accept any PRs you come up with, but we will not just add any feature that's requested.
34
+
35
+ #### But it's a really really good idea!
36
+
37
+ Again, if it's a world beating idea, put something together (even if it's pseudo-code) and a good document on the problem you're trying to fix and the value of your feature. Then submit a PR.
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ group :development do
4
4
  # We depend on Vagrant for development, but we don't add it as a
5
5
  # gem dependency because we expect to be installed within the
6
6
  # Vagrant environment itself using `vagrant plugin`.
7
- gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
7
+ gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :tag => "v2.1.2"
8
8
  end
9
9
 
10
10
  group :plugins do
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  - NEW: moved to version v1.0.0 as it's no longer a "beta" plugin, it's been well used and tested. So figured now is a good time.
6
6
  - NEW: `disabled` flag on shares now are properly respected
7
7
  - UPDATED: share directories on guest are no longer recursively `chown`.
8
+ - NEW: Added VMware Fusion provider support.
8
9
  - Added untested support for Docker providers (Please raise any issues if they don't work!).
9
10
  - Added Parallels provider support
10
11
  - Redhat/CentOS guest support added.
@@ -7,8 +7,8 @@ VAGRANTFILE_API_VERSION = "2"
7
7
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8
8
 
9
9
  # Every Vagrant virtual environment requires a box to build off of.
10
- config.vm.box = "ubuntu/trusty64" # ubuntu
11
- #config.vm.box = "centos/7" # centos/7
10
+ #config.vm.box = "ubuntu/trusty64" # ubuntu
11
+ config.vm.box = "centos/7" # centos/7
12
12
  #config.vm.box = "nrel/CentOS-6.5-x86_64" # centos/6.5
13
13
 
14
14
  # Create a private network, which allows host-only access to the machine
@@ -56,14 +56,16 @@ module VagrantPlugins
56
56
  machine.guest.capability(:nfs_check_command)
57
57
  end
58
58
 
59
- def self.nfs_export(machine, ip, folders)
59
+ def self.nfs_export(machine, ips, folders)
60
60
  if !nfs_capable?(machine)
61
61
  raise Errors::NFSServerMissing
62
62
  end
63
63
 
64
64
  if machine.guest.capability?(:nfs_setup_firewall)
65
65
  machine.ui.info I18n.t("vagrant_nfs_guest.guests.linux.nfs_setup_firewall")
66
- machine.guest.capability(:nfs_setup_firewall, ip)
66
+ ips.each do |ip|
67
+ machine.guest.capability(:nfs_setup_firewall, ip)
68
+ end
67
69
  end
68
70
 
69
71
  nfs_exports_template = machine.guest.capability(:nfs_exports_template)
@@ -73,7 +75,7 @@ module VagrantPlugins
73
75
  output = Vagrant::Util::TemplateRenderer.render(
74
76
  nfs_exports_template,
75
77
  uuid: machine.id,
76
- ips: [ip],
78
+ ips: ips,
77
79
  folders: folders,
78
80
  user: Process.uid)
79
81
 
@@ -8,6 +8,14 @@ module VagrantPlugins
8
8
  machine.communicate.test("test $(ps -o comm= 1) == 'systemd'")
9
9
  end
10
10
 
11
+ def self.firewalld?(machine)
12
+ machine.communicate.test("test $(command -v firewall-cmd)")
13
+ end
14
+
15
+ def self.firewalld_enabled?(machine)
16
+ machine.communicate.test("test $(firewall-cmd --state) == 'running'")
17
+ end
18
+
11
19
  def self.nfs_server_install(machine)
12
20
  machine.communicate.sudo("yum -y install nfs-utils nfs-utils-lib")
13
21
 
@@ -39,6 +47,19 @@ module VagrantPlugins
39
47
 
40
48
  nfs_start_command(machine)
41
49
  end
50
+
51
+ puts("*******************************")
52
+ puts(firewalld?(machine))
53
+ puts(firewalld_enabled?(machine))
54
+ puts("*******************************")
55
+
56
+ if firewalld?(machine) #and firewalld_enabled?(machine)
57
+ # add nfs rules if we have firewalld and it's enabled
58
+ machine.communicate.sudo("firewall-cmd --permanent --add-service=nfs")
59
+ machine.communicate.sudo("firewall-cmd --permanent --add-service=mountd")
60
+ machine.communicate.sudo("firewall-cmd --permanent --add-service=rpc-bind")
61
+ machine.communicate.sudo("firewall-cmd --reload")
62
+ end
42
63
  end
43
64
 
44
65
  def self.nfs_server_installed(machine)
@@ -20,6 +20,7 @@ require_relative "providers/virtualbox/plugin"
20
20
  require_relative "providers/parallels/plugin"
21
21
  require_relative "providers/docker/plugin"
22
22
  require_relative "providers/lxc/plugin"
23
+ require_relative "providers/vmware_fusion/plugin"
23
24
 
24
25
  module VagrantPlugins
25
26
  module SyncedFolderNFSGuest
@@ -0,0 +1,19 @@
1
+ module VagrantPlugins
2
+ module SyncedFolderNFSGuest
3
+ module ProviderVMwareFusion
4
+ module Cap
5
+ def self.read_host_ip
6
+ # In practice, we need the host's IP on the vmnet device this VM uses.
7
+ # It seems a bit tricky to get the right one, so let's allow all.
8
+ return `for N in $(ifconfig | awk -F: '/vmnet/ { print $1; }'); do ifconfig $N | awk '/inet / { print $2; }'; done`.split("\n")
9
+ end
10
+
11
+ def self.nfs_settings(machine)
12
+ host_ip = self.read_host_ip
13
+ machine_ip = machine.provider.driver.read_ip
14
+ return host_ip, machine_ip
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,15 @@
1
+ require "vagrant"
2
+
3
+ module VagrantPlugins
4
+ module SyncedFolderNFSGuest
5
+ class Plugin < Vagrant.plugin("2")
6
+ name "vmware_fusion-provider"
7
+ description "vagrant-vmware_fusion provider"
8
+
9
+ provider_capability(:vmware_fusion, :nfs_settings) do
10
+ require_relative "cap/nfs_settings"
11
+ ProviderVMwareFusion::Cap
12
+ end
13
+ end
14
+ end
15
+ end
@@ -59,7 +59,7 @@ module VagrantPlugins
59
59
  end
60
60
 
61
61
  machine.ui.info I18n.t("vagrant_nfs_guest.actions.vm.nfs.exporting")
62
- machine.guest.capability(:nfs_export, host_ip, mount_folders)
62
+ machine.guest.capability(:nfs_export, Array(host_ip), mount_folders)
63
63
  end
64
64
 
65
65
  protected
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module SyncedFolderNFSGuest
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-nfs_guest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Garfield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-02 00:00:00.000000000 Z
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,6 +47,8 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - ".gitignore"
49
49
  - ".ruby-version"
50
+ - CODE_OF_CONDUCT.md
51
+ - CONTRIBUTING.md
50
52
  - Gemfile
51
53
  - LICENSE.txt
52
54
  - README.md
@@ -81,6 +83,8 @@ files:
81
83
  - lib/vagrant-nfs_guest/providers/parallels/plugin.rb
82
84
  - lib/vagrant-nfs_guest/providers/virtualbox/cap/nfs_settings.rb
83
85
  - lib/vagrant-nfs_guest/providers/virtualbox/plugin.rb
86
+ - lib/vagrant-nfs_guest/providers/vmware_fusion/cap/nfs_settings.rb
87
+ - lib/vagrant-nfs_guest/providers/vmware_fusion/plugin.rb
84
88
  - lib/vagrant-nfs_guest/synced_folder.rb
85
89
  - lib/vagrant-nfs_guest/version.rb
86
90
  - templates/locales/en.yml