drone-build-status-monitor/demo/remote-script.sh

24 lines
642 B
Bash
Executable File

#!/bin/sh
# DO NOT run this script directly - this will be copied to the Multipass cluster to set up k3s
sudo apt update
sudo NEEDRESTART_MODE=a apt upgrade -y
# Install k3s, and make config file available
curl -sfL https://get.k3s.io | sh -
sudo cp /etc/rancher/k3s/k3s.yaml /tmp/k3s.yaml
sudo chmod +r /tmp/k3s.yaml
# Create necessary directories for local-storage from k3s nodes...
sudo mkdir -p /tmp/gitea-storage
sudo chmod 777 /tmp/gitea-storage
# ...and for certificates...
sudo mkdir -p /tmp/gitea-certs
sudo chmod 777 /tmp/gitea-certs
# ...and for the nginx configuration
sudo mkdir -p /tmp/nginx
sudo chmod 777 /tmp/nginx
exit