Skip to content

Instantly share code, notes, and snippets.

Also important to note is that I am using a kubeetcd storage implementation so the OS storage will still save under kubernetes.io
and I don't have to worry about a migration
###
# Create a clean area outside of my normal work areas
###
cb
mkdir rebase
cd rebase
export GOPATH=`pwd`
###
# Get the code
/*
This is a mock up of the minimal viable product for rollbacks. It is NOT a complete solution.
A rollback is essentially a posting of an old deployment config on top of the current config. However,
the user will indicate which version of the deployment config they'd like to use by specifying a deployment
from 'list deployments' or whatever the replication controller version evolves into.
To demonstrate the mechanics the code below mocks what an actual api call would do. In an actual solution
I envision that it would be something like:
@pweil-
pweil- / first window
Last active August 29, 2015 14:10
Router not picking up routes
...... vagrant up with dev cluster set ......
===== Create Command ======
[vagrant@openshift-master vagrant]$ hack/install-router.sh router-1 10.245.1.2 && hack/install-router.sh router-2 10.245.1.2 && openshift kube -c paul_temp/pod.json create pods && openshift kube -c paul_temp/route.json create routes && openshift kube -c paul_temp/service.json create services
Creating router file and starting pod...
router-1
Creating router file and starting pod...
router-2
Name Image(s) Host Labels Status
[vagrant@openshiftdev origin]$ openshift cli get services -o json
{
"kind": "ServiceList",
"creationTimestamp": null,
"selfLink": "/api/v1beta1/services",
"resourceVersion": 19,
"apiVersion": "v1beta1",
"items": [
{
"id": "kubernetes",
00000000:public_ssl.accept(0006)=0009 from [10.0.2.15:56882]
00000000:be_sni.srvcls[0009:000a]
00000000:be_sni.clicls[0009:000a]
00000000:be_sni.closed[0009:000a]
00000001:fe_sni.accept(0007)=0009 from [10.0.2.15:56890]
00000001:be_http_hello-nginx.clireq[0009:ffffffff]: GET / HTTP/1.1
00000001:be_http_hello-nginx.clihdr[0009:ffffffff]: User-Agent: curl/7.32.0
00000001:be_http_hello-nginx.clihdr[0009:ffffffff]: Host: www.example.com
00000001:be_http_hello-nginx.clihdr[0009:ffffffff]: Accept: */*
00000001:be_http_hello-nginx.srvrep[0009:000a]: HTTP/1.1 200 OK
E0120 18:25:14.183656 1 reflector.go:114] watch of *api.Route ended with error: very short watch
-------------------------------------------------- body: &{0xc2080971c0 {0 0} false ?reflect.Value? 0x549490 0x549420}
-------------------------------------------------- start: {"Type":"ADDED","Object":{"kind":"route","apiVersion":"v1beta1","metadata":{"creationTimestamp":null},"host":"www.example.com","serviceName":"example"}}
-------------------------------------------------- decoded: : <nil> : EOF
@pweil-
pweil- / haproxy conf
Last active August 29, 2015 14:13
debugging haproxy
backend be_http_example
mode http
balance leastconn
timeout check 5000ms
server example 0.0.0.0:8888 check inter 5000ms
I0121 15:34:37.665654 10326 errors.go:52] An unchecked error was received: 100: Key not found (/builds) [160]
I0121 15:34:37.666143 10326 errors.go:52] An unchecked error was received: 100: Key not found (/builds) [160]
backend be_http_hello-nginx
mode http
balance leastconn
timeout check 5000ms
server hello-nginx 172.17.0.14:80 check inter 5000ms