This file contains hidden or 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
package io.cloudsoft.ibm.mms.amp.util; | |
import brooklyn.config.ConfigKey; | |
import brooklyn.enricher.Enrichers; | |
import brooklyn.entity.basic.AbstractEntity; | |
import brooklyn.entity.basic.Attributes; | |
import brooklyn.entity.basic.ConfigKeys; | |
import brooklyn.event.AttributeSensor; | |
import brooklyn.event.basic.Sensors; | |
import brooklyn.event.feed.http.HttpFeed; |
This file contains hidden or 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
cat > index.html << --EOF-- | |
<html><body> | |
<h1>Hello World</h1> | |
<p> | |
This is a sample Brooklyn-deployed web server, built on netcat. | |
Of course you can use any script here, or pre-built blueprints for common webapp, nosql, message software, | |
services, clusters, or a pre-built imageId, or Chef -- up to you. | |
</p> | |
<p> | |
Management policies can then be mixed in. |
This file contains hidden or 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
Hosted AMP in SL running no blueprints currently, but previously deploying OG to SL and AWS | |
num #instances #bytes class name | |
---------------------------------------------- | |
1: 5798577 185554464 java.util.concurrent.ConcurrentHashMap$HashEntry | |
2: 5403795 172921440 java.lang.String | |
3: 1431659 84584664 [C | |
4: 1528111 67764056 [Ljava.util.concurrent.ConcurrentHashMap$HashEntry; | |
5: 1528111 61124440 java.util.concurrent.ConcurrentHashMap$Segment |
This file contains hidden or 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: dse-cassandra | |
# starts a single datacenter DSE cluster and an opscenter node | |
services: | |
- type: io.cloudsoft.datastax.dse.DSECassandraDatacenter | |
name: DSE Cluster | |
brooklyn.config: | |
cluster.initial.size: 5 | |
cluster.initial.quorumSize: 3 | |
datastax.cassandra.opscenter.entity: $brooklyn:component("opscenter") |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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)) ); |