Compare commits

..

73 commits

Author SHA1 Message Date
0cc4a27f32 Update 'README.md' 2023-02-21 10:29:07 +00:00
Fabio
7e885eb8a4
Update README.md 2022-12-05 19:16:19 -03:00
Fabio
39bd2a8704
Update README.md 2022-12-05 19:16:03 -03:00
Fabio
e4cc2f91a4
Update README.md 2022-11-22 18:14:16 -03:00
Fabio
ceb4d98a22
Update README.md 2022-11-22 18:14:02 -03:00
Roman Mohr
a0cdcb05a2 Merge pull request #180 from rmohr/dnf
dnf plugin
2016-11-22 16:10:02 +01:00
Roman Mohr
fad6bbf6a0 Yum is replaced by DNF in newer Fedora releases
Check if yum is really present on a 'redhat' machine.  Only if it is,
enable the Yum bucket. The same for DNF since older versions of CentOS
and Fedora do not ship DNF.
2016-09-26 14:03:23 +02:00
Roman Mohr
5141e1305a Add support for DNF
If the folder `/car/cache/dnf` is present, the content will be cached
like in the Yum plugin.

A possible configuration to enable it:

Vagrant.configure(2) do |config|
   config.vm.box = "fedora/24-cloud-base"
  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :machine
    config.cache.auto_detect = false
    config.cache.enable :dnf
  end
end
2016-09-23 12:10:29 +02:00
Fabio Rehm
959ac6fbcc Update README.md 2016-07-18 23:01:42 -07:00
Fabio Rehm
da0eff6a71 Merge pull request #165 from legal90/parallels
Announce compatibility with Parallels provider
2015-11-20 10:06:56 -02:00
Mikhail Zholobov
c42420ec7c Announce compatibility with Parallels provider 2015-11-19 23:14:37 +02:00
Mehran Kholdi
8615b7495e Merge pull request #154 from BayanGroup/master
Add pip cache bucket
2015-07-28 10:21:39 +04:30
AmirAli Moinfar
6deb452f0d Add documentation for caching pip packages 2015-07-05 14:44:27 +04:30
AmirAli Moinfar
1c3fcd2768 Add support for caching pip packages
These directories are chached for pip packages:
$HOME/.cache/pip/http
$HOME/.cache/pip/wheels
2015-07-05 13:56:18 +04:30
Patrick Connolly
40dddfb368 v1.2.1 2015-07-03 14:51:55 -04:00
Patrick Connolly
dd32f2472e Add chef_zero provisioner support. 2015-06-03 13:45:22 -04:00
Fabio Rehm
3b18f4a5ec Update README.md 2015-05-08 19:50:53 -03:00
Fabio Rehm
2c2411721b Merge pull request #141 from strzibny/fix-spelling
Fix spelling
2015-04-07 08:46:26 -03:00
Josef Stribny
92b95824ba Fix spelling 2015-04-07 09:19:26 +02:00
Fabio Rehm
2bb7f21273 v1.2.0 2015-01-14 23:11:54 -02:00
Fabio Rehm
00e2d858da Merge branch 'vagrant_1-7-1_fix' of https://github.com/Yserz/vagrant-cachier
Conflicts:
	lib/vagrant-cachier/cap/linux/chef_file_cache_path.rb
