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
@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
###########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
/*
* This file is part of Oshinko.
*
* Copyright (C) 2016 Red Hat, Inc.
*
*/
'use strict';
angular.module('Oshinko')
.factory('clusterActions', [
// 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)
{
"apiVersion": "v1",
"kind": "LimitRange",
"metadata": {
"name": "limits"
},
"spec": {
"limits": [
{
"type": "Pod",
<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>