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
#!/usr/bin/env bash | |
# AKS Periscope Kustomize Deployment Script | |
# This script will do the following: | |
# - create a SAS token valid for 60 minutes | |
# - deploy AKS Periscope into your cluster | |
# - collect and save logs into the storage account specified | |
# Set some variables for where you want the logs uploaded to: |
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
# get disk for aks to check attachment state during disk expansion | |
# vars | |
$subscriptionName = "" | |
$aksClusterName = "" | |
$aksClusterResourceGroupName = "" | |
$pvcName = "" | |
# login | |
Connect-AzAccount -UseDeviceAuthentication |
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
function Clear-DeletedBranches { | |
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] | |
[Alias("cdb")] | |
param( | |
[Parameter(Mandatory = $false)] | |
[string] | |
$GitDir = $PWD | |
) | |
$defaultBranch = ((git symbolic-ref --short refs/remotes/origin/HEAD) -split "/")[1] |
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
# Testing process to expand k8s PVCs without losing data | |
#region Install | |
# Check the current cluster | |
kubectl config current-context | |
# Add bitnami repo | |
helm repo list | |
helm repo add bitnami https://charts.bitnami.com/bitnami |
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
2020/06/25 12:34:07 [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64] | |
2020/06/25 12:34:07 Checking 'PACKER_CONFIG' for a config file path | |
2020/06/25 12:34:07 'PACKER_CONFIG' not set; checking the default config file path | |
2020/06/25 12:34:07 Attempting to open config file: /home/adamr/.packerconfig | |
2020/06/25 12:34:07 [WARN] Config file doesn't exist: /home/adamr/.packerconfig | |
2020/06/25 12:34:07 Setting cache directory: /mnt/c/Users/adamr/code/Packer-Templates/azure-test/packer_cache | |
2020/06/25 12:34:07 Creating plugin client for path: /usr/local/bin/packer | |
2020/06/25 12:34:07 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-azure-arm"} | |
2020/06/25 12:34:07 Waiting for RPC address for: /usr/local/bin/packer | |
2020/06/25 12:34:07 packer-builder-azure-arm plugin: [INFO] Packer version: 1.6.0 [go1.13.12 linux amd64] |
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 GitLab pipeline status | |
# vars | |
GITLAB_URL="https://gitlab.domain.com" | |
GITLAB_TOKEN="<your_access_token>" | |
# status can be one of: running, pending, success, failed, canceled, skipped, created, manual | |
STATUS="success" | |
# get required info |
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
[CmdletBinding()] | |
param ( | |
[string]$AzDOAccountName = 'adamrushuk', | |
[string]$AzDOArtifactFeedName = 'dev', | |
[string]$AzDOPat, | |
[string]$ModuleFolderPath = (Join-Path -Path $env:SYSTEM_ARTIFACTSDIRECTORY -ChildPath "PowerShellPipeline\PSModule\PSvCloud") | |
) | |
# Variables | |
$feedUsername = 'NotChecked' |
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
#Requires -RunAsAdministrator | |
# Testing KeePass automation against KeePass v2.39.1 | |
# Vars | |
$masterKeyCredential = New-Object -TypeName 'PSCredential' -ArgumentList ('KPMasterUser', (ConvertTo-SecureString -String 'Passw0rd123!' -AsPlainText -Force)) | |
$repoPath = 'C:\Code\KeePass\KeePassDB' | |
$databaseName = 'KeePassDatabase' | |
$databasePath = Join-Path -Path $repoPath -ChildPath "$databaseName.kdbx" | |
$databaseProfileName = 'KeePassDatabaseProfile01' | |
$testGroupName = 'TestAccounts' |
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
<# | |
.SYNOPSIS | |
Configures Azure for secure Terraform access. | |
.DESCRIPTION | |
Configures Azure for secure Terraform access using Azure Key Vault. | |
The following steps are automated: | |
- Creates an Azure Service Principle for Terraform. | |
- Creates a new Resource Group. | |
- Creates a new Storage Account. |
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
# Install Boxstarter and Chocolatey | |
Set-ExecutionPolicy -ExecutionPolicy "RemoteSigned" -Verbose | |
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# Set Explorer options | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -DisableOpenFileExplorerToQuickAccess -DisableShowRecentFilesInQuickAccess -DisableShowFrequentFoldersInQuickAccess -DisableExpandToOpenFolder -DisableShowRibbon | |
# Set Taskbar options | |
Set-TaskbarOptions -Size Large -Lock -Dock Bottom -Combine Always |
NewerOlder