mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #15998 from cilium-team/updating-vagrant
Auto commit by PR queue bot
This commit is contained in:
		
							
								
								
									
										20
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -5,7 +5,7 @@
 | 
				
			|||||||
VAGRANTFILE_API_VERSION = "2"
 | 
					VAGRANTFILE_API_VERSION = "2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Require a recent version of vagrant otherwise some have reported errors setting host names on boxes
 | 
					# Require a recent version of vagrant otherwise some have reported errors setting host names on boxes
 | 
				
			||||||
Vagrant.require_version ">= 1.6.2"
 | 
					Vagrant.require_version ">= 1.7.4"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if ARGV.first == "up" && ENV['USING_KUBE_SCRIPTS'] != 'true'
 | 
					if ARGV.first == "up" && ENV['USING_KUBE_SCRIPTS'] != 'true'
 | 
				
			||||||
  raise Vagrant::Errors::VagrantError.new, <<END
 | 
					  raise Vagrant::Errors::VagrantError.new, <<END
 | 
				
			||||||
@@ -54,28 +54,28 @@ $kube_provider_boxes = {
 | 
				
			|||||||
      # your own value so long as you provide :box_url; for example, the
 | 
					      # your own value so long as you provide :box_url; for example, the
 | 
				
			||||||
      # "official" name of this box is "rickard-von-essen/
 | 
					      # "official" name of this box is "rickard-von-essen/
 | 
				
			||||||
      # opscode_fedora-20", but by providing the URL and our own name, we
 | 
					      # opscode_fedora-20", but by providing the URL and our own name, we
 | 
				
			||||||
      # make it appear as yet another provider under the "kube-fedora20"
 | 
					      # make it appear as yet another provider under the "kube-fedora22"
 | 
				
			||||||
      # box
 | 
					      # box
 | 
				
			||||||
      :box_name => 'kube-fedora20',
 | 
					      :box_name => 'kube-fedora23',
 | 
				
			||||||
      :box_url => 'https://atlas.hashicorp.com/rickard-von-essen/boxes/opscode_fedora-20/versions/0.4.0/providers/parallels.box'
 | 
					      :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/parallels/opscode_fedora-23_chef-provisionerless.box'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  :virtualbox => {
 | 
					  :virtualbox => {
 | 
				
			||||||
    'fedora' => {
 | 
					    'fedora' => {
 | 
				
			||||||
      :box_name => 'kube-fedora21',
 | 
					      :box_name => 'kube-fedora23',
 | 
				
			||||||
      :box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-21_chef-provisionerless.box'
 | 
					      :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-23_chef-provisionerless.box'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  :libvirt => {
 | 
					  :libvirt => {
 | 
				
			||||||
    'fedora' => {
 | 
					    'fedora' => {
 | 
				
			||||||
      :box_name => 'kube-fedora21',
 | 
					      :box_name => 'kube-fedora23',
 | 
				
			||||||
      :box_url => 'https://amadeus.box.com/shared/static/93mj2fajrii6afeh8b5v5ihuk2ows2yn.box'
 | 
					      :box_url => 'https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-libvirt.box'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  :vmware_desktop => {
 | 
					  :vmware_desktop => {
 | 
				
			||||||
    'fedora' => {
 | 
					    'fedora' => {
 | 
				
			||||||
      :box_name => 'kube-fedora21',
 | 
					      :box_name => 'kube-fedora23',
 | 
				
			||||||
      :box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-21_chef-provisionerless.box'
 | 
					      :box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-23_chef-provisionerless.box'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,11 +22,7 @@ set -o pipefail
 | 
				
			|||||||
# See: https://github.com/mitchellh/vagrant/issues/2430
 | 
					# See: https://github.com/mitchellh/vagrant/issues/2430
 | 
				
			||||||
hostnamectl set-hostname ${MASTER_NAME}
 | 
					hostnamectl set-hostname ${MASTER_NAME}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
 | 
					if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
 | 
				
			||||||
  # Workaround to vagrant inability to guess interface naming sequence
 | 
					 | 
				
			||||||
  # Tell system to abandon the new naming scheme and use eth* instead
 | 
					 | 
				
			||||||
  rm -f /etc/sysconfig/network-scripts/ifcfg-enp0s3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Disable network interface being managed by Network Manager (needed for Fedora 21+)
 | 
					  # Disable network interface being managed by Network Manager (needed for Fedora 21+)
 | 
				
			||||||
  NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
					  NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
				
			||||||
  if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
 | 
					  if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
 | 
				
			||||||
@@ -108,8 +104,8 @@ fi
 | 
				
			|||||||
if ! which /usr/libexec/cockpit-ws &>/dev/null; then
 | 
					if ! which /usr/libexec/cockpit-ws &>/dev/null; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pushd /etc/yum.repos.d
 | 
					  pushd /etc/yum.repos.d
 | 
				
			||||||
    wget https://copr.fedoraproject.org/coprs/sgallagh/cockpit-preview/repo/fedora-21/sgallagh-cockpit-preview-fedora-21.repo
 | 
					    wget https://copr.fedoraproject.org/coprs/sgallagh/cockpit-preview/repo/fedora-22/sgallagh-cockpit-preview-fedora-22.repo
 | 
				
			||||||
    yum install -y cockpit cockpit-kubernetes
 | 
					    dnf install -y cockpit cockpit-kubernetes
 | 
				
			||||||
  popd
 | 
					  popd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  systemctl enable cockpit.socket
 | 
					  systemctl enable cockpit.socket
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ function provision-network-master {
 | 
				
			|||||||
  # Install etcd for flannel data
 | 
					  # Install etcd for flannel data
 | 
				
			||||||
  if ! which etcd >/dev/null 2>&1; then
 | 
					  if ! which etcd >/dev/null 2>&1; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    yum install -y etcd
 | 
					    dnf install -y etcd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Modify etcd configuration for flannel data
 | 
					    # Modify etcd configuration for flannel data
 | 
				
			||||||
    cat <<EOF >/etc/etcd/etcd.conf
 | 
					    cat <<EOF >/etc/etcd/etcd.conf
 | 
				
			||||||
@@ -45,7 +45,7 @@ EOF
 | 
				
			|||||||
  # Install flannel for overlay
 | 
					  # Install flannel for overlay
 | 
				
			||||||
  if ! which flanneld >/dev/null 2>&1; then
 | 
					  if ! which flanneld >/dev/null 2>&1; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    yum install -y flannel
 | 
					    dnf install -y flannel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cat <<EOF >/etc/flannel-config.json
 | 
					    cat <<EOF >/etc/flannel-config.json
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@ function provision-network-node {
 | 
				
			|||||||
  # Install flannel for overlay
 | 
					  # Install flannel for overlay
 | 
				
			||||||
  if ! which flanneld >/dev/null 2>&1; then
 | 
					  if ! which flanneld >/dev/null 2>&1; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    yum install -y flannel
 | 
					    dnf install -y flannel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Configure local daemon to speak to master
 | 
					    # Configure local daemon to speak to master
 | 
				
			||||||
    NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
					    NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,11 +22,7 @@ set -o pipefail
 | 
				
			|||||||
# See: https://github.com/mitchellh/vagrant/issues/2430
 | 
					# See: https://github.com/mitchellh/vagrant/issues/2430
 | 
				
			||||||
hostnamectl set-hostname ${NODE_NAME}
 | 
					hostnamectl set-hostname ${NODE_NAME}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; then
 | 
					if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
 | 
				
			||||||
  # Workaround to vagrant inability to guess interface naming sequence
 | 
					 | 
				
			||||||
  # Tell system to abandon the new naming scheme and use eth* instead
 | 
					 | 
				
			||||||
  rm -f /etc/sysconfig/network-scripts/ifcfg-enp0s3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  # Disable network interface being managed by Network Manager (needed for Fedora 21+)
 | 
					  # Disable network interface being managed by Network Manager (needed for Fedora 21+)
 | 
				
			||||||
  NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
					  NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
 | 
				
			||||||
  if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
 | 
					  if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ Running Kubernetes with Vagrant (and VirtualBox) is an easy way to run/test/deve
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### Prerequisites
 | 
					### Prerequisites
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. Install latest version >= 1.6.2 of vagrant from http://www.vagrantup.com/downloads.html
 | 
					1. Install latest version >= 1.7.4 of vagrant from http://www.vagrantup.com/downloads.html
 | 
				
			||||||
2. Install one of:
 | 
					2. Install one of:
 | 
				
			||||||
   1. The latest version of Virtual Box from https://www.virtualbox.org/wiki/Downloads
 | 
					   1. The latest version of Virtual Box from https://www.virtualbox.org/wiki/Downloads
 | 
				
			||||||
   2. [VMWare Fusion](https://www.vmware.com/products/fusion/) version 5 or greater as well as the appropriate [Vagrant VMWare Fusion provider](https://www.vagrantup.com/vmware)
 | 
					   2. [VMWare Fusion](https://www.vmware.com/products/fusion/) version 5 or greater as well as the appropriate [Vagrant VMWare Fusion provider](https://www.vagrantup.com/vmware)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user