ci: add Control Center bootstrap script and RenovateBot workflow
This commit is contained in:
parent
dd2065cf60
commit
960f8f63fe
2 changed files with 60 additions and 0 deletions
35
scripts/control-center-bootstrap.sh
Executable file
35
scripts/control-center-bootstrap.sh
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "=========================================="
|
||||
echo " Bootstrapping Control Center VM "
|
||||
echo "=========================================="
|
||||
|
||||
# Ensure script is run with appropriate permissions (this script might run as part of Cloud-Init or manually)
|
||||
|
||||
if ! command -v terraform &> /dev/null; then
|
||||
echo "Terraform not found. Please ensure it is installed via Nix."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "1. Initializing proxmox-bootstrap state..."
|
||||
cd terraform/proxmox-bootstrap
|
||||
terraform init
|
||||
|
||||
echo "2. Applying proxmox-bootstrap (Requires manual approval if not passing -auto-approve)"
|
||||
echo " This will configure the restricted terraform@pve user on the Proxmox host."
|
||||
# Uncomment the following line to auto-approve in a fully automated environment
|
||||
# terraform apply -auto-approve
|
||||
terraform apply
|
||||
|
||||
echo "3. Fetching the generated API token..."
|
||||
TF_TOKEN=$(terraform output -raw terraform_api_token)
|
||||
|
||||
echo "=========================================="
|
||||
echo " IMPORTANT: Save the following token into "
|
||||
echo " Forgejo Secrets as PROXMOX_TOKEN_SECRET "
|
||||
echo "=========================================="
|
||||
echo "$TF_TOKEN"
|
||||
echo "=========================================="
|
||||
|
||||
echo "Control Center Bootstrap Complete."
|
||||
Loading…
Add table
Add a link
Reference in a new issue