docs for buckets

This commit is contained in:
Fabio Rehm 2013-12-07 03:43:37 -02:00
parent 94ba773ce6
commit 00f4aaa28c
11 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,29 @@
# APT-CACHER
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-debian-box'
config.cache.enable :apt_cacher
end
```
This is useful, if you are using containers inside your VMs, e.g VirtualBox -> LXC.
This would allow you to reuse packages without sharing folder inside VirtualBox. Only
works with NFS-shared folders (since `vboxsf` is enforcing `vagrant`-user and `apt-cacher`
is running under `apt-cacher-ng` user)
# install apt-cacher on (Host)-VM
$ sudo apt-get install apt-cacher-ng
# get the IP for eth0 interface
$ ifconfig eth0 |grep "inet addr"|awk '{print $2}' |cut -c6-20
# configure mirror on for your docker/LXC instances:
$ echo 'Acquire::http { Proxy "http://X.X.X.X:3142"; };' > /etc/apt/apt.conf.d/10mirror
# check, if working by tailing log on (Host)-VM, while installing packages on (Guest)-VMs
$ tail -f /var/log/apt-cacher-ng/apt-cacher.log
Used by Debian-like Linux distros, will get configured under guest's `/var/cache/apt-cacher-ng`.

14
docs/buckets/apt.md Normal file
View file

@ -0,0 +1,14 @@
# APT
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-debian-box'
config.cache.enable :apt
end
```
Used by Debian-like Linux distros, will get configured under guest's `/var/cache/apt/archives`.
_Please note that to avoid re-downloading packages, you should avoid `apt-get clean`
as much as possible in order to make a better use of the cache, even if you are
packaging a box_

11
docs/buckets/chef.md Normal file
View file

@ -0,0 +1,11 @@
# Chef
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-using-chef-provisioner'
config.cache.enable :chef
end
```
When a Chef provisioner is detected, this bucket caches the default
`file_cache_path` directory, `/var/chef/cache`. Requires Vagrant 1.2.4+.

11
docs/buckets/composer.md Normal file
View file

@ -0,0 +1,11 @@
# [Composer](http://getcomposer.org/)
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-php-installed'
config.cache.enable :composer
end
```
Compatible with probably any type of linux guest distro, will cache guests'
`$HOME/.composer` if PHP is detected.

16
docs/buckets/npm.md Normal file
View file

@ -0,0 +1,16 @@
# [npm](https://npmjs.org/)
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-nodejs-installed'
config.cache.enable :npm
end
```
Compatible with probably any type of linux guest distro, will hook into npm's
cache directory under the result of running `npm config get cache` as
the default SSH user (usually `vagrant`) on your guest.
If you use [nvm](https://github.com/creationix/nvm) / [n](https://github.com/visionmedia/n)
on the guest machine, make sure it is already installed before enabling
the bucket, otherwise you won't benefit from this plugin.

10
docs/buckets/pacman.md Normal file
View file

@ -0,0 +1,10 @@
# Pacman
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-arch-linux-box'
config.cache.enable :pacman
end
```
Used by Arch Linux, will get configured under guest's `/var/cache/pacman/pkg`.

14
docs/buckets/rubygems.md Normal file
View file

@ -0,0 +1,14 @@
# RubyGems
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-ruby-installed'
config.cache.enable :gem
end
```
Compatible with probably with any type of guest distro, will hook into the `cache`
folder under the result of running `gem env gemdir` as the default SSH user (usualy
`vagrant`) on your guest. If you use rbenv / rvm on the guest machine, make sure
it is already installed before enabling the bucket, otherwise you won't benefit
from this plugin.

14
docs/buckets/rvm.md Normal file
View file

@ -0,0 +1,14 @@
# [rvm](https://rvm.io/)
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-box-with-rvm-installed'
config.cache.enable :gem
end
```
Compatible with probably with any type of linux guest distro, will hook into the
`cache` folder under the result of running rvm info as the default SSH user (usualy
`vagrant`) on your guest. If you use rvm on the guest machine, make sure it is
already installed before enabling the bucket, otherwise you won't benefit from
this plugin.

12
docs/buckets/yum.md Normal file
View file

@ -0,0 +1,12 @@
# Yum
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-centos-box'
config.cache.enable :yum
end
```
Used by CentOS guests, will get configured under guest's `/var/cache/yum`. It will
also [make sure](lib/vagrant-cachier/bucket/yum.rb#L20) that `keepcache` is set to
`1` on guest's `/etc/yum.conf`.

12
docs/buckets/zypper.md Normal file
View file

@ -0,0 +1,12 @@
# Zypper
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'some-suse-box'
config.cache.enable :zypper
end
```
Used by SuSE guests, will get configured under guest's `/var/cache/zypp/packages`. It will
also [make sure](lib/vagrant-cachier/bucket/zypper.rb#L20) that `keep-packages` is enabled
for all repositories.

View file

@ -44,6 +44,11 @@
.navbar-nav>li>iframe {
margin-top: 12px;
}
table {
margin-left: auto;
margin-right: auto;
}
</style>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->