Skip to content

Instantly share code, notes, and snippets.

@wstrange
wstrange / quickstart.sh
Last active April 20, 2018 23:58
Quick start for forgeops 6.0
#!/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 / getnightly.sh
Created September 15, 2015 00:53
Download Nightly ForgeRock binaries
#!/bin/bash
# Script that downloads all nightly builds into a staging directory
# Vagrant guests should have this staging directory mounted locally.
# This script leaves the product names as generic (no release in the name), but creates a RELEASE file
# with all of the version info. It is suggest to copy this RELEASE file into the guest to have a record
# of which binaries got installed.
dir=./staging/
@wstrange
wstrange / init-test.yaml
Created November 9, 2017 15:24
Test pod preset in an init container
apiVersion: settings.k8s.io/v1alpha1
kind: PodPreset
metadata:
name: test
spec:
selector:
matchLabels:
app: test
env:
- name: SETME
@wstrange
wstrange / get-images.sh
Created June 12, 2017 22:04
Setup for CE lab
#!/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 16:20
Alpine edge openjdk 131
# 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'; \
apiVersion: v1
kind: Pod
metadata:
name: authn
labels:
name: authn
spec:
containers:
- name: authn
image: forgerock/ms-oauth-authn:latest
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" \
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
@wstrange
wstrange / logstash for OpenIDM OpenAM OpenDJ
Created July 31, 2014 17:38
logstash tes - openidm openam opendj
input {
file {
type => idmRecon
# start_position => beginning
path => "/opt/openidm/audit/recon.csv"
}
file {
type => idmActivity
# start_position => beginning
path => "/opt/openidm/audit/activity.csv"
@wstrange
wstrange / genplugins.groovy
Created August 26, 2016 21:58
Jenkins script to list plugins
// go to http://localhost:8080/script
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getShortName()}:${plugin.getVersion()}")
}