Skip to content

Instantly share code, notes, and snippets.

View david-martin's full-sized avatar

David Martin david-martin

View GitHub Profile
apiVersion: v1
data:
grafana-primary-dashboard.json: |-
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
apiVersion: v1
data:
grafana-primary-dashboard.json: |-
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
@david-martin
david-martin / get_pem.sh
Last active April 10, 2018 07:56
Android custom CA
mkdir -p example/src/main/res/raw
openssl s_client -connect aerogear-app-metrics-myproject.192.168.37.1.nip.io:443 -showcerts </dev/null 2>/dev/null|openssl x509 -outform PEM > example/src/main/res/raw/my_ca
@david-martin
david-martin / __service_broker_provisioning_and_binding_README.md
Last active March 29, 2018 11:52
Service Broker Provisioning & Binding from the Kubernetes Service Catalog (using Ansible Broker & OpenShift Catalog)

Provision

Pod Details

  • ns: dh-keycloak-apb-prov-ql8z4
  • pod: apb-305a6d24-5d73-437f-bbba-b0b51700f14f
  • cmd: provision --extra-vars {"ADMIN_PASSWORD":"admin","ADMIN_USERNAME":"admin","USE_SHARED_SERVICE":false,"_apb_plan_id":"default","_apb_service_class_id":"b95513950bb3f132de25d58fb75f8dca","_apb_service_instance_id":"9b57113f-162b-4d32-ba34-3ae6a14368b6","cluster":"openshift","namespace":"m2"}
  • Env Vars
    • POD_NAME: metadata.name
  • POD_NAMESPACE: metadata.namespace
[dmartin@rollins-tp react-native]$ react-native run-android
Scanning folders for symlinks in /home/dmartin/work/aerogear-js-sdk/example/react-native/node_modules (5ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Download https://jcenter.bintray.com/com/facebook/fresco/fresco/1.3.0/fresco-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1.3.0/imagepipeline-okhttp3-1.3.0.pom
Download https://jcenter.bintray.com/com/squareup/okhttp3/okhttp-urlconnection/3.6.0/okhttp-urlconnection-3.6.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/drawee/1.3.0/drawee-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/1.3.0/fbcore-1.3.0.pom
Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/1.3.0/imagepipeline-1.3.0.pom
@david-martin
david-martin / keycloak.log
Last active February 12, 2018 17:22
keycloak log & NPE from MetricsListener
Added 'admin' to '/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json', restart server to load user
[KEYCLOAK DOCKER IMAGE] Using the external postgres database
17:04:37,311 INFO [org.jboss.modules] (main) JBoss Modules version 1.6.1.Final
17:04:37,404 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1
17:04:37,535 INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: Keycloak 3.4.3.Final (WildFly Core 3.0.8.Final) starting
17:04:37,608 INFO [org.jboss.vfs] (MSC service thread 1-3) VFS000002: Failed to clean existing content for temp file provider of type temp. Enable DEBUG level log to find what caused this
17:04:38,629 INFO [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more abo
sudo firewall-cmd --info-zone dockerc
dockerc (active)
target: default
icmp-block-inversion: no
interfaces:
sources: 172.17.0.0/16
services:
ports: 443/tcp 53/udp 80/tcp 8443/tcp 8053/udp 5353/udp 8080/tcp
protocols:
masquerade: no
@david-martin
david-martin / apb_output.txt
Last active January 5, 2018 11:50
apb prepare build push list
$ docker run --rm --privileged -v $PWD:/mnt:z -v /home/dmartin/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u 1000 docker.io/ansibleplaybookbundle/apb-tools:latest prepare
Finished writing dockerfile.
$ docker run --rm --privileged -v $PWD:/mnt:z -v /home/dmartin/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u 1000 docker.io/ansibleplaybookbundle/apb-tools:latest build
Finished writing dockerfile.
Building APB using tag: [test]
Successfully built APB image: test
@david-martin
david-martin / gist:3ae910fdd837034e583cf5d0619fc2cc
Created December 15, 2017 16:42
Run APB in OpenShift without OpenShift Ansible Broker installed
NAMESPACE=myproject
oc policy add-role-to-user admin system:serviceaccount:$NAMESPACE:default
oc run prometheus-apb --image=docker.io/aerogearcatalog/prometheus-apb:latest -- provision -e "namespace=$NAMESPACE"
Starting Liquibase migration
Liquibase Update Successful
no /keys directory found, will used default selfsigned certificate
launching wildfly
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss/wildfly