Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .commit-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
🔧 Generated Commit Message:
Scripts: Add existence check — assign-role.ps1

- Improves resilience and avoids silent failures
- Improves resilience and avoids silent failures
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GravityLog.txt
README-Update.log
node_modules/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 📦 CHANGELOG

Generated on 2025-08-24

* 🧹 Removed node_modules from repo history (tokab, 2025-08-24) * 🚫 Ignored node_modules from version control (tokab, 2025-08-24) * 🧼 Finalizing local changes before pull (tokab, 2025-08-24) * 🧼 Cleaned README duplicates and added validator section (tokab, 2025-08-24) * WSL hook test (Todd Wolf, 2025-08-16) * Verify working hook (Todd Wolf, 2025-08-16) * Hook test after pwsh install (Todd Wolf, 2025-08-16) * Trigger pre-commit hook (Todd Wolf, 2025-08-13) * Test pre-commit (Todd Wolf, 2025-08-13) * Ignore local log files for cleaner repo hygiene (tokab, 2025-08-11) * 🧼 Sync README with actual repo modules (tokab, 2025-08-11) * Add GravityPod: Get-PublicIP with logging and README (tokab, 2025-08-11) * docs: refresh README and log commit to GravityLog (Todd Wolf, 2025-08-11) * docs: auto-update README with repo module links (Todd Wolf, 2025-08-11) * docs: update README, changelog, and commit hygiene notes (Todd Wolf, 2025-08-11) * docs: add commit hygiene audit notes (Todd Wolf, 2025-08-11) * Merge pull request #1 from FlashMS/feature/rbac-module (Todd Wolf, 2025-08-11) * Chore: stage workspace and helper scripts (tokab, 2025-08-07) * Update README.md (Todd Wolf, 2025-07-14) * Add script existence check and PowerShell deployment step (Todd Wolf, 2025-08-05) * [Docs] Update README with final structure and usage (Todd Wolf, 2025-08-05) * Fix azure-deploy.yml content (tokab, 2025-06-09) * Full cleanup: updated README and folder restructure (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Update README.md (Todd Wolf, 2025-07-21) * Rename Script to script (Todd Wolf, 2025-07-17) * Update and rename Role Assignment Script to role assignment script (Todd Wolf, 2025-07-17) * Create rbac (Todd Wolf, 2025-07-17) * Delete RBAC (Todd Wolf, 2025-07-17) * Update RBAC (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-15) * Update RBAC (Todd Wolf, 2025-07-15) * Create Role Assignment Script (Todd Wolf, 2025-07-15) * Delete rbac directory (Todd Wolf, 2025-07-15) * Create ├── assign-role.ps1 ├── README.md (Todd Wolf, 2025-07-15) * Create RBAC (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-15) * Create README.md (Todd Wolf, 2025-07-15) * Create README.md (Todd Wolf, 2025-07-15) * Update Script (Todd Wolf, 2025-07-15) * Update Script (Todd Wolf, 2025-07-15) * Update Scripts (Todd Wolf, 2025-07-15) * Update Tier II Monitoring Module (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-15) * Create Script (Todd Wolf, 2025-07-15) * Update Scripts (Todd Wolf, 2025-07-15) * Create Scripts (Todd Wolf, 2025-07-15) * Create Tier II Monitoring Module (Todd Wolf, 2025-07-15) * Update README.md (Todd Wolf, 2025-07-14) * Update azure-deploy.yml (Todd Wolf, 2025-06-30) * Update README with test date 2025-06-09 03:05 PM EDT (tokab, 2025-06-09) * Fix azure-deploy.yml content (tokab, 2025-06-09) * Add azure-deploy.yml workflow (tokab, 2025-06-09) * Trigger workflow test and fix checkout (tokab, 2025-06-09) * Create cli-commands.sh (Todd Wolf, 2025-04-21) * Create delete-resources.ps1 (Todd Wolf, 2025-04-21) * Update deploy-resources.ps1 (Todd Wolf, 2025-04-21) * Create deploy-resources.ps1 (Todd Wolf, 2025-04-21) * Delete scripts (Todd Wolf, 2025-04-21) * Delete # deploy-resources.ps1 (Todd Wolf, 2025-04-21) * Create # deploy-resources.ps1 (Todd Wolf, 2025-04-21) * Update scripts (Todd Wolf, 2025-04-21) * Update scripts (Todd Wolf, 2025-04-21) * Update README.md (Todd Wolf, 2025-04-21) * Update README.md (Todd Wolf, 2025-04-21) * Delete Azure Powershell more (Todd Wolf, 2025-04-21) * Delete Azure PowerShell basics (Todd Wolf, 2025-04-21) * Delete Azure-QuickStart-PSScripts (Todd Wolf, 2025-04-21) * Create workflows. (Todd Wolf, 2025-04-21) * Create scripts (Todd Wolf, 2025-04-21) * Create Azure Powershell more (Todd Wolf, 2025-04-03) * Update Azure PowerShell basics (Todd Wolf, 2025-04-03) * Update and rename PowerShell basics to Azure PowerShell basics (Todd Wolf, 2025-04-03) * Update PowerShell basics (Todd Wolf, 2025-04-03) * Update README.md (Todd Wolf, 2025-04-03) * Update PowerShell basics (Todd Wolf, 2025-04-03) * Create README.md (Todd Wolf, 2025-04-03) * Create PowerShell basics (Todd Wolf, 2025-04-03) * Create Azure-QuickStart-PSScripts (Todd Wolf, 2025-04-03)
120 changes: 120 additions & 0 deletions CommitFixSuggestions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@