2015-01-14 23:04:32 -02:00
Fabio Rehm
e227077008 Merge branch 'patch-1' of https://github.com/cassianoleal/vagrant-cachier 2015-01-14 23:03:29 -02:00
Fabio Rehm
050e9ea464 Merge branch 'cache-chef-gems' of https://github.com/jperville/vagrant-cachier 2015-01-14 23:02:34 -02:00
Fabio Rehm
f09af37533 Update bundle 2015-01-14 23:02:15 -02:00
cassiano
c6d4e57554 Do not modify Vagrant core object
Using [Array#keep_if](http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-keep_if) on a Vagrant core object can lead to unpredictable behaviour down the line as it modifies the object instead of creating a new one.

An example of such interference is described on https://github.com/cassianoleal/vagrant-butcher/issues/57. The problem with `keep_if` was identified by @sethvargo on this issue: https://github.com/mitchellh/vagrant/issues/5060#issuecomment-68107995
2014-12-25 18:33:34 +01:00
Michael K
15b0039467 Use provisioner type attribute
Vagrant changed the provisioner name attribute to type in version 1.7.1.
2014-12-22 21:08:56 +01:00
Julien Pervillé
4647721f85 Add support for caching chef gems (in /opt/chef/embedded). 2014-10-29 13:09:22 +06:30
Fabio Rehm
9f6b615e84 v1.1.0 2014-10-15 01:28:54 -03:00
Fabio Rehm
1ccdbbeb48 Move bower docs to buckets dir 2014-10-15 01:25:38 -03:00
Fabio Rehm
21f475212c Update bundle 2014-10-15 01:22:11 -03:00
Fabio Rehm
837003ed48 Merge pull request #125 from slecache/bower
Add support for Bower
2014-10-15 01:16:26 -03:00
Fabio Rehm
babc7e09ff Merge pull request #124 from neerolyte/composer_home_resolution
Resolve $HOME even if VM spits bogus new lines
2014-10-15 01:15:51 -03:00
Sebastien Lecacheur
1fe3e15c64 Fix Bower menu link in the docs 2014-10-07 00:07:19 +02:00
Sébastien LECACHEUR
973d5d1a8f Add support for Bower 2014-10-04 01:34:44 +02:00
David Schoen
e9f4df338a Resolve $HOME even if VM spits bogus new lines
Fixes issue #122
2014-09-28 16:03:51 +10:00
Fabio Rehm
b2b0d98dfa 💣 post install message 2014-09-22 22:24:54 -03:00
Fabio Rehm
1333041059 Bump version to 1.0 along with an update to dev dependencies 2014-09-22 22:22:03 -03:00
Fabio Rehm
7acbc815cf Add link to gitter to readme 2014-08-09 16:21:12 -03:00
Fabio Rehm
137bb91eec Add link to gitter chat on docs 2014-08-09 16:16:44 -03:00
Fabio Rehm
25f5582e20 v0.9.0 2014-08-09 16:07:57 -03:00
Fabio Rehm
25b5fa0285 Merge branch 'use_image_for_bucket_name_with_docker' of https://github.com/jbarbuto/vagrant-cachier 2014-08-09 15:39:12 -03:00
Fabio Rehm
4ab1640e7e Add notice about yum bucket and windows hosts (closes GH-117) 2014-08-09 15:36:22 -03:00
John Barbuto
b7b3bcb3ed Check if image is set with docker provider
If build_dir is set instead for building images on demand, there's no way to
know what to set the bucket name to, except perhaps parsing it from Dockerfile.
2014-07-24 23:25:36 -07:00
John Barbuto
c7c47782cb Use image for bucket name with docker, if box is unset
This allows multiple machines using the image to share the cache
and avoids the following error:

    /Applications/Vagrant/embedded/lib/ruby/2.0.0/pathname.rb:389:in
    `initialize': no implicit conversion of nil into String (TypeError)
2014-07-22 22:54:19 -07:00
Fabio Rehm
d94f08a048 v0.8.0 (aka 1.0.0 release candidate) 2014-07-20 23:02:04 -03:00
Fabio Rehm
1a1b108c23 Disable apt-lists bucket for windows hosts
Fixes GH-106
2014-07-20 22:55:32 -03:00
Fabio Rehm
2b6a07d000 Skip chmod 777 for cache bucket root for smb synced folders
Closes GH-107
2014-07-20 22:14:19 -03:00
Fabio Rehm
f8314aba52 Update CHANGELOG 2014-07-20 21:13:50 -03:00
Fabio Rehm
871f317ba6 Set composer cache bucket ownership to the configured SSH user 2014-07-20 21:13:35 -03:00
Fabio Rehm
44aa6a6c54 Remove unecessary logic to skip parent folder creation when preparing bucket symlinks 2014-07-20 21:12:28 -03:00
Fabio Rehm
c4db3c1ef4 Use $HOME/.composer/cache as the root for the composer bucket
Fixes GH-89
2014-07-20 21:11:20 -03:00
Fabio Rehm
4265f58985 Remove some TODOs that have been around for way too long and havent been an issue for a long time 2014-07-20 20:52:31 -03:00
Fabio Rehm
2b00036484 Update CHANGELOG 2014-07-20 20:36:50 -03:00
Fabio Rehm
82fe74a888 👋 to the deprecated enable_nfs config 2014-07-20 20:36:32 -03:00
Fabio Rehm
5f4a7f1967 Make use of the Vagrantfile configured base box name instead of getting it from the Box object (which might be nil)
Closes GH-86
2014-07-20 20:34:14 -03:00
Fabio Rehm
183b2b55d8 Remove unused locale 2014-07-20 20:28:12 -03:00
Fabio Rehm
2cc7b837db Lets keep this code as it is 2014-07-20 20:15:47 -03:00
Fabio Rehm
2b8a281e8a Whitespace 2014-07-20 20:13:36 -03:00
Fabio Rehm
d885c901b9 Up development version 2014-07-20 20:01:28 -03:00
Fabio Rehm
6bca147fb9 Use vagrant cloud base boxes for sanity checks 2014-07-20 19:59:27 -03:00
Fabio Rehm
228cae4a9a Remove Vagrant.require_plugin from sanity checks 2014-07-20 19:58:57 -03:00
Fabio Rehm
e6826e6864 Update bundle 2014-07-20 19:25:55 -03:00
Fabio Rehm
2c51c7e636 Merge pull request #112 from glensc/patch-1
fix cache path
2014-07-04 10:23:30 -03:00
Elan Ruusamäe
5dbd5511fa fix cache path
the path used seems to be `/tmp/vagrant-cache`. at least in 0.7.2
2014-07-04 15:53:44 +03:00
Fabio Rehm
bbd1e9c901 Make sure people know that synced_folder_opts are optional
I came across a blog post somewhere saying that this was required but I
can't find the link right now.
2014-06-23 18:01:01 -03:00
Fabio Rehm
5598824558 Update compatible providers list 2014-06-23 18:00:32 -03:00
Fabio Rehm
6f275353b8 Update README.md 2014-05-13 21:24:48 -03:00
Fabio Rehm
6e160ba4cb v0.7.2 2014-05-08 10:06:51 -03:00
Fabio Rehm
f545717587 Merge pull request #104 from berendt/add_missing_cloud_providers
added missing cloud providers
2014-05-08 10:06:08 -03:00
Christian Berendt
f65a1217e9 added missing cloud providers 2014-05-07 20:50:06 +02:00
Fabio Rehm
3997e2abc7 v0.7.1 2014-05-04 23:20:28 -03:00
Fabio Rehm
364876d8e9 Update bundle 2014-05-04 23:01:24 -03:00
Gustavo L. de M. Chaves
8ac8d7f6f6 Fix multi generic bucket set up
The previously documented way to specify multiple generic buckets
doesn't work because vagrant-cachier can't enable a bucket type more
than once.

Here we generalize the configs hash that the generic bucket gets making
it possible to specify multiple buckets with a single hash. The
documentation is changed accordingly.

Note that we keep it backwards compatible for single generic bucket
specification.

Issue: https://github.com/fgrehm/vagrant-cachier/issues/99
2014-04-16 09:04:49 -03:00
46 changed files with 611 additions and 123 deletions

View file

@ -1,3 +1,97 @@
## [1.2.1](https://github.com/fgrehm/vagrant-cachier/compare/v1.2.0...v1.2.1) (July 3, 2015)
IMPROVEMENTS:
- Add chef\_zero support to chef bucket [[GH-153]]
[GH-153]: https://github.com/fgrehm/vagrant-cachier/issues/153
## [1.2.0](https://github.com/fgrehm/vagrant-cachier/compare/v1.1.0...v1.2.0) (Jan 14, 2015)
FEATURES:
- [Chef Gems bucket](http://fgrehm.viewdocs.io/vagrant-cachier/buckets/chef_rubygems) [[GH-129]]
[GH-129]: https://github.com/fgrehm/vagrant-cachier/pull/129
BUG FIXES:
- Fix provisioner resolution on Vagrant 1.7+ [[GH-133]] / [[GH-134]]
- Do not modify Vagrant core object, preventing unpredictable behavior [[GH-135]]
[GH-133]: https://github.com/fgrehm/vagrant-cachier/issues/133
[GH-134]: https://github.com/fgrehm/vagrant-cachier/pull/134
[GH-135]: https://github.com/fgrehm/vagrant-cachier/pull/135
## [1.1.0](https://github.com/fgrehm/vagrant-cachier/compare/v1.0.0...v1.1.0) (Oct 15, 2014)
FEATURES:
- [Bower bucket](http://fgrehm.viewdocs.io/vagrant-cachier/buckets/bower) [[GH-125]]
[GH-125]: https://github.com/fgrehm/vagrant-cachier/pull/125
IMPROVEMENTS:
- Resolve $HOME even if VM spits bogus new lines [[GH-122]] / [[GH-124]]
[GH-122]: https://github.com/fgrehm/vagrant-cachier/issues/122
[GH-124]: https://github.com/fgrehm/vagrant-cachier/pull/124
## [1.0.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.9.0...v1.0.0) (Sep 22, 2014)
Public API is considered stable.
## [0.9.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.8.0...v0.9.0) (Aug 9, 2014)
FEATURES:
- Suport for caching packages for Docker containers that doesn't have a base box specified [[GH-116]]
[GH-116]: https://github.com/fgrehm/vagrant-cachier/pull/116
## [0.8.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.7.2...v0.8.0) (Jul 20, 2014)
BACKWARDS INCOMPATIBILITIES:
- Removed deprecated `config.enable_nfs` config.
- Changed composer cache bucket to use `$HOME/.composer/cache` [[GH-89]]
IMPROVEMENTS:
- Set composer cache bucket ownership to the configured SSH user.
BUG FIXES:
- Automatically disable apt-lists bucket when a Windows host is detected [[GH-106]]
- Skip `chmod 777` for `smb` mounted folders [[GH-107]]
- Do not error if base box has been removed and `:box` is configured as the cache scope [[GH-86]]
[GH-86]: https://github.com/fgrehm/vagrant-cachier/issues/86
[GH-89]: https://github.com/fgrehm/vagrant-cachier/issues/89
[GH-106]: https://github.com/fgrehm/vagrant-cachier/issues/106
[GH-107]: https://github.com/fgrehm/vagrant-cachier/issues/107
## [0.7.2](https://github.com/fgrehm/vagrant-cachier/compare/v0.7.1...v0.7.2) (May 08, 2014)
IMPROVEMENTS:
- Add `azure`, `brightbox`, `cloudstack`, `vcloud` and `vsphere` to the list
of known cloud providers [[GH-104]]
[GH-104]: https://github.com/fgrehm/vagrant-cachier/pull/104
## [0.7.1](https://github.com/fgrehm/vagrant-cachier/compare/v0.7.0...v0.7.1) (May 04, 2014)
BUG FIXES:
- Fix support for using multiple generic buckets [[GH-101]]
[GH-101]: https://github.com/fgrehm/vagrant-cachier/pull/101
## [0.7.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.6.0...v0.7.0) (Apr 06, 2014)
FEATURES:

View file

@ -1,14 +1,13 @@
source 'https://rubygems.org'
group :development do
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.5.2'
gem 'vagrant', github: 'mitchellh/vagrant', tag: 'v1.7.2'
gem 'rake'
end
group :plugins do
gemspec
gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
gem 'vagrant-global-status', github: 'fgrehm/vagrant-global-status'
gem 'vagrant-lxc', github: 'fgrehm/vagrant-lxc'
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
gem 'vagrant-omnibus'
end

View file

@ -1,14 +1,8 @@
GIT
remote: git://github.com/fgrehm/vagrant-global-status.git
revision: 6a93c79c7595b76392a2b559674985eabc004aa8
specs:
vagrant-global-status (0.1.5.dev)
GIT
remote: git://github.com/fgrehm/vagrant-lxc.git
revision: 47cf361b983d71108619ce5f379ef0fe3358a6a8
revision: c9cd671a32f730fff4b6e4fdd3687a531af0663c
specs:
vagrant-lxc (1.0.0.alpha.2.dev)
vagrant-lxc (1.1.0)
GIT
remote: git://github.com/fgrehm/vagrant-pristine.git
@ -18,53 +12,108 @@ GIT
GIT
remote: git://github.com/mitchellh/vagrant.git
revision: 5b360d0990f0f6fb286dadf65581c345c55d3b32
tag: v1.5.2
revision: 1cd667b243f4a263cd5322b6455165cc676b6f7f
tag: v1.7.2
specs:
vagrant (1.5.2)
bundler (~> 1.5.2)
vagrant (1.7.2)
bundler (>= 1.5.2, < 1.8.0)
childprocess (~> 0.5.0)
erubis (~> 2.7.0)
hashicorp-checkpoint (~> 0.1.1)
i18n (~> 0.6.0)
listen (~> 2.4.0)
listen (~> 2.8.0)
log4r (~> 1.1.9, < 1.1.11)
net-scp (~> 1.1.0)
net-ssh (>= 2.6.6, < 2.8.0)
net-sftp (~> 2.1)
net-ssh (>= 2.6.6, < 2.10.0)
nokogiri (= 1.6.3.1)
rb-kqueue (~> 0.2.0)
rest-client (>= 1.6.0, < 2.0)
wdm (~> 0.1.0)
winrm (~> 1.1.3)
PATH
remote: .
specs:
vagrant-cachier (0.7.0)
GEM
remote: https://rubygems.org/
specs:
celluloid (0.15.2)
timers (~> 1.1.0)
childprocess (0.5.2)
akami (1.2.2)
gyoku (>= 0.4.0)
nokogiri
builder (3.2.2)
celluloid (0.16.0)
timers (~> 4.0.0)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
erubis (2.7.0)
ffi (1.9.3)
i18n (0.6.9)
listen (2.4.1)
ffi (1.9.6)
gssapi (1.0.3)
ffi (>= 1.0.1)
gyoku (1.2.2)
builder (>= 2.1.2)
hashicorp-checkpoint (0.1.4)
hitimes (1.2.2)
httpclient (2.6.0.1)
httpi (0.9.7)
rack
i18n (0.6.11)
listen (2.8.5)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
little-plugger (1.1.3)
log4r (1.1.10)
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.8.4)
mime-types (2.4.3)
mini_portile (0.6.0)
multi_json (1.10.1)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.7.0)
rake (10.2.2)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.9.2)
netrc (0.10.2)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
nori (1.1.5)
rack (1.6.0)
rake (10.4.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rb-kqueue (0.2.2)
rb-kqueue (0.2.3)
ffi (>= 0.5.0)
timers (1.1.0)
vagrant-omnibus (1.3.1)
rest-client (1.7.2)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rubyntlm (0.1.1)
savon (0.9.5)
akami (~> 1.0)
builder (>= 2.1.2)
gyoku (>= 0.4.0)
httpi (~> 0.9)
nokogiri (>= 1.4.0)
nori (~> 1.0)
wasabi (~> 1.0)
timers (4.0.1)
hitimes
uuidtools (2.1.5)
vagrant-omnibus (1.4.1)
wasabi (1.0.0)
nokogiri (>= 1.4.0)
wdm (0.1.0)
winrm (1.1.3)
gssapi (~> 1.0.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (~> 1.6, >= 1.6.1)
nokogiri (~> 1.5)
rubyntlm (~> 0.1.1)
savon (= 0.9.5)
uuidtools (~> 2.1.2)
PLATFORMS
ruby
@ -73,7 +122,9 @@ DEPENDENCIES
rake
vagrant!
vagrant-cachier!
vagrant-global-status!
vagrant-lxc!
vagrant-omnibus
vagrant-pristine!
BUNDLED WITH
1.10.4

View file

@ -1,14 +1,19 @@
🟢 We plan to support and maintain vagrant-lxc, as well as clean it up.<br/>
🟢 Please feel free to contribute Issues and pull requests.<br/>
🟢 P.S: Thanks [Fabio Rehm](https://fabiorehm.com) for the amazing initial project.
--------
# vagrant-cachier
[![Gem Version](https://badge.fury.io/rb/vagrant-cachier.png)](http://badge.fury.io/rb/vagrant-cachier) [![Gittip](http://img.shields.io/gittip/fgrehm.svg)](https://www.gittip.com/fgrehm/)
[![Gem Version](https://badge.fury.io/rb/vagrant-cachier.png)](http://badge.fury.io/rb/vagrant-cachier) [![Gitter chat](https://badges.gitter.im/fgrehm/vagrant-cachier.png)](https://gitter.im/fgrehm/vagrant-cachier)
A [Vagrant](http://www.vagrantup.com/) plugin that helps you reduce the amount of
coffee you drink while waiting for boxes to be provisioned by sharing a common
package cache among similiar VM instances. Kinda like [vagrant-apt_cache](https://github.com/avit/vagrant-apt_cache)
or [this magical snippet](http://gist.github.com/juanje/3797297) but targetting
package cache among similar VM instances. Kinda like [vagrant-apt_cache](https://github.com/avit/vagrant-apt_cache)
or [this magical snippet](http://gist.github.com/juanje/3797297) but targeting
multiple package managers and Linux distros.
## Installation
Make sure you have Vagrant 1.4+ and run:
@ -27,9 +32,9 @@ Vagrant.configure("2") do |config|
# More info on http://fgrehm.viewdocs.io/vagrant-cachier/usage
config.cache.scope = :box
# If you are using VirtualBox, you might want to use that to enable NFS for
# shared folders. This is also very useful for vagrant-libvirt if you want
# bi-directional sync
# OPTIONAL: If you are using VirtualBox, you might want to use that to enable
# NFS for shared folders. This is also very useful for vagrant-libvirt if you
# want bi-directional sync
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the
@ -49,12 +54,14 @@ http://fgrehm.viewdocs.io/vagrant-cachier.
## Providers that are known to work
* Vagrant's built in VirtualBox provider
* Vagrant's built in VirtualBox and Docker providers
* [vagrant-lxc](https://github.com/fgrehm/vagrant-lxc)
* [VMware providers](http://www.vagrantup.com/vmware) with NFS enabled (See
[GH-24](https://github.com/fgrehm/vagrant-cachier/issues/24) for more info)
* [docker-provider](https://github.com/fgrehm/docker-provider)
* _[Let me know if it is compatible with other providers!](https://github.com/fgrehm/vagrant-cachier/issues/new)_
* [vagrant-parallels](https://github.com/Parallels/vagrant-parallels)
* [vagrant-libvirt](https://github.com/pradels/vagrant-libvirt)
* [vagrant-kvm](https://github.com/adrahon/vagrant-kvm)
* _[Let us know if it is compatible with other providers!](https://github.com/fgrehm/vagrant-cachier/issues/new)_
_Please note that as of v0.6.0 the plugin will automatically disable any
previously defined configs for [cloud providers](lib/vagrant-cachier/plugin.rb#L19-22)_

View file

@ -16,3 +16,12 @@ Vagrant.configure("2") do |config|
config.cache.enable :apt_lists
end
```
## Heads up!
This bucket is automatically disabled for Windows hosts, please have a look at
the following issues for more information:
* https://github.com/fgrehm/vagrant-cachier/issues/106
* https://github.com/fgrehm/vagrant-cachier/issues/109
* https://github.com/fgrehm/vagrant-cachier/issues/113

13
docs/buckets/bower.md Normal file
View file

@ -0,0 +1,13 @@
# [Bower](http://bower.io/)
Compatible with probably any type of linux guest distro, will cache guests'
`$HOME/.cache/bower` if bower is detected.
To manually enable it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-bower-installed'
config.cache.enable :bower
end
```

View file

@ -0,0 +1,18 @@
# Chef RubyGems
When a Chef installation is detected, this bucket caches its embedded gems.
Most of these gems are part of the Chef omnibus package but sometimes cookbooks
need to install extra gems to run within the context of a Chef recipe using the
`chef_gem` resource.
The embedded Chef gem location is returned by running the
`/opt/chef/embedded/bin/gem env gemdir` command.
To manually enable it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-using-chef-provisioner'
config.cache.enable :chef_gem
end
```

View file

@ -1,7 +1,7 @@
# [Composer](http://getcomposer.org/)
Compatible with probably any type of linux guest distro, will cache guests'
`$HOME/.composer` if PHP is detected.
`$HOME/.composer/cache` if PHP is detected.
To manually enable it:

20
docs/buckets/dnf.md Normal file
View file

@ -0,0 +1,20 @@
# DNF
Used by Fedora guests, will get configured under guest's `/var/cache/dnf`. It will
also [make sure](lib/vagrant-cachier/bucket/dnf.rb#L20) that `keepcache` is set to
`1` on guest's `/etc/dnf/dnf.conf`.
To manually enable it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-fedora-box'
config.cache.enable :dnf
end
```
### :warning: Notice about Windows hosts :warning:
In case this bucket is enabled and a Windows host is in use, you might see an
ugly stacktrace as described on [this comment](https://github.com/fgrehm/vagrant-cachier/issues/117#issuecomment-50548393)
if some DNF repository is not available during provisioning.

View file

@ -10,20 +10,22 @@ end
```
The `:cache_dir` parameter is required. It specifies the directory on the guest
that will be cached under the "generic" bucket.
that will be cached under the "/tmp/vagrant-cache/generic" bucket.
You may enable more than one generic bucket by giving them different names via
the `:name` parameter, like this:
You may enable more than one generic bucket by giving them different names,
like this:
```ruby
Vagrant.configure("2") do |config|
config.cache.enable :generic, { name: "one", cache_dir: "/var/cache/one" }
config.cache.enable :generic, { name: "two", cache_dir: "/var/cache/two" }
config.cache.enable :generic, {
"one" => { cache_dir: "/var/cache/one" },
"two" => { cache_dir: "/var/cache/two" },
}
end
```
In this case you get two buckets called "generic-one" and "generic-two" under guest's
`/tmp/vagrant-cache`.
In this case you get two buckets called "one" and "two" under the guest's
`/tmp/vagrant-cache` directory.
The Generic bucket is useful if you want to implement a caching mechanism by
hand. For instance, if you want to cache your wget downloads under
@ -31,7 +33,9 @@ hand. For instance, if you want to cache your wget downloads under
```ruby
Vagrant.configure("2") do |config|
config.cache.enable :generic, { name: "wget", cache_dir: "/var/cache/wget" }
config.cache.enable :generic, {
"wget" => { cache_dir: "/var/cache/wget" },
}
end
```

15
docs/buckets/pip.md Normal file
View file

@ -0,0 +1,15 @@
# [pip](https://pip.pypa.io/)
Compatible with probably any type of linux guest distro, will hook into pip's
http and wheels cache directory under `$HOME/.cache/pip/http` and `$HOME/.cache/pip/wheels` as
the default SSH user (usually `vagrant`) on your guest.
To manually enable it:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-pip-installed'
config.cache.enable :pip
end
```

View file

@ -12,3 +12,9 @@ Vagrant.configure("2") do |config|
config.cache.enable :yum
end
```
### :warning: Notice about Windows hosts :warning:
In case this bucket is enabled and a Windows host is in use, you might see an
ugly stacktrace as described on [this comment](https://github.com/fgrehm/vagrant-cachier/issues/117#issuecomment-50548393)
if some Yum repository is not available during provisioning.

View file

@ -11,7 +11,7 @@ Regarding configurations, right now the plugin does not make any assumptions for
you and you have to configure things properly from your `Vagrantfile`. In other
words, _the plugin is disabled by default_.
Cache buckets will always be available from `/tmp/vagrant-cachier` on your guest and
Cache buckets will always be available from `/tmp/vagrant-cache` on your guest and
the appropriate folders will get symlinked to the right path _after_ the machine is
up but _right before_ it gets provisioned. We _could_ potentially do it on one go
and share bucket's folders directly to the right path if we were only using VirtualBox

View file

@ -28,9 +28,9 @@ Vagrant.configure("2") do |config|
# More info on the "Usage" link above
config.cache.scope = :box
# If you are using VirtualBox, you might want to use that to enable NFS for
# shared folders. This is also very useful for vagrant-libvirt if you want
# bi-directional sync
# OPTIONAL: If you are using VirtualBox, you might want to use that to enable
# NFS for shared folders. This is also very useful for vagrant-libvirt if you
# want bi-directional sync
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the

View file

@ -87,18 +87,25 @@
<li><a tabindex="-1" href="buckets/apt-lists">apt-lists</a></li>
<li><a tabindex="-1" href="buckets/apt-cacher">apt-cacher</a></li>
<li><a tabindex="-1" href="buckets/chef">Chef</a></li>
<li><a tabindex="-1" href="buckets/chef_rubygems">Chef Gems</a></li>
<li><a tabindex="-1" href="buckets/composer">Composer</a></li>
<li><a tabindex="-1" href="buckets/dnf">DNF</a></li>
<li><a tabindex="-1" href="buckets/bower">Bower</a></li>
<li><a tabindex="-1" href="buckets/pacman">Pacman</a></li>
<li><a tabindex="-1" href="buckets/npm">npm</a></li>
<li><a tabindex="-1" href="buckets/rubygems">RubyGems</a></li>
<li><a tabindex="-1" href="buckets/rvm">rvm</a></li>
<li><a tabindex="-1" href="buckets/yum">Yum</a></li>
<li><a tabindex="-1" href="buckets/zypper">Zypper</a></li>
<li><a tabindex="-1" href="buckets/pip">pip</a></li>
</ul>
</li>
<li>
<a href="development">Development</a>
</li>
<li>
<li><a href="https://gitter.im/fgrehm/vagrant-cachier" target="_blank">Chat</li>
</li>
</ul>
<ul class="nav navbar-nav navbar-right visible-md visible-lg">

View file

@ -33,13 +33,34 @@ module VagrantPlugins
def cache_root
@cache_root ||= case @env[:machine].config.cache.scope.to_sym
when :box
@env[:home_path].join('cache', @env[:machine].box.name)
@box_name = box_name
# Box is optional with docker provider
if @box_name.nil? && @env[:machine].provider_name.to_sym == :docker
@image_name = image_name
# Use the image name if it's set
if @image_name
bucket_name = @image_name.gsub(':', '-')
else
raise "Cachier plugin only supported with docker provider when image is used"
end
else
bucket_name = @box_name
end
@env[:home_path].join('cache', bucket_name)
when :machine
@env[:machine].data_dir.parent.join('cache')
else
raise "Unknown cache scope: '#{@env[:machine].config.cache.scope}'"
end
end
def box_name
@env[:machine].config.vm.box
end
def image_name
@env[:machine].provider_config.image
end
end
end
end

View file

@ -20,8 +20,13 @@ module VagrantPlugins
end
def chmod_bucket_root(machine)
@logger.info "'chmod'ing bucket root dir to 777..."
machine.communicate.sudo 'mkdir -p /tmp/vagrant-cache && chmod 777 /tmp/vagrant-cache'
machine.communicate.sudo 'mkdir -p /tmp/vagrant-cache'
# https://github.com/fgrehm/vagrant-cachier/issues/107
if ! smb_synced_folder_enabled?(machine)
@logger.info "'chmod'ing bucket root dir to 777..."
machine.communicate.sudo 'chmod 777 /tmp/vagrant-cache'
end
end
def configure_cache_buckets(env)
@ -41,6 +46,20 @@ module VagrantPlugins
data_file = env[:machine].data_dir.join('cache_dirs')
data_file.open('w') { |f| f.print env[:cache_dirs].uniq.join("\n") }
end
def smb_synced_folder_enabled?(machine)
synced_folder_opts = machine.config.cache.synced_folder_opts
synced_folder_opts ||= {}
# If smb was explicitly enabled
if synced_folder_opts[:type] && synced_folder_opts[:type].to_s == 'smb'
return true
elsif machine.provider_name.to_sym == :hyperv
# If the provider in use is hyperv, the default synced folder is 'smb'
# unless specified
return synced_folder_opts[:type] == nil
end
end
end
end
end

View file

@ -43,13 +43,13 @@ module VagrantPlugins
end
# TODO: "merge" symlink and user_symlink methods
def symlink(guest_path, bucket_path = "/tmp/vagrant-cache/#{@name}", create_parent: true)
def symlink(guest_path, bucket_path = "/tmp/vagrant-cache/#{@name}")
return if @env[:cache_dirs].include?(guest_path)
@env[:cache_dirs] << guest_path
comm.execute("mkdir -p #{bucket_path}")
unless symlink?(guest_path)
comm.sudo("mkdir -p `dirname #{guest_path}`") if create_parent
comm.sudo("mkdir -p `dirname #{guest_path}`")
if empty_dir?(bucket_path) && !empty_dir?(guest_path)
# Warm up cache with guest machine data
comm.sudo("shopt -s dotglob && mv #{guest_path}/* #{bucket_path}")
@ -90,12 +90,16 @@ end
require_relative "bucket/apt"
require_relative "bucket/chef"
require_relative "bucket/gem"
require_relative "bucket/chef_gem"
require_relative "bucket/pacman"
require_relative "bucket/yum"
require_relative "bucket/dnf"
require_relative "bucket/rvm"
require_relative "bucket/apt_cacher"
require_relative "bucket/apt_lists"
require_relative "bucket/composer"
require_relative "bucket/bower"
require_relative "bucket/npm"
require_relative "bucket/zypper"
require_relative "bucket/generic"
require_relative "bucket/pip"

View file

@ -7,6 +7,10 @@ module VagrantPlugins
end
def install
# Apt lists bucket can't be used on windows hosts
# https://github.com/fgrehm/vagrant-cachier/issues/106
return if Vagrant::Util::Platform.windows?
if guest.capability?(:apt_lists_dir)
guest_path = guest.capability(:apt_lists_dir)

View file

@ -0,0 +1,21 @@
module VagrantPlugins
module Cachier
class Bucket
class Bower < Bucket
def self.capability
:bower_path
end
def install
if guest.capability?(:bower_path)
if bower_path = guest.capability(:bower_path)
user_symlink(bower_path)
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Bower')
end
end
end
end
end
end

View file

@ -0,0 +1,25 @@
module VagrantPlugins
module Cachier
class Bucket
class ChefGem < Bucket
def self.capability
:chef_gemdir
end
def install
if guest.capability?(:chef_gemdir)
if gemdir_path = guest.capability(:chef_gemdir)
prefix = gemdir_path.split('/').last
bucket_path = "/tmp/vagrant-cache/#{@name}/#{prefix}"
gem_cache_path = "#{gemdir_path}/cache"
symlink(gem_cache_path, bucket_path)
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'ChefRubyGems')
end
end
end
end
end
end

View file

@ -9,7 +9,7 @@ module VagrantPlugins
def install
if guest.capability?(:composer_path)
if composer_path = guest.capability(:composer_path)
symlink(composer_path, create_parent: false)
user_symlink(composer_path)
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Composer')

View file

@ -0,0 +1,27 @@
module VagrantPlugins
module Cachier
class Bucket
class Dnf < Bucket
def self.capability
:dnf_cache_dir
end
def install
if guest.capability?(:dnf_cache_dir)
if guest_path = guest.capability(:dnf_cache_dir)
return if @env[:cache_dirs].include?(guest_path)
# Ensure caching is enabled
comm.sudo("sed -i '/keepcache=/d' /etc/dnf/dnf.conf")
comm.sudo("sed -i '/^[main]/a keepcache=1' /etc/dnf/dnf.conf")
symlink(guest_path)
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'DNF')
end
end
end
end
end
end

View file

@ -3,12 +3,22 @@ module VagrantPlugins
class Bucket
class Generic < Bucket
def install
# First we normalize the @configs hash as a hash of hashes
if @configs.has_key?(:cache_dir)
@name = @configs.has_key?(:name) ? "generic-#{@configs[:name]}" : "generic"
symlink(@configs[:cache_dir])
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Generic')
@configs = { @name => @configs }
end
# Now we iterate through all generic buckets's configurations and
# set them up.
@configs.each do |key, conf|
if conf.has_key?(:cache_dir)
symlink(conf[:cache_dir], "/tmp/vagrant-cache/#{key}")
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: "Generic[#{key}]")
end
end
end
end
end

