Skip to content

Commit

Permalink
Split catalog and resources and update catalog BOM files
Browse files Browse the repository at this point in the history
  • Loading branch information
grkvlt committed Oct 28, 2016
1 parent 0886a7d commit 3f0e96b
Show file tree
Hide file tree
Showing 17 changed files with 98 additions and 75 deletions.
17 changes: 5 additions & 12 deletions README.md
Expand Up @@ -19,9 +19,9 @@ and [Kubernetes](http://kubernetes.io/) clusters.

You will find the source code for the blueprints in this repository.

* [Docker](./common/src/main/resources/docker/)
* [Swarm](./swarm/src/main/resources/swarm/)
* [Kubernetes](./kubernetes/src/main/resources/kubernetes/)
* [Docker](./common/src/main/catalog/docker/)
* [Swarm](./swarm/src/main/catalog/swarm/)
* [Kubernetes](./kubernetes/src/main/catalog/kubernetes/)

## Getting Started

Expand All @@ -37,8 +37,6 @@ brooklyn.catalog:
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-swarm&v=2.1.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-kubernetes&v=2.1.0-SNAPSHOT"
items:
- classpath://io.brooklyn.etcd.brooklyn-etcd:brooklyn-etcd/catalog.bom
- classpath://io.brooklyn.clocker.common:docker/catalog.bom
- classpath://io.brooklyn.clocker.swarm:swarm/catalog.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/catalog.bom
```
Expand All @@ -57,11 +55,6 @@ Then add the catalog entries using the following YAML:
```YAML
brooklyn.catalog:
items:
- classpath://io.brooklyn.etcd.brooklyn-etcd:brooklyn-etcd/catalog.bom
- classpath://io.brooklyn.clocker.common:common/common.bom
- classpath://io.brooklyn.clocker.common:common/ca.bom
- classpath://io.brooklyn.clocker.common:docker/docker.bom
- classpath://io.brooklyn.clocker.swarm:swarm/swarm.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/plugins.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/kubernetes.bom
- classpath://swarm/catalog.bom
- classpath://kubernetes/catalog.bom
```
2 changes: 0 additions & 2 deletions clocker.bom
Expand Up @@ -5,7 +5,5 @@ brooklyn.catalog:
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-swarm&v=2.1.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-kubernetes&v=2.1.0-SNAPSHOT"
items:
- classpath://io.brooklyn.etcd.brooklyn-etcd:brooklyn-etcd/catalog.bom
- classpath://io.brooklyn.clocker.common:docker/catalog.bom
- classpath://io.brooklyn.clocker.swarm:swarm/catalog.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/catalog.bom
18 changes: 14 additions & 4 deletions common/pom.xml
Expand Up @@ -17,13 +17,18 @@
<build>
<resources>
<resource>
<directory>src/main/examples</directory>
<directory>src/main/catalog</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/examples</directory>
<filtering>false</filtering>
<targetPath>examples</targetPath>
</resource>
<resource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
Expand All @@ -46,17 +51,22 @@
<configuration>
<artifacts>
<artifact>
<file>${project.basedir}/src/main/resources/docker/docker.bom</file>
<file>${project.basedir}/src/main/catalog/docker/docker.bom</file>
<type>bom</type>
<classifier>docker</classifier>
</artifact>
<artifact>
<file>${project.basedir}/src/main/resources/common/ca.bom</file>
<file>${project.basedir}/src/main/catalog/common/ca.bom</file>
<type>bom</type>
<classifier>ca</classifier>
</artifact>
<artifact>
<file>${project.basedir}/src/main/resources/common/common.bom</file>
<file>${project.basedir}/src/main/catalog/common/haproxy.bom</file>
<type>bom</type>
<classifier>haproxy</classifier>
</artifact>
<artifact>
<file>${project.basedir}/src/main/catalog/common/common.bom</file>
<type>bom</type>
<classifier>common</classifier>
</artifact>
Expand Down
File renamed without changes.
51 changes: 51 additions & 0 deletions common/src/main/catalog/common/common.bom
@@ -0,0 +1,51 @@
brooklyn.catalog:
version: "2.1.0-SNAPSHOT" # CLOCKER_VERSION
publish:
description: |
Resources for common Apache Brooklyn entities
license_code: APACHE-2.0

items:
- id: conditional-entity
name: "Conditional Entity"
description: |
An entity that creates a child only if a configuration key is set
itemType: entity
item:
type: org.apache.brooklyn.entity.stock.ConditionalEntity
id: conditional-entity

- id: child-software-process
name: "Child Software Process"
description: |
A child entity that executes commands to run a process
itemType: entity
item:
type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
id: child-software-process

- id: empty-software-process
name: "Empty Software Process"
description: |
A startable entity to group child entities
itemType: entity
item:
type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
id: empty-software-process

- id: centos-software-process
name: "CentOS Software Process"
description: |
An entity that executes commands to run a process

Uses a CentOS 7.x Virtual Machine
itemType: entity
iconUrl: https://raw.githubusercontent.com/docker-library/docs/c4df0024e2cad985326dc38f6b6ce39abeab59c5/centos/logo.png
item:
type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
id: centos-software-process
brooklyn.config:
dontRequireTtyForSudo: true
provisioning.properties:
osFamily: centos
osVersionRegex: 7
Expand Up @@ -2,56 +2,12 @@ brooklyn.catalog:
version: "2.1.0-SNAPSHOT" # CLOCKER_VERSION
publish:
description: |
Resources for common Apache Brooklyn entities
HAProxy load balancer
license_code: APACHE-2.0

items:
- https://raw.githubusercontent.com/brooklyncentral/brooklyn-dns/master/brooklyn-dns-etc-hosts-generator.bom

- id: conditional-entity
name: "Conditional Entity"
description: |
An entity that creates a child only if a configuration key is set
itemType: entity
item:
type: org.apache.brooklyn.entity.stock.ConditionalEntity
id: conditional-entity

- id: child-software-process
name: "Child Software Process"
description: |
A child entity that executes commands to run a process
itemType: entity
item:
type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
id: child-software-process

- id: empty-software-process
name: "Empty Software Process"
description: |
A startable entity to group child entities
itemType: entity
item:
type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
id: empty-software-process

- id: centos-software-process
name: "CentOS Software Process"
description: |
An entity that executes commands to run a process

Uses a CentOS 7.x Virtual Machine
itemType: entity
iconUrl: https://raw.githubusercontent.com/docker-library/docs/c4df0024e2cad985326dc38f6b6ce39abeab59c5/centos/logo.png
item:
type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
id: centos-software-process
brooklyn.config:
dontRequireTtyForSudo: true
provisioning.properties:
osFamily: centos
osVersionRegex: 7

- id: haproxy-load-balancer-template
name: "HAProxy Load Balancer"
description: |
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions kubernetes/pom.xml
Expand Up @@ -16,13 +16,18 @@

<build>
<resources>
<resource>
<directory>src/main/catalog</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/examples</directory>
<filtering>false</filtering>
<targetPath>examples</targetPath>
</resource>
<resource>
<directory>src/test/resources</directory>
Expand All @@ -46,12 +51,12 @@
<configuration>
<artifacts>
<artifact>
<file>${project.basedir}/src/main/resources/kubernetes/kubernetes.bom</file>
<file>${project.basedir}/src/main/catalog/kubernetes/kubernetes.bom</file>
<type>bom</type>
<classifier>kubernetes</classifier>
</artifact>
<artifact>
<file>${project.basedir}/src/main/resources/kubernetes/plugins.bom</file>
<file>${project.basedir}/src/main/catalog/kubernetes/plugins.bom</file>
<type>bom</type>
<classifier>plugins</classifier>
</artifact>
Expand Down
8 changes: 8 additions & 0 deletions kubernetes/src/main/catalog/kubernetes/catalog.bom
@@ -0,0 +1,8 @@
brooklyn.catalog:
items:
- https://raw.githubusercontent.com/brooklyncentral/brooklyn-dns/master/brooklyn-dns-etc-hosts-generator.bom
- classpath://io.brooklyn.etcd.brooklyn-etcd:brooklyn-etcd/catalog.bom
- classpath://io.brooklyn.clocker.common:docker/catalog.bom
- classpath://io.brooklyn.clocker.common:common/haproxy.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/plugins.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/kubernetes.bom
5 changes: 0 additions & 5 deletions kubernetes/src/main/resources/kubernetes/catalog.bom

This file was deleted.

7 changes: 6 additions & 1 deletion swarm/pom.xml
Expand Up @@ -16,13 +16,18 @@

<build>
<resources>
<resource>
<directory>src/main/catalog</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/examples</directory>
<filtering>false</filtering>
<targetPath>examples</targetPath>
</resource>
<resource>
<directory>src/test/resources</directory>
Expand All @@ -46,7 +51,7 @@
<configuration>
<artifacts>
<artifact>
<file>${project.basedir}/src/main/resources/swarm/swarm.bom</file>
<file>${project.basedir}/src/main/catalog/swarm/swarm.bom</file>
<type>bom</type>
<classifier>swarm</classifier>
</artifact>
Expand Down
6 changes: 6 additions & 0 deletions swarm/src/main/catalog/swarm/catalog.bom
@@ -0,0 +1,6 @@
brooklyn.catalog:
items:
- classpath://io.brooklyn.etcd.brooklyn-etcd:brooklyn-etcd/catalog.bom
- classpath://io.brooklyn.clocker.common:docker/catalog.bom
- classpath://io.brooklyn.clocker.common:common/haproxy.bom
- classpath://io.brooklyn.clocker.swarm:swarm/swarm.bom
File renamed without changes.
4 changes: 0 additions & 4 deletions swarm/src/main/resources/swarm/catalog.bom

This file was deleted.

0 comments on commit 3f0e96b

Please sign in to comment.