Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Include default vagrant-cachier configuration #702

@geerlingguy

Description

@geerlingguy

Especially in light of #699—I'd like to add a default configuration so people who install vagrant-cachier don't also have to add in extra bits to a Vagrantfile.local to get some cache benefits.

By default, I'd like to add :apt and :generic (so the composer dir is cached). The yum cache has a few caveats, so I might not enable it by default, and there's nothing for dnf yet. I also need to test and make sure there are no issues if using a CentOS base box while the :apt cache is enabled.

Here's the current config I'm testing:

if Vagrant.has_plugin?("vagrant-cachier")
  # Share cache among instances of the same base box.
  config.cache.scope = :box

  # Set cache buckets manually.
  config.cache.auto_detect = false

  # Cache apt data.
  config.cache.enable :apt

  # Cache the composer directory.
  config.cache.enable :generic, { :cache_dir => "/home/vagrant/.composer/cache"  }

  # Cache via NFS shares.
  config.cache.synced_folder_opts = {
    type: :nfs,
    mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
  }
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions