mirror of https://github.com/tteck/Proxmox.git
				
				
				
			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
 | 
			
		||||
alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
			
		||||
trap die ERR
 | 
			
		||||
 | 
			
		||||
silent() { "$@" > /dev/null 2>&1; }
 | 
			
		||||
function error_exit() {
 | 
			
		||||
  trap - ERR
 | 
			
		||||
  local reason="Unknown failure occurred."
 | 
			
		||||
| 
						 | 
				
			
			@ -76,20 +76,20 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
 | 
			
		|||
set -e
 | 
			
		||||
 | 
			
		||||
msg_info "Updating Container OS"
 | 
			
		||||
apt-get update &>/dev/null
 | 
			
		||||
apt-get -y upgrade &>/dev/null
 | 
			
		||||
$STD apt-get update
 | 
			
		||||
$STD apt-get -y upgrade
 | 
			
		||||
msg_ok "Updated Container OS"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing Dependencies"
 | 
			
		||||
apt-get install -y curl &>/dev/null
 | 
			
		||||
apt-get install -y sudo &>/dev/null
 | 
			
		||||
apt-get install -y git &>/dev/null
 | 
			
		||||
$STD apt-get install -y curl
 | 
			
		||||
$STD apt-get install -y sudo
 | 
			
		||||
$STD apt-get install -y git
 | 
			
		||||
msg_ok "Installed Dependencies"
 | 
			
		||||
 | 
			
		||||
msg_info "Installing k0s Kubernetes"
 | 
			
		||||
sh <(curl -sSLf https://get.k0s.sh) &>/dev/null
 | 
			
		||||
k0s install controller --single &>/dev/null
 | 
			
		||||
k0s start &>/dev/null
 | 
			
		||||
$STD bash <(curl -sSLf https://get.k0s.sh)
 | 
			
		||||
$STD k0s install controller --single
 | 
			
		||||
$STD k0s start
 | 
			
		||||
mkdir -p /etc/k0s
 | 
			
		||||
k0s config create > /etc/k0s/k0s.yaml
 | 
			
		||||
msg_ok "Installed k0s Kubernetes"
 | 
			
		||||
| 
						 | 
				
			
			@ -103,7 +103,7 @@ fi
 | 
			
		|||
 | 
			
		||||
if [[ $HELM == "Y" ]]; then
 | 
			
		||||
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"
 | 
			
		||||
fi
 | 
			
		||||
PASS=$(grep -w "root" /etc/shadow | cut -b6)
 | 
			
		||||
| 
						 | 
				
			
			@ -128,6 +128,6 @@ if [[ "${SSH_ROOT}" == "yes" ]]; then
 | 
			
		|||
fi
 | 
			
		||||
 | 
			
		||||
msg_info "Cleaning up"
 | 
			
		||||
apt-get autoremove >/dev/null
 | 
			
		||||
apt-get autoclean >/dev/null
 | 
			
		||||
$STD apt-get autoremove
 | 
			
		||||
$STD apt-get autoclean
 | 
			
		||||
msg_ok "Cleaned"
 | 
			
		||||
		Loading…
	
		Reference in New Issue