Skip to content

Instantly share code, notes, and snippets.

Warren Strange wstrange

Block or report user

Report or block wstrange

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wstrange
wstrange / process-test.yaml
Created Jan 3, 2019
Kubernetes process namespacing sharing for JDK appps
View process-test.yaml
# Test pod to demonstrate process namespace sharing between tomcat (using the JRE) and
# OpenJDK tools (jmap, jstack, etc.)
# See https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
# Deploy using: kubectl create -f process-test.yaml
# Exec into the jdk container: kubectl exec tomcat -c jdk -it bash
# Use some debug commands: jps, jmap, jstack, etc.
apiVersion: v1
kind: Pod
metadata:
name: tomcat
@wstrange
wstrange / debug.sh
Created Aug 3, 2018
Debug running ds processes with jstack
View debug.sh
#!/usr/bin/env bash
dump() {
echo "******* Dump $1 *******"
pid=`jps -ml | grep $1 | awk '{print $1}'`
if [ -n "$pid" ]; then
echo $pid
jstack $pid;
fi
}
@wstrange
wstrange / ds.yaml
Last active Jun 23, 2018
ds helm chart values
View ds.yaml
image:
repository: gcr.io/engineering-devops
pullPolicy: Always
#pullPolicy: IfNotPresent
tag: 6.5.0
djInstance: userstore
djPersistence: true
@wstrange
wstrange / quickstart.sh
Last active Apr 20, 2018
Quick start for forgeops 6.0
View quickstart.sh
#!/bin/bash
# delete existing git secret from older install
kubectl delete secret git-ssh-key
helm repo add forgerock https://storage.googleapis.com/forgerock-charts
helm repo update
# make sure you are in your namespace here. Try the kubens command!
helm install forgerock/cmp-platform
# this will take approx. 3-5 min to provision everything. Create /etc/host entries for all the ingresses
@wstrange
wstrange / init-test.yaml
Created Nov 9, 2017
Test pod preset in an init container
View init-test.yaml
apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
name: test
spec:
selector:
matchLabels:
app: test
env:
- name: SETME
View get-images.sh
#!/usr/bin/env bash
# This will pre-pull the docker images into the minikube cache
eval $(minikube docker-env)
for i in git openidm opendj openam openig amster
do
echo "getting $i"
docker pull gcr.io/engineering-devops/$i:5.5.0
done
@wstrange
wstrange / Dockerfile
Created May 25, 2017
Alpine edge openjdk 131
View Dockerfile
# docker build -t alpine-jdk .
FROM alpine:edge
# Default to UTF-8 file.encoding
ENV LANG C.UTF-8
# add a simple script that can auto-detect the appropriate JAVA_HOME value
# based on whether the JDK or only the JRE is installed
RUN { \
echo '#!/bin/sh'; \
View simple pod
apiVersion: v1
kind: Pod
metadata:
name: authn
labels:
name: authn
spec:
containers:
- name: authn
image: forgerock/ms-oauth-authn:latest
View cts-template.txt
define suffix=dc=openam,dc=forgerock,dc=org
branch: [suffix]
branch: ou=famrecords,ou=openam-session,ou=tokens,[suffix]
subordinateTemplate: cts
template: cts
rdnAttr: coreTokenId
objectClass: frCoreToken
View benchmark-testing
bin/searchrate -p 389 -h userstore-0.userstore -D "cn=directory manager" -w password \
-F -c 10 -t 10 --baseDn "dc=openam,dc=forgerock,dc=org" \
-g "rand(0,1000)" "(uid=user.%d)"
bin/modrate -p 389 -D "cn=directory manager" -h userstore-0.userstore -w password \
-F -c 20 -t 10 -b "uid=user.%d,ou=People,dc=openam,dc=forgerock,dc=org" \
You can’t perform that action at this time.