forked from extern/Proxmox
Update and rename k0s-install.sh to k0s-v5-install.sh
This commit is contained in:
parent
411af1c39e
commit
bdaaed3aaf
@ -19,7 +19,7 @@ set -o pipefail
|
|||||||
shopt -s expand_aliases
|
shopt -s expand_aliases
|
||||||
alias die='EXIT=$? LINE=$LINENO error_exit'
|
alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||||
trap die ERR
|
trap die ERR
|
||||||
|
silent() { "$@" > /dev/null 2>&1; }
|
||||||
function error_exit() {
|
function error_exit() {
|
||||||
trap - ERR
|
trap - ERR
|
||||||
local reason="Unknown failure occurred."
|
local reason="Unknown failure occurred."
|
||||||
@ -76,20 +76,20 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
msg_info "Updating Container OS"
|
msg_info "Updating Container OS"
|
||||||
apt-get update &>/dev/null
|
$STD apt-get update
|
||||||
apt-get -y upgrade &>/dev/null
|
$STD apt-get -y upgrade
|
||||||
msg_ok "Updated Container OS"
|
msg_ok "Updated Container OS"
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
apt-get install -y curl &>/dev/null
|
$STD apt-get install -y curl
|
||||||
apt-get install -y sudo &>/dev/null
|
$STD apt-get install -y sudo
|
||||||
apt-get install -y git &>/dev/null
|
$STD apt-get install -y git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing k0s Kubernetes"
|
msg_info "Installing k0s Kubernetes"
|
||||||
sh <(curl -sSLf https://get.k0s.sh) &>/dev/null
|
$STD bash <(curl -sSLf https://get.k0s.sh)
|
||||||
k0s install controller --single &>/dev/null
|
$STD k0s install controller --single
|
||||||
k0s start &>/dev/null
|
$STD k0s start
|
||||||
mkdir -p /etc/k0s
|
mkdir -p /etc/k0s
|
||||||
k0s config create > /etc/k0s/k0s.yaml
|
k0s config create > /etc/k0s/k0s.yaml
|
||||||
msg_ok "Installed k0s Kubernetes"
|
msg_ok "Installed k0s Kubernetes"
|
||||||
@ -103,7 +103,7 @@ fi
|
|||||||
|
|
||||||
if [[ $HELM == "Y" ]]; then
|
if [[ $HELM == "Y" ]]; then
|
||||||
msg_info "Installing Helm"
|
msg_info "Installing Helm"
|
||||||
curl -sSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash &>/dev/null
|
$STD bash <(curl -sSLf https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3)
|
||||||
msg_ok "Installed Helm"
|
msg_ok "Installed Helm"
|
||||||
fi
|
fi
|
||||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
PASS=$(grep -w "root" /etc/shadow | cut -b6)
|
||||||
@ -128,6 +128,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
apt-get autoremove >/dev/null
|
$STD apt-get autoremove
|
||||||
apt-get autoclean >/dev/null
|
$STD apt-get autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
Loading…
Reference in New Issue
Block a user