Skip to content

Instantly share code, notes, and snippets.

yum install java-1.6.0-openjdk-devel
yum install git
git clone git@github.com:brooklyncentral/brooklyn
cd brooklyn
wget http://mirrors.gigenet.com/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
su -c "tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /opt/"
# Add the following lines to maven.sh
export M2_HOME=/opt/apache-maven-3.0.5
name: AWS Docker Cloud
location:
aws-ec2:
region: eu-west-1
services:
- type: brooklyn.clocker.example.DockerCloud
brooklyn.config:
install.version: 1.2
@Test
public void testPredicateAndSupplier() {
Function function = IfFunctions.ifPredicate(Predicates.equalTo(false)).get(Suppliers.ofInstance("F"))
.ifEquals(true).value("T").defaultGet(Suppliers.ofInstance("?")).build();
Assert.assertEquals(function.apply(true), "T");
Assert.assertEquals(function.apply(false), "F");
Assert.assertEquals(function.apply(null), "?");
}
app.config field riak.conf variable
-------------------------------------------------------------------------------------------
yokozuna.enabled yokozuna
yokozuna.solr_port yokozuna.solr_port
yokozuna.solr_jmx_port yokozuna.solr_jmx_port
yokozuna.solr_jvm_args yokozuna.solr_jvm_args
yokozuna.yz_dir yokozuna.data_dir
riak_repl.data_root mdc.data_root
riak_core.cluster_mgr mdc.cluster_manager
riak_repl.max_fssource_cluster mdc.max_fssource_cluster
Failed after 304ms: Error invoking start at DynamicWebAppClusterImpl{id=LnOlsrWx}: On start of cluster DynamicWebAppClusterImpl{id=LnOlsrWx}, failed to get to initial size of 1; size is 0: java.lang.IllegalArgumentException: Error resolving config enricher.producer, $brooklyn:component(CHILD, thewebserver), in brooklyn.util.task.BasicExecutionContext@5e2faae([Wrapped[contextEntity:CoLocatedMongoDBRouterImpl{id=ggmNbopm}]]): brooklyn.util.exceptions.PropagatedRuntimeException: java.util.NoSuchElementException: No entity matching id thewebserver, in scope CHILD wrt CoLocatedMongoDBRouterImpl{id=ggmNbopm}
brooklyn.util.exceptions.PropagatedRuntimeException: Error invoking start at DynamicWebAppClusterImpl{id=LnOlsrWx}: Error invoking start at DynamicWebAppClusterImpl{id=LnOlsrWx}: On start of cluster DynamicWebAppClusterImpl{id=LnOlsrWx}, failed to get to initial size of 1; size is 0: java.lang.IllegalArgumentException: Error resolving config enricher.producer, $brooklyn:component(CHILD, thewebserver), in brook
@nakomis
nakomis / Clear Catalog
Last active August 29, 2015 14:12
Deletes all applications from an Apache Brooklyn catalog
Linux
=====
wget -O- http://admin:password@127.0.0.1:8081/v1/catalog/applications | \
grep -o 'symbolicName\"\:\"[^\"]*\"' | \
grep -oP '(?<=\:\")[^\"]*' | \
while read c; do curl -u admin:password -X DELETE http://127.0.0.1:8081/v1/catalog/entities/$c; done
Mac (requires ack - `brew install ack` or `sudo port install ack`)
@nakomis
nakomis / harvest
Last active August 29, 2015 14:17
Harvesting harvest
#!/bin/bash
# Usage: harvest [d [m [yyyy]]]
# Assumes the presence of harvest.env in the subfolder 'ignored' of the folder in which this script is located
# The contents of the file should be as follow:
# export USER_NAME=martin.harris@cloudsoftcorp.com
# export PASSWORD=hunter2
. $(dirname $0)/ignored/harvest.env
if [ -n "$3" ]; then
@nakomis
nakomis / gist:da25de721196fbafaa41
Created June 11, 2015 10:41
TAI exception stack-trace
2015-06-11 11:26:52,029 WARN b.n.vclouddirector.NatService [natservice-execmanager-0]: Ignoring the Certificate Validation using FakeSSLSocketFactory
2015-06-11 11:39:45,716 WARN b.n.v.NatServiceDispatcher [natservice-execmanager-0]: Problem executing action to modify NAT rules for martin@canopy_compose-2_01 @ https://svdc.it-solutions.atos.net/cloud/org/canopy_compose-2_01
brooklyn.util.exceptions.PropagatedRuntimeException:
at brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:97) ~[brooklyn-utils-common-0.7.0-SNAPSHOT.jar:0.7.0-SNAPSHOT]
at brooklyn.networking.vclouddirector.NatServiceDispatcher.executeActions(NatServiceDispatcher.java:404) ~[brooklyn-networking-vcloud-director-0.7.0-SNAPSHOT.jar:na]
at brooklyn.networking.vclouddirector.NatServiceDispatcher$1.call(NatServiceDispatcher.java:328) [brooklyn-networking-vcloud-director-0.7.0-SNAPSHOT.jar:na]
at brooklyn.networking.vclouddirector.NatServiceDispatcher$1.call(NatServiceDispatcher.java:325) [brooklyn-networking-vcloud-director-0.
brooklyn.catalog:
id: foo.bar.location
name: Martin's Foo Location
version: 1.0.0
item.type: location
item:
type: brooklyn.location.jclouds.JcloudsLocation
spec: jclouds:aws-ec2:us-west-1
brooklyn.config:
brooklyn.catalog:
id: foo.bar.location6
name: Martin's Foo Location
version: 1.0.0
item.type: location
item:
type: brooklyn.location.jclouds.JcloudsLocation
provider: aws-ec2
region: us-west-1