Skip to content

Instantly share code, notes, and snippets.

View david-martin's full-sized avatar

David Martin david-martin

View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: '1'
org.eclipse.che.container.container.machine_name: dev-machine
creationTimestamp: '2019-01-15T15:39:29Z'
generation: 1
labels:
che.original_name: dockerimage
@david-martin
david-martin / release.md
Created January 8, 2019 10:59
Webapp Release Process

WebApp

cd /tmp/
git clone [email protected]:integr8ly/tutorial-web-app
cd tutorial-web-app/

npm version 2.1.0
git push origin master
git push --tags
@david-martin
david-martin / saas_offerings.js
Last active August 28, 2018 16:32
saas_offerings.js
// Add Che & Launcher to the top of the catalog.
window.OPENSHIFT_CONSTANTS.SAAS_OFFERINGS = [{
title: "Tutorial Web App",
icon: "fa fa-cogs",
url: "https://cloudservices.skunkhenry.com",
description: "Launch quests & steel threads & missions & launchables & tutorials & stuff"
}, {
title: "Eclipse Che",
icon: "fa fa-code",
url: "https://che-che2.cloudservices.skunkhenry.com",
#!/bin/sh
set +e
docker rm $(docker ps -qa --no-trunc --filter "status=exited")
docker volume rm $(docker volume ls -qf dangling=true)
docker volume ls -qf dangling=true | xargs -r docker volume rm
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
# HELP jvm_threads_current Current thread count of a JVM
# TYPE jvm_threads_current gauge
jvm_threads_current 111.0
# HELP jvm_threads_daemon Daemon thread count of a JVM
# TYPE jvm_threads_daemon gauge
jvm_threads_daemon 14.0
# HELP jvm_threads_peak Peak thread count of a JVM
# TYPE jvm_threads_peak gauge
jvm_threads_peak 111.0
# HELP jvm_threads_started_total Started thread count of a JVM
@david-martin
david-martin / use_tag.sh
Last active June 11, 2018 11:54
Usage: `./use_tag.sh 1.0.0-alpha`
#!/bin/sh
set -x
TAG=$1
oc patch deployment webconsole -n openshift-web-console -p "{\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"webconsole\", \"image\": \"aerogear/origin-web-console:$TAG\"}]}}}}"
oc get configmap broker-config -n ansible-service-broker -o yaml | sed -e "s/tag:.*/tag: \"$TAG\"/" | oc replace -n ansible-service-broker -f -
version: 1.0
name: unifiedpush-apb
description: __DEPENDENCIES
bindable: True
async: optional
tags:
- mobile-service
metadata:
displayName: __DEPENDENCIES
longDescription: "An APB deploying the AeroGear UnifiedPush Server with persistent storage and authentication through Openshift"
@david-martin
david-martin / cluster_plan_with_dependencies.yml
Last active April 30, 2018 22:35
cluster service plan with dependencies
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServicePlan
metadata:
name: dependenciestest
spec:
clusterServiceBrokerName: ansible-service-broker
clusterServiceClassRef:
name: dependenciestest
description: Dependencies Test
externalID: 5f04a3f508d7615a422863814f58ad98
@david-martin
david-martin / serviceclass.json
Last active April 24, 2018 12:15
Service Plan with 'file' upload type
{
"kind": "ClusterServicePlan",
"apiVersion": "servicecatalog.k8s.io/v1beta1",
"metadata": {
"name": "5f04a3f508d7615a422863814f58ad98",
"selfLink": "/apis/servicecatalog.k8s.io/v1beta1/clusterserviceplans/5f04a3f508d7615a422863814f58ad98",
"uid": "97edff6f-47a9-11e8-9116-0242ac110003",
"resourceVersion": "583",
"creationTimestamp": "2018-04-24T10:23:55Z"
},
@david-martin
david-martin / config.local.js
Created April 16, 2018 09:01
./app/config.local.js for use with minishift
'use strict';
(function() {
// This is the default configuration for the dev mode of the web console.
// A generated version of this config is created at run-time when running
// the web console from the openshift binary.
//
// To change configuration for local development, copy this file to
// app/config.local.js and edit the copy.
var masterPublicHostname = '192.168.99.100:8443';