View file

@ -0,0 +1,22 @@
module VagrantPlugins
module Cachier
class Bucket
class Pip < Bucket
def self.capability
:pip_cache_dir
end
def install
if guest.capability?(:pip_cache_dir)
if guest_path = guest.capability(:pip_cache_dir)
symlink("#{guest_path}/http", "/tmp/vagrant-cache/#{@name}/http")
symlink("#{guest_path}/wheels", "/tmp/vagrant-cache/#{@name}/wheels")
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'pip')
end
end
end
end
end
end

View file

@ -8,13 +8,14 @@ module VagrantPlugins
def install
if guest.capability?(:yum_cache_dir)
guest_path = guest.capability(:yum_cache_dir)
return if @env[:cache_dirs].include?(guest_path)
if guest_path = guest.capability(:yum_cache_dir)
return if @env[:cache_dirs].include?(guest_path)
# Ensure caching is enabled
comm.sudo("sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf")
# Ensure caching is enabled
comm.sudo("sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf")
symlink(guest_path)
symlink(guest_path)
end
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Yum')
end

View file

@ -4,7 +4,6 @@ module VagrantPlugins
module Arch
module PacmanCacheDir
def self.pacman_cache_dir(machine)
# TODO: Find out if there is a config file we can read from
'/var/cache/pacman/pkg'
end
end

