Skip to content

Instantly share code, notes, and snippets.

View nebhale's full-sized avatar

Ben Hale nebhale

View GitHub Profile
@nebhale
nebhale / configuration-examples.yml
Last active August 29, 2015 14:03
Configuration for 3-member Redis cluster managed by a 3-member Sentinel cluster
---
spring:
redis:
port: 6379
host: localhost
---
spring:
sentinel:
-
#!/usr/bin/env bash
# Copyright 2014 Pivotal Software, Inc. All Rights Reserved.
set -e
VERSION=1.8.0_05
tar xzf "${BOSH_COMPILE_TARGET}/java/openjdk-${VERSION}.tar.gz" --strip 1 -C "${BOSH_INSTALL_TARGET}"
@nebhale
nebhale / gist:6ac1c022efae38d7723e
Created September 22, 2014 12:19
Jenkins on Cloud Foundry
bhale-desktop: export PORT=9001
bhale-desktop: detect
java-buildpack=1234-https://github.com/cloudfoundry/java-buildpack.git#3455de8 java-main open-jdk-jre=1.8.0_20 spring-auto-reconfiguration=1.5.0_RELEASE
bhale-desktop: compile
-----> Java Buildpack Version: 1234 | https://github.com/cloudfoundry/java-buildpack.git#3455de8
-----> Downloading Open Jdk JRE 1.8.0_20 from https://download.run.pivotal.io/openjdk/mountainlion/x86_64/openjdk-1.8.0_20.tar.gz (found in cache)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (0.6s)
-----> Downloading Spring Auto Reconfiguration 1.5.0_RELEASE from https://download.run.pivotal.io/auto-reconfiguration/auto-reconfiguration-1.5.0_RELEASE.jar (found in cache)
@nebhale
nebhale / gist:c793f8602e7d68983935
Created October 7, 2014 15:21
Typical Auto-reconfiguration
2014-10-07T16:20:02.47+0100 [STG] ERR Cloning into '/tmp/buildpacks/java-buildpack'...
2014-10-07T16:20:03.64+0100 [STG] OUT -----> Java Buildpack Version: c19642c | https://github.com/cloudfoundry/java-buildpack.git#c19642c
2014-10-07T16:20:03.76+0100 [STG] OUT -----> Downloading Open Jdk JRE 1.8.0_20 from https://download.run.pivotal.io/openjdk/lucid/x86_64/openjdk-1.8.0_20.tar.gz (found in cache)
2014-10-07T16:20:05.12+0100 [STG] OUT Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.3s)
2014-10-07T16:20:05.15+0100 [STG] OUT -----> Downloading Spring Auto Reconfiguration 1.5.0_RELEASE from https://download.run.pivotal.io/auto-reconfiguration/auto-reconfiguration-1.5.0_RELEASE.jar (found in cache)
2014-10-07T16:20:05.58+0100 [STG] OUT -----> Downloading Tomcat Instance 8.0.14 from https://download.run.pivotal.io/tomcat/tomcat-8.0.14.tar.gz (0.4s)
2014-10-07T16:20:05.74+0100 [STG] OUT Expanding Tomcat to .java-buildpack/tomcat (0.1s)
2014-10-07T16:20:05.77+010
@nebhale
nebhale / Controller.groovy
Created October 8, 2014 12:12
Testing System.out and System.err on Cloud Foundry
@RestController
class Controller {
@RequestMapping(method = RequestMethod.POST, value='/out')
void out(@RequestBody String message) {
System.out.println(message);
System.out.flush();
}
@RequestMapping(method = RequestMethod.POST, value='/err')
@nebhale
nebhale / gist:642d0a186107349b1d5d
Created December 2, 2014 13:31
PCF on AWS Failure Log
{"type": "step_started", "id": "microbosh.setting_manifest"}
WARNING! Your target has been changed to `https://10.0.1.11:25555'!
Deployment set to '/var/tempest/workspaces/default/deployments/micro/micro_bosh.yml'
{"type": "step_finished", "id": "microbosh.setting_manifest"}
{"type": "step_started", "id": "microbosh.deploying"}
Verifying stemcell...
File exists and readable OK
Verifying tarball...
Read tarball OK
bhale-desktop master: cf restage java-main-application
Restaging app java-main-application in org bhale / space development as [email protected]...
Creating container
Successfully created container
Downloading app package...
Downloaded app package (16.4M)
Downloading buildpacks (https://github.com/cloudfoundry/java-buildpack/archive/master.zip), build artifacts cache...
Downloading build artifacts cache...
Downloaded build artifacts cache (116.1M)
Downloaded buildpacks
@nebhale
nebhale / OpenJDK JRE
Created March 3, 2015 15:25
JRE File Lists
ASSEMBLY_EXCEPTION
bin/
bin/java
bin/jjs
bin/keytool
bin/orbd
bin/pack200
bin/policytool
bin/rmid
bin/rmiregistry
url = ${spring.datasource.url}
driverClassName = ${spring.datasource.driverClassName}
username = ${spring.datasource.username}
password = ${spring.datasource.password}
#Jdbc Connection Pool Properties
initialSize = ${spring.datasource.initialSize}
maxActive = ${spring.datasource.maxActive}
maxIdle = ${spring.datasource.maxIdle}
minIdle = ${spring.datasource.minIdle}
maxWait = ${spring.datasource.maxWait}
@nebhale
nebhale / cf-acceptance-tests
Last active August 29, 2015 14:16
`moose` outputs
hypnotoad: cd cf-acceptance-tests/assets/java/
hypnotoad master: find .
.
./index.jsp
./RequestUri.jsp
./WEB-INF
./WEB-INF/web.xml
./Ω.jsp
hypnotoad master: cf push assets-java
Creating app assets-java in org jbp-test / space jbp-test as admin...