Compare commits
23 Commits
89ee0a70cf
...
main
Author | SHA1 | Date | |
---|---|---|---|
a26b88def7 | |||
03c8cf4d07 | |||
7b74b441ff | |||
3c9610ce4f | |||
f3870d98b7 | |||
1680e2aa2a | |||
7b77f58079 | |||
7fcf93cfa1 | |||
584a6fa3d2 | |||
49dadeccf7 | |||
006a6819e2 | |||
3c9e329121 | |||
4c59d8d898 | |||
db84cec53e | |||
f07e72a98a | |||
e25feea97b | |||
53d2410ce3 | |||
677093396f | |||
5224c00c4b | |||
a5fbd2f300 | |||
ed8b09a4bf | |||
ec183b9d58 | |||
af8f4d7d75 |
@ -1,2 +1,7 @@
|
|||||||
# nexo-cloud-scripts
|
# nexo-cloud-scripts
|
||||||
|
|
||||||
|
|
||||||
|
Installation scripts
|
||||||
|
```
|
||||||
|
curl -s https://git.masscivicdynamic.com/wallaceosmar/nexo-cloud-scripts/raw/branch/main/install.sh -o install.sh && bash install.sh && rm install.sh
|
||||||
|
```
|
104
docker-compose.yaml
Normal file
104
docker-compose.yaml
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
services:
|
||||||
|
nexo-cloud:
|
||||||
|
image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
- SSL_MODE=${SSL_MODE-off}
|
||||||
|
- APP_KEY=${APP_KEY}
|
||||||
|
- APP_NAME=${APP_NAME}
|
||||||
|
- DB_CONNECTION=${DB_CONNECTION:-pgsql}
|
||||||
|
- DB_USERNAME=${DB_USERNAME}
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||||
|
- APP_PREVIOUS_KEYS=${APP_PREVIOUS_KEYS}
|
||||||
|
- PHP_OPCACHE_ENABLE=${PHP_OPCACHE_ENABLE:-1}
|
||||||
|
- LOG_CHANNEL=${LOG_CHANNEL:-stack}
|
||||||
|
networks:
|
||||||
|
- nexo-cloud
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
reverb:
|
||||||
|
condition: service_healthy
|
||||||
|
volumes:
|
||||||
|
- /data/nexo-cloud/logs:/var/www/html/storage/logs
|
||||||
|
- /data/nexo-cloud/ssh:/var/www/html/storage/app/ssh
|
||||||
|
- /data/nexo-cloud/applications:/var/www/html/storage/app/applications
|
||||||
|
- /data/nexo-cloud/databases:/var/www/html/storage/app/databases
|
||||||
|
- /data/nexo-cloud/services:/var/www/html/storage/app/services
|
||||||
|
- /data/nexo-cloud/backups:/var/www/html/storage/app/backups
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${DB_USERNAME:-nexo-cloud}
|
||||||
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-nexo-cloud}
|
||||||
|
- POSTGRES_DB=${DB_DATABASE:-nexo-cloud}
|
||||||
|
networks:
|
||||||
|
- nexo-cloud
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}", "-d", "${DB_DATABASE:-nexo-cloud}" ]
|
||||||
|
interval: 5s
|
||||||
|
retries: 10
|
||||||
|
timeout: 2s
|
||||||
|
redis:
|
||||||
|
image: redis:7.2-alpine
|
||||||
|
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
|
||||||
|
environment:
|
||||||
|
- REDIS_PASSWORD="${REDIS_PASSWORD}"
|
||||||
|
networks:
|
||||||
|
- nexo-cloud
|
||||||
|
healthcheck:
|
||||||
|
test: redis-cli ping
|
||||||
|
interval: 5s
|
||||||
|
retries: 10
|
||||||
|
timeout: 2s
|
||||||
|
task:
|
||||||
|
image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest
|
||||||
|
command: ["php", "/var/www/html/artisan", "schedule:work"]
|
||||||
|
stop_signal: SIGTERM
|
||||||
|
networks:
|
||||||
|
- nexo-cloud
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "healthcheck-schedule"]
|
||||||
|
start_period: 10s
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
queue:
|
||||||
|
image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest
|
||||||
|
command: [ "php", "/var/www/html/artisan", "queue:work", "--tries=3" ]
|
||||||
|
stop_signal: SIGTERM
|
||||||
|
networks:
|
||||||
|
- nexo-cloud
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "healthcheck-queue" ]
|
||||||
|
start_period: 10s
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
reverb:
|
||||||
|
image: git.masscivicdynamic.com/masscivicdynamic/nexo-cloud:latest
|
||||||
|
command: [ "php", "/var/www/html/artisan", "--port=8000", "reverb:start" ]
|
||||||
|
stop_signal: SIGTERM
|
||||||
|
environment:
|
||||||
|
- REVERB_APP_ID=${REVERB_APP_ID:-271026}
|
||||||
|
- REVERB_APP_KEY=${REVERB_APP_KEY:-dyadpyflxsz00fd60az2}
|
||||||
|
- REVERB_APP_SECRET=${REVERB_APP_SECRET:-quuxylmbloar05e6kk0e}
|
||||||
|
- REVERB_HOST="${REVERB_HOST:-*}"
|
||||||
|
- REVERB_PORT=${REVERB_PORT:-8000}
|
||||||
|
- REVERB_SCHEME=${REVERB_SCHEME:-http}
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "healthcheck-reverb" ]
|
||||||
|
start_period: 10s
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
nexo-cloud:
|
222
install.sh
222
install.sh
@ -4,6 +4,12 @@
|
|||||||
DOCKER_COMPOSE_URL="https://git.masscivicdynamic.com/masscivicdynamic/nexo-cloud-scripts/raw/branch/main/docker-compose.yml"
|
DOCKER_COMPOSE_URL="https://git.masscivicdynamic.com/masscivicdynamic/nexo-cloud-scripts/raw/branch/main/docker-compose.yml"
|
||||||
KUBERNETES_DEPLOY_URL="https://git.masscivicdynamic.com/masscivicdynamic/nexo-cloud-scripts/raw/branch/main/kube-deploy.yaml"
|
KUBERNETES_DEPLOY_URL="https://git.masscivicdynamic.com/masscivicdynamic/nexo-cloud-scripts/raw/branch/main/kube-deploy.yaml"
|
||||||
ENV_FILE="/data/nexo-cloud/.env"
|
ENV_FILE="/data/nexo-cloud/.env"
|
||||||
|
DATA_DIR="/data/nexo-cloud"
|
||||||
|
SSL_DIR="$DATA_DIR/ssh"
|
||||||
|
KUBE_DIR="$DATA_DIR/kubernetes"
|
||||||
|
SSL_CERT="$SSL_DIR/server.crt"
|
||||||
|
SSL_KEY="$SSL_DIR/server.key"
|
||||||
|
KUBECONFIG_FILE="$KUBE_DIR/config"
|
||||||
|
|
||||||
# Minimum disk space requirements (in GB)
|
# Minimum disk space requirements (in GB)
|
||||||
MIN_TOTAL_DISK_SPACE=30
|
MIN_TOTAL_DISK_SPACE=30
|
||||||
@ -19,15 +25,28 @@ generate_random_password() {
|
|||||||
echo "$(openssl rand -base64 16)"
|
echo "$(openssl rand -base64 16)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to generate a new APP_KEY
|
# Function to generate an APP_KEY
|
||||||
generate_app_key() {
|
generate_app_key() {
|
||||||
echo "$(openssl rand -base64 32)"
|
echo "$(openssl rand -base64 32)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to check disk space requirements
|
# Function to generate SSL certificate
|
||||||
|
generate_ssl_certificate() {
|
||||||
|
if [ ! -f "$SSL_CERT" ] || [ ! -f "$SSL_KEY" ]; then
|
||||||
|
echo "Generating SSL certificate..."
|
||||||
|
mkdir -p "$SSL_DIR"
|
||||||
|
openssl req -newkey rsa:2048 -nodes -keyout "$SSL_KEY" \
|
||||||
|
-x509 -days 365 -out "$SSL_CERT" -subj "/CN=NexoCloud"
|
||||||
|
echo "SSL certificate generated and stored in $SSL_DIR."
|
||||||
|
else
|
||||||
|
echo "SSL certificate already exists in $SSL_DIR."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to check disk space
|
||||||
check_disk_space() {
|
check_disk_space() {
|
||||||
local total_space=$(df --output=size /data | tail -n 1 | awk '{print $1}')
|
local total_space=$(df --output=size "$DATA_DIR" | tail -n 1 | awk '{print $1}')
|
||||||
local available_space=$(df --output=avail /data | tail -n 1 | awk '{print $1}')
|
local available_space=$(df --output=avail "$DATA_DIR" | tail -n 1 | awk '{print $1}')
|
||||||
local total_space_gb=$((total_space / 1024 / 1024))
|
local total_space_gb=$((total_space / 1024 / 1024))
|
||||||
local available_space_gb=$((available_space / 1024 / 1024))
|
local available_space_gb=$((available_space / 1024 / 1024))
|
||||||
|
|
||||||
@ -42,28 +61,73 @@ check_disk_space() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to create the data directory and subdirectories if they don't exist
|
||||||
|
ensure_data_directory() {
|
||||||
|
if [ ! -d "$DATA_DIR" ]; then
|
||||||
|
echo "Creating data directory at $DATA_DIR..."
|
||||||
|
mkdir -p "$DATA_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create subdirectories
|
||||||
|
for subdir in logs ssh applications databases services backups kubernetes; do
|
||||||
|
if [ ! -d "$DATA_DIR/$subdir" ]; then
|
||||||
|
echo "Creating subdirectory $subdir in $DATA_DIR..."
|
||||||
|
mkdir -p "$DATA_DIR/$subdir"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "Directories created successfully."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to copy kubeconfig file if Kubernetes is installed
|
||||||
|
copy_kubeconfig_file() {
|
||||||
|
if command_exists kubectl; then
|
||||||
|
echo "Kubernetes detected. Checking kubeconfig..."
|
||||||
|
if [ -f "$HOME/.kube/config" ]; then
|
||||||
|
mkdir -p "$KUBE_DIR"
|
||||||
|
cp "$HOME/.kube/config" "$KUBECONFIG_FILE"
|
||||||
|
echo "Kubeconfig file copied to $KUBECONFIG_FILE."
|
||||||
|
else
|
||||||
|
echo "Kubeconfig file not found in $HOME/.kube/config."
|
||||||
|
fi
|
||||||
|
elif command_exists k3s; then
|
||||||
|
echo "K3s detected. Checking kubeconfig..."
|
||||||
|
if [ -f "/etc/rancher/k3s/k3s.yaml" ]; then
|
||||||
|
mkdir -p "$KUBE_DIR"
|
||||||
|
cp "/etc/rancher/k3s/k3s.yaml" "$KUBECONFIG_FILE"
|
||||||
|
echo "Kubeconfig file copied to $KUBECONFIG_FILE."
|
||||||
|
else
|
||||||
|
echo "K3s kubeconfig file not found in /etc/rancher/k3s/k3s.yaml."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No Kubernetes or K3s installation detected. Skipping kubeconfig copy."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Function to handle the .env file
|
# Function to handle the .env file
|
||||||
handle_env_file() {
|
handle_env_file() {
|
||||||
if [ ! -f "$ENV_FILE" ]; then
|
if [ ! -f "$ENV_FILE" ]; then
|
||||||
echo "No .env file found. Creating a new one."
|
echo "Environment file not found. Creating a new one."
|
||||||
mkdir -p "$(dirname "$ENV_FILE")"
|
|
||||||
touch "$ENV_FILE"
|
touch "$ENV_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate and append variables
|
|
||||||
APP_KEY=$(generate_app_key)
|
APP_KEY=$(generate_app_key)
|
||||||
APP_NAME="NexoCloud"
|
|
||||||
DB_USERNAME="nexo-cloud"
|
DB_USERNAME="nexo-cloud"
|
||||||
DB_PASSWORD=$(generate_random_password)
|
DB_PASSWORD=$(generate_random_password)
|
||||||
REDIS_PASSWORD=$(generate_random_password)
|
REDIS_PASSWORD=$(generate_random_password)
|
||||||
|
|
||||||
# Set APP_NAME
|
# Ask if user wants to change APP_NAME
|
||||||
if ! grep -q "^APP_NAME=" "$ENV_FILE"; then
|
read -p "Do you want to change the APP_NAME? (y/n) [default: NexoCloud]: " change_app_name
|
||||||
echo "APP_NAME=$APP_NAME" >> "$ENV_FILE"
|
if [ "$change_app_name" == "y" ] || [ "$change_app_name" == "Y" ]; then
|
||||||
echo "Default APP_NAME set to $APP_NAME."
|
read -p "Enter the new APP_NAME: " new_app_name
|
||||||
|
APP_NAME="$new_app_name"
|
||||||
|
else
|
||||||
|
APP_NAME="NexoCloud"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Handle APP_PREVIOUS_KEYS and APP_KEY
|
# Update environment variables
|
||||||
|
sed -i '/^APP_NAME=/d' "$ENV_FILE"
|
||||||
|
echo "APP_NAME=$APP_NAME" >> "$ENV_FILE"
|
||||||
|
|
||||||
if grep -q "^APP_KEY=" "$ENV_FILE"; then
|
if grep -q "^APP_KEY=" "$ENV_FILE"; then
|
||||||
PREVIOUS_KEYS=$(grep "^APP_PREVIOUS_KEYS=" "$ENV_FILE" | cut -d'=' -f2)
|
PREVIOUS_KEYS=$(grep "^APP_PREVIOUS_KEYS=" "$ENV_FILE" | cut -d'=' -f2)
|
||||||
NEW_PREVIOUS_KEYS="${PREVIOUS_KEYS},$(grep "^APP_KEY=" "$ENV_FILE" | cut -d'=' -f2)"
|
NEW_PREVIOUS_KEYS="${PREVIOUS_KEYS},$(grep "^APP_KEY=" "$ENV_FILE" | cut -d'=' -f2)"
|
||||||
@ -75,97 +139,101 @@ handle_env_file() {
|
|||||||
sed -i '/^APP_KEY=/d' "$ENV_FILE"
|
sed -i '/^APP_KEY=/d' "$ENV_FILE"
|
||||||
echo "APP_KEY=$APP_KEY" >> "$ENV_FILE"
|
echo "APP_KEY=$APP_KEY" >> "$ENV_FILE"
|
||||||
|
|
||||||
# Set DB_USERNAME if not present
|
|
||||||
if ! grep -q "^DB_USERNAME=" "$ENV_FILE"; then
|
if ! grep -q "^DB_USERNAME=" "$ENV_FILE"; then
|
||||||
echo "DB_USERNAME=$DB_USERNAME" >> "$ENV_FILE"
|
echo "DB_USERNAME=$DB_USERNAME" >> "$ENV_FILE"
|
||||||
echo "Default DB_USERNAME set to $DB_USERNAME."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set DB_PASSWORD if not present
|
|
||||||
if ! grep -q "^DB_PASSWORD=" "$ENV_FILE"; then
|
if ! grep -q "^DB_PASSWORD=" "$ENV_FILE"; then
|
||||||
echo "DB_PASSWORD=$DB_PASSWORD" >> "$ENV_FILE"
|
echo "DB_PASSWORD=$DB_PASSWORD" >> "$ENV_FILE"
|
||||||
echo "Generated DB_PASSWORD."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set REDIS_PASSWORD if not present
|
|
||||||
if ! grep -q "^REDIS_PASSWORD=" "$ENV_FILE"; then
|
if ! grep -q "^REDIS_PASSWORD=" "$ENV_FILE"; then
|
||||||
echo "REDIS_PASSWORD=$REDIS_PASSWORD" >> "$ENV_FILE"
|
echo "REDIS_PASSWORD=$REDIS_PASSWORD" >> "$ENV_FILE"
|
||||||
echo "Generated REDIS_PASSWORD."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Environment variables set up in $ENV_FILE."
|
echo "Environment variables configured in $ENV_FILE."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to load the .env file
|
# Function to set up Docker
|
||||||
load_env_file() {
|
setup_docker() {
|
||||||
if [ -f "$ENV_FILE" ]; then
|
docker swarm init
|
||||||
export $(grep -v '^#' "$ENV_FILE" | xargs)
|
curl -o "$DATA_DIR/docker-compose.yml" "$DOCKER_COMPOSE_URL"
|
||||||
echo "Environment variables loaded from $ENV_FILE."
|
docker-compose -f "$DATA_DIR/docker-compose.yml" up -d
|
||||||
else
|
}
|
||||||
echo "No .env file found. Exiting."
|
|
||||||
exit 1
|
# Function to deploy Kubernetes application
|
||||||
|
deploy_kubernetes() {
|
||||||
|
curl -o "$DATA_DIR/kubernetes/kube-deploy.yaml" "$KUBERNETES_DEPLOY_URL"
|
||||||
|
kubectl apply -f "$DATA_DIR/kubernetes/kube-deploy.yaml"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main deployment logic
|
||||||
|
deploy_application() {
|
||||||
|
echo "Deploying the application..."
|
||||||
|
if [ "$1" == "docker" ]; then
|
||||||
|
setup_docker
|
||||||
|
elif [ "$1" == "kubernetes" ]; then
|
||||||
|
deploy_kubernetes
|
||||||
fi
|
fi
|
||||||
|
echo "Deployment completed."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main installation logic
|
# Function to handle installation or restart
|
||||||
install_application() {
|
install_application() {
|
||||||
check_disk_space
|
echo "Do you want to:"
|
||||||
handle_env_file
|
echo "1) Install a fresh application"
|
||||||
load_env_file
|
echo "2) Restart the deployment"
|
||||||
|
read -p "Enter your choice (1-2): " deployment_choice
|
||||||
|
|
||||||
if command_exists docker; then
|
if [ "$deployment_choice" == "1" ]; then
|
||||||
echo "Docker detected. Proceeding with Docker setup..."
|
ensure_data_directory
|
||||||
curl -o docker-compose.yml $DOCKER_COMPOSE_URL
|
check_disk_space
|
||||||
echo "docker-compose.yml downloaded successfully."
|
handle_env_file
|
||||||
echo "Running Docker Compose with the environment variables..."
|
generate_ssl_certificate
|
||||||
docker-compose --env-file "$ENV_FILE" up -d
|
|
||||||
elif command_exists kubectl || command_exists k3s; then
|
echo "Choose the platform to install or manage:"
|
||||||
echo "K3s or Kubernetes detected. Proceeding with Kubernetes setup..."
|
echo "1) Docker"
|
||||||
curl -o kubernetes-deploy.yaml $KUBERNETES_DEPLOY_URL
|
echo "2) Kubernetes (K8s)"
|
||||||
echo "kubernets-deploy.yaml downloaded successfully."
|
echo "3) K3s (Lightweight Kubernetes)"
|
||||||
echo "Applying Kubernetes deployment..."
|
read -p "Enter your choice (1-3): " platform_choice
|
||||||
kubectl apply -f kubernetes-deploy.yaml
|
|
||||||
else
|
case $platform_choice in
|
||||||
echo "Neither Docker nor Kubernetes is installed."
|
1)
|
||||||
read -p "Would you like to install Docker or K3s? (docker/k3s): " choice
|
PLATFORM="docker"
|
||||||
case "$choice" in
|
if ! command_exists docker; then
|
||||||
docker)
|
echo "Installing Docker..."
|
||||||
install_docker
|
curl -s https://get.docker.com | sh -s --
|
||||||
curl -o docker-compose.yml $DOCKER_COMPOSE_URL
|
fi
|
||||||
echo "docker-compose.yml downloaded successfully."
|
|
||||||
echo "Running Docker Compose with the environment variables..."
|
|
||||||
docker-compose --env-file "$ENV_FILE" up -d
|
|
||||||
;;
|
;;
|
||||||
k3s)
|
2)
|
||||||
install_k3s
|
PLATFORM="kubernetes"
|
||||||
curl -o kubernetes-deploy.yaml $KUBERNETES_DEPLOY_URL
|
if ! command_exists kubectl; then
|
||||||
echo "kubernets-deploy.yaml downloaded successfully."
|
echo "Installing Kubernetes..."
|
||||||
echo "Applying Kubernetes deployment..."
|
apt-get update && apt-get install -y kubeadm kubectl kubelet
|
||||||
kubectl apply -f kubernetes-deploy.yaml
|
fi
|
||||||
|
copy_kubeconfig_file
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
PLATFORM="kubernetes"
|
||||||
|
if ! command_exists k3s; then
|
||||||
|
echo "Installing K3s..."
|
||||||
|
curl -sfL https://get.k3s.io | sh -
|
||||||
|
fi
|
||||||
|
copy_kubeconfig_file
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid choice. Exiting."
|
echo "Invalid choice. Exiting."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
deploy_application "$PLATFORM"
|
||||||
|
elif [ "$deployment_choice" == "2" ]; then
|
||||||
|
echo "Restarting deployment..."
|
||||||
|
deploy_application "$PLATFORM"
|
||||||
|
else
|
||||||
|
echo "Invalid choice. Exiting."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to install Docker
|
|
||||||
install_docker() {
|
|
||||||
echo "Docker is not installed. Installing Docker..."
|
|
||||||
curl -fsSL https://get.docker.com | bash
|
|
||||||
sudo systemctl start docker
|
|
||||||
sudo systemctl enable docker
|
|
||||||
echo "Docker installed successfully."
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to install K3s
|
|
||||||
install_k3s() {
|
|
||||||
echo "K3s is not installed. Installing K3s..."
|
|
||||||
curl -sfL https://get.k3s.io | sh -
|
|
||||||
echo "K3s installed successfully."
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run the installation process
|
|
||||||
install_application
|
install_application
|
||||||
|
Reference in New Issue
Block a user