Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Vagrant VMs to Fedora 23 #15998

Merged
merged 1 commit into from Jan 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
VAGRANTFILE_API_VERSION = "2"

# 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'
raise Vagrant::Errors::VagrantError.new, <<END
Expand Down Expand Up @@ -54,28 +54,28 @@ $kube_provider_boxes = {
# your own value so long as you provide :box_url; for example, the
# "official" name of this box is "rickard-von-essen/
# 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_name => 'kube-fedora20',
:box_url => 'https://atlas.hashicorp.com/rickard-von-essen/boxes/opscode_fedora-20/versions/0.4.0/providers/parallels.box'
:box_name => 'kube-fedora23',
:box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/parallels/opscode_fedora-23_chef-provisionerless.box'
}
},
:virtualbox => {
'fedora' => {
:box_name => 'kube-fedora21',
:box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-21_chef-provisionerless.box'
:box_name => 'kube-fedora23',
:box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_fedora-23_chef-provisionerless.box'
}
},
:libvirt => {
'fedora' => {
:box_name => 'kube-fedora21',
:box_url => 'https://amadeus.box.com/shared/static/93mj2fajrii6afeh8b5v5ihuk2ows2yn.box'
:box_name => 'kube-fedora23',
: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 => {
'fedora' => {
:box_name => 'kube-fedora21',
:box_url => 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-21_chef-provisionerless.box'
:box_name => 'kube-fedora23',
:box_url => 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/vmware/opscode_fedora-23_chef-provisionerless.box'
}
}
}
Expand Down
10 changes: 3 additions & 7 deletions cluster/vagrant/provision-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ set -o pipefail
# See: https://github.com/mitchellh/vagrant/issues/2430
hostnamectl set-hostname ${MASTER_NAME}

if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; 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

if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intention with this conditional was to limit the fixup to Fedora 21. The fixup appeared unnecessary (and occasionally problematic) for Fedora 22 and 23, at least for libvirt. Do the opscode boxes for 23 have different configuration from the fedora libvirt image that does not require this block?

# Disable network interface being managed by Network Manager (needed for Fedora 21+)
NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
Expand Down Expand Up @@ -108,8 +104,8 @@ fi
if ! which /usr/libexec/cockpit-ws &>/dev/null; then

pushd /etc/yum.repos.d
wget https://copr.fedoraproject.org/coprs/sgallagh/cockpit-preview/repo/fedora-21/sgallagh-cockpit-preview-fedora-21.repo
yum install -y cockpit cockpit-kubernetes
wget https://copr.fedoraproject.org/coprs/sgallagh/cockpit-preview/repo/fedora-22/sgallagh-cockpit-preview-fedora-22.repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a problem with wget being missing on the fedora 23 libvirt image. Do the opscode boxes include it by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marun Forgot to reply sorry. No, wget doesn't exit under fedora. See above^

I've test with libvirt but I had to add this dnf install -y wget because the libvirt fedora 23 box doesn't >have wget installed. However I got some errors but I don't know if they are related to libvirt fedora >box or kube:

dnf install -y cockpit cockpit-kubernetes
popd

systemctl enable cockpit.socket
Expand Down
4 changes: 2 additions & 2 deletions cluster/vagrant/provision-network-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function provision-network-master {
# Install etcd for flannel data
if ! which etcd >/dev/null 2>&1; then

yum install -y etcd
dnf install -y etcd

# Modify etcd configuration for flannel data
cat <<EOF >/etc/etcd/etcd.conf
Expand All @@ -45,7 +45,7 @@ EOF
# Install flannel for overlay
if ! which flanneld >/dev/null 2>&1; then

yum install -y flannel
dnf install -y flannel

cat <<EOF >/etc/flannel-config.json
{
Expand Down
2 changes: 1 addition & 1 deletion cluster/vagrant/provision-network-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function provision-network-node {
# Install flannel for overlay
if ! which flanneld >/dev/null 2>&1; then

yum install -y flannel
dnf install -y flannel

# Configure local daemon to speak to master
NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
Expand Down
6 changes: 1 addition & 5 deletions cluster/vagrant/provision-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ set -o pipefail
# See: https://github.com/mitchellh/vagrant/issues/2430
hostnamectl set-hostname ${NODE_NAME}

if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=21 ]]; 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

if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the fixup this block encloses still required for the opscode boxes?

# Disable network interface being managed by Network Manager (needed for Fedora 21+)
NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started-guides/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Running Kubernetes with Vagrant (and VirtualBox) is an easy way to run/test/deve

### 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:
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)
Expand Down