Skip to content

Instantly share code, notes, and snippets.

@jasonbrooks
Created August 19, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonbrooks/b84117ada0ec1f7dab61 to your computer and use it in GitHub Desktop.
Save jasonbrooks/b84117ada0ec1f7dab61 to your computer and use it in GitHub Desktop.
Vagrant.configure(2) do |config|

  config.vm.box = "centos/7"

  config.vm.provider "libvirt" do |libvirt, override|
    libvirt.cpus = 2
    libvirt.memory = 1024
    libvirt.driver = 'kvm'
    libvirt.storage :file, :size => '10G'
  end

$script = <<SCRIPT
yum install -y docker atomic
systemctl start lvm2-lvmetad.service
echo DEVS="/dev/vdb" > /etc/sysconfig/docker-storage-setup
echo VG="docker" >> /etc/sysconfig/docker-storage-setup
docker-storage-setup
systemctl enable docker
systemctl start docker
SCRIPT

  config.vm.provision "shell", inline: $script

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment