Skip to content

Instantly share code, notes, and snippets.

View crobby's full-sized avatar

Chad Roberts crobby

  • SUSE
  • Flushing, Michigan, USA
View GitHub Profile
<td ng-switch="entry.status" ng-click="gotoCluster(entry.name)">
<span ng-switch-when="Running" class="label label-success">{{entry.status}}</span>
<span ng-switch-when="Error" class="label label-danger">{{entry.status}}</span>
<span ng-switch-when="Scaling" class="label label-default">{{entry.status}}</span>
<span ng-switch-default class="label label-default">{{entry.status}}</span>
</td>
{
"apiVersion": "v1",
"kind": "LimitRange",
"metadata": {
"name": "limits"
},
"spec": {
"limits": [
{
"type": "Pod",
// The middleware configuration is for the handler executors. These do not apply to the swagger.json document.
// The middleware executes after routing but before authentication, binding and validation
func setupMiddlewares(handler http.Handler) http.Handler {
corsHeaders := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowCredentials: true,
AllowedMethods: []string{"GET", "HEAD", "POST", "DELETE", "PUT"},
OptionsPassthrough: false, // I have also tried true here
})
handler = corsHeaders.Handler(handler)
/*
* This file is part of Oshinko.
*
* Copyright (C) 2016 Red Hat, Inc.
*
*/
'use strict';
angular.module('Oshinko')
.factory('clusterActions', [
###########DO NOT RUN FROM MASTER, IT WILL HANG...RUN FROM WORKER
before doing this
source ./common.sh (or set SPARK_USER=chad in env)
spark-submit --master spark://testcluster:7077 --class org.apache.spark.examples.JavaWordCount /opt/spark/examples/jars/spark-examples_2.11-2.0.0-preview.jar /opt/spark/README.md
@crobby
crobby / quickstart.sh
Last active January 16, 2017 17:50
Simple barebones oshinko (webui) setup
: Start up an OpenShift Origin cluster locally
oc cluster up
: Authorize Oshinko service account to write to the OpenShift API
oc create sa oshinko
oc policy add-role-to-user edit -z oshinko
: Launch Oshinko in the current project
oc new-app -f https://raw.githubusercontent.com/radanalyticsio/oshinko-webui/master/tools/ui-template.yaml
@crobby
crobby / quickstart-no-route.sh
Last active January 16, 2017 20:26
Fast way to get oshinko up and running on a basic openshift single node cluster
# Start up an OpenShift Origin cluster locally
oc cluster up
# Authorize Oshinko service account to write to the OpenShift API
oc create sa oshinko
oc policy add-role-to-user edit -z oshinko
# Launch Oshinko in the current project
oc new-app -f ui-template-no-route.yaml
# Wait for your app to come up, then find the pod name where oshinko-webui is running
# then execute oc port-forward <pod name> <local port>:8080
@crobby
crobby / jetty9.3.20.patch
Created June 9, 2017 14:33
patch to update jetty
Index: pom.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pom.xml (revision afab8557b069dff233bc187ddad46d071eeb6137)
+++ pom.xml (revision )
@@ -136,7 +136,7 @@
<derby.version>10.12.1.1</derby.version>
<parquet.version>1.8.1</parquet.version>
@crobby
crobby / tf_serving.sh
Last active March 8, 2018 20:31 — forked from jarutis/tf_serving.sh
Install Tensorflow Serving on Centos 7 (CPU)
# Java
yum -y install java-1.8.0-openjdk-devel
# Build Esentials (minimal)
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3)
yum -y install epel-release
# Python
apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
labels:
app: seldon
name: ${NAME}
namespace: ${NAMESPACE}
spec:
annotations:
deployment_version: "0.1"