This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if AWS environment variables are set | |
if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ] || [ -z "$AWS_SESSION_TOKEN" ]; then | |
echo "One or more AWS environment variables are missing. Please check your environment." | |
exit 1 | |
fi | |
echo "AWS environment variables are set correctly." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# -------------------------------------------------------------- | |
# Backstage Kubernetes Debug Script | |
# -------------------------------------------------------------- | |
# This script helps troubleshoot and validate the integration | |
# between a Backstage app and a Kubernetes cluster (AKS). It: | |
# 1. Checks if the required command-line tools (Azure CLI and kubectl) are installed. | |
# 2. Verifies Azure login status. | |
# 3. Assigns the necessary RBAC role to a specified service principal or user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set variables | |
$namespace = "default" | |
$serviceAccount = "backstage-sa" | |
$roleBinding = "backstage-sa-binding" | |
$tokenFile = "backstage-sa-token.txt" | |
$kubeApiServer = "https://127.0.0.1:50442" | |
$appConfigPath = "./app-config.yaml" | |
Write-Host "Starting troubleshooting for Backstage Kubernetes integration..." -ForegroundColor Green |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Exit immediately if a command exits with a non-zero status | |
set -o pipefail # Fail if any piped command fails | |
# Variables (Adjust as needed) | |
DB_ROOT_PASSWORD="strong_root_password" | |
DB_NAME="my_project_db" | |
DB_USER="project_user" | |
DB_USER_PASSWORD="strong_user_password" |
OlderNewer