Updated Branches:
  refs/heads/master 7b5746a0b -> 0e8beca3d

Adding json template files for cli and rest-api


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

Branch: refs/heads/master
Commit: 0e8beca3d6058a13a352ad4f677bf4cb3a3f44ac
Parents: 7b5746a
Author: Imesh Gunaratne <[email protected]>
Authored: Tue Dec 24 16:52:19 2013 +0530
Committer: Imesh Gunaratne <[email protected]>
Committed: Tue Dec 24 16:52:19 2013 +0530

----------------------------------------------------------------------
 tools/templates/json/autoscale-policy.json      | 28 ++++++++
 tools/templates/json/cartridge.json             | 49 ++++++++++++++
 tools/templates/json/deployment-policy.json     | 16 +++++
 .../templates/json/load-balancer-cartridge.json | 67 ++++++++++++++++++++
 tools/templates/json/partition.json             | 14 ++++
 5 files changed, 174 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0e8beca3/tools/templates/json/autoscale-policy.json
----------------------------------------------------------------------
diff --git a/tools/templates/json/autoscale-policy.json 
b/tools/templates/json/autoscale-policy.json
new file mode 100644
index 0000000..326fa25
--- /dev/null
+++ b/tools/templates/json/autoscale-policy.json
@@ -0,0 +1,28 @@
+{
+    "autoscalePolicy": {
+        "id": "autoscale-policy-id",
+        "loadThresholds": {
+            "requestsInFlight": {
+                "average": "6000",
+                "gradient": "0",
+                "secondDerivative": "0",
+                "scaleDownMarginOfGradient": "1.0",
+                "scaleDownMarginOfSecondDerivative": "0.2"
+            },
+            "memoryConsumption": {
+                "average": "6000",
+                "gradient": "0",
+                "secondDerivative": "0",
+                "scaleDownMarginOfGradient": "1.0",
+                "scaleDownMarginOfSecondDerivative": "0.2"
+            },
+            "loadAverage": {
+                "average": "6000",
+                "gradient": "0",
+                "secondDerivative": "0",
+                "scaleDownMarginOfGradient": "1.0",
+                "scaleDownMarginOfSecondDerivative": "0.2"
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0e8beca3/tools/templates/json/cartridge.json
----------------------------------------------------------------------
diff --git a/tools/templates/json/cartridge.json 
b/tools/templates/json/cartridge.json
new file mode 100644
index 0000000..6851787
--- /dev/null
+++ b/tools/templates/json/cartridge.json
@@ -0,0 +1,49 @@
+{
+    "cartridgeDefinitionBean": {
+        "type": "cartridge-name",
+        "provider": "cartridge-provider-name",
+        "host": "cartridge-provider-host",
+        "displayName": "cartridge-display-name",
+        "description": "cartridge-description",
+        "version": "1",
+        "multiTenant": "false",
+        "portMapping": [
+            {
+                "protocol": "http",
+                "port": "80",
+                "proxyPort": "8280"
+            },
+            {
+                "protocol": "https",
+                "port": "443",
+                "proxyPort": "8243"
+            }
+        ],
+        "deployment": {
+        },
+        "iaasProvider": [
+            {
+                "type": "provider-name",
+                "imageId": "region/image-id",
+                "maxInstanceLimit": "4",
+                "property": [
+                    {
+                        "name": "instanceType",
+                        "value": "instance-type"
+                    },
+                    {
+                        "name": "keyPair",
+                        "value": "key-pair-name"
+                    }
+                ]
+            }
+        ],
+        "loadBalancer": {
+            "type": "lb",
+            "property": {
+                "name": "default.load.balancer",
+                "value": "true"
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0e8beca3/tools/templates/json/deployment-policy.json
----------------------------------------------------------------------
diff --git a/tools/templates/json/deployment-policy.json 
b/tools/templates/json/deployment-policy.json
new file mode 100644
index 0000000..1f01c7d
--- /dev/null
+++ b/tools/templates/json/deployment-policy.json
@@ -0,0 +1,16 @@
+{
+    "deploymentPolicy": {
+        "id": "deployment-policy-id",
+        "partitionGroup": {
+            "id": "partition-group-id",
+            "partitionAlgo": "one-after-another",
+            "partition": [
+                {
+                    "id": "partition-id",
+                    "partitionMax": "3",
+                    "partitionMin": "1"
+                }
+            ]
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0e8beca3/tools/templates/json/load-balancer-cartridge.json
----------------------------------------------------------------------
diff --git a/tools/templates/json/load-balancer-cartridge.json 
b/tools/templates/json/load-balancer-cartridge.json
new file mode 100644
index 0000000..4175933
--- /dev/null
+++ b/tools/templates/json/load-balancer-cartridge.json
@@ -0,0 +1,67 @@
+{
+    "cartridgeDefinitionBean": {
+        "type": "lb",
+        "provider": "apache",
+        "host": "lb.stratos.apache.org",
+        "displayName": "Apache Stratos Load Balancer Cartridge",
+        "description": "Apache Stratos Load Balancer Cartridge",
+        "version": "4",
+        "defaultAutoscalingPolicy": "autoscale-policy-id",
+        "multiTenant": "false",
+        "portMapping": [
+            {
+                "protocol": "http",
+                "port": "8280",
+                "proxyPort": "8280"
+            },
+            {
+                "protocol": "https",
+                "port": "8243",
+                "proxyPort": "8243"
+            }
+        ],
+        "deployment": {
+        },
+        "iaasProvider": [
+            {
+                "type": "provider-name",
+                "imageId": "region/lb-image-id",
+                "maxInstanceLimit": "5",
+                "property": [
+                    {
+                        "name": "instanceType",
+                        "value": "m1.medium"
+                    },
+                    {
+                        "name": "keyPair",
+                        "value": "key-pair-name"
+                    }
+                ]
+            }
+        ],
+        "loadBalancer": {
+        },
+        "property": [
+            {
+                "name": "load.balancer",
+                "value": "true"
+            },
+            {
+                "name": "payload_parameter.MB_IP",
+                "value": "message-broker-ip"
+            },
+            {
+                "name": "payload_parameter.MB_PORT",
+                "value": "mb-port"
+            },
+            {
+                "name": "payload_parameter.CEP_IP",
+                "value": "cep-ip"
+            },
+            {
+                "name": "payload_parameter.CEP_PORT",
+                "value": "cep-port"
+            }
+        ]
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/0e8beca3/tools/templates/json/partition.json
----------------------------------------------------------------------
diff --git a/tools/templates/json/partition.json 
b/tools/templates/json/partition.json
new file mode 100644
index 0000000..181ee84
--- /dev/null
+++ b/tools/templates/json/partition.json
@@ -0,0 +1,14 @@
+{
+    "partition":{
+        "id": "partition-id",
+        "provider": "provider-name",
+        "property": [
+            {
+                "name": "region",
+                "value": "region-name"
+            }
+        ],
+        "partitionMin": "1",
+        "partitionMax": "3"
+    }
+}
\ No newline at end of file

Reply via email to