mirror of https://github.com/k3s-io/k3s
parent
ae75a7d259
commit
a70412099a
|
@ -14,9 +14,21 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
echo "== Refreshing package database =="
|
||||||
|
until apt-get update; do
|
||||||
|
echo "== apt-get update failed, retrying =="
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
|
||||||
apt-get update
|
function apt-get-install {
|
||||||
apt-get install --yes curl
|
# Forcibly install packages (options borrowed from Salt logs).
|
||||||
|
until apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef install $@; do
|
||||||
|
echo "== install of packages $@ failed, retrying =="
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
apt-get-install curl
|
||||||
|
|
||||||
# Retry a download until we get it.
|
# Retry a download until we get it.
|
||||||
#
|
#
|
||||||
|
@ -44,12 +56,6 @@ install-salt() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "== Refreshing package database =="
|
|
||||||
until apt-get update; do
|
|
||||||
echo "== apt-get update failed, retrying =="
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p /var/cache/salt-install
|
mkdir -p /var/cache/salt-install
|
||||||
cd /var/cache/salt-install
|
cd /var/cache/salt-install
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,6 @@ done
|
||||||
move_docker=""
|
move_docker=""
|
||||||
move_kubelet=""
|
move_kubelet=""
|
||||||
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
docker_storage=${DOCKER_STORAGE:-aufs}
|
docker_storage=${DOCKER_STORAGE:-aufs}
|
||||||
|
|
||||||
# Format the ephemeral disks
|
# Format the ephemeral disks
|
||||||
|
@ -66,7 +64,7 @@ else
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${docker_storage} == "btrfs" ]]; then
|
if [[ ${docker_storage} == "btrfs" ]]; then
|
||||||
apt-get install --yes btrfs-tools
|
apt-get-install btrfs-tools
|
||||||
|
|
||||||
if [[ ${#block_devices[@]} == 1 ]]; then
|
if [[ ${#block_devices[@]} == 1 ]]; then
|
||||||
echo "One ephemeral block device found; formatting with btrfs"
|
echo "One ephemeral block device found; formatting with btrfs"
|
||||||
|
@ -102,7 +100,7 @@ else
|
||||||
# In devicemapper mode, Docker can use LVM directly
|
# In devicemapper mode, Docker can use LVM directly
|
||||||
# Also, fewer code paths are good
|
# Also, fewer code paths are good
|
||||||
echo "Using LVM2 and ext4"
|
echo "Using LVM2 and ext4"
|
||||||
apt-get install --yes lvm2
|
apt-get-install lvm2
|
||||||
|
|
||||||
# Don't output spurious "File descriptor X leaked on vgcreate invocation."
|
# Don't output spurious "File descriptor X leaked on vgcreate invocation."
|
||||||
# Known bug: e.g. Ubuntu #591823
|
# Known bug: e.g. Ubuntu #591823
|
||||||
|
@ -165,10 +163,10 @@ if [[ ${docker_storage} == "btrfs" ]]; then
|
||||||
elif [[ ${docker_storage} == "aufs-nolvm" || ${docker_storage} == "aufs" ]]; then
|
elif [[ ${docker_storage} == "aufs-nolvm" || ${docker_storage} == "aufs" ]]; then
|
||||||
# Install aufs kernel module
|
# Install aufs kernel module
|
||||||
# Fix issue #14162 with extra-virtual
|
# Fix issue #14162 with extra-virtual
|
||||||
apt-get install --yes linux-image-extra-$(uname -r) linux-image-extra-virtual
|
apt-get-install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
||||||
|
|
||||||
# Install aufs tools
|
# Install aufs tools
|
||||||
apt-get install --yes aufs-tools
|
apt-get-install aufs-tools
|
||||||
|
|
||||||
DOCKER_OPTS="${DOCKER_OPTS} -s aufs"
|
DOCKER_OPTS="${DOCKER_OPTS} -s aufs"
|
||||||
elif [[ ${docker_storage} == "devicemapper" ]]; then
|
elif [[ ${docker_storage} == "devicemapper" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue