Skip to content

Instantly share code, notes, and snippets.

View cunningt's full-sized avatar

Tom Cunningham cunningt

  • IBM
  • Medfield, MA
  • 21:15 (UTC -04:00)
View GitHub Profile
@cunningt
cunningt / gist:a1d463e68110170e25ef0e215c089c91
Created August 4, 2020 14:11
error deploying with openshift-maven-plugin 1.0.rc1 on openshift 3.11
/usr/local/s2i/run: line 15: /opt/jboss/container/maven/default//scl-enable-maven: No such file or directory
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
INFO exec java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError -cp "." -jar
Error: -jar requires jar file specification
Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
I'm having trouble removing the CustomResourceDefinitions :
If I remove all of the CustomResourceDefinitions from the template, the template cannot create a Prometheus:
`
tcunning@tcunning-OSX:~/src/cunningt/application-templates$ oc process -f fuse-prometheus-operator.yml -p NAMESPACE=fuse | oc create -f -
rolebinding.rbac.authorization.k8s.io/prometheus-operator created
role.rbac.authorization.k8s.io/prometheus-operator created
deployment.apps/prometheus-operator created
serviceaccount/prometheus-operator created
@cunningt
cunningt / gist:12eb22c079a4f7c579512834fe9dd2ca
Created October 20, 2018 13:34
error when trying to install templates without CRDs on minishift v1.24 / oc 3.11
minishift start --ocp-tag=v3.11.16
tcunning@tcunning-OSX:~/src/cunningt/application-templates$ oc process -f fuse-prometheus-operator.yml -p NAMESPACE=fuse | oc create -f -
rolebinding.rbac.authorization.k8s.io/prometheus-operator created
role.rbac.authorization.k8s.io/prometheus-operator created
deployment.apps/prometheus-operator created
serviceaccount/prometheus-operator created
error: unable to recognize no matches for kind "Prometheus" in version "monitoring.coreos.com/v1"
@cunningt
cunningt / broker-config
Created September 17, 2018 16:47
broker config
tcunning@tcunning-OSX:~/apb/foobar-apb$ oc export cm/broker-config -n automation-broker
Command "export" is deprecated, use the oc get --export
apiVersion: v1
data:
broker-config: |
registry:
- type: dockerhub
name: dh
url: https://registry.hub.docker.com
org: ansibleplaybookbundle
@cunningt
cunningt / apb successful
Created September 17, 2018 16:13
apb successful
tcunning@tcunning-OSX:~/apb/foo-apb$ ~/bin/apb-docker-run.sh push --broker https://automation-broker-automation-broker.192.168.64.124.nip.io/automation-broker --broker-name automation-broker
Running APB image: docker.io/ansibleplaybookbundle/apb-tools:canary
Targetting minishift host: tcp://192.168.64.124:2376
version: 1.0
name: foo-apb
description: This is a sample application generated by apb init
bindable: False
async: optional
metadata:
displayName: foo
@cunningt
cunningt / deployment
Created August 28, 2018 19:27
deployment
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: ${MY_POD_NAMESPACE}
spec:
replicas: 1
selector:
@cunningt
cunningt / bundle.yaml
Created August 25, 2018 14:18
bundle.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: servicemonitors.monitoring.coreos.com
spec:
group: monitoring.coreos.com
names:
kind: ServiceMonitor
listKind: ServiceMonitorList
plural: servicemonitors
@cunningt
cunningt / broker-config
Created February 27, 2018 15:32
broker-config
tcunning@tcunning-OSX:/tmp/foo-apb$ oc get configmap broker-config -o yaml
apiVersion: v1
data:
broker-config: |
registry:
- type: "dockerhub"
name: "dh"
url: "https://registry.hub.docker.com"
org: "ansibleplaybookbundle"
tag: "latest"
@cunningt
cunningt / provision.log
Created February 21, 2018 20:34
Prometheus(APB) provision log
+ [[ provision --extra-vars {"PROMETHEUS_SECURED_DEPLOYMENT":true,"SMTP_AUTH_PASS":"foobar","SMTP_AUTH_USER":"alertmanager","SMTP_FROM":"alertmanager@example.org","SMTP_HOST":"localhost","SMTP_PORT":25,"_apb_plan_id":"ephemeral","_apb_service_class_id":"f755257efed3e3d43c8b82afd0db1181","_apb_service_instance_id":"1907c4b0-548d-4d12-a862-7d5f8887b867","cluster":"openshift","namespace":"myproj"} == *\s\2\i\/\a\s\s\e\m\b\l\e* ]]
+ ACTION=provision
+ shift
+ playbooks=/opt/apb/actions
+ CREDS=/var/tmp/bind-creds
+ TEST_RESULT=/var/tmp/test-result
+ whoami
+ set +x
+ [[ -e /opt/apb/actions/provision.yaml ]]
+ [[ -e /opt/apb/actions/provision.yml ]]
@cunningt
cunningt / minishift log for issue #1910
Created January 12, 2018 19:29
minishift log for issue #1910
tcunning@tcunning-OSX:/tmp$ MINISHIFT_ENABLE_EXPERIMENTAL=y minishift start --openshift-version=v3.7.0 --memory 4GB --service-catalog --extra-clusterup-flags "--loglevel 1 --service-catalog" --show-libmachine-logs -v5
-- Starting profile 'regular'
Found binary path at /usr/local/bin/docker-machine-driver-xhyve
Launching plugin server for driver xhyve
Plugin server listening at address 127.0.0.1:49947
() DBG | operation not supported by device
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName