Commit Graph

1103 Commits

Author SHA1 Message Date
Michael Ablassmeier
70bb392241
Support separate storage pools for additional disks (#1130)
Add support for a pool setting for additional disks, example:

Vagrant.configure("2") do |config|
  config.vm.box = "generic/centos8"
    config.vm.provider :libvirt do |domain|
        domain.storage :file, :size => '20G', :pool=>'default'
        domain.snapshot_pool_name='cache'
    end
end

this allows to place the virtual machines snapshot in the "cache" pool,
while additional disks are created in the "default" storage pool.
2020-10-23 14:39:14 +01:00
Darragh Bailey
06e31d3918
Add rudimentary create domain spec test (#1158)
Provide a simple create domain test that uncovered a bug with an
exception in addition to fixing the tests to avoid unnecessary output
when the code sends messages via the UI.
2020-10-23 14:31:29 +01:00
Darragh Bailey
80c81f62f4
Fix release workflow (#1157)
Ensure the release workflow will work consistently by limiting the
number of issues that are checked in addition to making use of a cache.
This should keep the requests below the API limit and overtime may be
increased should the cache be retained.

Add checks to determine the correct default branch and look to establish
if the tag that was created is reachable from this branch, using it as
the value for `commitish` to the create release action so that it
retains the `x commits since release` text and link.

In the case the workflow is re-run for a release after another release
look to pick up the next tag after this release in order to limit the
release notes from updating with additional fixes.
2020-10-23 14:22:35 +01:00
Radix10
8f37a78290
fix typo (#1154) 2020-10-09 09:53:59 +01:00
Darragh Bailey
e5c50de3c2
Limit docker image push (#1152)
Tweak workflow to skip attempting to push the docker image without
credentials additionally modify to allow the dockerhub organization to
be managed via a secret so that forked repos may push locally modified
images to their own dockerhub with a minimum of effort.

Additionally given the way github status checks works, this should allow
maintainers of this project to push the same commit to a local branch in
order to build and publish the image to the org dockerhub repository to
allow testing of the image before merging. Based on having first
reviewed and decided it was safe to allow access to any secrets.

Pushing the PR to a local branch will not result in getting a tag with the
pr<num> as the version, however this is a reasonable starting position.
2020-10-04 12:22:23 +01:00
Darragh Bailey
2f827fa5a3
Update version for release (#1151) 2020-10-03 21:14:00 +01:00
Vít Ondruch
0ecb9cc94f
Use Vagrant::Util::TemplateRenderer instead of Erubis. (#1144)
Erubis is dead upstream, therefore it is good idea to avoid its usage.

Also, this allows to drop explicit dependency on Erubis, which is not
specified anywhere and may cause issues when Vagrant changes its
renderer.

Fixes #1142.
2020-10-03 21:04:59 +01:00
Darragh Bailey
6a9e604e45
Support release notes generation (#1150)
Add github actions to automatically populate release notes on tag push.
This should make it easier to show what new functionality/improvements
have been added by populating the release page based on PRs and issues.
2020-10-03 20:52:31 +01:00
Darragh Bailey
d4d82d9773
Add docker image for vagrant-libvirt (#1149)
Provide a docker image that supports execution of vagrant-libvirt
provided the host system has docker and libvirt installed. This can help
side step many of the library compatibility issues experienced by users
by providing an alternative way to run the latest code should their
distribution not have a natively packaged vagrant.
2020-10-03 17:16:00 +01:00
Darragh Bailey
d7debb68c6
Merge pull request #1123 from cvoltz/wwn
Add WWN support
2020-08-16 19:49:15 +01:00
Darragh Bailey
162eb7f8a7
config: allow for setting URI from environment (#1141)
Users are allowed to set a LIBVIRT_DEFAULT_URI environment variable that
controls tools (i.e. virsh, virt-install, etc) that communicate with
libvirt. Let's allow for that mechanism to be used here.
2020-08-16 16:45:01 +01:00
Dusty Mabe
41bcae26e4 config: allow for setting URI from environment
Users are allowed to set a LIBVIRT_DEFAULT_URI environment variable that
controls tools (i.e. virsh, virt-install, etc) that communicate with
libvirt. Let's allow for that mechanism to be used here.
2020-08-16 16:37:57 +01:00
Darragh Bailey
d16bdcc1dc
Add @uri config tests and minor refactor (#1139)
Test settings modifying the `@uri` and `@qemu_use_session` variables to make
it easier to update and perform an initial minor refactor to reduce some
of the code currently in use to set `@uri`.
2020-08-16 16:27:27 +01:00
Darragh Bailey
4cff77e1c7
Limit CI jobs to a subset of combinations (#1140)
It's time consuming to execute many combinations of vagrant releases
along with versions of ruby. Limit to the most likely combinations.
2020-08-16 16:18:49 +01:00
Darragh Bailey
74c381a30d
Update test syntax to remove stubs (#1138)
Use of stubs are deprecated, switch to the newer expect/allow syntax.
2020-08-16 16:06:05 +01:00
Darragh Bailey
dda5d4e1c4
Merge pull request #1137 from rgl/add-domain-title-and-description
let the user set the domain title and description
2020-08-13 14:52:06 +01:00
Rui Lopes
19cd1d5629 let the user set the domain title and description 2020-08-12 22:06:05 +01:00
Darragh Bailey
18c7803863
Merge pull request #1134 from eighthave/remove-redundant
remove redundant setting of default volume/backingStore mode
2020-07-22 16:44:04 +01:00
Hans-Christoph Steiner
8b712b7715 remove redundant setting of default volume/backingStore mode
According to the docs, for volumes and backingStores: "The mode defaults to
0600 when not provided.  https://libvirt.org/formatstorage.html

Removing this setting here allows the pool configuration to set the default
mode.
2020-07-22 13:45:38 +02:00
Christopher Voltz
437fc3f3b0 Add WWN support
Add the disk attribute wwn to set the WWN of a disk drive.

Signed-off-by: christopher@voltz.us
2020-06-14 20:00:15 -05:00
Michael Ablassmeier
5e77446297
add snapshot_pool_name to README (#1114) 2020-06-04 15:19:34 +01:00
Darragh Bailey
30599c6521
Merge pull request #1119 from timhughes/patch-1
update examples to use fedora/32-cloud-base
2020-06-04 15:19:05 +01:00
Darragh Bailey
f1b0c9a460
Merge pull request #1036 from zakame/public_address-provider-capability
Add public_address provider capability
2020-06-04 15:15:39 +01:00
Zak B. Elep
55abd327eb Add public_address provider capability
Used by vagrant-share plugin to determine local guest address for
forwarding via ngrok.
2020-06-04 17:07:40 +08:00
Tim Hughes
2ba06a168f
update examples to use fedora/32-cloud-base
fixes #1070
2020-06-04 01:04:18 +01:00
Darragh Bailey
760a08a6c4
Merge pull request #1037 from zakame/forward_ports-fix-pid-tracking
action/forward_ports.rb: Fix SSH tunnel spawning and PID tracking
2020-05-28 15:41:50 +01:00
Zak B. Elep
9e35ec2b05 action/forward_ports.rb: Fix SSH tunnel spawning and PID tracking
- Explicitly disable any SSH multiplexing here so PID tracking of
  tunnels works correctly.

- Using `exec ssh` in the spawn forces Ruby to use a subshell (as exec
  is a shell builtin) instead of spawning the ssh process directly, which
  results in getting the wrong (and dead, as the exec replaces the
  subshell) PID to track and clean up later.

- Run the ssh tunnel command on its own process group, essentially
  daemonizing it and keeping its PID intact even when `vagrant up` command
  is run on shell/consoles without an explicit TTY, such as Emacs Eshell.
2020-05-28 17:26:50 +08:00
Darragh Bailey
aa7ea05540
Bugfix release 0.1.2 (#1112)
Skipping 0.1.1 as accidentally tagged before bumping version
2020-05-12 10:05:32 +01:00
Darragh Bailey
1c39003fc6
Merge pull request #1111 from AmedeeBulle/issue-1110 2020-05-12 09:34:21 +01:00
Philippe Vanhaesendonck
4472654ba0
prune_nfs_exports: create Logger instance.
Fix #1110

Signed-off-by: Philippe Vanhaesendonck <philippe.vanhaesendonck@e-bulles.be>
2020-05-12 08:33:39 +02:00
Petr Ruzicka
d75c9ffda3
Improve Fedora installation procedure (#1101) 2020-05-10 14:54:56 +01:00
Julio Lajara
f00bc0eaae
Add qemu commandline environment variable support. (#961)
Make it easier to tweak some qemu options by allowing passthru of
command line environment variables.

- Also cleans up weird variable indirection used for qemu commandline args
  variable through `qargs` in various constructors.
- Addresses some functionality discussed in #776.
2020-05-10 14:37:31 +01:00
Darragh Bailey
f5f9e34da0
Tidy up README and TOC (#1108)
Bring the TOC in line with recent additions and enable the ability to
use a vim plugin to quickly regenerate in lieu of a better alternative.

Using https://github.com/mzlogin/vim-markdown-toc

Clean up any trailing whitespace so that subsequent file updates
by other PRs will be able to simply regen using appropriate tooling
without pulling in additional changes unrelated.
2020-05-10 14:23:25 +01:00
ryanfitzsimon
a83900f1ae
Download images with libvirt instead of copying (#928)
Packaging an existing vagrant environment relied on copying the backing
image. Users may not have permission to read this file despite being
able to interact with it through libvirt.

Use ruby-libvirt to download the image instead so any user with libvirt
access can run the package command.
2020-05-10 13:13:56 +01:00
Quinten Johnson
7e966febbd
Allow setting of PCI domain (#927) 2020-05-10 11:40:29 +01:00
Quinten Johnson
618c8b251d
Allow specification of domain shares (#925)
Weighted priority of the domain relative to others on the host.
2020-05-10 11:24:06 +01:00
Quinten Johnson
d9c5f63410
Allow specification of numa nodeset (#924)
This specifies the physical numa nodes on which the virtual memory can be
placed.
2020-05-10 10:52:46 +01:00
Quinten Johnson
60ef4b03d1
Allow specification of cpuset (#923)
Allows the pinning of vcpus to physical cpus.
2020-04-29 19:08:01 +01:00
Darragh Bailey
398258e306
Merge pull request #1102 from abbbi/fix_docs
provide working link to documentation about nested virtualization
2020-04-29 17:04:20 +01:00
Darragh Bailey
47ded9f52e
Make sure to require util/nfs for include (#1103) 2020-04-29 17:03:47 +01:00
Michael Ablassmeier
509671c3a3 provide working link to documentation about nested virtualization 2020-04-29 16:46:56 +02:00
Paul Elliott
bde81a15a2
Remove NFS exports on domain destroy (#781)
Uncomment NFS prune action

If the user has not configured NFS for any of the synced folders, then
it is likely they are not expecting to be asked for a sudo password on
destroy. Move the test for using NFS to a common module and include in
both the preparing and pruning actions.

Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com>
2020-04-28 16:22:34 +01:00
Darragh Bailey
9ea4aee83a
Merge pull request #1079 from ccrebolder/use_fog-libvirt_filters
Use fog-libvirt filters when querying libvirt host
2020-04-27 20:35:18 +01:00
Chris Crebolder
34d933deea Check for empty result from fog-libvirt volumes
The fog-libvirt volumes filter behaves differently than the others in
that it returns an empty volume object if nothing is found. This has the
potential to change in the future so guard against an empty result as
well by checking if the assigned first element is nil.
2020-04-24 21:10:29 +01:00
Chris Crebolder
86aac4ce9c Use fog-libvirt filters when querying libvirt host
This commit replaces the pattern where the metadata for all volumes,
servers, or pools was downloaded and then searched. Instead a filter
argument is passed to the connection and only the metadata for the named
resource is returned, if it exists. This results in significant speed
increases for libvirt hosts that are offsite or have many volumes.
2020-04-24 21:10:29 +01:00
Michael Ablassmeier
304a2a055c
call stale_volume_remove only if configured libvirt pool exists (#1095)
Move message about removing stale volume unless there is one to be
removed.
2020-04-24 19:11:19 +01:00
Darragh Bailey
5e1445f7df
Prep for releasing 0.1.0 (#1093)
Start keeping .1 for bugfixes and make it easier for people to pin locally to accept those without picking up major changes
2020-04-23 18:07:09 +01:00
Darragh Bailey
63f34432ad
Allow dev with latest vagrant to use newer vagrant-spec (#1098)
Latest vagrant depends on a vagrant-spec release containing a more
recent dependency on childprocess than is supported for earlier releases
of vagrant.

Adjust dependencies to pin to the specific release of vagrant-spec if
the request version of vagrant is 2.2.7 or older.

Does not attempt to handle the situation where a version is specified
that cannot be parsed.

While it would be useful to test against newer versions of 2.2.x, it
appears this encounters a bug in upstream vagrant when installing in
dev mode see https://github.com/hashicorp/vagrant#11293
Therefore limit latest 2.2.x released version tested against to 2.2.4.
2020-04-23 09:12:04 +01:00
Darragh Bailey
8cea27fd3e
Defer to Warden to call recover (#984)
Warden will call the recover method when env[:interrupted] is set, so
just return instead and let it walk the stack to perform cleanup. This
ensures that during the WaitTillUp action that the user setting to
disable destroy_on_error is respected should the exception occur during
looking for the IP address or SSH connection.
2020-04-22 09:13:18 +01:00
Darragh Bailey
30ccf3a0ba
Merge pull request #1096 from abbbi/handle_box_image
Fixes issue introduced with #1030
2020-04-21 17:58:28 +01:00