You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by m4...@apache.org on 2017/09/29 10:37:59 UTC
[2/3] brooklyn-server git commit: Reuse each bundle's catalog.bom
file to build global catalog.bom
Reuse each bundle's catalog.bom file to build global catalog.bom
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/d99d1297
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/d99d1297
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/d99d1297
Branch: refs/heads/master
Commit: d99d129797f849d6aae485b4eac95a58ea9c64de
Parents: ef20daa
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Wed Sep 20 11:54:44 2017 +0100
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Tue Sep 26 14:23:32 2017 +0200
----------------------------------------------------------------------
.../init/src/main/resources/catalog-classes.bom | 364 -------------------
karaf/init/src/main/resources/catalog.bom | 25 ++
software/base/src/main/resources/catalog.bom | 84 -----
3 files changed, 25 insertions(+), 448 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d99d1297/karaf/init/src/main/resources/catalog-classes.bom
----------------------------------------------------------------------
diff --git a/karaf/init/src/main/resources/catalog-classes.bom b/karaf/init/src/main/resources/catalog-classes.bom
deleted file mode 100644
index 96afc8f..0000000
--- a/karaf/init/src/main/resources/catalog-classes.bom
+++ /dev/null
@@ -1,364 +0,0 @@
-# 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
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-brooklyn.catalog:
- version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION
- items:
- # org.apache.brooklyn.core
- - itemType: entity
- items:
- - id: org.apache.brooklyn.entity.group.QuarantineGroup
- item:
- type: org.apache.brooklyn.entity.group.QuarantineGroup
- name: Quarantine Group
- description: A grouping for entities that are in quarantine (i.e. removed from the main cluster)
- - id: org.apache.brooklyn.entity.group.BasicGroup
- item:
- type: org.apache.brooklyn.entity.group.BasicGroup
- name: Basic Group
- description: A grouping of entities
- - id: org.apache.brooklyn.entity.stock.BasicEntity
- item:
- type: org.apache.brooklyn.entity.stock.BasicEntity
- name: Basic Entity
- description: The simplest basic entity (can be useful for testing)
- - id: org.apache.brooklyn.entity.stock.DataEntity
- item:
- type: org.apache.brooklyn.entity.stock.DataEntity
- name: Data Entity
- description: An entity that supplies data as sensor values (periodically evaluating given suppliers).
- - id: org.apache.brooklyn.entity.group.DynamicGroup
- item:
- type: org.apache.brooklyn.entity.group.DynamicGroup
- name: Dynamic Group
- description: A grouping of entities, where membership of the group is based on a given filter.
- - id: org.apache.brooklyn.entity.stock.DelegateEntity
- item:
- type: org.apache.brooklyn.entity.stock.DelegateEntity
- name: Delegate Entity
- description: An entity that mirrors another entity (mirroring its sensors)
- - id: org.apache.brooklyn.entity.group.DynamicRegionsFabric
- item:
- type: org.apache.brooklyn.entity.group.DynamicRegionsFabric
- name: Dynamic Regions Fabric
- description: A 'fabric' (see 'Dynamic Fabric') that allows new locations to be added/removed.
- - id: org.apache.brooklyn.core.server.entity.BrooklynMetrics
- item:
- type: org.apache.brooklyn.core.server.entity.BrooklynMetrics
- name: Brooklyn Metrics
- description: An entity that gives information about this Brooklyn server.
- - id: org.apache.brooklyn.entity.stock.BasicApplication
- item:
- type: org.apache.brooklyn.entity.stock.BasicApplication
- name: Basic Application
- description: The simplest application.
- - id: org.apache.brooklyn.entity.stock.BasicStartable
- item:
- type: org.apache.brooklyn.entity.stock.BasicStartable
- name: Basic Startable
- description: Provides a pass-through Startable entity, which can control the location(s) passed to its children.
- - id: org.apache.brooklyn.entity.group.DynamicCluster
- item:
- type: org.apache.brooklyn.entity.group.DynamicCluster
- name: Dynamic Cluster
- description: A cluster of entities that can dynamically increase or decrease the number of members.
- - id: org.apache.brooklyn.entity.group.DynamicMultiGroup
- item:
- type: org.apache.brooklyn.entity.group.DynamicMultiGroup
- name: Dynamic Multi Group
- description: Similar to 'Dynamic Group', but with multiple child groups. Entities are added to the child groups based on a supplied filter.
- - id: org.apache.brooklyn.entity.group.DynamicFabric
- item:
- type: org.apache.brooklyn.entity.group.DynamicFabric
- name: Dynamic Fabric
- description: The 'fabric' creates and starts an entity in each of its locations.
-
- # org.apache.brooklyn.policy
- - items:
- - id: org.apache.brooklyn.policy.ha.ConnectionFailureDetector
- itemType: policy
- item:
- type: org.apache.brooklyn.policy.ha.ConnectionFailureDetector
- name: Connection Failure Detector
- description: HA policy for monitoring a host:port,
- - id: org.apache.brooklyn.policy.ha.ServiceRestarter
- itemType: policy
- item:
- type: org.apache.brooklyn.policy.ha.ServiceRestarter
- name: Service Restarter
- description: HA policy for restarting a service automatically,
- - id: org.apache.brooklyn.policy.ha.SshMachineFailureDetector
- itemType: policy
- item:
- type: org.apache.brooklyn.policy.ha.SshMachineFailureDetector
- name: Ssh Connectivity Failure Detector
- description: HA policy for monitoring an SshMachine,
-
-# Removed from catalog because 'FollowTheSunPool' cannot currently be configured via catalog mechanisms.
-# Also removing associated 'BalanceableWorkerPool' etc as they are only useful with 'FollowTheSunPool'
-# - id: org.apache.brooklyn.policy.followthesun.FollowTheSunPool
-# item:
-# type: org.apache.brooklyn.policy.followthesun.FollowTheSunPool
-# - id: org.apache.brooklyn.policy.loadbalancing.BalanceableWorkerPool
-# itemType: entity
-# item:
-# type: org.apache.brooklyn.policy.loadbalancing.BalanceableWorkerPool
-# - id: org.apache.brooklyn.policy.loadbalancing.ItemsInContainersGroup
-# itemType: entity
-# item:
-# type: org.apache.brooklyn.policy.loadbalancing.ItemsInContainersGroup
- - id: org.apache.brooklyn.policy.ha.ServiceReplacer
- itemType: policy
- item:
- type: org.apache.brooklyn.policy.ha.ServiceReplacer
- name: Service Replacer
- description: HA policy for replacing a failed member of a group
- - id: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
- itemType: policy
- item:
- type: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
- name: Auto-scaler
- description: Policy that is attached to a Resizable entity and dynamically
-
- # org.apache.brooklyn.enrichers
- - itemType: enricher
- items:
- - id: org.apache.brooklyn.core.network.OnPublicNetworkEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.core.network.OnPublicNetworkEnricher
- name: Public Network Advertiser
- description: Advertises entity's public mapped ports. This can be used with sensors of type URI, HostAndPort or plain integer port values
- - id: org.apache.brooklyn.core.network.OnSubnetNetworkEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.core.network.OnSubnetNetworkEnricher
- name: Subnet Network Advertiser
- description: Advertises entity's subnet mapped ports. This can be used with sensors of type URI, HostAndPort or plain integer port values
- - id: org.apache.brooklyn.enricher.stock.Aggregator
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.Aggregator
- name: Aggregator
- description: Aggregates sensors from multiple entities into a single sensor value
- - id: org.apache.brooklyn.enricher.stock.Combiner
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.Combiner
- name: Combiner
- description: Combines and apply a transformation to sensors of an entity
- - id: org.apache.brooklyn.enricher.stock.Joiner
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.Joiner
- name: Joiner
- description: Joins entity's sensors into another one, i.e. creates a comma separated string from a list
- - id: org.apache.brooklyn.enricher.stock.MapAggregator
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.MapAggregator
- name: Map Aggregator
- description: Aggregates a pair of sensors on multiple children and/or members that are used as key-value pairs in a generated Map
- - id: org.apache.brooklyn.enricher.stock.PercentageEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.PercentageEnricher
- name: Percentage Transformer
- description: Computes and advertises the percentage based on a current and total values
- - id: org.apache.brooklyn.enricher.stock.Propagator
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.Propagator
- name: Propagator
- description: Propagates sensors from one entity to another
- - id: org.apache.brooklyn.enricher.stock.Transformer
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.Transformer
- name: Transformer
- description: Transforms sensors of an entity
- - id: org.apache.brooklyn.enricher.stock.UpdatingMap
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.UpdatingMap
- name: Map Updater
- description: Updates an entry in a sensor Map
- - id: org.apache.brooklyn.enricher.stock.YamlRollingTimeWindowMeanEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.YamlRollingTimeWindowMeanEnricher
- name: YAML Rolling Average
- description: Transforms sensor data into a rolling average based on a time window.")
- - id: org.apache.brooklyn.enricher.stock.YamlTimeWeightedDeltaEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.YamlTimeWeightedDeltaEnricher
- name: YAML Time-weighted Delta
- description: Converts an absolute count sensor into a delta sensor
- - id: org.apache.brooklyn.enricher.stock.reducer.Reducer
- itemType: enricher
- item:
- type: org.apache.brooklyn.enricher.stock.reducer.Reducer
- name: Reducer
- description: Applies a transformation to a sensor
- - id: org.apache.brooklyn.policy.enricher.DeltaEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.DeltaEnricher
- name: Delta
- description: Converts an absolute sensor into a delta sensor (i.e. the diff between the current and previous value)
- - id: org.apache.brooklyn.policy.enricher.HttpLatencyDetector
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.HttpLatencyDetector
- name: HTTP Latency Detector
- description: Computes latency in accessing a URL, normally by periodically polling that URL
- - id: org.apache.brooklyn.policy.enricher.RollingMeanEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.RollingMeanEnricher
- name: Rolling Mean
- description: |
- Transforms a sensor into a rolling average based on a fixed window size.
- This is useful for smoothing sample type metrics, such as latency or CPU time.
- - id: org.apache.brooklyn.policy.enricher.RollingTimeWindowMeanEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.RollingTimeWindowMeanEnricher
- name: "[DEPRECATED] Rolling Mean in Time Window"
- description: "[DEPRECATED] Prefer YamlRollingTimeWindowMeanEnricher"
- - id: org.apache.brooklyn.policy.enricher.TimeFractionDeltaEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.TimeFractionDeltaEnricher
- name: Time-fraction Delta
- description: |
- Converts an absolute measure of time into a fraction of time,
- based on the delta between consecutive values and the elapsed time between those values.
- - id: org.apache.brooklyn.policy.enricher.TimeWeightedDeltaEnricher
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.enricher.TimeWeightedDeltaEnricher
- name: "[DEPRECATED] Time Weighted Delta"
- description: "[DEPRECATED] prefer 'YamlTimeWeightedDeltaEnricher'"
- - id: org.apache.brooklyn.policy.ha.ServiceFailureDetector
- itemType: enricher
- item:
- type: org.apache.brooklyn.policy.ha.ServiceFailureDetector
- name: Service Failure Detector
- description: Emits a new sensor if the current entity fails
-
- # org.apache.brooklyn.software-base
- - itemType: entity
- items:
- - id: org.apache.brooklyn.entity.machine.MachineEntity
- item:
- type: org.apache.brooklyn.entity.machine.MachineEntity
- name: Machine Entity
- description: Represents a machine, providing metrics about it (e.g. obtained from ssh)
- - id: org.apache.brooklyn.entity.software.base.SameServerEntity
- item:
- type: org.apache.brooklyn.entity.software.base.SameServerEntity
- - id: org.apache.brooklyn.entity.chef.ChefEntity
- iconUrl: https://upload.wikimedia.org/wikipedia/en/5/56/Chef_Software_Inc._company_logo.png
- item:
- type: org.apache.brooklyn.entity.chef.ChefEntity
- - id: org.apache.brooklyn.entity.brooklynnode.BrooklynEntityMirror
- item:
- type: org.apache.brooklyn.entity.brooklynnode.BrooklynEntityMirror
- name: Brooklyn Entity Mirror
- description: Provides an entity which can sit in one brooklyn
- - id: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
- item:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
- - id: org.apache.brooklyn.entity.software.base.EmptyWindowsProcess
- item:
- type: org.apache.brooklyn.entity.software.base.EmptyWindowsProcess
- - id: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
- item:
- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
- name: Vanilla Windows Process
- description: A basic Windows entity configured with scripts, e.g. for launch, check-running and stop
- - id: org.apache.brooklyn.entity.java.VanillaJavaApp
- item:
- type: org.apache.brooklyn.entity.java.VanillaJavaApp
- name: Vanilla Java App
- - id: org.apache.brooklyn.entity.brooklynnode.BrooklynNode
- item:
- type: org.apache.brooklyn.entity.brooklynnode.BrooklynNode
- name: Brooklyn Node
- description: Deploys a Brooklyn management server
- - id: org.apache.brooklyn.entity.brooklynnode.BrooklynCluster
- item:
- type: org.apache.brooklyn.entity.brooklynnode.BrooklynCluster
- name: Brooklyn Cluster
- - id: org.apache.brooklyn.entity.brooklynnode.LocalBrooklynNode
- item:
- type: org.apache.brooklyn.entity.brooklynnode.LocalBrooklynNode
- name: Local Brooklyn Node
- description: An entity that represents the local Brooklyn server.
- - id: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
- item:
- type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
- name: Vanilla Software Process
- description: A software process configured with scripts, e.g. for launch, check-running and stop
- - id: org.apache.brooklyn.entity.machine.pool.ServerPool
- item:
- type: org.apache.brooklyn.entity.machine.pool.ServerPool
- name: Server Pool
- description: Creates a pre-allocated server pool, which other applications can deploy to
-
- # org.apache.brooklyn.test-framework
- - itemType: entity
- items:
- - id: org.apache.brooklyn.test.framework.TestSshCommand
- item:
- type: org.apache.brooklyn.test.framework.TestSshCommand
- name: Test SSH Command
- - id: org.apache.brooklyn.test.framework.SimpleShellCommandTest
- item:
- type: org.apache.brooklyn.test.framework.SimpleShellCommandTest
- name: "[DEPRECATED] Simple Shell Command Test"
- description: "[DEPRECATED] Instead use TestSshCommand"
- - id: org.apache.brooklyn.test.framework.ParallelTestCase
- item:
- type: org.apache.brooklyn.test.framework.ParallelTestCase
- name: Parallel Test Case
- - id: org.apache.brooklyn.test.framework.TestCase
- item:
- type: org.apache.brooklyn.test.framework.TestCase
- name: Test Case
- - id: org.apache.brooklyn.test.framework.InfrastructureDeploymentTestCase
- item:
- type: org.apache.brooklyn.test.framework.InfrastructureDeploymentTestCase
- name: Infrastructure Deployment Test Case
- - id: org.apache.brooklyn.test.framework.TestSensor
- item:
- type: org.apache.brooklyn.test.framework.TestSensor
- name: Test Sensor
- - id: org.apache.brooklyn.test.framework.TestEffector
- item:
- type: org.apache.brooklyn.test.framework.TestEffector
- name: Test Effector
- - id: org.apache.brooklyn.test.framework.TestHttpCall
- item:
- type: org.apache.brooklyn.test.framework.TestHttpCall
- name: Test HTTP Call
- - id: org.apache.brooklyn.test.framework.LoopOverGroupMembersTestCase
- item:
- type: org.apache.brooklyn.test.framework.LoopOverGroupMembersTestCase
- name: Loop Over Group Members Test Case
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d99d1297/karaf/init/src/main/resources/catalog.bom
----------------------------------------------------------------------
diff --git a/karaf/init/src/main/resources/catalog.bom b/karaf/init/src/main/resources/catalog.bom
new file mode 100644
index 0000000..277c32f
--- /dev/null
+++ b/karaf/init/src/main/resources/catalog.bom
@@ -0,0 +1,25 @@
+# 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
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+brooklyn.catalog:
+ version: "0.13.0-SNAPSHOT" # BROOKLYN_VERSION
+
+ items:
+ - classpath://org.apache.brooklyn.core:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION
+ - classpath://org.apache.brooklyn.policy:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION
+ - classpath://org.apache.brooklyn.software-base:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION
+ - classpath://org.apache.brooklyn.test-framework:0.13.0-SNAPSHOT:catalog.bom # BROOKLYN_VERSION
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/d99d1297/software/base/src/main/resources/catalog.bom
----------------------------------------------------------------------
diff --git a/software/base/src/main/resources/catalog.bom b/software/base/src/main/resources/catalog.bom
index 8b5839b..cf224b9 100644
--- a/software/base/src/main/resources/catalog.bom
+++ b/software/base/src/main/resources/catalog.bom
@@ -83,87 +83,3 @@ brooklyn.catalog:
type: org.apache.brooklyn.entity.machine.pool.ServerPool
name: Server Pool
description: Creates a pre-allocated server pool, which other applications can deploy to
-
- - id: bash-web-server-template
- itemType: template
- name: "Template: Bash Web Server"
- description: |
- Sample YAML building on Template "Server",
- adding bash commands to launch a Python-based web server
- on port 8020
- item:
- name: Python Web Server (Brooklyn Example)
-
- # this example builds on the previous one,
- # adding some scripts to initialize the VM
-
- services:
- - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
- name: My Bash Web Server VM
- brooklyn.config:
- install.command: |
- # install python if not present
- which python || \
- { apt-get update && apt-get install python ; } || \
- { yum update && yum install python ; } || \
- { echo WARNING: cannot install python && exit 1 ; }
-
- customize.command: |
- # create the web page to serve
- cat > index.html << EOF
-
- Hello world.
- <p>
- I am ${ENTITY_INFO}, ${MESSAGE:-a Brooklyn sample}.
- <p>
- Created at: `date`
- <p>
- I am running at ${HOSTNAME}, with on-box IP configuration:
- <pre>
- `ifconfig | grep inet`
- </pre>
-
- EOF
-
- launch.command: |
- # launch in background (ensuring no streams open), and record PID to file
- nohup python -m SimpleHTTPServer ${PORT:-8020} < /dev/null > output.txt 2>&1 &
- echo $! > ${PID_FILE:-pid.txt}
- sleep 5
- ps -p `cat ${PID_FILE:-pid.txt}`
- if [ $? -ne 0 ] ; then
- cat output.txt
- echo WARNING: python web server not running
- exit 1
- fi
-
- shell.env:
- HOSTNAME: $brooklyn:attributeWhenReady("host.name")
- PORT: $brooklyn:config("my.app.port")
- ENTITY_INFO: $brooklyn:component("this", "")
- MESSAGE: $brooklyn:config("my.message")
-
- # custom
- my.app.port: 8020
- my.message: "good to meet you"
-
- brooklyn.enrichers:
- # publish the URL as a sensor; the GUI will pick this up (main.uri)
- - type: org.apache.brooklyn.enricher.stock.Transformer
- brooklyn.config:
- uniqueTag: url-generator
- enricher.sourceSensor: host.subnet.hostname
- # use the definition from Attributes class, as it has a RendererHint so GUI makes it a link
- enricher.targetSensor: $brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
- enricher.targetValue:
- $brooklyn:formatString:
- - "http://%s:%s/"
- - $brooklyn:attributeWhenReady("host.subnet.hostname")
- - $brooklyn:config("my.app.port")
-
- location:
- jclouds:aws-ec2:
- region: eu-central-1
- # edit these (or delete if credentials specified in brooklyn.properties)
- identity: <REPLACE>
- credential: <REPLACE>