Add Google Cloud K3s infrastructure support
- Add Terraform configuration for GCP instance and storage - Add startup script for K3s installation and configuration - Add pipeline scripts for deployment and management - Add Forgejo deployment manifests and configuration
This commit is contained in:
parent
7384722305
commit
2ab7872af1
30 changed files with 1024 additions and 324 deletions
65
gcloud/tf/scripts/pre-flight-checks.sh
Executable file
65
gcloud/tf/scripts/pre-flight-checks.sh
Executable file
|
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "🧪 checking we have tofu insatalled..."
|
||||
if ! command -v tofu &> /dev/null
|
||||
then
|
||||
echo "❌ tofu could not be found, please install it first"
|
||||
echo
|
||||
echo "see https://opentofu.org/docs/intro/install/standalone/"
|
||||
echo
|
||||
echo "and https://opentofu.org/docs/intro/install/ for more details"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ tofu is installed,..."
|
||||
echo
|
||||
tofu version
|
||||
echo
|
||||
|
||||
echo "🧪 checking we have gcloud insatalled..."
|
||||
if ! command -v gcloud &> /dev/null
|
||||
then
|
||||
echo "❌ gcloud could not be found, please install it first"
|
||||
echo
|
||||
echo "see https://cloud.google.com/sdk/docs/install"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ gcloud is installed,..."
|
||||
echo
|
||||
gcloud version
|
||||
echo
|
||||
|
||||
echo "🧪 checking we have kubectl insatalled..."
|
||||
if ! command -v kubectl &> /dev/null
|
||||
then
|
||||
echo "❌ kubectl could not be found, please install it first"
|
||||
echo
|
||||
echo "see https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ kubectl is installed,..."
|
||||
echo
|
||||
kubectl version --client
|
||||
echo
|
||||
|
||||
echo "🧪 checking we have envsubst insatalled..."
|
||||
if ! command -v envsubst &> /dev/null
|
||||
then
|
||||
echo "❌ envsubst could not be found, please install it first"
|
||||
echo
|
||||
echo "on ubuntu you can install it with: sudo apt-get install -y gettext-base"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ envsubst is installed,..."
|
||||
echo
|
||||
envsubst --version
|
||||
echo
|
||||
|
||||
echo "✅ Pre-flight checks passed. You are ready to proceed 🙂"
|
||||
echo
|
||||
Loading…
Add table
Add a link
Reference in a new issue