Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am miclip on github.
  • I am miclip (https://keybase.io/miclip) on keybase.
  • I have a public key ASCGfUjAGdBE79AIihl1HPEW25q1rQs5gvf5hT-g0PBTFAo

To claim this, I am signing this object:

perl ..\sqlserver2pgsql\sqlserver2pgsql.pl -b .\before_script.sql -a after_script.sql -u un
sure_script.sql -k .\kettle\ -sd [DATABASE] -sh localhost -sp 1433 -su sa -sw [PASSWORD] -pd [DATABASE] -ph localhost -pp 5432 -pu pos
tgres -pw [PASSWORD] -f .\MyDb.sql -camel_to_snake
psql [DATABASE] -f .\before_script.sql
.\Kitchen.bat -file ..\..\kettle\migration.kjb -level detailed
psql [DATABASE] -f .\after_script.sql
@miclip
miclip / vault-interpolate.sh
Created August 8, 2019 14:38
Concourse Vault Interpolate Task
#!/bin/bash
set -ex
vault login $VAULT_TOKEN -no-print=true >/dev/null
files=$(find $INTERPOLATION_PATHS -type f -name '*.yml' -follow)
for file in $files; do
echo -e "Creating interpolated $file \n"
@miclip
miclip / Brewfile
Created October 9, 2019 16:50
Homebrew Brewfile
tap "adoptopenjdk/openjdk"
tap "cloudfoundry/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "pivotal/tap"
tap "starkandwayne/cf"
brew "azure-cli"
brew "bash-completion"
brew "docker"
@miclip
miclip / deploy_jenkins.md
Last active November 6, 2019 02:23
Deploy Jenkins to PKS (vsphere) with Helm

Deploy Jenkins to PKS (vsphere) with helm

Create storage class on vsphere:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: fast
provisioner: kubernetes.io/vsphere-volume

Create Kubernetes User with PKS

Log into Cluster as PKS admin.

pks login -a https://api.pks.pivotal.io -u admin -p <PASSWORD> -k
pks get-credentials dev

Create namespace:

Run docker build on Jenkins deployed on PKS using Host docker.sock

Update deployment with:

Make container privileged.

securityContext:
      privileged: true
#!/bin/bash
set -eu
if [ ! -d "concourse-docker" ] ; then
echo "clone docker concourse repo..."
git clone git@github.com:concourse/concourse-docker.git
fi
pushd ./concourse-docker > /dev/null

Protect Service on PKS with UAA

Protect service on PKS with UAA using oauth-proxy. Assumes you've deployed the nginx ingress controller.

Create the UAA client:

 uaac client add --name kibana --scope openid email profile \
   --authorized_grant_types authorization_code --authorities uaa.resources 
   --redirect-uri kibana.haas-445.pez.pivotal.io/oauth2/callback --secret the-secret