brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject [08/11] git commit: Moved test blueprints to example and launcher projects
Date Thu, 21 Aug 2014 16:01:23 GMT
Moved test blueprints to example and launcher projects


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/d2e63ca7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/d2e63ca7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/d2e63ca7

Branch: refs/heads/master
Commit: d2e63ca7672aaabfb5f5ad3a8d8a4e78e5e100ea
Parents: 2ce9c52
Author: Andrew Kennedy <grkvlt@apache.org>
Authored: Wed Aug 20 12:29:06 2014 +0100
Committer: Andrew Kennedy <grkvlt@apache.org>
Committed: Thu Aug 21 14:50:27 2014 +0100

----------------------------------------------------------------------
 .../brooklyn/demo/NodeJsTodoApplication.java    | 57 ++++++++++++++++++++
 software/webapp/pom.xml                         |  6 ---
 .../webapp/nodejs/NodeJsTodoApplication.java    | 56 -------------------
 .../entity/webapp/nodejs/nodejs-todo.yaml       | 42 ---------------
 .../webapp/nodejs/nodejs-word-finder.yaml       | 34 ------------
 .../src/test/resources/nodejs-todo.yaml         | 42 +++++++++++++++
 .../src/test/resources/nodejs-word-finder.yaml  | 34 ++++++++++++
 7 files changed, 133 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/examples/simple-web-cluster/src/main/java/brooklyn/demo/NodeJsTodoApplication.java
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/brooklyn/demo/NodeJsTodoApplication.java
b/examples/simple-web-cluster/src/main/java/brooklyn/demo/NodeJsTodoApplication.java
new file mode 100644
index 0000000..cba766c
--- /dev/null
+++ b/examples/simple-web-cluster/src/main/java/brooklyn/demo/NodeJsTodoApplication.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package brooklyn.demo;
+
+import static brooklyn.event.basic.DependentConfiguration.attributeWhenReady;
+import brooklyn.catalog.Catalog;
+import brooklyn.entity.basic.AbstractApplication;
+import brooklyn.entity.basic.Attributes;
+import brooklyn.entity.basic.SoftwareProcess;
+import brooklyn.entity.basic.StartableApplication;
+import brooklyn.entity.nosql.redis.RedisStore;
+import brooklyn.entity.proxying.EntitySpec;
+import brooklyn.entity.webapp.nodejs.NodeJsWebAppService;
+import brooklyn.event.basic.DependentConfiguration;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Node.JS Todo Application
+ */
+@Catalog(name="NodeJS Todo",
+        description="Node.JS Todo Application.",
+        iconUrl="classpath://nodejs-logo.png")
+public class NodeJsTodoApplication extends AbstractApplication implements StartableApplication
{
+
+    @Override
+    public void init() {
+        RedisStore redis = addChild(EntitySpec.create(RedisStore.class));
+
+        addChild(EntitySpec.create(NodeJsWebAppService.class)
+                .configure(NodeJsWebAppService.APP_GIT_REPOSITORY_URL, "https://github.com/amirrajan/nodejs-todo/")
+                .configure(NodeJsWebAppService.APP_FILE, "server.js")
+                .configure(NodeJsWebAppService.APP_NAME, "nodejs-todo")
+                .configure(NodeJsWebAppService.NODE_PACKAGE_LIST, ImmutableList.of("express",
"ejs", "redis"))
+                .configure(SoftwareProcess.SHELL_ENVIRONMENT, ImmutableMap.<String, Object>of(
+                        "REDISTOGO_URL", DependentConfiguration.formatString("redis://%s:%d/",
+                                attributeWhenReady(redis, Attributes.HOSTNAME), attributeWhenReady(redis,
RedisStore.REDIS_PORT)))));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/software/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/software/webapp/pom.xml b/software/webapp/pom.xml
index a7aa180..5a44cc2 100644
--- a/software/webapp/pom.xml
+++ b/software/webapp/pom.xml
@@ -140,12 +140,6 @@
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>io.brooklyn</groupId>
-            <artifactId>brooklyn-software-nosql</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
 
         <!-- bring in jclouds for testing -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/software/webapp/src/test/java/brooklyn/entity/webapp/nodejs/NodeJsTodoApplication.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/test/java/brooklyn/entity/webapp/nodejs/NodeJsTodoApplication.java
b/software/webapp/src/test/java/brooklyn/entity/webapp/nodejs/NodeJsTodoApplication.java
deleted file mode 100644
index 32043d5..0000000
--- a/software/webapp/src/test/java/brooklyn/entity/webapp/nodejs/NodeJsTodoApplication.java
+++ /dev/null
@@ -1,56 +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.
- */
-package brooklyn.entity.webapp.nodejs;
-
-import static brooklyn.event.basic.DependentConfiguration.attributeWhenReady;
-import brooklyn.catalog.Catalog;
-import brooklyn.entity.basic.AbstractApplication;
-import brooklyn.entity.basic.Attributes;
-import brooklyn.entity.basic.SoftwareProcess;
-import brooklyn.entity.basic.StartableApplication;
-import brooklyn.entity.nosql.redis.RedisStore;
-import brooklyn.entity.proxying.EntitySpec;
-import brooklyn.event.basic.DependentConfiguration;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Node.JS Todo Application
- */
-@Catalog(name="NodeJS Todo",
-        description="Node.JS Todo Application.",
-        iconUrl="classpath://nodejs-logo.png")
-public class NodeJsTodoApplication extends AbstractApplication implements StartableApplication
{
-
-    @Override
-    public void init() {
-        RedisStore redis = addChild(EntitySpec.create(RedisStore.class));
-
-        addChild(EntitySpec.create(NodeJsWebAppService.class)
-                .configure(NodeJsWebAppService.APP_GIT_REPOSITORY_URL, "https://github.com/amirrajan/nodejs-todo/")
-                .configure(NodeJsWebAppService.APP_FILE, "server.js")
-                .configure(NodeJsWebAppService.APP_NAME, "nodejs-todo")
-                .configure(NodeJsWebAppService.NODE_PACKAGE_LIST, ImmutableList.of("express",
"ejs", "redis"))
-                .configure(SoftwareProcess.SHELL_ENVIRONMENT, ImmutableMap.<String, Object>of(
-                        "REDISTOGO_URL", DependentConfiguration.formatString("redis://%s:%d/",
-                                attributeWhenReady(redis, Attributes.HOSTNAME), attributeWhenReady(redis,
RedisStore.REDIS_PORT)))));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-todo.yaml
----------------------------------------------------------------------
diff --git a/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-todo.yaml
b/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-todo.yaml
deleted file mode 100644
index 879a9c1..0000000
--- a/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-todo.yaml
+++ /dev/null
@@ -1,42 +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.
-
-id: nodejs-todo-application
-name: "Node.JS Todo Application"
-origin: "https://github.com/amirrajan/nodejs-todo/"
-locations:
-- jclouds:softlayer:ams01
-services:
-- serviceType: brooklyn.entity.nosql.redis.RedisStore
-  id: redis
-- serviceType: brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/amirrajan/nodejs-todo/"
-    appFileName: server.js
-    appName: nodejs-todo
-    nodePackages:
-    - express
-    - ejs
-    - redis
-    env:
-      REDISTOGO_URL: >
-        $brooklyn:formatString("redis://%s:%d/",
-        component("redis").attributeWhenReady("host.name"),
-        component("redis").attributeWhenReady("redis.port"))

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-word-finder.yaml
----------------------------------------------------------------------
diff --git a/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-word-finder.yaml
b/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-word-finder.yaml
deleted file mode 100644
index 5af00fc..0000000
--- a/software/webapp/src/test/resources/brooklyn/entity/webapp/nodejs/nodejs-word-finder.yaml
+++ /dev/null
@@ -1,34 +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.
-
-id: nodejs-word-finder-application
-name: "Node.JS Word Finder Application"
-origin: "https://github.com/amirrajan/word-finder/"
-locations:
-- jclouds:softlayer:ams01
-services:
-- serviceType: brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/amirrajan/word-finder/"
-    appFileName: server.js
-    appName: word-finder
-    nodePackages:
-    - express
-    - ejs
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/usage/launcher/src/test/resources/nodejs-todo.yaml
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/resources/nodejs-todo.yaml b/usage/launcher/src/test/resources/nodejs-todo.yaml
new file mode 100644
index 0000000..879a9c1
--- /dev/null
+++ b/usage/launcher/src/test/resources/nodejs-todo.yaml
@@ -0,0 +1,42 @@
+# 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.
+
+id: nodejs-todo-application
+name: "Node.JS Todo Application"
+origin: "https://github.com/amirrajan/nodejs-todo/"
+locations:
+- jclouds:softlayer:ams01
+services:
+- serviceType: brooklyn.entity.nosql.redis.RedisStore
+  id: redis
+- serviceType: brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+  id: nodejs
+  name: "Node.JS"
+  brooklyn.config:
+    gitRepoUrl:
+      "https://github.com/amirrajan/nodejs-todo/"
+    appFileName: server.js
+    appName: nodejs-todo
+    nodePackages:
+    - express
+    - ejs
+    - redis
+    env:
+      REDISTOGO_URL: >
+        $brooklyn:formatString("redis://%s:%d/",
+        component("redis").attributeWhenReady("host.name"),
+        component("redis").attributeWhenReady("redis.port"))

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d2e63ca7/usage/launcher/src/test/resources/nodejs-word-finder.yaml
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/resources/nodejs-word-finder.yaml b/usage/launcher/src/test/resources/nodejs-word-finder.yaml
new file mode 100644
index 0000000..5af00fc
--- /dev/null
+++ b/usage/launcher/src/test/resources/nodejs-word-finder.yaml
@@ -0,0 +1,34 @@
+# 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.
+
+id: nodejs-word-finder-application
+name: "Node.JS Word Finder Application"
+origin: "https://github.com/amirrajan/word-finder/"
+locations:
+- jclouds:softlayer:ams01
+services:
+- serviceType: brooklyn.entity.webapp.nodejs.NodeJsWebAppService
+  id: nodejs
+  name: "Node.JS"
+  brooklyn.config:
+    gitRepoUrl:
+      "https://github.com/amirrajan/word-finder/"
+    appFileName: server.js
+    appName: word-finder
+    nodePackages:
+    - express
+    - ejs
\ No newline at end of file


Mime
View raw message