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
VBoxManage setextradata boot2docker VBoxInternal/CPUM/EnableHVP 1 |
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: My Web Cluster | |
location: | |
byon: | |
user: vagrant | |
password: vagrant | |
hosts: | |
- 10.10.10.101 | |
- 10.10.10.102 | |
- 10.10.10.103 |
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: Python Web Server | |
# this example deploys a very simple python web server | |
services: | |
- type: vanilla-bash-server | |
name: My Bash Web Server VM | |
brooklyn.config: | |
install.command: | | |
# install python if not present |
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
brooklyn.location.named.local-vagrant = byon:(hosts="10.10.10.101,10.10.10.102,10.10.10.103,10.10.10.104") | |
brooklyn.location.named.local-vagrant.user = vagrant | |
brooklyn.location.named.local-vagrant.password = vagrant |
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
brooklyn.catalog: | |
version: 1.0 | |
id: my-sql | |
description: MySQL is a relational database. | |
item: | |
type: org.apache.brooklyn.entity.database.mysql.MySqlCluster | |
initialSize: 2 | |
name: MySQL Node | |
location: byon |
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: Bash Web Server and Riak Cluster (Brooklyn Example) | |
# this example *references* the previous one, | |
# combining it with a stock blueprint for a Riak cluster, | |
# and shows how a sensor from the latter can be injected | |
services: | |
# reference template 2, overriding message to point at riak | |
- type: 2-bash-web-server-template |
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: Bash Web Server and Riak Cluster (Brooklyn Example) | |
# this example *references* the previous one, | |
# combining it with a stock blueprint for a Riak cluster, | |
# and shows how a sensor from the latter can be injected | |
services: | |
# reference template 2, overriding message to point at riak | |
- type: 2-bash-web-server-template |
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: Resilient Load-Balanced Bash Web Cluster (Brooklyn Example) | |
# this final example shows some of the advanced functionality: | |
# defining custom sensors, and a cluster with a "spec", | |
# policies for resilience and scaling based on that sensor, | |
# and wiring a load balancer in front of the cluster | |
# combining this with the riak cluster in the previous example | |
# is left as a suggested exercise for the user |
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
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
package com.acme.crate; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import org.apache.brooklyn.api.entity.EntityLocal; | |
import org.apache.brooklyn.api.sensor.SensorEvent; | |
import org.apache.brooklyn.api.sensor.SensorEventListener; | |
import org.apache.brooklyn.core.entity.trait.Startable; | |
import org.apache.brooklyn.core.mgmt.internal.EffectorUtils; |
OlderNewer