Friday, December 18, 2020

Azure to OCI VPN

So we wanted to connect an Azure Vnet to our OCI network.  And the Azure gear is all configured in Terraform.


The trick to getting this to to work was tweeking the IPSec settings on the gateway.  Here is what we needed:

  ipsec_policy {
    ike_encryption   = "AES256"
    ike_integrity    = "SHA384"
    dh_group         = "DHGroup2"

    ipsec_encryption = "AES256"
    ipsec_integrity  = "SHA1"
    pfs_group        = "PFS2"
  }

Thursday, May 14, 2020

Checklists

Years ago I read the Checklist Manafesto.  It was a great work on why checklists matter.  Now we try to automate things as much as possible.  So now 12 steps of the checklist might be reduced to "push the green button".  And not everything can be automated. 

SRE weekly included a link to Bill Duncan's blog entry "Checklists and Runbooks".  It's a good reminder on how and when to use checklists.

Tuesday, March 10, 2020

Two employees

I'm still loving the new job.  I'm liking the work and the people.  Most of all I'm working remote!

One thing that keeps occurring to me though.  We have restricted access to production systems, of course.  But I keep thinking of Warren Bennis's statement: 
The factory of the future will have only two employees, a man and a dog. The man will be there to feed the dog. The dog will be there to keep the man from touching the equipment.
The more we automate, use code control with IaaS, and put everything in DevOps, the more we're approaching that.  In The Phoenix Project the protagonist learns how doing IT and Development is a lot like running a running a factory.  If I take that idea and mix it with Bennis's prediction then I would expect to see production environments have a "digital dog" that protects the environment.

That's not too far off from what the security roles do for us.  But the more we put into code control the less reason we have to be doing anything in the production systems.

The other part of making it work is having visibility without going into the systems.  We might think of it like having a robot that can go around the factory to look at things, or cameras looking at all the machines.  We call it things like "reporting" or "telemetrics".  But the idea is measure everything that could matter and make it visible from outside.  That could be Datadog, App Insights, or a home made monitoring app.  If we can see everything we need to know about, then we don't have to go into the factory building.

That is fantastic for physical safety.  It also follows the rule of thumb for hazmat responses.  (Be far enough away that you can cover the entire site with your thumb.)  I think that is why in DevOps safety is more about the social side than the physical.  But it will matter a lot for a company doing a digital transformation that includes physical manufacturing.


Friday, February 14, 2020

First week as an SRE

I started as a Site Reliability Engineer (SRE) this week.  I'll have less traditional IT work to do and more Web App work.  Mostly the same tech, starting with Azure.  Working at a software company.

I've been better about starting a script to setup my tools this time.  I've manually installed PowerShell 7 RC2 and VS Code.  Then I have this for setting them up further (GitHub link):

# Install modules
Install-Module Az
Install-Module AzureAD

# Install RSAT (all)
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

# Update help
Update-Help -Force

# Schedule help to be updated automatically
$ActionParams = @{ 
    Execute  = 'PowerShell.exe' 
    Argument = '-NoProfile -ExecutionPolicy Bypass -Command Update-Help -Force' 
}
$Action      = New-ScheduledTaskAction @ActionParams
$Trigger     = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Wednesday -At '9:02:00' -RandomDelay '0:03:00' 
$Principal   = New-ScheduledTaskPrincipal -GroupId 'BUILTIN\Administrators' -RunLevel Highest
$SettingsSet = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
Register-ScheduledTask -TaskName 'Update PowerShell Help' -Action $Action -Trigger $Trigger -Principal $Principal -Settings $SettingsSet

# Create transcripts folder
$TranscriptsFolder = "$env:USERPROFILE\PowerShellTranscripts"
if (-not $(Test-Path -Path $TranscriptsFolder)) {
        New-Item -Path "~" -Name PowerShellTranscripts -ItemType Directory
}

# Setup transcripts for Windows PowerShell
$TranscriptLine = "Start-Transcript -Path $TranscriptsFolder\WindowsPowerShell.`$(Get-Date -Format yyMMdd).txt`r`n"
$ProfilePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1"
try {$ProfileContent = Get-Content -Path $ProfilePath}
    catch {$ProfileContent = ''}
if ($ProfileContent -notcontains $TranscriptLine) {
    $ProfileContent += $TranscriptLine
    Out-File -InputObject $ProfileContent -FilePath $ProfilePath
}
# Setup transcripts for PowerShell (core)
$TranscriptLine = "Start-Transcript -Path $TranscriptsFolder\PowerShell.`$(Get-Date -Format yyMMdd).txt`r`n"
$ProfilePath = "$env:USERPROFILE\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
try {$ProfileContent = Get-Content -Path $ProfilePath}
    catch {$ProfileContent = ''}
if ($ProfileContent -notcontains $TranscriptLine) {
    $ProfileContent += $TranscriptLine
    Out-File -InputObject $ProfileContent -FilePath $ProfilePath
}
# Setup transcripts for VS Code
$TranscriptLine = "Start-Transcript -Path $TranscriptsFolder\VSCode.`$(Get-Date -Format yyMMdd).txt`r`n"
$ProfilePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.VSCode_profile.ps1"
try {$ProfileContent = Get-Content -Path $ProfilePath}
    catch {$ProfileContent = ''}
if ($ProfileContent -notcontains $TranscriptLine) {
    $ProfileContent += $TranscriptLine
    Out-File -InputObject $ProfileContent -FilePath $ProfilePath
}

Oh, and dark mode everywhere I can get it.

So far, so fun.  I'm still using what I know but getting to look at Azure from a bit different angle!