Return-Path: X-Original-To: apmail-brooklyn-commits-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A46611879 for ; Thu, 21 Aug 2014 16:01:45 +0000 (UTC) Received: (qmail 99515 invoked by uid 500); 21 Aug 2014 16:01:45 -0000 Delivered-To: apmail-brooklyn-commits-archive@brooklyn.apache.org Received: (qmail 99492 invoked by uid 500); 21 Aug 2014 16:01:45 -0000 Mailing-List: contact commits-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list commits@brooklyn.incubator.apache.org Received: (qmail 99483 invoked by uid 99); 21 Aug 2014 16:01:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2014 16:01:45 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,HK_RANDOM_FROM,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 21 Aug 2014 16:01:19 +0000 Received: (qmail 97319 invoked by uid 99); 21 Aug 2014 16:01:16 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Aug 2014 16:01:16 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 697BD9C05D8; Thu, 21 Aug 2014 16:01:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: grkvlt@apache.org To: commits@brooklyn.incubator.apache.org Date: Thu, 21 Aug 2014 16:01:23 -0000 Message-Id: <7a7325a8f2844da2a9442d92febbd3c0@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [08/11] git commit: Moved test blueprints to example and launcher projects X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Wed Aug 20 12:29:06 2014 +0100 Committer: Andrew Kennedy 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.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 @@ tests test - - io.brooklyn - brooklyn-software-nosql - ${project.version} - test - 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.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