Skip to content

Commit

Permalink
Vagrant fixes for fedora 23
Browse files Browse the repository at this point in the history
 - wget is not installed by default on fedora 23.  Use curl instead
   since it is always available on recent Fedora.

 - The repo url for cockpit resulted in an http redirect message being
   saved as the repo file which broke deployment.  Update the url to
   url that was redirected to and ensure that future redirects will be
   handled correctly.

 - The main Fedora 23 repo includes salt packages, and there is no
   salt repo for 23.  The salt bootstrap still creates a repo file for
   a nonexistent repo, though, and this change removes it to avoid
   having dnf report an error on every update.
  • Loading branch information
marun committed Jan 26, 2016
1 parent a5d2c1b commit e709e91
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/vagrant/provision-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ 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-22/sgallagh-cockpit-preview-fedora-22.repo
curl -OL https://copr.fedorainfracloud.org/coprs/g/cockpit/cockpit-preview/repo/fedora-23/msuchy-cockpit-preview-fedora-23.repo
dnf install -y cockpit cockpit-kubernetes
popd

Expand Down
14 changes: 14 additions & 0 deletions cluster/vagrant/provision-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ function install-salt() {
if ! which salt-call >/dev/null 2>&1; then
# Install salt binaries
curl -sS -L --connect-timeout 20 --retry 6 --retry-delay 10 https://bootstrap.saltstack.com | sh -s

# Fedora >= 23 includes salt packages but the bootstrap is
# creating configuration for a (non-existent) salt repo anyway.
# Remove the invalid repo to prevent dnf from warning about it on
# every update. Assume this problem is specific to Fedora 23 and
# will fixed by the time another version of Fedora lands.
local fedora_version=$(grep 'VERSION_ID' /etc/os-release | sed 's+VERSION_ID=++')
if [[ "${fedora_version}" = '23' ]]; then
local repo_file='/etc/yum.repos.d/saltstack-salt-fedora-23.repo'
if [[ -f "${repo_file}" ]]; then
rm "${repo_file}"
fi
fi

fi
}

Expand Down

0 comments on commit e709e91

Please sign in to comment.