Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Yates Alex-Yates

View GitHub Profile
View Update__DeployLog.ps1
<#
Required variables:
$DLM_PackageStep
$DLM_DeployStep
$DLM_ServerInstance
$DLM_Database
Optional variables (include for SQL Auth, exclude for WinAuth):
$DLM_Username
$DLM_Password
View Read__DeployLog.ps1
<#
Required variables:
$DLM_PackageStep
$DLM_ServerInstance
$DLM_Database
Optional variables (include for SQL Auth, exclude for WinAuth):
$DLM_Username
$DLM_Password
#>
View ListRunningInstances.ps1
# These are the states that an EC2 VM can be in
# (I'm doing it this way to ensure I've considered all possible states. If it ever becomes possible for an instance
# to be in a different state, and one of my instance enters that state, this script should throw and error)
[array]$expectedStates = "pending","running","shutting-down","terminated","stopping","stopped"
# Asking EC2 what VMs I have running
$states = @()
Get-EC2Instance | ForEach-Object {
$_.RunningInstance | ForEach-Object {
$instanceId = (Get-EC2Instance $_.InstanceId).Instances.InstanceId
View dealing_with_the_other_people.txt
"No mater what they tell you, it's always a people problem."
Gerald Weinberg
DevOps, DevSecOps, BizDevOps, DataOps, KittenOps...
It's over a decade since Andrew Clay Shafer first described the "wall of confusion" between development and operations. By now many of us have been hacking away at it for years, and in some places we've made progress. However, at the same time the wall has been sprouting new limbs and reinforcing itself, further dividing our organisations into warring tribes and, ultimately, conquering them.
In this session we'll start by staging a debate between an ex- "wild west" "DevOps-ist" and an ex-grumpy DBA as a case study to explore the reasons why most of us, unintentionally, are predisposed to reinforce the walls rather than tear them down.
This is a session about trust, vulnerability, unconscious biasses and politics. We'll also touch on ITIL, Agile and risk management, but we are here first and foremost to talk about people, collaboration and teamwork.
View download_script_from_github.ps1
Function Get-Script{
param (
[Parameter(Mandatory=$true)][string]$script, # the name of the file (needs to be in repo root, otherwise tweak this function)
[string]$owner = "my-username", # repo owner (github username)
[string]$repo = "my-repo", # name of repo
[string]$branch = "master",
[string]$outputDir = ""
)
# the raw page for the script
View install_tentacle.ps1
param (
[Parameter(Mandatory=$true)]$octopusServerThumbprint,
[Parameter(Mandatory=$true)]$yourApiKey,
[Parameter(Mandatory=$true)]$octopusServerUrl,
[Parameter(Mandatory=$true)]$registerInEnvironments,
$tentacleDownloadPath = "http://octopusdeploy.com/downloads/latest/OctopusTentacle64"
$registerInRoles = "web-server"
$tentacleListenPort = 10933
$tentacleHomeDirectory = "C:\Octopus"
$tentacleAppDirectory = "C:\Octopus\Applications"
View PersonalSpeakerInclusionPolicy.txt
17th July 2020
As a cis, white, straight, middle class, able-bodied man, I recognise my royal flush of privilege.
I'm very lucky. I was born into a loving and supportive family and I've had remarkably few obstacles
put in my way. Had I not been born with all those advantages, I probably would not have achieved
everything that I have achieved.
Representation is important. I understand that for various reasons it is not easy for events to
create agendas with speakers that fully reflect their community. I also understand that the community
is divided on how best to solve this problem. I don't pretend to have all the answers. I also don't
View OctopusClass1Abstract
Title:
Build your own database deployment pipeline with Octopus Deploy and either SSDT or Redgate SQL Change Automation
Abstract:
Automated deployments enable teams to deliver value faster, more reliably and for less money. If your database deployments are still slow, manual and error prone, and your business wants to remain competitive, building an automated database deployment pipeline should be a high priority.
However, this can be difficult because it requires a working knowledge of various technologies, as well as an understanding about how to glue them all together. For example, folks need to understand database technologies, scripting languages, source control tools and CI/CD architectures, as well as all the necessary networking. To create a truly successful deployment pipeline it often requires collaboration between multiple specialists with a generalist to guide them.
This session is both for the aspiring generalists who wants to understand the big picture and for the specialist who wants to lear
View agentjob.sql
-- First we delete the job if it allready exists
-- Note: use @job_name instead of @job_id for the delete (SQL default is to use ID, but that only works first time)
-- Note: use @delete_history=0 to maintain job history. History will still be deleted in SSMS Agent GUI.
-- However, it will be persisted in sysjobhistory table in the msdb database.
/****** Object: Job [TestyMcJobFace] Script Date: 07/02/2020 10:39:22 ******/
IF EXISTS (SELECT job_id FROM msdb.dbo.sysjobs_view WHERE name = N'TestyMcJobFace')
EXEC msdb.dbo.sp_delete_job @job_name=N'TestyMcJobFace', @delete_unused_schedule=1, @delete_history=0
GO
View why-how-what.txt
Why:
We believe that when we invest in people and teams, they do better work and make more valuable contributions to their organisations, communities and our world.
How:
We do this by teaching people to create safe systems of work, where they can experiment, refine ideas and iterate on them to deliver constantly evolving and improving products.
What:
We offer DevOps training classes, consulting services and coaching/mentoring packages, with a specialism in database DevOps. We don't build your product for you, we give your people the skills to build them for themselves - throughout their careers.
You can’t perform that action at this time.