Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@rasheedamir
rasheedamir / HazelcastConfiguration.java
Last active February 14, 2019 22:24
hazelcast on kubernetes
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import com.google.common.collect.ImmutableList;
import com.hazelcast.client.HazelcastClient;
import com.hazelcast.client.config.ClientConfig;
import com.hazelcast.client.config.ClientConnectionStrategyConfig;
import com.hazelcast.client.config.ClientNetworkConfig;
import com.hazelcast.config.DiscoveryConfig;
import com.hazelcast.config.DiscoveryStrategyConfig;
@rasheedamir
rasheedamir / tinyerp-mvn-dependency-tree.md
Last active February 6, 2019 17:00
tinyerp-mvn-dependency-tree
[INFO] com.tinyerp:gateway:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.2.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.1.2.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.2.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.1:compile
[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
@rasheedamir
rasheedamir / Makefile
Created May 3, 2018 20:59 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@rasheedamir
rasheedamir / Jenkinsfile
Last active April 18, 2018 12:05
Jenkinsfile-upload-to-s3
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@cf54366') _
def kubeConfig = params.KUBE_CONFIG
podTemplate() {
mavenNode(dockerImage: 'docker:1.11.2') {
container(name: 'maven') {
stage("checkout") {
@rasheedamir
rasheedamir / springboot-k8s-slow-startup.md
Created March 28, 2018 09:50
springboot-k8s-slow-startup.md
exec java -Xmx300m -javaagent:/opt/agent-bond/agent-bond.jar=jolokia{{host=0.0.0.0}},jmx_exporter{{9779:/opt/agent-bond/jmx_exporter_config.yml}} -XX:ParallelGCThreads=1 -XX:ConcGCThreads=1 -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -cp . -jar /deployments/ods-1.2.23.jar
I> No access restrictor found, access to any MBean is allowed
Jolokia: Agent started with URL http://100.108.0.15:8778/jolokia/
2018-03-27 18:12:22.367:INFO:ifasjipjsoejs.Server:jetty-8.y.z-SNAPSHOT
2018-03-27 18:12:22.616:INFO:ifasjipjsoejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:9779
18:12:26.770 [main] DEBUG io.fabric8.kubernetes.client.Config - Trying to configure client from Kubernetes config...
18:12:27.033 [main] DEBUG io.fabric8.kubernetes.client.Config - Did not find Kubernetes config at: [/opt/jboss/.kube/config]. Ignoring.
18:12:27.034 [main] DEBUG io.fabric8.kubernetes.client.Config - Trying to configure client from service account...
18:12:27.034 [main] DEBUG io.fabric8.kubernetes.client.Conf
@rasheedamir
rasheedamir / SystemLog.txt
Created February 13, 2018 14:21
SystemLog.txt
pper/usr.
 OK ] Started Verity Setup for /dev/mapper/usr.
[ 3.433601] EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null)
[ 3.437516] systemd[1]: Mounted /sysroot/usr.
[ OK ] Mounted /sysroot/usr.
[ 3.442525] systemd[1]: Starting Root filesys[ 3.444077] random: crng init done
tem setup...
Starting Root filesystem setup...
[ 3.551360] systemd-networkd[260]: eth0: Gained IPv6LL
[ OK ] Started Root filesystem setup.
@rasheedamir
rasheedamir / Actions->InstanceSettings->GetSystemLog.txt
Created February 13, 2018 13:12
Actions->InstanceSettings->GetSystemLog.txt
erved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=15, Nodes=1
[ 0.000000] ftrace: allocating 26629 entries in 105 pages
[ 0.001000] Hierarchical RCU implementation.
[ 0.001000] RCU event tracing is enabled.
[ 0.001000] RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=15.
[ 0.001000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=15
[ 0.001000] NR_IRQS: 33024, nr_irqs: 952, preallocated irqs: 16
[ 0.001000] xen:events: Using 2-level ABI
[ 0.001000] xen:events: Xen HVM callback vector for event delivery is enabled
@rasheedamir
rasheedamir / WorkUnit.java
Created April 10, 2017 20:35
trying lombok with jackson with builder patter
package sample.producer.domain;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.Value;
@Value /* to generate equals, hashCode, getters & toString ( immutable ) */
@NoArgsConstructor(force = true, access = AccessLevel.PACKAGE) /* just for dehydration! as default ctor is used to create object & then fields are set using refection! */
@rasheedamir
rasheedamir / jenkinsfile-and-log.md
Created October 31, 2017 09:09
jenkinsfile-and-log.md
#!/usr/bin/env groovy
@Library('github.com/stakater/fabric8-pipeline-library@master')

def localItestPattern = ""
try {
    localItestPattern = ITEST_PATTERN
} catch (Throwable e) {
    localItestPattern = "*KT"