Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bbrowning's full-sized avatar

Ben Browning bbrowning

  • Red Hat
  • Ashburn, VA
View GitHub Profile
@bbrowning
bbrowning / 0_README.md
Last active April 28, 2020 17:57
Deploying OpenShift Serverless 1.7.0 stage builds on external OpenShift 4.3 clusters

Note: This is only tested on OCP 4.3 or 4.4 clusters

Disable the default OLM operator sources:

oc patch OperatorHub cluster --type json \
  -p '[{"op": "add", "path": "/spec/disableAllDefaultSources", "value": true}]'

Download the imageContentSourcePolicy.yaml from this gist and apply it.

TORQUEBOX_SERVER=standalone.xml
TORQUEBOX_HOME=/opt/torquebox
RUN=yes
@bbrowning
bbrowning / openshift_instructions.md
Last active August 22, 2018 15:59
Running Apache OpenWhisk on OpenShift

Running Apache OpenWhisk on OpenShift

Prerequisites

These instructions assume you are using Minishift 1.0.1 or newer as your OpenShift installation.

You'll also need a wsk binary in your $PATH to interact with OpenWhisk after it's deployed. Download the latest version for your OS

@bbrowning
bbrowning / activationStats.sh
Created April 12, 2018 16:11
Useful script to display recent activation stats from OpenWhisk
#!/usr/bin/env bash
# set -x
set -e
func=$1
count=$2
if [ "${func}x" = "x" ]; then
echo "You must supply a function as the first argument"
@bbrowning
bbrowning / Main.java
Last active May 12, 2017 17:39
An example of using Undertow ResponseHeader filters with WildFly Swarm
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.wildfly.swarm.config.undertow.FilterConfiguration;
import org.wildfly.swarm.config.undertow.configuration.ResponseHeader;
import org.wildfly.swarm.config.undertow.server.host.FilterRef;
import org.wildfly.swarm.container.Container;
import org.wildfly.swarm.undertow.UndertowFraction;
import org.wildfly.swarm.undertow.WARArchive;
public class Main {
public static void main(String... args) throws Exception {
@bbrowning
bbrowning / config.ru
Created November 8, 2013 21:49
Poor Puma performance with keepalives enabled on JRuby. For both 'ab' runs, Puma was warmed up before running the actual test shown.
run lambda { |env|
[200, { 'Content-Type' => 'text/plain' }, ["hello world\n"]]
}
source 'https://rubygems.org'
gem 'multi_json'
@bbrowning
bbrowning / jubilee
Created January 3, 2014 19:18
jubilee vs torqbox performance on techempower json benchmark after warmup period
# Jubille started with:
# jubilee -p 8080 -e production
#
# Note that the Jubilee console outputs quite a few errors like below during
# the test:
#
# Jan 03, 2014 2:15:31 PM org.vertx.java.core.logging.impl.JULLogDelegate error
# SEVERE: Unhandled exception
# java.nio.channels.ClosedChannelException
source 'https://rubygems.org'
gem 'jruby-openssl', '0.9.3'
@bbrowning
bbrowning / instructions.md
Last active December 20, 2015 23:49
OpenShift pre_build hook to allow Windows developers to deploy to OpenShift
  1. Make sure your Gemfile.lock is not committed to your OpenShift git repository.

  2. Copy the pre_build file to .openshift/action_hooks/pre_build

  3. Add .openshift/action_hooks/pre_build to git, set the executable bit, and push your changes

    git add .openshift/action_hooks/pre_build git update-index --chmod=+x .openshift/action_hooks/pre_build git commit -m "Add bundle_install in pre_build hook" git push