### ba6d36f
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 58c88bd
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 48de1fc
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### c4a2936
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 5180e7d
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### bbfdb65
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 9a9642d
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### fe6b389
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 09b9e7c
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 714ae5c
- ❌ Original: Rename Script to script
- ✅ Suggested: refactor: rename Script.ps1 to script.ps1 for consistency

### 0c9a2da
- ❌ Original: Update and rename Role Assignment Script to role assignment script
- ✅ Suggested: refactor: rename and update role assignment script for clarity

### 5fabd3d
- ❌ Original: Create RBAC
- ✅ Suggested: feat: add initial RBAC module

### b5dd797
- ❌ Original: Delete RBAC
- ✅ Suggested: chore: remove deprecated RBAC module

### 305c2a8
- ❌ Original: Update RBAC
- ✅ Suggested: refactor: adjust RBAC logic and structure

### ab78182
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 1fd88e7
- ❌ Original: Update RBAC
- ✅ Suggested: refactor: adjust RBAC logic and structure

### ec88e43
- ❌ Original: Create Role Assignment Script
- ✅ Suggested: feat: add role assignment script for Azure deployment

### 3d330ee
- ❌ Original: Delete RBAC
- ✅ Suggested: chore: remove deprecated RBAC module

### 9104593
- ❌ Original: Create RBAC
- ✅ Suggested: feat: add initial RBAC module

### d374058
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### db419b1
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### 7518032
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### f1733c4
- ❌ Original: Create README.md
- ✅ Suggested: docs: add initial README for module

### 3c64446
- ❌ Original: Create README.md
- ✅ Suggested: docs: add initial README for module

### 5e71cf7
- ❌ Original: Update Script
- ✅ Suggested: refactor: improve script logic for role assignment

### 3e38dc6
- ❌ Original: Update Script
- ✅ Suggested: refactor: improve script logic for role assignment

### 3f06290
- ❌ Original: Update Script
- ✅ Suggested: refactor: improve script logic for role assignment

### e64cfcd
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README

### ea00dd5
- ❌ Original: Update Script
- ✅ Suggested: refactor: improve script logic for role assignment

### 0c9a283
- ❌ Original: Update README.md
- ✅ Suggested: docs: clarify usage or structure in README
16 changes: 16 additions & 0 deletions GravityLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

:
Old:
New:
---
### Commit:
**Old Message:**
**New Message:**
---

[2025-08-11 15:05:57]
🔧 Generated Commit Message:
Scripts: Add existence check — assign-role.ps1

- Improves resilience and avoids silent failures

1 change: 1 addition & 0 deletions GravityPods/Network/PublicIP/Get-PublicIP.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<paste script here>
1 change: 1 addition & 0 deletions GravityPods/Network/PublicIP/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<paste README here>
Empty file added GravityToolkit.psm1
Empty file.
26 changes: 26 additions & 0 deletions Intern/UCE/UCE_Validator_Confirm-OAS3Schema.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function Confirm-OAS3Schema {
param (
[string]$SpecPath,
[switch]$Verbose,
[switch]$Confirm
)

if (-not (Test-Path $SpecPath)) {
Write-Error "Spec file not found: $SpecPath"
return
}

if ($Confirm) {
$response = Read-Host "Confirm validation of $SpecPath (Y/N)"
if ($response -ne 'Y') {
Write-Host "Operation cancelled."
return
}
}

if ($Verbose) {
Write-Host "Validating OpenAPI schema at: $SpecPath"
}

node .\oas3-validator.js $SpecPath
}
Empty file.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<paste full function here>
<paste full function here>
Empty file.
12 changes: 12 additions & 0 deletions Intern/scripts_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# GravitySystem Script Index

