Initial commit: add .gitignore and README

This commit is contained in:
defiQUG
2026-02-09 21:51:52 -08:00
commit 5d47b3a5d9
49 changed files with 5633 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
#!/bin/bash
# Load shared libraries
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
# Script to set up shared infrastructure services
set -e
echo "🏗️ Setting up shared infrastructure services..."
# Check prerequisites
command -v kubectl >/dev/null 2>&1 || { echo "❌ kubectl not found"; exit 1; }
command -v helm >/dev/null 2>&1 || { echo "❌ helm not found"; exit 1; }
# Configuration
NAMESPACE="shared-services"
REGISTRY_NAMESPACE="container-registry"
echo "📋 Creating namespaces..."
kubectl create namespace "$NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
kubectl create namespace "$REGISTRY_NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
echo "📦 Setting up Prometheus/Grafana..."
# Add Prometheus Helm repo
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
# Install Prometheus Stack
helm upgrade --install prometheus prometheus-community/kube-prometheus-stack \
--namespace "$NAMESPACE" \
--create-namespace \
--set prometheus.prometheusSpec.retention=30d \
--wait || echo "⚠️ Prometheus installation skipped (may already exist)"
echo "📊 Setting up Loki for logging..."
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm upgrade --install loki grafana/loki-stack \
--namespace "$NAMESPACE" \
--create-namespace \
--wait || echo "⚠️ Loki installation skipped (may already exist)"
echo "🐳 Setting up container registry (Harbor)..."
# Harbor setup would go here
echo " → Harbor setup requires additional configuration"
echo " → See: https://goharbor.io/docs/"
echo "✅ Shared infrastructure setup initiated!"
echo ""
echo "📝 Next steps:"
echo " 1. Configure Prometheus/Grafana dashboards"
echo " 2. Set up Loki log aggregation"
echo " 3. Deploy container registry"
echo " 4. Configure monitoring alerts"
echo " 5. Migrate projects to shared infrastructure"

45
infrastructure/setup.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
# Workspace Setup Script
# Initializes the workspace with required tools and dependencies
set -e
# Load shared libraries
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
log_heading "🚀 Setting up workspace..."
log_step "Checking required tools..."
require_command node
require_command npm
require_command git
# Check for pnpm
if check_command pnpm; then
log_success "pnpm is installed"
else
log_info "Installing pnpm..."
npm install -g pnpm
log_success "pnpm installed"
fi
# Install workspace dependencies if package.json exists
PROJECT_ROOT="$(get_project_root)"
if [ -f "$PROJECT_ROOT/package.json" ]; then
log_step "Installing workspace dependencies..."
cd "$PROJECT_ROOT"
pnpm install
log_success "Workspace dependencies installed"
fi
# Install root-level dependencies
if [ -f "$PROJECT_ROOT/pnpm-workspace.yaml" ]; then
log_step "Installing monorepo dependencies..."
cd "$PROJECT_ROOT"
pnpm install
log_success "Monorepo dependencies installed"
fi
log_success "Workspace setup complete!"