diff --git a/cluster/vagrant/provision-master.sh b/cluster/vagrant/provision-master.sh index 99f1de04c76..1362332e271 100755 --- a/cluster/vagrant/provision-master.sh +++ b/cluster/vagrant/provision-master.sh @@ -64,6 +64,7 @@ done echo "127.0.0.1 localhost" >> /etc/hosts # enables cmds like 'kubectl get pods' on master. echo "$MASTER_IP $MASTER_NAME" >> /etc/hosts +enable-accounting prepare-package-manager # Configure the master network @@ -118,8 +119,7 @@ if ! which /usr/libexec/cockpit-ws &>/dev/null; then pushd /etc/yum.repos.d 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 socat ethtool - dnf update -y docker + dnf install -y cockpit cockpit-kubernetes docker socat ethtool popd systemctl enable cockpit.socket diff --git a/cluster/vagrant/provision-node.sh b/cluster/vagrant/provision-node.sh index d62536a5a44..4893424edc8 100755 --- a/cluster/vagrant/provision-node.sh +++ b/cluster/vagrant/provision-node.sh @@ -59,6 +59,7 @@ for (( i=0; i<${#NODE_NAMES[@]}; i++)); do fi done +enable-accounting prepare-package-manager # Configure network diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index 30d612a0984..846d9c505ce 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -14,15 +14,21 @@ # See the License for the specific language governing permissions and # limitations under the License. +function enable-accounting() { + mkdir -p /etc/systemd/system.conf.d/ + cat </etc/systemd/system.conf.d/kubernetes-accounting.conf +[Manager] +DefaultCPUAccounting=yes +DefaultMemoryAccounting=yes +EOF + systemctl daemon-reload +} + function prepare-package-manager() { echo "Prepare package manager" # Useful if a mirror is broken or slow echo "fastestmirror=True" >> /etc/dnf/dnf.conf - - # In Fedora 23, installed version does not work with Salt - # Cf. https://github.com/saltstack/salt/issues/31001 - dnf update -y dnf dnf-plugins-core } @@ -113,8 +119,10 @@ function install-salt() { popd 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 + # Install salt from official repositories. + # Need to enable testing-repos to get version of salt with fix for dnf-core-plugins + dnf config-manager --set-enabled updates-testing + dnf install -y salt-minion # Fedora >= 23 includes salt packages but the bootstrap is # creating configuration for a (non-existent) salt repo anyway.