| File Name | Project | Logic Type | Description | Status |
|---|---|---|---|---|
| UCE_Validator_Confirm-OAS3Schema.ps1 | UCE | Validator | Confirm-OAS3Schema | Draft |
| UCE_Validator_Enable-WSLMetadata.ps1 | UCE | Validator | Enable-WSLMetadata | Draft |
| UCE_Validator_ResolveAndCommit.ps1 | UCE | Validator | ResolveAndCommit | Draft |
| UCE_Validator_Update-ToolkitReadme.ps1 | UCE | Validator | Update-ToolkitReadme | Draft |
| UCE_Validator_Confirm-OAS3Schema.ps1 | | | | |
| UCE_Validator_Enable-WSLMetadata.ps1 | | | | |
| UCE_Validator_ResolveAndCommit.ps1 | | | | |
| UCE_Validator_Update-ToolkitReadme.ps1 | | | | |
74 changes: 15 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,19 @@
# Azure-Admin-Portfolio
![PowerShell](https://img.shields.io/badge/PowerShell-7.2-blue)
![Modules](https://img.shields.io/badge/Modules-5-green)
![CI](https://img.shields.io/badge/CI-Simulated-yellow)
![Last Updated](https://img.shields.io/date/1692873600?label=Last%20Updated)

## 🔍 OpenAPI Schema Validator

This repo includes a modular validator for OpenAPI 3.0 specs using [`swagger-parser`](https://www.npmjs.com/package/swagger-parser).
### Usage
```powershell
Confirm-OAS3Schema -SpecPath ".\oas3.yaml" -Verbose -Confirm
This repo includes a modular validator for OpenAPI 3.0 specs using [swagger-parser](https://www.npmjs.com/package/swagger-parser).
$validatorDoc = @'

This portfolio is a modular, automation-ready toolkit designed for hybrid cloud administrators. It showcases resilient PowerShell scripting, session continuity workflows, and secure Azure deployment practices — all built with portability, recovery, and clarity in mind.

It also demonstrates hands-on Azure administration using PowerShell, Azure CLI, and GitHub Actions — automating resource creation and management to highlight DevOps fluency and cloud lifecycle control.
Updated: 2025-08-24 20:47:06

---

## Key Features

- Deployment automation via GitHub Actions and service principal authentication
- Modular PowerShell tools for alias management, logging, and session restoration
- Monitoring starter scripts for Log Analytics, Alerts, and Metrics
- Role-based access control (RBAC) scaffolds for secure resource management
- Infrastructure as Code samples for scalable provisioning
- CLI and PowerShell scripts for resource lifecycle management
- YAML workflows for CI/CD deployment automation

---

## 📁 Folder Structure

```
Azure-Admin-Portfolio/ ├── README.md ├── PowerShellToolkit/ │ ├── initProfile.ps1 │ ├── aliases.ps1 │ ├── sessionTracker.ps1 │ └── tools/ │ ├── syncLogs.ps1 │ └── archiveLogs.ps1 ├── Monitoring/ │ ├── README.md │ ├── LogAnalytics/ │ ├── Alerts/ │ └── Metrics/ ├── RBAC/ │ ├── define-roles.ps1 │ └── assign-role.ps1 ├── IaC/ │ └── deploy-vnet.bicep ├── scripts/ │ ├── deploy-resources.ps1 │ ├── delete-resources.ps1 │ └── cli-commands.sh ├── .github/ │ └── workflows/ │ └── azure-deploy.yml ├── validate.yml ├── rbac/ ├── Tier II Monitoring Module/ └── role assignment script/
```


---

## Getting Started

1. Clone the repo to your local or cloud development environment
2. Run `PowerShellToolkit/initProfile.ps1` to initialize session tools and aliases
3. Customize your deployment workflow in `.github/workflows/azure-deploy.yml`
4. Reference `Monitoring/` and `RBAC/` for additional provisioning scripts

---

## Setup

- Azure account with active subscription
- PowerShell 7+ with Az module (`Install-Module -Name Az`)
- Azure CLI installed (`az login`)
- GitHub repository with secrets configured (see below)

### Configure Azure Credentials

Create a service principal:

```bash
az ad sp create-for-rbac --name "PortfolioSP" --role Contributor --scopes /subscriptions/<your-subscription-id>


---

## 🧩 Next Steps

1. Replace the contents of `README.md` with the above.
2. Run:

```bash
git add README.md
git rebase --continue
Updated: 2025-08-24 20:57:23
19 changes: 19 additions & 0 deletions oas3-validator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const parser = require("swagger-parser");
const path = process.argv[2];

if (!path) {
console.error("Error: No spec path provided.");
process.exit(1);
}

parser.validate(path)
.then(api => {
console.log("✅ OpenAPI schema is valid.");
console.log(`Title: ${api.info.title}`);
console.log(`Version: ${api.info.version}`);
})
.catch(err => {
console.error("❌ Schema validation failed:");
console.error(err.message);
process.exit(1);
});
11 changes: 11 additions & 0 deletions oas3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
openapi: 3.0.0
info:
title: Sample API
version: 1.0.0
paths:
/hello:
get:
summary: Returns a greeting
responses:
'200':
description: A successful response
Loading