View file

@ -4,7 +4,6 @@ module VagrantPlugins
module Debian
module AptCacheDir
def self.apt_cache_dir(machine)
# TODO: Find out if there is a config file we can read from
'/var/cache/apt/archives'
end
end

View file

@ -0,0 +1,20 @@
module VagrantPlugins
module Cachier
module Cap
module Linux
module BowerPath
def self.bower_path(machine)
bower_path = nil
machine.communicate.tap do |comm|
return unless comm.test('which bower')
comm.execute 'echo $HOME' do |buffer, output|
bower_path = output.chomp if buffer == :stdout
end
end
return "#{bower_path}/.cache/bower"
end
end
end
end
end
end

View file

@ -5,8 +5,8 @@ module VagrantPlugins
module ChefFileCachePath
def self.chef_provisioner?(machine)
provisioners = machine.config.vm.provisioners
chef_provisioners = [:chef_solo, :chef_client]
compat_provisioners = provisioners.keep_if { |p| chef_provisioners.include? p.name }
chef_provisioners = [:chef_solo, :chef_client, :chef_zero]
compat_provisioners = provisioners.select { |p| chef_provisioners.include? p.name || p.type }
if compat_provisioners.size > 1
raise "One machine is using multiple chef provisioners, which is unsupported."
@ -19,7 +19,6 @@ module VagrantPlugins
def self.chef_file_cache_path(machine)
chef_file_cache_path = nil
# TODO: Determine paths rather than using default.
chef_file_cache_path = '/var/chef/cache' if chef_provisioner?(machine)
return chef_file_cache_path

