Skip to content

Instantly share code, notes, and snippets.

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" \
@wstrange
wstrange / genplugins.groovy
Created Aug 26, 2016
Jenkins script to list plugins
View genplugins.groovy
// go to http://localhost:8080/script
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getShortName()}:${plugin.getVersion()}")
}
@wstrange
wstrange / create_AM_bootstrap.sh
Last active Jul 14, 2016
Create an OpenAM bootstrap file from environment variables
View create_AM_bootstrap.sh
#!/usr/bin/env bash
# Shell script to Create bootstrap file from env vars.
# redirect this to ~/openam/bootstrap
#
#
# This is what the template looks like
# From BootstrapCreator.java:
# "@DS_PROTO@://@DS_HOST@/@INSTANCE_NAME@" +
# "?user=@DSAMEUSER_NAME@&pwd=@DSAMEUSER_PWD@" +
# "&dsbasedn=@BASE_DN@" +
@wstrange
wstrange / djcert.sh
Last active Jun 24, 2016
Create a CA and a server certificate for OpenDJ using cfssl
View djcert.sh
#!/bin/bash
# Script to create a self signed CA using cfssl, and create
# server certs for DJ that are signed by this CA.
# Where we store the CA certificates
CA_HOME=~/etc/ca
# Where OpenDJ is insstalled
OPENDJ_HOME=~/packages/opendj
View docker.log
sh: can't create /proc/sys/net/ipv4/neigh/weave/base_reachable_time: Read-only file system
1491e5db25cf1c4e06bb3b8c3f79e27004aedfb280a8e655ad1b64005cd9c478
weave container is not present. Have you launched it?
Starting LocalKube...
Starting etcd...
2016-04-11 16:18:32.323453 I | etcdserver: recovered store from snapshot at index 30003
2016-04-11 16:18:32.323493 I | etcdserver: name = kubeetcd
2016-04-11 16:18:32.323499 I | etcdserver: data dir = /var/localkube/data
2016-04-11 16:18:32.323505 I | etcdserver: member dir = /var/localkube/data/member
2016-04-11 16:18:32.323509 I | etcdserver: heartbeat = 100ms
@wstrange
wstrange / kube-setcontext.sh
Last active Apr 4, 2016
Setup kubectl context for using helm local docker solution
View kube-setcontext.sh
!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.