vagrant-sshfs 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -3
- data/README.adoc +3 -6
- data/RELEASE.txt +9 -5
- data/Rakefile +0 -10
- data/build.sh +43 -0
- data/lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb +24 -0
- data/lib/vagrant-sshfs/plugin.rb +10 -0
- data/lib/vagrant-sshfs/version.rb +1 -1
- data/test/misc/README.txt +1 -1
- data/test/misc/Vagrantfile +2 -2
- data/vagrant-sshfs.gemspec +0 -3
- metadata +5 -62
- data/features/README.md +0 -21
- data/features/sshfs_cwd_mount.feature +0 -46
- data/features/step_definitions/sshfs_cwd_mount_steps.rb +0 -12
- data/features/support/env.rb +0 -27
- data/test/libvirt/README.txt +0 -23
- data/test/libvirt/Vagrantfile +0 -35
- data/test/virtualbox/README.txt +0 -25
- data/test/virtualbox/Vagrantfile +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4ee5170d16ece9d7e22c89f4638bcaa7e093d1bfad21f888761b2261fdc14d19
|
4
|
+
data.tar.gz: d9992aa2257e45ebeb76ab5f74cfc71ca442ae171a1e7e63a08e5380b283bcd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b79b0401b7fca07baf62338044b0957d68666537d584ec9cdde577ea28b86c3bae9b1849336f5def723cf3108e30dbce72b600d29a5e26e1385aa1bcd7e6af2
|
7
|
+
data.tar.gz: 358ff68b772b75123b5d13b4d691e957c1ea0e5d6d82071aec5253ece6aeccc57700e5fa7f53202ed957a31510142906d9ba1eb5fa5ad040f24c38d466f5eb74
|
data/Gemfile
CHANGED
@@ -6,12 +6,11 @@ group :development do
|
|
6
6
|
# We depend on Vagrant for development, but we don't add it as a
|
7
7
|
# gem dependency because we expect to be installed within the
|
8
8
|
# Vagrant environment itself using `vagrant plugin`.
|
9
|
-
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :ref => 'v2.
|
9
|
+
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :ref => 'v2.2.6'
|
10
10
|
end
|
11
11
|
|
12
12
|
group :plugins do
|
13
|
-
gem "vagrant-sshfs" , path: "."
|
14
13
|
# Add vagrant-libvirt plugin here, otherwise you won't be able to
|
15
14
|
# use libvirt as a provider when you execute `bundle exec vagrant up`
|
16
|
-
gem "vagrant-libvirt" , '0.0.
|
15
|
+
gem "vagrant-libvirt" , '0.0.45'
|
17
16
|
end
|
data/README.adoc
CHANGED
@@ -33,6 +33,9 @@ exists on Linux/Mac. On windows you only need to install
|
|
33
33
|
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=openssh&arch=x86_64[openssh]
|
34
34
|
via https://cygwin.com/[cygwin] and you will get `sftp-server`.
|
35
35
|
|
36
|
+
Also, we recommend running vagrant from the cygwin provided terminal. There have
|
37
|
+
been issues with other shells leading to problems with mounts.
|
38
|
+
|
36
39
|
|
37
40
|
[[history]]
|
38
41
|
== History
|
@@ -290,12 +293,6 @@ test and install this plugin on your local machine:
|
|
290
293
|
# Install development dependencies
|
291
294
|
$ gem install bundler && bundle install
|
292
295
|
|
293
|
-
# List available Rake tasks
|
294
|
-
$ bundle exec rake -T
|
295
|
-
|
296
|
-
# Run Cucumber tests
|
297
|
-
$ bundle exec rake featuretests
|
298
|
-
|
299
296
|
# Build the gem (gets generated in the 'pkg' directory
|
300
297
|
$ bundle exec rake build
|
301
298
|
|
data/RELEASE.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
|
+
# point local system to git for vagrant-sshfs
|
2
3
|
|
3
|
-
# Run
|
4
|
-
cd /
|
5
|
-
vagrant up
|
4
|
+
# Run misc tests
|
5
|
+
cd /var/b/shared/code/github.com/dustymabe/vagrant-sshfs/test/misc
|
6
6
|
follow README for running tests
|
7
7
|
|
8
8
|
# Make sure to bump version in lib/vagrant-sshfs/version.rb and commit
|
@@ -36,8 +36,12 @@ verify with git verify-tag v1.2.0
|
|
36
36
|
git push
|
37
37
|
git push --tags
|
38
38
|
|
39
|
-
# Build with
|
40
|
-
|
39
|
+
# Build with build.sh script (uses buildah)
|
40
|
+
# We must run it in a buildah unshare session. Otherwise we get the error:
|
41
|
+
#
|
42
|
+
# ++ buildah mount fedora-working-container
|
43
|
+
# cannot mount using driver overlay in rootless mode. You need to run it in a `buildah unshare` session
|
44
|
+
buildah unshare ./build.sh
|
41
45
|
|
42
46
|
# Sign the output
|
43
47
|
gpg --armor --detach-sign pkg/vagrant-sshfs-1.2.0.gem
|
data/Rakefile
CHANGED
@@ -7,9 +7,6 @@
|
|
7
7
|
#
|
8
8
|
require 'bundler/gem_tasks'
|
9
9
|
|
10
|
-
# cucumber/rake/task provides us with an easy way to call cucumber
|
11
|
-
require 'cucumber/rake/task'
|
12
|
-
|
13
10
|
# rake/clean provides CLEAN/CLOBBER
|
14
11
|
# http://www.virtuouscode.com/2014/04/28/rake-part-6-clean-and-clobber/
|
15
12
|
# CLEAN - list to let rake know what files can be cleaned up after build
|
@@ -29,10 +26,3 @@ CLOBBER.include('pkg')
|
|
29
26
|
task :init do
|
30
27
|
FileUtils.mkdir_p 'build'
|
31
28
|
end
|
32
|
-
|
33
|
-
# Create new Cucumber::Rake::Task that will run Cucumber tests
|
34
|
-
Cucumber::Rake::Task.new(:featuretests)
|
35
|
-
|
36
|
-
# Define Rake::Task dependency - run :init before :featuretests
|
37
|
-
task :featuretests => :init
|
38
|
-
|
data/build.sh
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
set -ex
|
3
|
+
|
4
|
+
ctr=$(buildah from registry.fedoraproject.org/fedora:31)
|
5
|
+
|
6
|
+
rpms=(
|
7
|
+
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
8
|
+
gcc-c++ # for building unf_ext
|
9
|
+
libvirt-devel # for building ruby-libvirt gem
|
10
|
+
zlib-devel # for building nokogiri gem
|
11
|
+
git # for the git ls-files in gemspec file
|
12
|
+
bsdtar # used by vagrant to unpack box files
|
13
|
+
)
|
14
|
+
|
15
|
+
WORKINGDIR='/tmp/workingdir/'
|
16
|
+
|
17
|
+
# Set working directory
|
18
|
+
buildah config --workingdir $WORKINGDIR $ctr
|
19
|
+
|
20
|
+
# Get all updates and install needed rpms
|
21
|
+
buildah run $ctr -- dnf update -y
|
22
|
+
buildah run $ctr -- dnf install -y ${rpms[@]}
|
23
|
+
|
24
|
+
# Add source code
|
25
|
+
buildah add $ctr './' $WORKINGDIR
|
26
|
+
|
27
|
+
# Install bundler
|
28
|
+
buildah run $ctr -- gem install bundler
|
29
|
+
|
30
|
+
# Install all needed gems
|
31
|
+
buildah run $ctr -- bundle install --with plugins
|
32
|
+
|
33
|
+
# Install all needed gems
|
34
|
+
buildah run $ctr -- bundle exec rake build
|
35
|
+
|
36
|
+
# Copy built files outside of container
|
37
|
+
mount=$(buildah mount $ctr)
|
38
|
+
package=$(ls $mount/$WORKINGDIR/pkg/vagrant-sshfs-*gem)
|
39
|
+
echo "copying to ./$(basename $package)"
|
40
|
+
cp $package ./
|
41
|
+
buildah umount $ctr
|
42
|
+
|
43
|
+
echo "Built package is at ./$(basename $package)"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module GuestAlpine
|
3
|
+
module Cap
|
4
|
+
class SSHFSClient
|
5
|
+
def self.sshfs_install(machine)
|
6
|
+
# Install sshfs
|
7
|
+
machine.communicate.sudo("apk add sshfs")
|
8
|
+
# Load the fuse module
|
9
|
+
machine.communicate.sudo("modprobe fuse")
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.sshfs_installed(machine)
|
13
|
+
installed = machine.communicate.test("apk -e info sshfs")
|
14
|
+
if installed
|
15
|
+
# fuse may not get loaded at boot, so check if it's loaded otherwise force load it
|
16
|
+
machine.communicate.sudo("lsmod | grep fuse || modprobe fuse")
|
17
|
+
end
|
18
|
+
|
19
|
+
installed
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/vagrant-sshfs/plugin.rb
CHANGED
@@ -127,6 +127,16 @@ module VagrantPlugins
|
|
127
127
|
VagrantPlugins::GuestArch::Cap::SSHFSClient
|
128
128
|
end
|
129
129
|
|
130
|
+
guest_capability("alpine", "sshfs_installed") do
|
131
|
+
require_relative "cap/guest/alpine/sshfs_client"
|
132
|
+
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
|
133
|
+
end
|
134
|
+
|
135
|
+
guest_capability("alpine", "sshfs_install") do
|
136
|
+
require_relative "cap/guest/alpine/sshfs_client"
|
137
|
+
VagrantPlugins::GuestAlpine::Cap::SSHFSClient
|
138
|
+
end
|
139
|
+
|
130
140
|
guest_capability("suse", "sshfs_installed") do
|
131
141
|
require_relative "cap/guest/suse/sshfs_client"
|
132
142
|
VagrantPlugins::GuestSUSE::Cap::SSHFSClient
|
data/test/misc/README.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# This directory is for testing the three different mount modes
|
3
3
|
# that are supported by vagrant-sshfs
|
4
4
|
|
5
|
-
# To test we will first create the directory on the
|
5
|
+
# To test we will first create the directory on the machine where
|
6
6
|
# we will mount the guest /etc/ into the host (the reverse mount).
|
7
7
|
|
8
8
|
mkdir /tmp/reverse_mount_etc
|
data/test/misc/Vagrantfile
CHANGED
@@ -21,8 +21,8 @@ Vagrant.configure(2) do |config|
|
|
21
21
|
# mounting /etc/ from vagrant guest into vagrant host
|
22
22
|
config.vm.synced_folder "/tmp/reverse_mount_etc/", "/etc", type: "sshfs", reverse: true
|
23
23
|
|
24
|
-
host = '
|
25
|
-
box = 'fedora/
|
24
|
+
host = 'sshfs-tests'
|
25
|
+
box = 'fedora/31-cloud-base'
|
26
26
|
|
27
27
|
config.vm.define host do | tmp |
|
28
28
|
tmp.vm.hostname = host
|
data/vagrant-sshfs.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-sshfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dusty Mabe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: win32-process
|
@@ -52,48 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: cucumber
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: aruba
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: komenda
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
55
|
description: "\n A Vagrant synced folder plugin that mounts folders via SSHFS.
|
98
56
|
\n This is the successor to Fabio Kreusch's implementation:\n https://github.com/fabiokr/vagrant-sshfs"
|
99
57
|
email:
|
@@ -108,12 +66,10 @@ files:
|
|
108
66
|
- README.adoc
|
109
67
|
- RELEASE.txt
|
110
68
|
- Rakefile
|
111
|
-
-
|
112
|
-
- features/sshfs_cwd_mount.feature
|
113
|
-
- features/step_definitions/sshfs_cwd_mount_steps.rb
|
114
|
-
- features/support/env.rb
|
69
|
+
- build.sh
|
115
70
|
- lib/vagrant-sshfs.rb
|
116
71
|
- lib/vagrant-sshfs/action_hostpath_fixup.rb
|
72
|
+
- lib/vagrant-sshfs/cap/guest/alpine/sshfs_client.rb
|
117
73
|
- lib/vagrant-sshfs/cap/guest/arch/sshfs_client.rb
|
118
74
|
- lib/vagrant-sshfs/cap/guest/debian/sshfs_client.rb
|
119
75
|
- lib/vagrant-sshfs/cap/guest/fedora/sshfs_client.rb
|
@@ -134,13 +90,9 @@ files:
|
|
134
90
|
- lib/vagrant-sshfs/synced_folder/sshfs_reverse_mount.rb
|
135
91
|
- lib/vagrant-sshfs/version.rb
|
136
92
|
- locales/synced_folder_sshfs.yml
|
137
|
-
- test/libvirt/README.txt
|
138
|
-
- test/libvirt/Vagrantfile
|
139
93
|
- test/misc/README.txt
|
140
94
|
- test/misc/Vagrantfile
|
141
95
|
- test/misc/dotests.sh
|
142
|
-
- test/virtualbox/README.txt
|
143
|
-
- test/virtualbox/Vagrantfile
|
144
96
|
- vagrant-sshfs.gemspec
|
145
97
|
homepage: https://github.com/dustymabe/vagrant-sshfs
|
146
98
|
licenses:
|
@@ -161,21 +113,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
113
|
- !ruby/object:Gem::Version
|
162
114
|
version: '0'
|
163
115
|
requirements: []
|
164
|
-
|
165
|
-
rubygems_version: 2.6.14.1
|
116
|
+
rubygems_version: 3.0.3
|
166
117
|
signing_key:
|
167
118
|
specification_version: 4
|
168
119
|
summary: 'A Vagrant synced folder plugin that mounts folders via SSHFS. This is the
|
169
120
|
successor to Fabio Kreusch''s implementation: https://github.com/fabiokr/vagrant-sshfs'
|
170
121
|
test_files:
|
171
|
-
- features/README.md
|
172
|
-
- features/sshfs_cwd_mount.feature
|
173
|
-
- features/step_definitions/sshfs_cwd_mount_steps.rb
|
174
|
-
- features/support/env.rb
|
175
|
-
- test/libvirt/README.txt
|
176
|
-
- test/libvirt/Vagrantfile
|
177
122
|
- test/misc/README.txt
|
178
123
|
- test/misc/Vagrantfile
|
179
124
|
- test/misc/dotests.sh
|
180
|
-
- test/virtualbox/README.txt
|
181
|
-
- test/virtualbox/Vagrantfile
|
data/features/README.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
|
2
|
-
We are using Cucumber for automated testing. Read more at the
|
3
|
-
following two links:
|
4
|
-
|
5
|
-
- [link1](https://en.wikipedia.org/wiki/Cucumber_(software))
|
6
|
-
- [link2](http://www.methodsandtools.com/tools/cucumber.php)
|
7
|
-
|
8
|
-
features/
|
9
|
-
This is the features directory. The features directory Contains
|
10
|
-
feature files, which all have a .feature extension. May contain
|
11
|
-
subdirectories to organize feature files.
|
12
|
-
|
13
|
-
features/step_definitions
|
14
|
-
This directory contains step definition files, which are Ruby code
|
15
|
-
and have a .rb extension.
|
16
|
-
|
17
|
-
features/support
|
18
|
-
This directory contains supporting Ruby code. Files in support
|
19
|
-
load before those in step_definitions, which makes it useful for
|
20
|
-
such things as environment configuration (commonly done in a file
|
21
|
-
called env.rb).
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# The language in this file is Gherkin. It is the language Cucumber
|
2
|
-
# uses to define test cases and is designed to be non-technical and
|
3
|
-
# human readable. All Gherkin files have a .feature extension
|
4
|
-
#
|
5
|
-
# See more here: https://en.wikipedia.org/wiki/Cucumber_(software)
|
6
|
-
#
|
7
|
-
# Additionally in the setup/env.rb file we set up Aruba. Aruba is used
|
8
|
-
# to define most of the basic step definitions that we use as part of
|
9
|
-
# the Gherkin syntax in this file.
|
10
|
-
#
|
11
|
-
# For more information on the step definitions provided see:
|
12
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/testing_frameworks/cucumber/steps
|
13
|
-
#
|
14
|
-
Feature: SSHFS mount of vagrant current working directory
|
15
|
-
|
16
|
-
Scenario Outline: SSHFS mounting of vagrant cwd
|
17
|
-
Given a file named "Vagrantfile" with:
|
18
|
-
"""
|
19
|
-
Vagrant.configure('2') do |config|
|
20
|
-
config.vm.box = '<box>'
|
21
|
-
# Disable the default rsync
|
22
|
-
config.vm.synced_folder '.', '/vagrant', disabled: true
|
23
|
-
|
24
|
-
# If using libvirt and nested virt (vagrant in vagrant) then
|
25
|
-
# we need to use a different network than 192.168.121.0
|
26
|
-
config.vm.provider :libvirt do |libvirt|
|
27
|
-
libvirt.management_network_name = 'vagrant-libvirt-test'
|
28
|
-
libvirt.management_network_address = '192.168.129.0/24'
|
29
|
-
end
|
30
|
-
|
31
|
-
# Mount up the current dir. It will have the Vagrantfile in there.
|
32
|
-
config.vm.synced_folder './', '/testdir', type: 'sshfs'
|
33
|
-
end
|
34
|
-
"""
|
35
|
-
When I successfully run `bundle exec vagrant up`
|
36
|
-
Then stdout from "bundle exec vagrant up" should contain "Installing SSHFS client..."
|
37
|
-
And stdout from "bundle exec vagrant up" should contain "Mounting SSHFS shared folder..."
|
38
|
-
And stdout from "bundle exec vagrant up" should contain "Folder Successfully Mounted!"
|
39
|
-
# The code for the following test is in ./step_definitions/sshfs_cwd_mount_steps.rb
|
40
|
-
And vagrant current working directory should be mounted
|
41
|
-
|
42
|
-
Examples:
|
43
|
-
| box |
|
44
|
-
| centos/7 |
|
45
|
-
|
46
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# This is a cucumber step definition. Cucumber scenarios become automated
|
2
|
-
# tests with the addition of what are called step definitions. A step
|
3
|
-
# definition is a block of code associated with one or more steps by a
|
4
|
-
# regular expression (or, in simple cases, a string).
|
5
|
-
#
|
6
|
-
# This is the step definition for the `And vagrant current working
|
7
|
-
# directory should be mounted` step from sshfs_cwd_mount.feature
|
8
|
-
#
|
9
|
-
And(/^vagrant current working directory should be mounted$/) do
|
10
|
-
run("vagrant ssh -c 'ls /testdir/Vagrantfile'")
|
11
|
-
expect(last_command_started).to have_exit_status(0)
|
12
|
-
end
|
data/features/support/env.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# This is a support file for the cucumber tests. This file sets up the
|
2
|
-
# environment for the tests to run. At this point mainly that means
|
3
|
-
# configuring Aruba. Aruba is used to define most of the basic step
|
4
|
-
# definitions that we use as part of the Gherkin syntax in our .feature files.
|
5
|
-
#
|
6
|
-
# For more information on the step definitions provided see:
|
7
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/testing_frameworks/cucumber/steps
|
8
|
-
require 'aruba/cucumber'
|
9
|
-
require 'komenda' # use komenda for easily executing a command
|
10
|
-
|
11
|
-
# Configure aruba. The options can be inferred from here:
|
12
|
-
# https://github.com/cucumber/aruba/tree/bb5d7ff71809b5461e29153ded793d2b9a3a0624/features/configuration
|
13
|
-
Aruba.configure do |config|
|
14
|
-
# Wait up to 300 seconds for the test to run
|
15
|
-
config.exit_timeout = 300
|
16
|
-
# Output stdout and stderr on test failure
|
17
|
-
config.activate_announcer_on_command_failure = [:stdout, :stderr]
|
18
|
-
# The directory where the tests are to be run
|
19
|
-
config.working_directory = 'build/aruba'
|
20
|
-
end
|
21
|
-
|
22
|
-
# After running tests, clean up
|
23
|
-
After do |_scenario|
|
24
|
-
if File.exist?(File.join(aruba.config.working_directory, 'Vagrantfile'))
|
25
|
-
Komenda.run('bundle exec vagrant destroy -f', cwd: aruba.config.working_directory, fail_on_fail: true)
|
26
|
-
end
|
27
|
-
end
|
data/test/libvirt/README.txt
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
To bring up vagrant host:
|
3
|
-
|
4
|
-
vagrant up
|
5
|
-
|
6
|
-
To run tests:
|
7
|
-
|
8
|
-
vagrant ssh
|
9
|
-
|
10
|
-
and then:
|
11
|
-
|
12
|
-
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
|
13
|
-
gem install bundler # see [2]
|
14
|
-
bundle install --with plugins # see [1]
|
15
|
-
bundle exec rake featuretests
|
16
|
-
|
17
|
-
[1] when running with bundler 1.13.2 I had to comment out
|
18
|
-
the vagrant-sshfs line in Gemfile because it errored out
|
19
|
-
complaining about it being defined twice. Running with
|
20
|
-
1.12.5 works fine.
|
21
|
-
[2] because of [1] need to use this instead:
|
22
|
-
gem install bundler --version 1.12.5
|
23
|
-
|
data/test/libvirt/Vagrantfile
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
Vagrant.configure(2) do |config|
|
4
|
-
|
5
|
-
config.ssh.insert_key = 'true'
|
6
|
-
config.vm.synced_folder "/guests/sharedfolder", "/sharedfolder", type: "sshfs"
|
7
|
-
|
8
|
-
config.vm.provider :libvirt do |domain|
|
9
|
-
domain.memory = 4096
|
10
|
-
domain.cpus = 4
|
11
|
-
domain.nested = true
|
12
|
-
end
|
13
|
-
|
14
|
-
host = 'viv-libvirt' # vagrant in vagrant - to test libvirt
|
15
|
-
box = 'fedora/25-cloud-base'
|
16
|
-
|
17
|
-
config.vm.define host do | tmp |
|
18
|
-
tmp.vm.hostname = host
|
19
|
-
tmp.vm.box = box
|
20
|
-
end
|
21
|
-
config.vm.provision "shell", inline: <<-SHELL
|
22
|
-
rpms=(
|
23
|
-
libvirt-daemon-kvm # for vagrant libvirt support
|
24
|
-
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
25
|
-
gcc-c++ # for building unf_ext
|
26
|
-
libvirt-devel # for building ruby-libvirt gem
|
27
|
-
zlib-devel # for building nokogiri gem
|
28
|
-
git # for the git ls-files in gemspec file
|
29
|
-
bsdtar # used by vagrant to unpack box files
|
30
|
-
)
|
31
|
-
dnf install -y ${rpms[@]}
|
32
|
-
usermod -a -G libvirt vagrant
|
33
|
-
systemctl start libvirtd virtlogd
|
34
|
-
SHELL
|
35
|
-
end
|
data/test/virtualbox/README.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# XXX Note this is not working right now as nested virt. I keep
|
2
|
-
# getting kernel tracebacks on Fedora 24.
|
3
|
-
|
4
|
-
To bring up vagrant host:
|
5
|
-
|
6
|
-
vagrant up
|
7
|
-
|
8
|
-
To run tests:
|
9
|
-
|
10
|
-
vagrant ssh
|
11
|
-
|
12
|
-
and then:
|
13
|
-
|
14
|
-
cd /sharedfolder/code/github.com/dustymabe/vagrant-sshfs/
|
15
|
-
gem install bundler # see [2]
|
16
|
-
bundle install --with plugins # see [1]
|
17
|
-
bundle exec rake featuretests
|
18
|
-
|
19
|
-
[1] when running with bundler 1.13.2 I had to comment out
|
20
|
-
the vagrant-sshfs line in Gemfile because it errored out
|
21
|
-
complaining about it being defined twice. Running with
|
22
|
-
1.12.5 works fine.
|
23
|
-
[2] because of [1] need to use this instead:
|
24
|
-
gem install bundler --version 1.12.5
|
25
|
-
|
data/test/virtualbox/Vagrantfile
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
#
|
4
|
-
# XXX Note this is not working right now as nested virt. I keep
|
5
|
-
# getting kernel tracebacks on Fedora 24.
|
6
|
-
#
|
7
|
-
Vagrant.configure(2) do |config|
|
8
|
-
|
9
|
-
config.ssh.insert_key = 'true'
|
10
|
-
config.vm.synced_folder "/guests/sharedfolder", "/sharedfolder", type: "sshfs"
|
11
|
-
|
12
|
-
config.vm.provider :libvirt do |domain|
|
13
|
-
domain.memory = 4096
|
14
|
-
domain.cpus = 4
|
15
|
-
domain.nested = true
|
16
|
-
end
|
17
|
-
|
18
|
-
host = 'viv-virtbox' # vagrant in vagrant - to test virtbox
|
19
|
-
box = 'fedora/25-cloud-base'
|
20
|
-
|
21
|
-
config.vm.define host do | tmp |
|
22
|
-
tmp.vm.hostname = host
|
23
|
-
tmp.vm.box = box
|
24
|
-
end
|
25
|
-
# Must use VirtualBox-5.0 - 5.1 not supported by Vagrant yet
|
26
|
-
config.vm.provision "shell", inline: <<-SHELL
|
27
|
-
dnf config-manager --add-repo http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
|
28
|
-
rpms=(
|
29
|
-
kernel-devel-$(uname -r) kernel-headers-$(uname -r)
|
30
|
-
gcc make VirtualBox-5.0 # all for virtualbox support
|
31
|
-
make gcc ruby ruby-devel redhat-rpm-config # for building gems
|
32
|
-
gcc-c++ # for building unf_ext
|
33
|
-
libvirt-devel # for building ruby-libvirt gem
|
34
|
-
zlib-devel # for building nokogiri gem
|
35
|
-
git # for the git ls-files in gemspec file
|
36
|
-
bsdtar # used by vagrant to unpack box files
|
37
|
-
)
|
38
|
-
dnf install -y ${rpms[@]}
|
39
|
-
/usr/lib/virtualbox/vboxdrv.sh setup
|
40
|
-
usermod -a -G vboxusers vagrant
|
41
|
-
SHELL
|
42
|
-
end
|