Skip to content

Instantly share code, notes, and snippets.

@jbayer
jbayer / gist:58ceceb07098961d6ac8
Created August 15, 2014 16:30
OpenShift Online 3 consecutive failures to scale an app to 16 or 10 instances
Fri Aug 15 00:13:58 $ rhc cartridge-scale jbossews-2.0 --app scaledemo --min 16 --max 16
This operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for jbossews-2.0 ...
Unable to complete the requested operation due to: Timed out while trying to fetch information from the nodes. Please try again and contact support if the issue persists.
Reference ID: 09c978ec58e729049adcfe287dcf58e0
Fri Aug 15 00:15:32 $ rhc cartridge-scale jbossews-2.0 --app scaledemo --min 10 --max 10
This operation will run until the application is at the minimum scale and may take several minutes.
Setting scale range for jbossews-2.0 ...
could not open session
@jbayer
jbayer / gist:2f67eaa245f30eac8fc9
Created July 13, 2014 13:01
cf restage APPNAME example
$ cf restage james-java
Restaging app james-java in org jwatters-org / space staging as jbayer@gopivotal.com...
OK
-----> Downloaded app package (532K)
-----> Downloaded app buildpack cache (39M)
-----> Java Buildpack Version: v2.1.2 | https://github.com/cloudfoundry/java-buildpack.git#074fd9a
-----> Downloading Open Jdk JRE 1.7.0_60 from http://download.run.pivotal.io/openjdk/lucid/x86_64/openjdk-1.7.0_60.tar.gz (found in cache)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)
-----> Downloading Maria Db JDBC 1.1.7 from http://download.run.pivotal.io/mariadb-jdbc/mariadb-jdbc-1.1.7.jar (0.0s)
-----> Downloading Tomcat Instance 7.0.54 from http://download.run.pivotal.io/tomcat/tomcat-7.0.54.tar.gz (found in cache)
@jbayer
jbayer / cf-logs-recent-output.txt
Created May 29, 2014 19:36
example of a tmate app on on cloud foundry hosted on pivotal web services
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/http_compat.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/http_struct.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/keyvalq_struct.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/listener.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/rpc.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/rpc_compat.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/rpc_struct.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/tag.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/tag_compat.h
2014-05-29T10:33:34.76-0700 [App/0] OUT include/event2/thread.h
@jbayer
jbayer / Good Group PM Bad Group PM By Ben Horowitz and David Weiden
Created May 28, 2014 04:01
Good Group PM Bad Group PM By Ben Horowitz and David Weiden
Good Group Product Manager /
Dead Group Product Manager
By Ben Horowitz and David Weiden
"Gentlemen, we're going to have a sales contest. First prize is a new car. Second prize is a knife set. Third prize is you're fired." - From the movie Glengary Glenross
"There are no bad group product managers, just group product managers that make bad decisions and then get fired." - Ben Horowitz
Group Product Manager is the most important non-executive position in a software company. In fact, it is more important and has higher impact on the company than many executive posts. A failed product can sink the company. A successful product can literally redefine the course of the business. Nobody is more responsible or more accountable for a product than the Group Product Manager. As a result, the job is characterized by massive success, massive failure, and little in between. Most GPMs are either promoted or end up leaving the company or being assigned to less hazardous duty within a short period of time.
@jbayer
jbayer / gist:de8eaec0c5ae7d96e041
Created May 1, 2014 17:39
example output from pushing the container-info buildpack
$ mkdir killroy
$ cd killroy/
$ ls
$ touch killroywashere
$ cf p killroywashere -b https://github.com/cloudfoundry-community/container-info-buildpack.git -m 256M
Creating app killroywashere in org jbayer-org / space development as jbayer@gopivotal.com...
OK
Creating route killroywashere.tabasco-app.cf-app.com...
OK
@jbayer
jbayer / docker-aws.yml
Created April 30, 2014 15:43
example of docker bosh release deployment manifest
<% deployment_name = 'docker' %>
<% os = 'ubuntu' %>
<% tld = 'microbosh' %>
<% director_uuid = 'GET_FROM_BOSH_STATUS' %>
---
name: <%= deployment_name %>
director_uuid: <%= director_uuid %>
releases:
- name: docker
@jbayer
jbayer / gist:3f6d31f06dcb26f7c325
Created April 30, 2014 06:22
Bash function demonstrating how to export the content of the buildpack compile script ENV_DIR into the environment from heroku docs
export_env_dir() {
env_dir=$1
whitelist_regex=${2:-''}
blacklist_regex=${3:-'^(PATH|GIT_DIR|CPATH|CPPATH|LD_PRELOAD|LIBRARY_PATH)$'}
if [ -d "$env_dir" ]; then
for e in $(ls $env_dir); do
echo "$e" | grep -E "$whitelist_regex" | grep -qvE "$blacklist_regex" &&
export "$e=$(cat $env_dir/$e)"
:
done
@jbayer
jbayer / gist:11388173
Created April 29, 2014 00:51
cloudfoundry example env vars in buildpack staging from compile script
-----> Downloaded app package (4.0K)
Cloning into '/tmp/buildpacks/null-buildpack'...
-----> build dir
env1: /tmp/staged/app
env2: /tmp/cache
env3:
-----> current env
USER=vcap
VCAP_APPLICATION={"limits":{"mem":256,"disk":1024,"fds":16384},"application_version":"65655208-793b-4585-ae61-2678b3e67965","application_name":"env-heroku","application_uris":["env-heroku.tabasco-app.cf-app.com"],"version":"65655208-793b-4585-ae61-2678b3e67965","name":"env-heroku","space_name":"development","space_id":"34abe92a-fc08-431a-a6ca-b673c021972e","uris":["env-heroku.tabasco-app.cf-app.com"],"users":null}
STAGING_TIMEOUT=900.0
@jbayer
jbayer / gist:11387928
Last active August 29, 2015 14:00
example of updated heroku compile output with env-var dir passed to compile script
$ heroku config:set BUILDPACK_URL=https://github.com/jbayer/null-buildpack.git
Setting config vars and restarting secure-dawn-7547... done, v4
BUILDPACK_URL: https://github.com/jbayer/null-buildpack.git
$ heroku config:set FOO=BAR
Setting config vars and restarting secure-dawn-7547... done, v5
FOO: BAR
$ mate README.txt
jamesbayer:env-heroku jamesbayer$ git add .
jamesbayer:env-heroku jamesbayer$ git commit -am 'initial commit'
[master (root-commit) ae9249d] initial commit
jamesbayer:boosh jamesbayer$ go get -u ./...
package _/Users/jamesbayer/workspace/boosh: unrecognized import path "_/Users/jamesbayer/workspace/boosh"
package _/Users/jamesbayer/workspace/boosh/builder: unrecognized import path "_/Users/jamesbayer/workspace/boosh/builder"