Skip to content

Instantly share code, notes, and snippets.

@ramr
ramr / router failover pod json
Created March 31, 2015 18:28
openshift router ha pod json
[vagrant@openshiftdev origin]$ openshift ex router --credentials="${KUBECONFIG}" --virtual-ips="10.0.2.100-102" --latest-images=true -o json
{
"metadata": {},
"items": [
{
"metadata": {
"name": "router",
"creationTimestamp": null,
"labels": {
"router": "router"
@ramr
ramr / router failover json
Last active August 29, 2015 14:18
router new failover json
{
"metadata":{
"name":"failover-router"
},
"kind":"Config",
"apiVersion":"v1beta1",
"creationTimestamp":"2014-09-18T18:28:38-04:00",
"items":[
{
"id": "router-service",
@ramr
ramr / f5-tonode-ip-tunnel
Last active August 29, 2015 14:21
f5 to node ip tunnel
f5:
ip tunnel del tun1
ip tunnel add tun1 mode ipip remote 10.3.89.46 dev eth0
ip tunnel
ifconfig tun1 10.3.91.216
ip link set tun1 up
# for remote end tunnel
ip route add 10.3.91.46 dev tun1
@ramr
ramr / router_dc_-10_percent
Last active August 29, 2015 14:26
router deployment config with update percent set to -10%
[vagrant@openshiftdev origin]$ oadm router --service-account=default --credentials=$KUBECONFIG --replicas=0
password for stats user admin has been set to 27Ndg4S572
deploymentconfigs/router
services/router
[vagrant@openshiftdev origin]$ oc get dc
NAME TRIGGERS LATEST VERSION
router ConfigChange 1
[vagrant@openshiftdev origin]$ oc get dc/router -o json
{
"kind": "DeploymentConfig",
@ramr
ramr / test-redispatches
Created September 1, 2015 18:53
recreate/test redispatches
#!/bin/bash
cookiejar="/tmp/cookiejar"
host="hello.openshift.test"
uri="http://$host/helasasa/"
to_opts="--connect-timeout 1 -m 1"
status=$(curl -s $to_opts -qw '%{http_code}' --resolve $host:80:10.0.2.15 \
-c "$cookiejar" -b "$cookiejar" -o /dev/null $uri)
echo "$(date): Initial cookie set status = $status"
@ramr
ramr / Gemfile
Created October 23, 2012 19:02
OpenShift Redmine 2.0 Gemfile and Gemfile.lock with rjb
source 'http://rubygems.org'
gem 'rails', '3.2.6'
gem 'prototype-rails', '3.2.1'
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder"
gem "minitest"
gem "mysql"
@ramr
ramr / multiple-routes-to-a-service
Created November 19, 2015 01:47
multiple routes to the same header-test service
echo '
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "header-test-route",
"labels": {
"name": "header-test-route"
}
@ramr
ramr / cf_buildpack_errors
Created April 21, 2013 23:35
CloudFoundry buildpack errors
bin/compile completed @ Sun Apr 21 23:20:11 UTC 2013
/var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:115:in `environment_variables': undefined method `[]' for false:FalseClass (NoMethodError)
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:84:in `startup_script'
from /var/vcap/packages/dea_next/buildpacks/lib/staging_plugin.rb:139:in `block in create_startup_script'
from /var/vcap/packages/dea_next/buildpacks/lib/staging_plugin.rb:138:in `open'
from /var/vcap/packages/dea_next/buildpacks/lib/staging_plugin.rb:138:in `create_startup_script'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:19:in `block in stage_application'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:12:in `chdir'
from /var/vcap/packages/dea_next/buildpacks/lib/buildpack.rb:12:in `stage_application'
from /var/vcap/packages/dea_next/buildpacks/bin/run:10:in `<main>'
@ramr
ramr / cf_buildpack_err
Created April 21, 2013 23:41
original cloudfoundry buildpack errors
cf push dynode --buildpack=git://github.com/ramr/strongloop-buildpack.git --no-create-services --instances 1 --memory 128M
Using manifest file manifest.yml
Creating dynode... OK
1: dynode
2: none
Subdomain> dynode
1: a1.cf-app.com
@ramr
ramr / pgshard_ssd_perf
Created March 3, 2014 23:11
SSD performance #s
On SSD instance - running bonnie++ for disk benchmarking. Will run on EBS based pgshards once we have a new instance launched.
ram@ip-10-2-16-37 [apm_pgshard]: ~$ bonnie++ -d /ebs/benchmark/bonnie -r 122698
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.