diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/authorized_keys b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/authorized_keys deleted file mode 100644 index 18a9c00fd5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile new file mode 100644 index 0000000000..b43a347cd7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/Vagrantfile @@ -0,0 +1,27 @@ +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +if Vagrant::VERSION < "1.5.0" + raise "Need at least vagrant version 1.5.0, please update" +end + +require_relative 'change_host_name.rb' +require_relative 'configure_networks.rb' +require_relative 'base_mac.rb' + +Vagrant.configure("2") do |config| + # SSH in as the default 'core' user, it has the vagrant ssh key. + config.ssh.username = "core" + + # Disable the base shared folder, guest additions are unavailable. + config.vm.synced_folder ".", "/vagrant", disabled: true + + config.vm.provider :virtualbox do |vb| + # Guest Additions are unavailable. + vb.check_guest_additions = false + + # Fix docker not being able to resolve private registry in VirtualBox + vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + end +end diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/base_mac.rb b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/base_mac.rb new file mode 100644 index 0000000000..1f26796e07 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/base_mac.rb @@ -0,0 +1,4 @@ +# This file must be rewritten with a real value for VirtualBox +Vagrant.configure("2") do |config| + config.vm.base_mac = "080027000000" +end diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/change_host_name.rb b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/change_host_name.rb new file mode 100644 index 0000000000..dfab7916be --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/box/change_host_name.rb @@ -0,0 +1,37 @@ +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +# NOTE: This monkey-patching of the coreos guest plugin is a terrible +# hack that needs to be removed once the upstream plugin works with +# alpha CoreOS images. + +require 'tempfile' +require Vagrant.source_root.join("plugins/guests/coreos/cap/change_host_name.rb") + +CLOUD_CONFIG = <&2 + echo "Using localhost, for default public and private IPs" >&2 + echo "COREOS_PUBLIC_IPV4=127.0.0.1" >> "$ENV" + echo "COREOS_PRIVATE_IPV4=127.0.0.1" >> "$ENV" + exit + fi sleep 0.1 done diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1-r8.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1-r9.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1-r8.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1-r9.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild index fc732939c0..4c076dcc14 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild @@ -17,8 +17,8 @@ S="${WORKDIR}" src_install() { insinto "/usr/share/oem" - doins "${FILESDIR}/authorized_keys" doins "${FILESDIR}/cloud-config.yml" + doins -r "${FILESDIR}/box" into "/usr/share/oem" dobin ${FILESDIR}/coreos-setup-environment