This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BrooklynServerDetails details = BrooklynLauncher.newLauncher(). | |
// to add a custom webapp | |
webapp("/cdh", "classpath://brooklyn-cdh-frontend.war"). | |
webconsolePort(CommandLineUtil.getCommandLineOption(args, "--port", "8081+")). | |
launch(); | |
// then things below linked to buttons / etc in app | |
// get the mgmt context (and also the webconsole URL) from this details container | |
ManagementContext mgmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// current syntax | |
MySqlNode mysql = (MySqlNode) addChild( | |
getEntityManager().createEntity( | |
BasicEntitySpec.newInstance(MySqlNode.class) | |
.configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL))) ); | |
// step 1 (uncontroversial?): allow addChild to take a spec directly | |
MySqlNode mysql1 = (MySqlNode) addChild( | |
BasicEntitySpec.newInstance(MySqlNode.class) | |
.configure(MySqlNode.CREATION_SCRIPT_URL, getConfig(DB_SETUP_SQL_URL)) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NewMapRSyntaxPlaying { | |
{ | |
// 0.5.0-rc.1 | |
// option 1 -- clusters with spec | |
// core = addChild(cluster( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml variant, similar to #3 below, with an explicit load balancer | |
# this format makes it much easier for mortals to read and write, | |
# based significantly on https://wiki.openstack.org/wiki/Heat/DSL | |
name: "Hello WebApp Cluster with Database" | |
components: | |
# key here equivalent to supplying a map with this as the value for key 'id' | |
hello_war: | |
content: hello.war | |
requires: | |
- type: com.example.java:WarDeploymentRequirement # explicit req type says to "deploy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"type" : "DeploymentPlan" | |
"href" : "data://...", | |
}, | |
{ | |
"type" : "Requirement", | |
"id" : "file1", | |
"href" : "data://...", | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="standardMBeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"> | |
<property name="locateExistingServerIfPossible" value="true" /> | |
</bean> | |
<bean id="jettyJMXExporter" class="org.springframework.jmx.export.MBeanExporter"> | |
<property name="beans"> | |
<map> | |
<entry key="com.opengamma.jetty:service=HttpConnector" value-ref="connector" /> | |
<entry key="com.opengamma.jetty:service=HttpServer" value-ref="server" /> | |
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VitaMinder | |
artifacts: | |
- | |
name: VitaMinder WAR | |
type: com.example.java:WAR | |
content: { href: vitaminder.war } | |
requirements: | |
- | |
type: HostedOn | |
fulfillment: id:as |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# displays a summary list of commits in your current repo vs upstream branch and upstream master, | |
# and of working tree changes Added, Modified, Deleted, or not in index ("??") | |
THIS_COMMAND="$0 $@" | |
while true; do | |
case $1 in | |
-o|--offline) | |
OFFLINE=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for l in locations/* ; do | |
ENT=`xmlstarlet sel -t -v "location/locationConfig/callerContext/entityProxy" $l` | |
if [ ! -z "$ENT" ] ; then | |
if [ -z `find . -name $ENT` ] ; then | |
# it's a leak | |
LOC=`basename $l` | |
echo "Detected location $LOC has reference to deleted entity $ENT - removing it" | |
rm $l | |
FILES=`grep -l $LOC locations/*` | |
if [ ! -z "$FILES" ] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
jstack $@ | awk ' | |
function onTraceBegin() { | |
onTraceEnd() | |
data["lineCount"]=0 | |
data["head"]=$0 | |
} | |
function onTraceEnd() { | |
if ("head" in data) { |