Skip to content

Instantly share code, notes, and snippets.

@ArKam
Last active November 23, 2015 17:00
Show Gist options
  • Save ArKam/fd0e507cea4d5f228929 to your computer and use it in GitHub Desktop.
Save ArKam/fd0e507cea4d5f228929 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
require 'open-uri'
require 'tempfile'
require 'yaml'
Vagrant.require_version ">= 1.6.0"
Vagrant.configure("2") do |config|
# Do not insert key directly, we're using insecure vagrant SSH KEYS for DEV/TEST purpose.
config.ssh.insert_key = false
# Use the private box and at least a working build.
config.vm.box = "ekinox/CoreOS"
config.vm.box_version = ">= 766.5.7"
config.vm.provider :virtualbox do |v|
v.name = "coreos-vagrant"
v.cpus = 2
v.gui = false
v.memory = 1024
# On VirtualBox, we don't have guest additions or a functional vboxsf
# in CoreOS, so tell Vagrant that so it can be smarter.
v.check_guest_additions = false
v.functional_vboxsf = false
end
# plugin conflict
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
#You need to have a public and a private interface.
config.vm.network "public_network", bridge: "en1: Wi-Fi (AirPort)", type: "dhcp"
config.vm.network "private_network", type: "dhcp"
#Finally, insert and populate new user_data config.
config.vm.provision :file, :source => "confs/cloud-config/user_data", :destination => "/tmp/user_data"
config.vm.provision :shell, :inline => "mv /tmp/user_data /var/lib/coreos-install/", :privileged => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment