Skip to content

Instantly share code, notes, and snippets.

View rhuss's full-sized avatar

Roland Huß rhuss

View GitHub Profile
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ kubernetes-client ---
[INFO] io.fabric8:kubernetes-client:jar:1.3.74-SNAPSHOT
[INFO] +- io.fabric8:kubernetes-model:jar:1.0.42:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.3:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- com.squareup.okhttp:okhttp:jar:2.7.2:compile
[INFO] | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] +- com.squareup.okhttp:logging-interceptor:jar:2.7.2:compile
[INFO] +- com.squareup.okhttp:okhttp-ws:jar:2.7.2:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.13:compile
@rhuss
rhuss / gist:1015bf1ffa6bedcd72e6
Last active September 24, 2021 16:02
Pushing to an OpenShift registry

How to setup an OpenShift registry

  • Create registry with oadm
oadm registry --latest-images --create \
              --credentials=/var/lib/openshift/openshift.local.config/master/openshift-registry.kubeconfig
  • Create route (optional, alternatively you can use also the internal ip of the registry service later)

gofabric8 IDE setup for IntelliJ IDEA

In Shell:

  • export $GOPATH=~/go/workspace
  • mkdir -p $GOPATH
  • export PATH=$PATH:$GOPATH/bin
  • cd ~/go
  • rm -rf workspace/*
  • go get github.com/tools/godep
brew install libvirt
sudo ln -s /opt/vagrant/embedded/include/ruby-2.0.0/{universal-darwin12.6.0,x86_64-darwin12.6.0}
ARCHFLAGS='-arch x86_64' \
CONFIGURE_ARGS="with-libvirt-include=/usr/local/include/libvirt:/opt/vagrant/embedded//include/ruby-2.0.0/universal-darwin12.6.0/ with-libvirt-lib=/usr/local/lib" \
vagrant plugin install vagrant-libvirt
@rhuss
rhuss / execute_groovy_jenkins_sample.groovy
Last active August 12, 2020 19:09
How to execute some shell scripting on Groovy with environment variables and redirection
def exec(cmd) {
println cmd
def process = new ProcessBuilder([ "sh", "-c", cmd])
.directory(new File("/tmp"))
.redirectErrorStream(true)
.start()
process.outputStream.close()
process.inputStream.eachLine {println it}
process.waitFor();
return process.exitValue()
@rhuss
rhuss / alpine-jre-8
Last active January 3, 2021 13:03
The Holy Grail of a Minimal, Headless, OpenJDK JRE 8
# Build for 206 MB JRE 1.8.0_60 (192 MB in size) with Alping and glibc
FROM alpine:3.2
ENV JRE=jre1.8.0_60 \
JAVA_HOME=/opt/jre
# That's the an EA from OpenJDK.net
# Courtesy to https://github.com/frol/docker-alpine-oraclejdk8 from where the setup of glibc is borrowed
@rhuss
rhuss / gist:b0e1884c990a8351d3e9
Last active August 29, 2015 14:21
Docker-Hammering

With an empty OpenShift 0.5.1 started up (except for some services) within a Vagrant setup, I noticed, that /var/log/messages grows very fast because of the requests logged below. I could (and have) set the loglevel to WARN but this doesn't solve the issue of many requests needs to be processed by the Docker daemon which leads to a constant CPU usage of about 4-5%. I wonder where these requests for container meta information comes from and why they are sent in such a high frequency (look at the timestamps).

May 21 13:06:52 localhost journal: Suppressed 741 messages from /system.slice/docker.service
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="GET /containers/json"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="+job containers()"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="-job containers() = OK (0)"
May 21 13:06:52 localhost docker: time="2015-05-21T13:06:52Z" level=info msg="GET /containers/json?all=1"
@rhuss
rhuss / gist:a83633c512fe0d0f1f2c
Created May 5, 2015 10:10
Debug output for "jmx4perl tomcat exec jolokia:type=Config debugInfo"
1430820552: Execution time: 1 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"Name","type":"read"},"value":"11257@Tichny.local"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmVersion","type":"read"},"value":"24.75-b04"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmName","type":"read"},"value":"Java HotSpot(TM) 64-Bit Server VM"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"VmVendor","type":"read"},"value":"Oracle Corporation"}
1430820552: Execution time: 0 ms
1430820552: Response: {"timestamp":1430820552,"status":200,"request":{"mbean":"java.lang:type=Runtime","attribute":"Uptime","type":"read"},"value":98185}
@rhuss
rhuss / Jolokia (Data Image).xml
Last active August 29, 2015 14:05
docker-maven-plugin configuration Samples
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<image>
<id>tomcat</id>
<name>consol/tomcat-7.0</name>
<run>
@rhuss
rhuss / docker-enter.sh
Last active August 29, 2015 14:05
nsenter with boot2docker
#!/bin/sh
usage ()
{
cat <<EOF
docker-enter -- Enter a running container via boot2docker and nsenter
Usage: docker-enter <container_name_or_ID> [command]
See https://github.com/jpetazzo/nsenter for details.