Skip to content

Instantly share code, notes, and snippets.

@yohanesws
yohanesws / notes-05n06-042018.md
Last active April 6, 2018 08:14
Enablement OCP
@yohanesws
yohanesws / generic-pipeline-custom.yml
Created March 13, 2018 09:42
Template for OCP Pipeline
apiVersion: v1
kind: Template
metadata:
name: generic-pipeline-custom
parameters:
- name: APP_NAME
description: Build Name
required: true
- description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.
displayName: GitHub Webhook Secret
@yohanesws
yohanesws / notes.md
Last active March 7, 2018 10:56
Jenkins Slave AutoProvisioning at OCP Deep Dive
@yohanesws
yohanesws / check.sh
Last active March 8, 2018 06:30
ES OCP CHECKING
#!/bin/bash
oc project logging
anypod=$(oc get po --selector=component=es --no-headers -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{"\n"}{end}' | head -n1)
ES_URL='https://localhost:9200'
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key'
date
oc exec $anypod -- $curl_get $ES_URL/_cat/health?v
@yohanesws
yohanesws / notes.md
Last active February 7, 2018 11:26
ES_Checking

ES at OCP CheatSheet

https://access.redhat.com/articles/3136551

Here are the optimizations I made to the cluster to increase indexing throughput:

Increased threadpool.bulk.queue_size to 500 because index requests were frequently overloading the queues Increased disk watermarks, because default settings were too aggressive for the large SSDs that we were using. I set "cluster.routing.allocation.disk.watermark.low": "100gb" and "cluster.routing.allocation.disk.watermark.high": "10gb" Deleted unused indexes to free up resources ES uses to manage their shards Increased number of primary shards to 175 with the goal of keeping shard size under 50GB and have approximately a shard per processor

@yohanesws
yohanesws / es_health.sh
Last active November 23, 2017 06:06
OCP ES Health Check
#!/bin/bash
oc project logging
anypod=$(oc get po --selector=component=es --no-headers -o jsonpath='{range .items[?(@.status.phase=="Running")]}{.metadata.name}{"\n"}{end}' | head -n1)
ES_URL='https://localhost:9200'
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key'
date
$curl_get $ES_URL/_cat/health?v
# See https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html for header meanings
@yohanesws
yohanesws / under-the-hood.md
Last active September 6, 2017 15:36
fabric8-maven
@yohanesws
yohanesws / openshift-jolokia.md
Last active September 5, 2017 19:03
Open Java Console in OpenShift
@yohanesws
yohanesws / curl.md
Created July 11, 2017 03:13 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.