View file

@ -0,0 +1,20 @@
module VagrantPlugins
module Cachier
module Cap
module Linux
module ChefGemdir
def self.chef_gemdir(machine)
gemdir = nil
machine.communicate.tap do |comm|
return unless comm.test('test -f /opt/chef/embedded/bin/gem')
comm.execute '/opt/chef/embedded/bin/gem env gemdir' do |buffer, output|
gemdir = output.chomp if buffer == :stdout
end
end
return gemdir
end
end
end
end
end
end

View file

@ -7,11 +7,14 @@ module VagrantPlugins
composer_path = nil
machine.communicate.tap do |comm|
return unless comm.test('which php')
# on some VMs an extra new line seems to come out, so we loop over
# the output just in case
composer_path = ''
comm.execute 'echo $HOME' do |buffer, output|
composer_path = output.chomp if buffer == :stdout
composer_path += output.chomp if buffer == :stdout
end
end
return "#{composer_path}/.composer"
return "#{composer_path}/.composer/cache"
end
end
end

View file

@ -0,0 +1,20 @@
module VagrantPlugins
module Cachier
module Cap
module Linux
module PipCacheDir
def self.pip_cache_dir(machine)
pip_cache_dir = nil
machine.communicate.tap do |comm|
return unless comm.test('which pip')
comm.execute 'echo $HOME' do |buffer, output|
pip_cache_dir = output.chomp if buffer == :stdout
end
end
return "#{pip_cache_dir}/.cache/pip"
end
end
end
end
end
end

