Skip to content

Instantly share code, notes, and snippets.

View markjacksonfishing's full-sized avatar
🎣
Fishing

Mark Jackson markjacksonfishing

🎣
Fishing
View GitHub Profile
@markjacksonfishing
markjacksonfishing / aws_auth.sh
Last active August 4, 2024 14:06
Backstage aws auth
#!/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."
#!/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.
@markjacksonfishing
markjacksonfishing / troubleshoot_backstage.ps1
Created August 12, 2024 23:58
troubleshoot_backstage.ps1
# 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
#!/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"