Skip to content

Instantly share code, notes, and snippets.

@wstrange
wstrange / create_AM_bootstrap.sh
Last active July 14, 2016 20:58
Create an OpenAM bootstrap file from environment variables
#!/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 June 24, 2016 22:32
Create a CA and a server certificate for OpenDJ using cfssl
#!/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
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 April 4, 2016 21:25
Setup kubectl context for using helm local docker solution
!/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
@wstrange
wstrange / Dockefile
Created January 13, 2016 00:31
Dockerfile test
# Dockerfile to package this app up so we can run it on kubernetes
# This will run pub get and build the app.
# When run it expects to find bin/server.dart
FROM google/dart-runtime
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 / config.json
Created November 5, 2013 00:50
OpenIG Sample config.json showing Tomcat form login
{
"_comment" : "Sample OpenIG config for tomcat form login. Assumes tomcat samples are deployed to instance localhost:48080",
"heap":{
"objects":[
{
"name":"HandlerServlet",
"type":"HandlerServlet",
"config":{
"handler":"DispatchHandler",
"baseURI":"http://openam.example.com:48080/"
@wstrange
wstrange / configfedlet.sh
Created November 4, 2011 21:25
Runs the fedlet configurator
#!/bin/sh
# Configure the fedlet
# remove the target
rm -fr ~/fedlet.old
mv ~/fedlet ~/fedlet.old
rm -f /var/tmp/metadata*
# Get the IDP meta data fresh from OIF
@wstrange
wstrange / wlstart.sh
Created October 20, 2011 18:24
Startup script for Weblogic Admin domain and managed servers
#!/bin/bash
# Start up script for a weblogic admin domain and associated service domains
# This is meant for demos and interactive usage
# A new gnome-terminal will be launched to show the output. You need
# X running
#
# Usage: wlstart.sh domain servers..
# Example: wlstart.sh IDMDomain wls_oif1
@wstrange
wstrange / proxypassexample
Created September 20, 2011 22:18
Proxy Pass Example
# Example Apache config to reverse proxy /ui to a back end app
# Also uses LDAP authentication on /ui and sets the REMOTE_USER header to the uid
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None