Skip to content

Instantly share code, notes, and snippets.

Enabling Intel AMT Serial over Lan (SOL) on Ubuntu

Grepping syslog for tty's, this was the only one to come up on my machine

$ sudo zgrep -a tty /var/log/syslog.*
...
Jun 26 08:25:53 taro kernel: [    1.786819] 0000:00:16.3: ttyS4 at I/O 0x30a0 (irq = 19, base_baud = 115200) is a 16550A
...
## example configuration for the inventory
## copy this file as 'config.yml' and replace the values with your own
hostname: puppetdb ## (str) the hostname of the PuppetDB server to use
port: 8081 ## (int) the port PuppetDB is listening on
ssl: true ## (bool) whether to use SSL/TLS for the connection (https)
cacert: /Users/name/.config/puppetdb.ca.crt ## (str) path to the ca certificate
@SeanHood
SeanHood / readWriteHCLWithGo.go
Created March 31, 2022 12:01
Read/Update/Write HCL2 with Go + hclwrite
package main
import (
"fmt"
"io/ioutil"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/zclconf/go-cty/cty"
)
@SeanHood
SeanHood / Jenkinsfile
Created August 27, 2021 08:56
Painless Puppet CICD: Bitbucket Branch Source Magic + a Puppet/r10k Jenkinsfile
pipeline {
agent any
stages {
stage('Tests') {
parallel {
stage('Validate Puppetfile') {
agent { dockerfile { reuseNode true } }
steps {
sh 'bundle exec rake r10k:syntax'
$ kubectl label po green-5c8f858bbb-mqxrd app=blue pod-template-hash=5bc56d75b --overwrite
NAME                     READY   STATUS              RESTARTS   AGE   LABELS
blue-5bc56d75b-5j462     1/1     Running             0          15m   app=blue,pod-template-hash=5bc56d75b
blue-5bc56d75b-wwn8c     1/1     Terminating         0          27s   app=blue,pod-template-hash=5bc56d75b
green-5c8f858bbb-bsjwv   0/1     ContainerCreating   0          0s    app=green,pod-template-hash=5c8f858bbb
green-5c8f858bbb-mqxrd 1/1 Running 0 15m app=blue,pod-template-hash=5bc56d75b
@SeanHood
SeanHood / README.md
Last active February 3, 2021 09:36
Terraform and OPA/Conftest/Rego, what a pain in the arse it is

Terraform and OPA/Conftest/Rego, what a pain in the arse it is

So this has taken me 24+ hours to figure out. All docs, references to using OPA with Terraform are about testing the plan. I want some static analysis on raw .tf files. An OPA based linter if you will.

First thing I ran into was iterating over an object, then being able to use it's key. In Python I'd do: for k,v in dict. In Rego, we do hash[key], then just go and use key wherever. ¯\_(ツ)_/¯ Maybe this will make more sense the more I use Rego.

@SeanHood
SeanHood / README.md
Last active October 16, 2020 18:04
Neat & Secure: Adding AWS SQS to a Laravel 5.6 Application

Neat & Secure: Adding AWS SQS to a Laravel 5.6 Application

Y'know sometime when you're working on an old codebase? and you wanna do something "new" but the docs don't really help you much? Yeah?

That's what I'm documenting here.

So I'm working on getting a Laravel 5.6 application into AWS Fargate with Terraform. This application began life as a Laravel 5.0 app ~6 years ago, so some of the codebase was somewhat templated from then. I’d like so add, I’m not so much a software developer and not a PHP one at that. More a gluer-together-of-parts-er, on of those “DevOps” you hear of. So this is part guide part journey.

Making changes

First up I made changes to the config, config/queue.php.

@SeanHood
SeanHood / README.md
Last active January 14, 2021 11:25
Puppet 4 + Hiera 5 + Hashicorp Vault

Puppet 4 + Hiera 5 + Hashicorp Vault

Quick guide for setting up Vault with Puppet

What doesn't this cover

  • Building a Production grade Vault cluster
  • Puppet 5 and 6 (Yes, I know Puppet 4 is EOL)
  • Vault Dynamic Secrets
  • The more secure Puppet 6 deferred functions
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tvmosaic
namespace: dvb
labels:
app: tvmosaic
annotations:
flux.weave.works/automated: "true"
@SeanHood
SeanHood / tvmosaic.yaml
Created September 14, 2019 22:33
TV Mosaic in K3s with a side of FluxCD
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tvmosaic
namespace: dvb
labels:
app: tvmosaic
annotations:
flux.weave.works/automated: "true"