View file

@ -0,0 +1,18 @@
module VagrantPlugins
module Cachier
module Cap
module RedHat
module DnfCacheDir
def self.dnf_cache_dir(machine)
dnf_cache_dir = nil
machine.communicate.tap do |comm|
return unless comm.test('which dnf')
dnf_cache_dir = '/var/cache/dnf'
end
return dnf_cache_dir
end
end
end
end
end
end

View file

@ -4,8 +4,13 @@ module VagrantPlugins
module RedHat
module YumCacheDir
def self.yum_cache_dir(machine)
# TODO: Find out if there is a config file we can read from
'/var/cache/yum'
yum_cache_dir = nil
machine.communicate.tap do |comm|
# In case yum is only forwarding to dnf do not cache
return unless not comm.test('yum --version 2>&1 | grep /usr/bin/dnf')
yum_cache_dir = '/var/cache/yum'
end
return yum_cache_dir
end
end
end

View file

@ -4,7 +4,6 @@ module VagrantPlugins
module SuSE
module ZypperCacheDir
def self.zypper_cache_dir(machine)
# TODO: Find out if there is a config file we can read from
'/var/cache/zypp/packages'
end
end

View file

@ -6,6 +6,11 @@ module VagrantPlugins
Cap::Linux::Gemdir
end
guest_capability 'linux', 'chef_gemdir' do
require_relative 'cap/linux/chef_gemdir'
Cap::Linux::ChefGemdir
end
guest_capability 'linux', 'rvm_path' do
require_relative 'cap/linux/rvm_path'
Cap::Linux::RvmPath
@ -16,6 +21,11 @@ module VagrantPlugins
Cap::Linux::ComposerPath
end
guest_capability 'linux', 'bower_path' do
require_relative 'cap/linux/bower_path'
Cap::Linux::BowerPath
end
guest_capability 'linux', 'chef_file_cache_path' do
require_relative 'cap/linux/chef_file_cache_path'
Cap::Linux::ChefFileCachePath
@ -26,6 +36,11 @@ module VagrantPlugins
Cap::Linux::NpmCacheDir
end
guest_capability 'linux', 'pip_cache_dir' do
require_relative 'cap/linux/pip_cache_dir'
Cap::Linux::PipCacheDir
end
guest_capability 'debian', 'apt_cache_dir' do
require_relative 'cap/debian/apt_cache_dir'
Cap::Debian::AptCacheDir
@ -46,6 +61,11 @@ module VagrantPlugins
Cap::RedHat::YumCacheDir
end
guest_capability 'redhat', 'dnf_cache_dir' do
require_relative 'cap/redhat/dnf_cache_dir'
Cap::RedHat::DnfCacheDir
end
guest_capability 'suse', 'yum_cache_dir' do
# Disable Yum on suse guests
end

