Skip to content

Instantly share code, notes, and snippets.

View jimmidyson's full-sized avatar

Jimmi Dyson jimmidyson

View GitHub Profile
2015-04-17 12:03:50,195 | ERROR | 6b961-1-thread-1 | DeploymentAgent | ? ? | 78 - io.fabric8.fabric-agent - 1.2.0.SNAPSHOT | Unable to update agent
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=fabric-camel-demo; type=karaf.feature; filter:="(&(osgi.identity=fabric-camel-demo)(type=karaf.feature))" [caused by: Unable to resolve fabric-camel-demo/1.2.0.SNAPSHOT: missing requirement [fabric-camel-demo/1.2.0.SNAPSHOT] osgi.identity; osgi.identity=io.fabric8.examples.fabric-camel-demo; type=osgi.bundle; version="[1.2.0.SNAPSHOT,1.2.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve io.fabric8.examples.fabric-camel-demo/1.2.0.SNAPSHOT: missing requirement [io.fabric8.examples.fabric-camel-demo/1.2.0.SNAPSHOT] osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.activemq.camel.component)"]]
at org.apache.felix.resolver.Candidates.populateResource(Candida
@jimmidyson
jimmidyson / 0_download_openshift.sh
Last active August 29, 2015 14:21
OpenShift Fabric8 start scripts
#!/bin/bash
curl -L https://github.com/openshift/origin/releases/download/v0.5.1/openshift-origin-v0.5.1-ce1e6c4-linux-amd64.tar.gz | tar xzv
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.fabric8.examples</groupId>
<artifactId>camel-rest</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Fabric8 :: Examples :: Camel REST</name>
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.cdi.ContextName;
@ContextName("myCdiRestCamelContext")
public class MyRoutes extends RouteBuilder {
@Override
public void configure() throws Exception {
restConfiguration().component("netty4-http").host("0.0.0.0").port(8080);
<plugin>
<groupId>org.jolokia</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.12.0</version>
<configuration>
<images>
<image>
<name>${docker.image}</name>
<build>
<from>fabric8/java</from>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>json</id>
<phase>generate-resources</phase>
<goals>
<goal>json</goal>
# go test -bench=. -benchmem -benchtime=30s
testing: warning: no tests to run
PASS
BenchmarkSetNs 100000 464509 ns/op 14876 B/op 163 allocs/op
BenchmarkSysFs 100000 459523 ns/op 14735 B/op 157 allocs/op
ok github.com/jimmidyson/benchmark-setns 122.377s
@jimmidyson
jimmidyson / recreate_openshift_cert.sh
Created September 1, 2015 16:11
Recreate OpenShift certs
oadm ca create-server-cert \
--cert=openshift.local.config/master/master.server.crt \
--key=openshift.local.config/master/master.server.key \
--hostnames=[ANY_OTHER_HOSTNAMES_HERE,]kubernetes.default.svc,kubernetes.default.svc.cluster.local,localhost,openshift.default.svc.cluster.local,127.0.0.1
### Keybase proof
I hereby claim:
* I am jimmidyson on github.
* I am jimmidyson (https://keybase.io/jimmidyson) on keybase.
* I have a public key whose fingerprint is 5B55 57A0 9422 9FB7 ED62 4B8C 8F47 C801 8D2A D863
To claim this, I am signing this object:
@jimmidyson
jimmidyson / prometheus.yml
Last active February 28, 2016 22:11
Prometheus Kubernetes manifest
apiVersion: v1
kind: Pod
metadata:
name: prometheus
spec:
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef: