Skip to content

Instantly share code, notes, and snippets.

@pagottoo
Last active May 19, 2024 17:33
Show Gist options
  • Select an option

  • Save pagottoo/09d0d164510a33443d4357d29f717c8b to your computer and use it in GitHub Desktop.

Select an option

Save pagottoo/09d0d164510a33443d4357d29f717c8b to your computer and use it in GitHub Desktop.
This Gist contains a provisioning script (provision.sh) designed for an Ubuntu Server running on a Raspberry Pi. The script is intended to be used with cloud-init to automate the initial setup and configuration of the server.
#!/bin/bash
LOGFILE=/var/log/controlplane-init.log
echo "Starting controlplane-init script..." | tee -a $LOGFILE
#!/bin/bash
LOGFILE=/var/log/node-join.log
echo "Starting node-join script..." | tee -a $LOGFILE
#!/bin/bash
LOGFILE=/var/log/provision.log
echo "Starting provisioning script..." | tee -a $LOGFILE
echo "Running step 1: Updating packages" | tee -a $LOGFILE
sudo apt-get update | tee -a $LOGFILE
echo "Running step 2: Installing dependencies" | tee -a $LOGFILE
sudo apt-get install -y some-package | tee -a $LOGFILE
# Other steps will come here...
echo "Provisioning script completed." | tee -a $LOGFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment