Couchbase: tests for example yaml blueprints - Rename couchbase.yaml to couchbase-cluster.yaml - Adds CouchbaseBlueprintTest.java - Adds yaml/test for: - couchbase-cluster-singleNode.yaml - couchbase-node.yaml - Updates couchbase yaml so all point at softlayer (except for couchbase-replication-w-pillowfight.yaml which spans AWS and softlayer)
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/51560b92 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/51560b92 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/51560b92 Branch: refs/heads/master Commit: 51560b92b67535b6155fb2234495f4dc0a7d265f Parents: aa4b61a Author: Aled Sage <[email protected]> Authored: Tue Mar 10 16:47:41 2015 +0000 Committer: Aled Sage <[email protected]> Committed: Thu Mar 26 10:09:41 2015 +0000 ---------------------------------------------------------------------- .../blueprints/CouchbaseBlueprintTest.java | 69 ++++++++++++++++++++ .../resources/couchbase-cluster-singleNode.yaml | 36 ++++++++++ .../src/test/resources/couchbase-cluster.yaml | 33 ++++++++++ .../src/test/resources/couchbase-node.yaml | 26 ++++++++ .../src/test/resources/couchbase-w-loadgen.yaml | 4 +- .../test/resources/couchbase-w-pillowfight.yaml | 2 +- .../launcher/src/test/resources/couchbase.yaml | 32 --------- 7 files changed, 167 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/java/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/java/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java b/usage/launcher/src/test/java/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java new file mode 100644 index 0000000..3450489 --- /dev/null +++ b/usage/launcher/src/test/java/brooklyn/launcher/blueprints/CouchbaseBlueprintTest.java @@ -0,0 +1,69 @@ +/* + * 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.launcher.blueprints; + +import org.testng.annotations.Test; + +public class CouchbaseBlueprintTest extends AbstractBlueprintTest { + + @Test(groups={"Live"}) + public void testCouchbaseNode() throws Exception { + runTest("couchbase-node.yaml"); + } + + @Test(groups={"Live"}) + public void testCouchbaseCluster() throws Exception { + runTest("couchbase-cluster.yaml"); + } + + @Test(groups={"Live"}) + public void testCouchbaseClusterSingleNode() throws Exception { + runTest("couchbase-cluster-singleNode.yaml"); + } + + @Test(groups={"Live"}) + public void testCouchbaseWithPillowfight() throws Exception { + runTest("couchbase-w-pillowfight.yaml"); + } + + /** + * FIXME Failed with "Unable to match required VM template constraints" - caused by NPE: + * Caused by: java.lang.NullPointerException: id + * at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:229) + * at org.jclouds.softlayer.domain.OperatingSystem.<init>(OperatingSystem.java:106) + * at org.jclouds.softlayer.domain.OperatingSystem$Builder.build(OperatingSystem.java:87) + * at org.jclouds.softlayer.domain.ContainerVirtualGuestConfiguration$4.apply(ContainerVirtualGuestConfiguration.java:209) + * at org.jclouds.softlayer.domain.ContainerVirtualGuestConfiguration$4.apply(ContainerVirtualGuestConfiguration.java:206) + * This blueprint uses {minRam: 16384, minCores: 4}. + * Suspect this is already fixed by Andrea Turli in latest jclouds. + */ + @Test(groups={"Live", "WIP"}) + public void testCouchbaseWithLoadgen() throws Exception { + runTest("couchbase-w-loadgen.yaml"); + } + + /** + * FIXME Failed with "Unable to match required VM template constraints" - caused by NPE + * (see error described at {@link #testCouchbaseWithLoadgen()}. + */ + @Test(groups={"Live", "WIP"}) + public void testCouchbaseReplicationWithPillowfight() throws Exception { + runTest("couchbase-replication-w-pillowfight.yaml"); + } +} http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase-cluster-singleNode.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase-cluster-singleNode.yaml b/usage/launcher/src/test/resources/couchbase-cluster-singleNode.yaml new file mode 100644 index 0000000..f40c779 --- /dev/null +++ b/usage/launcher/src/test/resources/couchbase-cluster-singleNode.yaml @@ -0,0 +1,36 @@ +# +# 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. +# +name: Couchbase One Bucket + +location: softlayer:wdc01 + +services: +- type: brooklyn.entity.nosql.couchbase.CouchbaseCluster + initialSize: 1 + intialQuorumSize: 1 + adminUsername: Administrator + adminPassword: Password + createBuckets: + - bucket: default + bucket-port: 11211 + bucket-replica: 0 + - bucket: my_bucket_2 + bucket-port: 11222 + bucket-replica: 0 + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase-cluster.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase-cluster.yaml b/usage/launcher/src/test/resources/couchbase-cluster.yaml new file mode 100644 index 0000000..b85884b --- /dev/null +++ b/usage/launcher/src/test/resources/couchbase-cluster.yaml @@ -0,0 +1,33 @@ +# +# 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. +# +name: Couchbase One Bucket + +location: softlayer:wdc01 + +services: +- type: brooklyn.entity.nosql.couchbase.CouchbaseCluster + initialSize: 3 + intialQuorumSize: 2 + adminUsername: Administrator + adminPassword: Password + createBuckets: + - bucket: default + bucket-port: 11211 + - bucket: my_bucket_2 + bucket-port: 11222 http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase-node.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase-node.yaml b/usage/launcher/src/test/resources/couchbase-node.yaml new file mode 100644 index 0000000..63a6348 --- /dev/null +++ b/usage/launcher/src/test/resources/couchbase-node.yaml @@ -0,0 +1,26 @@ +# +# 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. +# +name: Couchbase Node + +location: softlayer:wdc01 + +services: +- type: brooklyn.entity.nosql.couchbase.CouchbaseNode + adminUsername: Administrator + adminPassword: Password http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase-w-loadgen.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase-w-loadgen.yaml b/usage/launcher/src/test/resources/couchbase-w-loadgen.yaml index 10daa61..70ed435 100644 --- a/usage/launcher/src/test/resources/couchbase-w-loadgen.yaml +++ b/usage/launcher/src/test/resources/couchbase-w-loadgen.yaml @@ -18,6 +18,8 @@ # name: Couchbase with Elastic Load Generator +location: softlayer:wdc01 + services: - type: brooklyn.entity.nosql.couchbase.CouchbaseCluster @@ -50,5 +52,3 @@ services: brooklyn.example.couchbase.nodes: $brooklyn:formatString("'%s'", component("cb-cluster").attributeWhenReady("couchbase.cluster.node.addresses")) initialSize: 2 - -location: aws-ec2:us-east-1 http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase-w-pillowfight.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase-w-pillowfight.yaml b/usage/launcher/src/test/resources/couchbase-w-pillowfight.yaml index 3cc2851..2ee46ee 100644 --- a/usage/launcher/src/test/resources/couchbase-w-pillowfight.yaml +++ b/usage/launcher/src/test/resources/couchbase-w-pillowfight.yaml @@ -18,7 +18,7 @@ # name: Couchbase w Pillow Fight -location: aws-ec2 +location: softlayer:wdc01 services: - type: brooklyn.entity.nosql.couchbase.CouchbaseCluster http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/51560b92/usage/launcher/src/test/resources/couchbase.yaml ---------------------------------------------------------------------- diff --git a/usage/launcher/src/test/resources/couchbase.yaml b/usage/launcher/src/test/resources/couchbase.yaml deleted file mode 100644 index 11b1b09..0000000 --- a/usage/launcher/src/test/resources/couchbase.yaml +++ /dev/null @@ -1,32 +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. -# -name: Couchbase One Bucket - -location: softlayer:wdc01 - -services: -- type: brooklyn.entity.nosql.couchbase.CouchbaseCluster - initialSize: 3 - adminUsername: Administrator - adminPassword: Password - createBuckets: - - bucket: default - bucket-port: 11211 - - bucket: my_bucket_2 - bucket-port: 11222 \ No newline at end of file
