Skip to content

Instantly share code, notes, and snippets.

Avatar

Rasheed Amir rasheedamir

View GitHub Profile
View openshift-cheatsheet.md

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

View HazelcastConfiguration.java
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 Feb 6, 2019
tinyerp-mvn-dependency-tree
View tinyerp-mvn-dependency-tree.md
[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 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# 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 Apr 18, 2018
Jenkinsfile-upload-to-s3
View Jenkinsfile
#!/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 Mar 28, 2018
springboot-k8s-slow-startup.md
View 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
View 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 Feb 13, 2018
Actions->InstanceSettings->GetSystemLog.txt
View 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
View 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"
View jenkins-k8s-apply-issue.md

PROBLEM

Jenkinsfile

        // timeout is in milliseconds
        stage('Rollout to Stage') {
            kubernetesApply(readinessTimeout: 180000, environment: envStage)
            // TODO: figure out why to stash deployments?
            // TODO: from where does the stash command comes?