#!/bin/bash # Copyright (c) 2017 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. STACKUBE_ROOT=$(dirname "${BASH_SOURCE}") function configure_cni { sudo mkdir -p /etc/cni/net.d sudo sh -c "cat >/etc/cni/net.d/10-mynet.conf </etc/cni/net.d/99-loopback.conf < /dev/null 2>&1; then echo "hyperd already installed on this host, using it instead" else curl -sSL https://hypercontainer.io/install | sudo bash fi sudo sh -c 'cat>/etc/hyper/config < /dev/null 2>&1; then sudo rm -f /usr/bin/frakti fi sudo curl -sSL https://github.com/kubernetes/frakti/releases/download/${FRAKTI_VERSION}/frakti -o /usr/bin/frakti sudo chmod +x /usr/bin/frakti cgroup_driver=$(sudo docker info | awk '/Cgroup Driver/{print $3}') sudo sh -c "cat > /lib/systemd/system/frakti.service < /etc/yum.repos.d/kubernetes.repo < /etc/apt/sources.list.d/kubernetes.list <