View file

@ -17,14 +17,6 @@ module VagrantPlugins
(@buckets ||= {})[bucket] = opts
end
def enable_nfs=(value)
@ui.warn "The `enable_nfs` config for vagrant-cachier has been deprecated " \
"and will be removed on 0.7.0, please use " \
"`synced_folder_opts = { type: :nfs }` instead.\n"
@synced_folder_opts = { type: :nfs } if value
end
def validate(machine)
errors = _detected_errors

View file

@ -1,5 +1,3 @@
# TODO: Switch to Vagrant.require_version before 1.0.0
# see: https://github.com/mitchellh/vagrant/blob/bc55081e9ffaa6820113e449a9f76b293a29b27d/lib/vagrant.rb#L202-L228
unless Gem::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(Vagrant::VERSION))
raise 'vagrant-cachier requires Vagrant >= 1.4.0 in order to work!'
end
@ -20,7 +18,8 @@ module VagrantPlugins
# Keep an eye on https://github.com/mitchellh/vagrant/wiki/Available-Vagrant-Plugins#wiki-providers
# for more.
CLOUD_PROVIDERS = %w( aws cloudstack digitalocean hp joyent openstack rackspace
softlayer proxmox managed )
softlayer proxmox managed azure brightbox cloudstack vcloud
vsphere )
end
end

