Skip to content

Instantly share code, notes, and snippets.

View sneal's full-sized avatar

Shawn Neal sneal

View GitHub Profile
@sneal
sneal / Gemfile
Last active September 4, 2019 01:15
Postfacto Running on PCF without Redis
#
# Postfacto, a free, open-source and self-hosted retro tool aimed at helping
# remote teams.
#
# Copyright (C) 2016 - Present Pivotal Software, Inc.
#
# This program is free software: you can redistribute it and/or modify
#
# it under the terms of the GNU Affero General Public License as
#
@sneal
sneal / README.md
Created December 20, 2019 16:02
NSX-T Concourse Tasks

create-transport-node-profile

This task creates a nsx-t transport node profile.

inputs:

  • nsx-t-installation: a git resource containing this repo's tasks

params:

  • NSXT_MANAGER_URL: where nsx-t manager lives, eg nsxmgr-01.haas-417.example.com
  • NSXT_ADMIN_USERNAME: eg admin
@sneal
sneal / letsencrypt-pivotal.md
Last active January 13, 2020 21:21
Lets encrypt instructions for generating a certificate for Pivotal Platform

Let's Encrypt for Pivotal Platform w/Route53

Spin up a Docker container running Ubuntu

docker run -it ubuntu /bin/bash

Now from the running interactive shell we need to install certbot, the route53 plugin, and aws cli.

@sneal
sneal / tf-2-credhub.sh
Created January 27, 2020 21:41
Terraform to CredHub script
#!/bin/bash
# Script to populate all of the current environment's Concourse Credhub values
# based off the Terraform output
set -e
credhub_client_secret="$1"
[[ -z "$credhub_client_secret" ]] && { echo "Error: expected the client secret for credhub_admin_client"; exit 1; }
@sneal
sneal / createFugaciousSecret.sh
Created April 6, 2020 23:56
Create Fugacious Secret with Curl
readonly FUGACIOUS_URL='https://fugacio.us/m'
readonly FUGACIOUS_MAX_VIEWS=3
readonly FUGACIOUS_HOURS='2'
createFugaciousSecret() {
local user_password="${1}"
response=$(curl \
--silent \
--request POST \
@sneal
sneal / readme.md
Last active September 15, 2021 14:13
Expose a TKGI NodePort service

Assuming you've already deployed a pod named helloworld running Nginx on the non-privileged port 8080, for example using the quay.io/bitnami/nginx image.

$ kubectl get pods -o wide
NAME         READY   STATUS    RESTARTS   AGE   IP           NODE                                   NOMINATED NODE   READINESS GATES
helloworld   1/1     Running   0          36m   10.200.1.7   f0287b6b-f419-485c-9ea8-9fc6e21237af   <none>           <none>

Expose a new NodePort service:

@sneal
sneal / readme.md
Created October 6, 2021 16:12
NSX-T layer 4 LB VM Extension
$ cat > ./cf_prod_tcp_vm_extension.yml <<YAML
vm-extension-config:
  name: cf_prod_tcp_vm_extension
  cloud_properties:
    nsxt:
      lb:
        server_pools:
        - name: cf-prod-tcp-router
YAML
@sneal
sneal / fix-ruby.sh
Last active February 10, 2022 15:25
vSphere CPI - Fix Ruby Compilation on Mac
#!/usr/bin/env bash
brew install openssl@1.1
mkdir -p /usr/local/opt/openssl/lib/
ln -s /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib /usr/local/opt/openssl/lib/
ln -s /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/opt/openssl/lib/
pushd /usr/local/opt/openssl/lib/
ln -s libssl.1.1.dylib libssl.dylib
ln -s libcrypto.1.1.dylib libcrypto.dylib
popd
@sneal
sneal / main.go
Created August 11, 2022 21:48
Set vSphere EVC mode on a VM using govmomi
package main
import (
"context"
"fmt"
"github.com/vmware/govmomi"
"github.com/vmware/govmomi/find"
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/property"
"github.com/vmware/govmomi/session"
@sneal
sneal / README.md
Created May 11, 2023 20:51
vsphereVolume manual reattach

Using Pre-Existing Persistent Disks as PersistentVolumes

This explains how to create a PersistentVolume using existing (vsphereVolume) persistent disks populated with data, and how to use the PersistentVolume in a Pod.

Create Nginx Pod With PV

Create a storage class in the nginx namespace, here we're using the obsolete in-tree VCP provisioner:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: vcp-storage