Skip to content

Instantly share code, notes, and snippets.

@clhynfield
clhynfield / .envrc
Last active March 18, 2021 20:20
Setting and forgetting secrets in the environment with direnv and LastPass CLI
#!/bin/bash
read_secret() {
local path="$1"
note="$(lpass show --notes $path 2>/dev/null)"
if [[ $? -ne 0 ]]; then
echo "Can't read LastPass note" >&2
return 1
fi
echo "$note"

Keybase proof

I hereby claim:

  • I am clhynfield on github.
  • I am clhynfield (https://keybase.io/clhynfield) on keybase.
  • I have a public key ASCuvNl7TOl0H-2j86ZK89ZG-UUqUGfvbU0b7txh0SMTSAo

To claim this, I am signing this object:

# The pipeline downloads dependencies consumed by the tasks and places them into
# a trusted storage provider (artifactory in this case). This helps other
# concourse deployments without internet access retrieve task dependencies.
resource_types:
- name: pivnet
type: docker-image
source:
repository: pivotalcf/pivnet-resource
tag: latest-final
@clhynfield
clhynfield / env.yml
Created July 19, 2019 01:12
Vault interpolation task for Platform Automation
---
target: (( vault $VAULT_PREFIX "opsman_url:value" ))
username: (( vault $VAULT_PREFIX "opsman_username:value" ))
password: (( vault $VAULT_PREFIX "opsman_password:value" ))
decryption-passphrase: (( vault $VAULT_PREFIX "opsman_passphrase:value" ))
connect-timeout: 30
request-timeout: 1800
skip-ssl-validation: false
@clhynfield
clhynfield / pipeline.yml
Last active July 17, 2019 16:38
Mapping interpolated env configs
# AFTER - export-installation uses post-interpolated configurations
- name: export-installation
serial: true
plan:
- aggregate:
- get: daily-trigger
trigger: true
- get: platform-automation-image
params:
unpack: true
@clhynfield
clhynfield / OpsManager-version-as-code.md
Last active July 15, 2019 12:23
Test-driving Ops Manager version as code

Version Ops Manager via code

As a Platform Engineer, I want to select the version of Ops Manager with a config file So that I can manage software life cycle via source control

Given access to a paved IaaS
  And a PCF config-as-code repo
 And a Control Plane for PCF
@clhynfield
clhynfield / .envrc
Created June 21, 2019 15:28
Ops Manager .envrc
if [ -z "$OM_TARGET" ]; then
export OM_TARGET=opsman.cplane.mydomain.io
fi
if [ -z "$OM_USERNAME" ]; then
export OM_USERNAME='admin'
fi
if [ -z "$OM_SKIP_SSL_VALIDATION" ]; then
export OM_SKIP_SSL_VALIDATION=true
fi
if [ -z "$OM_PRIVATE_KEY_PATH" ]; then

Our Core Practices

Pivotal Labs | Platform

2019 Offsite


Pivotal Labs’ Approach to Modern Product Development

Our approach to product development is informed by over 20 years of experience and continuous improvement.

cred_path="/p-bosh/control-plane"
credhub_config="$HOME/.credhub/config.json"
eval "$(om bosh-env)"
if [ -f "$credhub_config" ]; then
rm "$credhub_config"
fi
credhub_ca_cert="$(
I haven't been able to count the number of disparate contexts that the onboarding contributor has to coordinate, because I flat-out cannot understand them, myself, but I think the problem lies squarely in that disjunction, Tom: the one and only agent owning the collection of these myriad contexts is the person to whom they are unknown