Skip to content

Commit

Permalink
Move all ECS definitions to a separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
grkvlt committed Oct 18, 2016
1 parent 33f5c22 commit 041e2f8
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 3 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ repository. To install this, follow the instructions below.
Clocker for [Apache Brooklyn](https://brooklyn.apache.org/) is a set of open
source, Apache Licensed tools designed to make working with [Docker](https://www.docker.com/)
containers as simple as a few clicks. Clocker contains [Brooklyn blueprints](http://brooklyn.apache.org/v/latest/start/blueprints.html)
to enable deployment and management of [Docker Swarm](https://www.docker.com/products/docker-swarm)
and [Kubernetes](http://kubernetes.io/) clusters.
to enable deployment and management of [Docker Swarm](https://www.docker.com/products/docker-swarm),
[Amazon ECS](https://aws.amazon.com/ecs/) and [Kubernetes](http://kubernetes.io/) clusters.

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

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

Expand All @@ -34,11 +35,13 @@ brooklyn.catalog:
brooklyn.libraries:
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.etcd&a=brooklyn-etcd&v=2.3.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-common&v=2.1.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-ecs&v=2.1.0-SNAPSHOT"
- "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.ecs:ecs/catalog.bom
- classpath://io.brooklyn.clocker.swarm:swarm/catalog.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/catalog.bom
```
Expand All @@ -49,6 +52,7 @@ You must add the following JARs to `./lib/dropins`:

* [brooklyn-etcd](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.etcd&a=brooklyn-etcd&v=2.3.0-SNAPSHOT)
* [common](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-common&v=2.1.0-SNAPSHOT)
* [ecs](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-ecs&v=2.1.0-SNAPSHOT)
* [swarm](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-swarm&v=2.1.0-SNAPSHOT)
* [kubernetes](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-kubernetes&v=2.1.0-SNAPSHOT)

Expand All @@ -61,6 +65,7 @@ brooklyn.catalog:
- 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.ecs:ecs/ecs.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
Expand Down
2 changes: 2 additions & 0 deletions clocker.bom
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ brooklyn.catalog:
brooklyn.libraries:
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.etcd&a=brooklyn-etcd&v=2.3.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-common&v=2.1.0-SNAPSHOT"
- "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.brooklyn.clocker&a=clocker-ecs&v=2.1.0-SNAPSHOT"
- "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.ecs:ecs/catalog.bom
- classpath://io.brooklyn.clocker.swarm:swarm/catalog.bom
- classpath://io.brooklyn.clocker.kubernetes:kubernetes/catalog.bom
60 changes: 60 additions & 0 deletions ecs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.brooklyn.clocker</groupId>
<artifactId>clocker-parent</artifactId>
<version>2.1.0-SNAPSHOT</version> <!-- CLOCKER_VERSION -->
</parent>

<name>Clocker :: ECS</name>
<artifactId>clocker-ecs</artifactId>
<packaging>jar</packaging>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/examples</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
<targetPath>tests</targetPath>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>attach-artifact</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.basedir}/src/main/resources/ecs/ecs.bom</file>
<type>bom</type>
<classifier>ecs</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
File renamed without changes.
4 changes: 4 additions & 0 deletions ecs/src/main/resources/ecs/catalog.bom
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
brooklyn.catalog:
items:
- classpath://io.brooklyn.clocker.common:docker/catalog.bom
- classpath://io.brooklyn.clocker.ecs:ecs/ecs.bom
File renamed without changes.
47 changes: 47 additions & 0 deletions ecs/src/test/resources/ecs/ecs.tests.bom
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
brooklyn.catalog:
version: "2.1.0-SNAPSHOT" # CLOCKER_VERSION
iconUrl: https://raw.githubusercontent.com/docker-library/docs/471fa6e4cb58062ccbf91afc111980f9c7004981/swarm/logo.png
dependsOn:
- tests/common.tests.bom
- tests/docker.tests.bom
license_code: APACHE-2.0

items:
- id: ecs-cluster-tests
name: "ECS Cluster Tests"
description: |
Tests on the ECS cluster of Docker Engine entities
itemType: entity
item:
type: test-case
name: "ecs-cluster-tests"

brooklyn.config:
timeout: 1h
timeout.initialStartup: 1h
timeout.runtimeAssertion: 1h
docker.initial.size: 2
docker.max.size: 5
docker.scaling.cpu.limit: 0.95
docker.recovery.stabilizationDelay: 10s
docker.recovery.failOnRecurringFailuresInThisDuration: 5m

brooklyn.children:
- type: ecs-cluster
id: ecs-cluster
name: "ecs-cluster"
description: |
The ECS cluster to test

- type: test-case
name: "ecs-test-suite"
brooklyn.children:
- type: test-case
name: "GROUP-1 Test ECS entity"
brooklyn.config:
targetId: ecs-cluster
brooklyn.children:
- type: assert-up
name: "TEST-01 Assert up"
- type: assert-running
name: "TEST-02 Assert running"
21 changes: 21 additions & 0 deletions ecs/src/test/resources/ecs/tests.bom
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
brooklyn.catalog:
version: "2.1.0-SNAPSHOT" # CLOCKER_VERSION
iconUrl: https://raw.githubusercontent.com/docker-library/docs/471fa6e4cb58062ccbf91afc111980f9c7004981/swarm/logo.png
dependsOn:
- tests/ecs.tests.bom
license_code: APACHE-2.0

items:
- id: ecs-tests
name: "ECS Tests"
description: |
Tests for ECS entities
itemType: template
item:
brooklyn.config:
timeout: 1h
timeout.initialStartup: 1h
timeout.runtimeAssertion: 1h

services:
- type: ecs-cluster-tests
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<name>Clocker</name>
<description>Apache Brooklyn blueprints to deploy and manage Docker environments</description>
<url>https://github.com/brooklyncentral/clocker</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand All @@ -24,6 +24,7 @@

<modules>
<module>common</module>
<module>ecs</module>
<module>swarm</module>
<module>kubernetes</module>
</modules>
Expand Down

0 comments on commit 041e2f8

Please sign in to comment.