View file

@ -1,5 +1,5 @@
module VagrantPlugins
module Cachier
VERSION = "0.7.0"
VERSION = "1.2.1"
end
end

View file

@ -9,11 +9,6 @@ en:
nfs_required: |-
The '%{bucket}' cache bucket requires NFS to be enabled, please add
`config.cache.synced_folder_opts = {type: :nfs}` to your Vagrantfile.
will_fix_machine_cache_dir: |-
A vagrant-cachier provider specific cache dir was found under
'%{current_path}' and it will be moved to
'%{new_path}' as it is the new path for keeping machine
scoped cache dirs starting with the 0.3.0 version of the plugin.
unable_to_ssh: |-
vagrant-cachier was unable to SSH into the VM to remove symlinks!
backed_by_cloud_provider: |-

View file

@ -1,10 +1,14 @@
Vagrant.require_plugin 'vagrant-cachier'
Vagrant.require_plugin 'vagrant-lxc'
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |_, override|
override.vm.box = "chef/ubuntu-14.04"
end
config.vm.provider :lxc do |_, override|
override.vm.box = "fgrehm/trusty64-lxc"
end
config.cache.auto_detect = true
config.cache.scope = :machine
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provision :shell, inline: 'apt-get update && apt-get install -y git'
end

View file

@ -1,8 +1,12 @@
Vagrant.require_plugin 'vagrant-cachier'
Vagrant.require_plugin 'vagrant-lxc'
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |_, override|
override.vm.box = "chef/ubuntu-14.04"
end
config.vm.provider :lxc do |_, override|
override.vm.box = "fgrehm/trusty64-lxc"
end
config.cache.auto_detect = true
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provision :shell, inline: 'echo Hello!'
end

View file

@ -1,6 +1,8 @@
Vagrant.require_plugin 'vagrant-cachier'
Vagrant.require_plugin 'vagrant-lxc'
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provider :virtualbox do |_, override|
override.vm.box = "chef/ubuntu-14.04"
end
config.vm.provider :lxc do |_, override|
override.vm.box = "fgrehm/trusty64-lxc"
end
end

View file

@ -1,7 +1,10 @@
Vagrant.require_plugin 'vagrant-cachier'
Vagrant.require_plugin 'vagrant-lxc'
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provider :virtualbox do |_, override|
override.vm.box = "chef/ubuntu-14.04"
end
config.vm.provider :lxc do |_, override|
override.vm.box = "fgrehm/trusty64-lxc"
end
config.vm.provision :shell, inline: 'echo Hello!'
end

View file

@ -17,14 +17,4 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.post_install_message = %q{
If you are new to vagrant-cachier just follow along with the docs available
at http://fgrehm.viewdocs.io/vagrant-cachier.
If you are a long time user, please note that plugin has gone through many
backwards incompatible changes since 0.6.0 so checkout
https://github.com/fgrehm/vagrant-cachier/blob/master/CHANGELOG.md
before continuing and caching all the things :)
}
end