http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/group-scaling/openstack/artifacts/c4.json ---------------------------------------------------------------------- diff --git a/samples/group-scaling/openstack/artifacts/c4.json b/samples/group-scaling/openstack/artifacts/c4.json deleted file mode 100755 index b6af266..0000000 --- a/samples/group-scaling/openstack/artifacts/c4.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "c4", - "provider": "apache", - "host": "stratos.apache.org", - "category": "data", - "displayName": "c4", - "description": "c4 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "openstack", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "vishanth-key" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ] -}
http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/group-scaling/openstack/artifacts/composite_application.json ---------------------------------------------------------------------- diff --git a/samples/group-scaling/openstack/artifacts/composite_application.json b/samples/group-scaling/openstack/artifacts/composite_application.json deleted file mode 100644 index 027575a..0000000 --- a/samples/group-scaling/openstack/artifacts/composite_application.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "applicationId": "appscaling", - "alias": "appscaling", - "components": { - "groups": [ - { - "name": "group1", - "alias": "mygroup1", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group2", - "alias": "mygroup2", - "groupMinInstances": 1, - "groupMaxInstances": 2, - "cartridges": [ - { - "type": "c2", - "cartridgeMin": 2, - "cartridgeMax": 4, - "subscribableInfo": { - "alias": "group2c2", - "autoscalingPolicy": "autoscale_policy_c2" - } - }, - { - "type": "c3", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group2c3", - "autoscalingPolicy": "autoscale_policy_c3" - } - } - ] - } - ], - "cartridges": [ - { - "type": "c1", - "cartridgeMin": 2, - "cartridgeMax": 4, - "subscribableInfo": { - "alias": "group1c1", - "autoscalingPolicy": "autoscale_policy_c1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "c4", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "myc4", - "autoscalingPolicy": "autoscale_policy_c4" - } - } - ], - "dependencies": { - "startupOrders": [ - "group.group1,cartridge.c4" - ], - "terminationBehaviour": "terminate-dependents" - } - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/group-scaling/openstack/artifacts/group1.json ---------------------------------------------------------------------- diff --git a/samples/group-scaling/openstack/artifacts/group1.json b/samples/group-scaling/openstack/artifacts/group1.json deleted file mode 100644 index 9acf5e6..0000000 --- a/samples/group-scaling/openstack/artifacts/group1.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "group1", - "groups": [ - { - "name": "group2", - "groupScalingEnabled": "true", - "cartridges": [ - "c2", - "c3" - ], - "dependencies": { - "startupOrders": [ - "cartridge.c3,cartridge.c2" - ], - "scalingDependants": [ - "cartridge.c3, cartridge.c2" - ], - "terminationBehaviour": "terminate-all" - } - } - ], - "cartridges": [ - "c1" - ], - "dependencies": { - "startupOrders": [ - "cartridge.c1,group.group2" - ], - "scalingDependants": [ - "cartridge.c1, group.group2" - ], - "terminationBehaviour": "terminate-dependents" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/group-scaling/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/group-scaling/openstack/deploy.sh b/samples/group-scaling/openstack/deploy.sh deleted file mode 100755 index 8a87f07..0000000 --- a/samples/group-scaling/openstack/deploy.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# Create autoscale policy -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy-c1.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy-c2.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy-c3.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy-c4.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies - -# Deploy c3 cartridge -curl -X POST -H "Content-Type: application/json" -d @'artifacts/c3.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy c4 cartridge -curl -X POST -H "Content-Type: application/json" -d @'artifacts/c4.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy c1 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/c1.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy c2 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/c2.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy group -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group1.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -sleep 3 -# Create application -curl -X POST -H "Content-Type: application/json" -d @'artifacts/composite_application.json' -k -v -u admin:admin https://localhost:9443/api/applications - -sleep 3 -# Deploy application -curl -X POST -H "Content-Type: application/json" -d@'artifacts/app_deployment_policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/appscaling/deploy http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/group-scaling/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/group-scaling/openstack/undeploy.sh b/samples/group-scaling/openstack/undeploy.sh deleted file mode 100755 index b661344..0000000 --- a/samples/group-scaling/openstack/undeploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# undeploy application -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/appscaling/undeploy http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/README.md ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/README.md b/samples/more-complex-app/README.md deleted file mode 100644 index b3a08ac..0000000 --- a/samples/more-complex-app/README.md +++ /dev/null @@ -1,11 +0,0 @@ -more-complex-app -================ - -i) Using these artifacts you can deploy the more complex application. - -ii) In this deployment scenario, it deployed two groups which are nested. - -iii) In the groups we have added more that one startup orders. - -iv) You can simply run the test.sh and deploy this complex application. - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/application_definition.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/application_definition.json b/samples/more-complex-app/ec2/artifacts/application_definition.json deleted file mode 100644 index 76aac15..0000000 --- a/samples/more-complex-app/ec2/artifacts/application_definition.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "applicationId": "app_boo", - "alias": "app_boo_r2", - "components": { - "groups": [ - { - "name": "group6", - "alias": "mygroup6", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group7", - "alias": "mygroup7", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group6tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup88", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group9", - "alias": "mygroup9", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group9tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ], - "dependencies": { - "startupOrders": [ - "group.group6,group.group8,cartridge.tomcat1" - ], - "terminationBehaviour": "terminate-all" - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/autoscale-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/autoscale-policy.json b/samples/more-complex-app/ec2/artifacts/autoscale-policy.json deleted file mode 100755 index 9e9ad99..0000000 --- a/samples/more-complex-app/ec2/artifacts/autoscale-policy.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "autoscale_policy_1", - "loadThresholds": { - "requestsInFlight": { - "threshold": 80 - }, - "memoryConsumption": { - "threshold": 90 - }, - "loadAverage": { - "threshold": 50 - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/deployment-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/deployment-policy.json b/samples/more-complex-app/ec2/artifacts/deployment-policy.json deleted file mode 100644 index 9592a35..0000000 --- a/samples/more-complex-app/ec2/artifacts/deployment-policy.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "applicationId": "app_boo", - "applicationPolicy": { - "applicationId": "app_boo_r4", - "networkPartition": [ - { - "id": "EC2-P1", - "activeByDefault": "true", - "partitions": [ - { - "id": "P1", - "provider": "ec2", - "property": [ - { - "name": "region", - "value": "ap-southeast-1" - } - ] - } - ] - } - ] - }, - "childPolicies": [ - { - "alias": "mytomcat2", - "networkPartition": [ - { - "id": "EC2-P1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mytomcat1", - "networkPartition": [ - { - "id": "EC2-P1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup6", - "networkPartition": [ - { - "id": "EC2-P1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup88", - "networkPartition": [ - { - "id": "EC2-P1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - } - ] -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/group6c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/group6c.json b/samples/more-complex-app/ec2/artifacts/group6c.json deleted file mode 100755 index 6a64b18..0000000 --- a/samples/more-complex-app/ec2/artifacts/group6c.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "group6", - "groups": [ - { - "name": "group7", - "cartridges": [ - "tomcat1", - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "cartridge.tomcat1,cartridge.tomcat2" - ], - "terminationBehaviour": "terminate-all" - } - }, - { - "name": "group8", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "group.group7,cartridge.tomcat2,group.group8" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/group8c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/group8c.json b/samples/more-complex-app/ec2/artifacts/group8c.json deleted file mode 100755 index 3294aec..0000000 --- a/samples/more-complex-app/ec2/artifacts/group8c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "group8", - "groups": [ - { - "name": "group9", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2", - "tomcat1" - ], - "dependencies": { - "startupOrders": [ - "group.group9,cartridge.tomcat2", - "group.group9,cartridge.tomcat1" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/tomcat.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/tomcat.json b/samples/more-complex-app/ec2/artifacts/tomcat.json deleted file mode 100755 index 5a05386..0000000 --- a/samples/more-complex-app/ec2/artifacts/tomcat.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "type": "tomcat", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat", - "description": "tomcat Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "ec2", - "imageId": "ap-southeast-1/ami-3c0f5d6e", - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "m1.medium" - }, - { - "name": "keyPair", - "value": "manula" - }, - { - "name": "securityGroups", - "value": "s2-2.0.0-rc1" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/tomcat1.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/tomcat1.json b/samples/more-complex-app/ec2/artifacts/tomcat1.json deleted file mode 100755 index 1172cd5..0000000 --- a/samples/more-complex-app/ec2/artifacts/tomcat1.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "type": "tomcat1", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat1", - "description": "tomcat1 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "ec2", - "imageId": "ap-southeast-1/ami-3c0f5d6e", - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "m1.medium" - }, - { - "name": "keyPair", - "value": "manula" - }, - { - "name": "securityGroups", - "value": "s2-2.0.0-rc1" - } - ] - } - ], -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/artifacts/tomcat2.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/artifacts/tomcat2.json b/samples/more-complex-app/ec2/artifacts/tomcat2.json deleted file mode 100755 index 014cbbd..0000000 --- a/samples/more-complex-app/ec2/artifacts/tomcat2.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "type": "tomcat2", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat2", - "description": "tomcat2 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "ec2", - "imageId": "ap-southeast-1/ami-3c0f5d6e", - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "m1.medium" - }, - { - "name": "keyPair", - "value": "manula" - }, - { - "name": "securityGroups", - "value": "s2-2.0.0-rc1" - } - ] - } - ], -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/deploy.sh b/samples/more-complex-app/ec2/deploy.sh deleted file mode 100755 index aa2378c..0000000 --- a/samples/more-complex-app/ec2/deploy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# Create autoscale policy -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies - -# Create tomcat cartridge -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat1 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat1.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat2 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat2.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy group -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group6c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group8c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -sleep 5 -# Create application -curl -X POST -H "Content-Type: application/json" -d @'artifacts/application_definition.json' -k -v -u admin:admin https://localhost:9443/api/applications - -sleep 3 -curl -X POST -H "Content-Type: application/json" -d@'artifacts/deployment-policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/deploy - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/ec2/undeploy.sh b/samples/more-complex-app/ec2/undeploy.sh deleted file mode 100755 index ed6e604..0000000 --- a/samples/more-complex-app/ec2/undeploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/undeploy - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/application_definition.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/application_definition.json b/samples/more-complex-app/kubernetes/artifacts/application_definition.json deleted file mode 100644 index 3d8d91f..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/application_definition.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "applicationId": "app_boo", - "alias": "app_boo_r2", - "components": { - "groups": [ - { - "name": "group6", - "alias": "mygroup6", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group7", - "alias": "mygroup7", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom2", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group6tom", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group9", - "alias": "mygroup9", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group9tom", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom1", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom2", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat1", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat2", - "autoscalingPolicy": "autoscale_policy_1" - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ], - "dependencies": { - "startupOrders": [ - "group.group6,cartridge.tomcat,group.group8" - ], - "terminationBehaviour": "terminate-all" - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/autoscale-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/autoscale-policy.json b/samples/more-complex-app/kubernetes/artifacts/autoscale-policy.json deleted file mode 100755 index 9e9ad99..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/autoscale-policy.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "autoscale_policy_1", - "loadThresholds": { - "requestsInFlight": { - "threshold": 80 - }, - "memoryConsumption": { - "threshold": 90 - }, - "loadAverage": { - "threshold": 50 - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/deployment-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/deployment-policy.json b/samples/more-complex-app/kubernetes/artifacts/deployment-policy.json deleted file mode 100644 index 9bb1027..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/deployment-policy.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "applicationId": "app_boo", - "applicationPolicy": { - "applicationId": "app_boo_r4", - "networkPartition": [ - { - "id":"network-p1", - "kubernetesClusterId":"kubernetes-cluster-1", - "activeByDefault": "true", - "partitions": [ - { - "id": "P1", - "provider": "kubernetes", - "property": [ - { - "name": "region", - "value": "default" - } - ] - } - ] - } - ] - }, - "childPolicies": [ - { - "alias": "mytomcat2", - "networkPartition": [ - { - "id": "network-p1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mytomcat1", - "networkPartition": [ - { - "id": "network-p1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup6", - "networkPartition": [ - { - "id": "network-p1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup8", - "networkPartition": [ - { - "id": "network-p1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - } - ] -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/group6c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/group6c.json b/samples/more-complex-app/kubernetes/artifacts/group6c.json deleted file mode 100755 index 6a64b18..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/group6c.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "group6", - "groups": [ - { - "name": "group7", - "cartridges": [ - "tomcat1", - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "cartridge.tomcat1,cartridge.tomcat2" - ], - "terminationBehaviour": "terminate-all" - } - }, - { - "name": "group8", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "group.group7,cartridge.tomcat2,group.group8" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/group8c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/group8c.json b/samples/more-complex-app/kubernetes/artifacts/group8c.json deleted file mode 100755 index 3294aec..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/group8c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "group8", - "groups": [ - { - "name": "group9", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2", - "tomcat1" - ], - "dependencies": { - "startupOrders": [ - "group.group9,cartridge.tomcat2", - "group.group9,cartridge.tomcat1" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/kubernetes-cluster.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/kubernetes-cluster.json b/samples/more-complex-app/kubernetes/artifacts/kubernetes-cluster.json deleted file mode 100644 index 228eeb3..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/kubernetes-cluster.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "clusterId": "kubernetes-cluster-1", - "description": "Kubernetes CoreOS cluster", - "kubernetesMaster": { - "hostId" : "KubHostMaster1", - "hostname" : "master.dev.kubernetes.example.org", - "hostIpAddress" : "172.17.8.100", - "property" : [ - ] - }, - - "portRange" : { - "upper": "5000", - "lower": "4500" - }, - - "kubernetesHosts": [ - { - "hostId" : "KubHostSlave1", - "hostname" : "slave1.dev.kubernetes.example.org", - "hostIpAddress" : "172.17.8.101", - "property" : [ - ] - }, - { - "hostId" : "KubHostSlave2", - "hostname" : "slave2.dev.kubernetes.example.org", - "hostIpAddress" : "172.17.8.102", - "property" : [ - ] - } - ], - "property":[ - { - "name":"payload_parameter.MB_IP", - "value":"172.17.8.1" - }, - { - "name":"payload_parameter.MB_PORT", - "value":"1883" - }, - { - "name":"payload_parameter.CEP_IP", - "value":"172.17.8.1" - }, - { - "name":"payload_parameter.CEP_PORT", - "value":"7711" - }, - { - "name":"payload_parameter.LOG_LEVEL", - "value":"DEBUG" - } - ] -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/tomcat.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/tomcat.json b/samples/more-complex-app/kubernetes/artifacts/tomcat.json deleted file mode 100755 index c017947..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/tomcat.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "tomcat", - "provider": "apache", - "host": "isuruh.lk", - "category": "data", - "displayName": "tomcat", - "description": "tomcat Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment":{ - "baseDir":"/var/www" - }, - "iaasProvider":[ - { - "type":"kubernetes", - "imageId":"stratos/cartridge:4.1.0-alpha", - "networkInterfaces":[ - { - "name":"network-non-routable", - "networkUuid":"" - } - ], - "property":[ - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/tomcat1.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/tomcat1.json b/samples/more-complex-app/kubernetes/artifacts/tomcat1.json deleted file mode 100755 index d34bc5f..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/tomcat1.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "tomcat1", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat1", - "description": "tomcat1 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment":{ - "baseDir":"/var/www" - }, - "iaasProvider":[ - { - "type":"kubernetes", - "imageId":"stratos/cartridge:4.1.0-alpha", - "networkInterfaces":[ - { - "name":"network-non-routable", - "networkUuid":"" - } - ], - "property":[ - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/artifacts/tomcat2.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/artifacts/tomcat2.json b/samples/more-complex-app/kubernetes/artifacts/tomcat2.json deleted file mode 100755 index 500d648..0000000 --- a/samples/more-complex-app/kubernetes/artifacts/tomcat2.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "tomcat2", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat2", - "description": "tomcat2 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment":{ - "baseDir":"/var/www" - }, - "iaasProvider":[ - { - "type":"kubernetes", - "imageId":"stratos/cartridge:4.1.0-alpha", - "networkInterfaces":[ - { - "name":"network-non-routable", - "networkUuid":"" - } - ], - "property":[ - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/deploy.sh b/samples/more-complex-app/kubernetes/deploy.sh deleted file mode 100755 index 6436bec..0000000 --- a/samples/more-complex-app/kubernetes/deploy.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# Create autoscale policy -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies - -# Create tomcat cartridge -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat1 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat1.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat2 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat2.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy group -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group6c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group8c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -sleep 5 -# Create application -curl -X POST -H "Content-Type: application/json" -d @'artifacts/application_definition.json' -k -v -u admin:admin https://localhost:9443/api/applications - -sleep 5 -# GET application -curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo - -# Deploy application -curl -X POST -H "Content-Type: application/json" -d@'artifacts/deployment-policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/deploy - -sleep 20 - -# Undeploy application -# curl -X POST -H "Content-Type: application/json" -d@'artifacts/deployment-policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/undeploy - -sleep 5 - -# Delete application -# curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/kubernetes/undeploy.sh b/samples/more-complex-app/kubernetes/undeploy.sh deleted file mode 100755 index 858f19a..0000000 --- a/samples/more-complex-app/kubernetes/undeploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# undeploy application -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/undeploy http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/application_definition.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/application_definition.json b/samples/more-complex-app/mock/artifacts/application_definition.json deleted file mode 100644 index e94d848..0000000 --- a/samples/more-complex-app/mock/artifacts/application_definition.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "applicationId": "app_boo", - "alias": "app_boo_r2", - "components": { - "groups": [ - { - "name": "group6", - "alias": "mygroup6", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group7", - "alias": "mygroup7", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group6tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group9", - "alias": "mygroup9", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group9tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ], - "dependencies": { - "startupOrders": [ - "group.group6,cartridge.tomcat,group.group8" - ], - "terminationBehaviour": "terminate-all" - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/autoscale-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/autoscale-policy.json b/samples/more-complex-app/mock/artifacts/autoscale-policy.json deleted file mode 100755 index 9e9ad99..0000000 --- a/samples/more-complex-app/mock/artifacts/autoscale-policy.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "autoscale_policy_1", - "loadThresholds": { - "requestsInFlight": { - "threshold": 80 - }, - "memoryConsumption": { - "threshold": 90 - }, - "loadAverage": { - "threshold": 50 - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/deployment-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/deployment-policy.json b/samples/more-complex-app/mock/artifacts/deployment-policy.json deleted file mode 100644 index 38bc5a6..0000000 --- a/samples/more-complex-app/mock/artifacts/deployment-policy.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "applicationId": "app_boo", - "applicationPolicy": { - "applicationId": "app_boo_r4", - "networkPartition": [ - { - "id": "openstack_R1", - "activeByDefault": "true", - "partitions": [ - { - "id": "P1", - "provider": "mock", - "property": [ - { - "name": "region", - "value": "RegionOne" - } - ] - } - ] - } - ] - }, - "childPolicies": [ - { - "alias": "mytomcat2", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mytomcat1", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup6", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup8", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - } - ] -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/group6c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/group6c.json b/samples/more-complex-app/mock/artifacts/group6c.json deleted file mode 100755 index 6a64b18..0000000 --- a/samples/more-complex-app/mock/artifacts/group6c.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "group6", - "groups": [ - { - "name": "group7", - "cartridges": [ - "tomcat1", - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "cartridge.tomcat1,cartridge.tomcat2" - ], - "terminationBehaviour": "terminate-all" - } - }, - { - "name": "group8", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "group.group7,cartridge.tomcat2,group.group8" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/group8c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/group8c.json b/samples/more-complex-app/mock/artifacts/group8c.json deleted file mode 100755 index 3294aec..0000000 --- a/samples/more-complex-app/mock/artifacts/group8c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "group8", - "groups": [ - { - "name": "group9", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2", - "tomcat1" - ], - "dependencies": { - "startupOrders": [ - "group.group9,cartridge.tomcat2", - "group.group9,cartridge.tomcat1" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/tomcat.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/tomcat.json b/samples/more-complex-app/mock/artifacts/tomcat.json deleted file mode 100755 index de39d22..0000000 --- a/samples/more-complex-app/mock/artifacts/tomcat.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat", - "provider": "apache", - "host": "isuruh.lk", - "category": "data", - "displayName": "tomcat", - "description": "tomcat Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "mock", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "reka" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/tomcat1.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/tomcat1.json b/samples/more-complex-app/mock/artifacts/tomcat1.json deleted file mode 100755 index ea2f591..0000000 --- a/samples/more-complex-app/mock/artifacts/tomcat1.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat1", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat1", - "description": "tomcat1 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "mock", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "reka" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/artifacts/tomcat2.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/artifacts/tomcat2.json b/samples/more-complex-app/mock/artifacts/tomcat2.json deleted file mode 100755 index c55e5a8..0000000 --- a/samples/more-complex-app/mock/artifacts/tomcat2.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat2", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat2", - "description": "tomcat2 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "mock", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "reka" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/deploy.sh b/samples/more-complex-app/mock/deploy.sh deleted file mode 100755 index 6436bec..0000000 --- a/samples/more-complex-app/mock/deploy.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# Create autoscale policy -curl -X POST -H "Content-Type: application/json" -d @'artifacts/autoscale-policy.json' -k -v -u admin:admin https://localhost:9443/api/autoscalingPolicies - -# Create tomcat cartridge -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat1 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat1.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy tomcat2 cartride -curl -X POST -H "Content-Type: application/json" -d @'artifacts/tomcat2.json' -k -v -u admin:admin https://localhost:9443/api/cartridges - -# Deploy group -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group6c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -curl -X POST -H "Content-Type: application/json" -d @'artifacts/group8c.json' -k -v -u admin:admin https://localhost:9443/api/cartridgeGroups - -sleep 5 -# Create application -curl -X POST -H "Content-Type: application/json" -d @'artifacts/application_definition.json' -k -v -u admin:admin https://localhost:9443/api/applications - -sleep 5 -# GET application -curl -X GET -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo - -# Deploy application -curl -X POST -H "Content-Type: application/json" -d@'artifacts/deployment-policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/deploy - -sleep 20 - -# Undeploy application -# curl -X POST -H "Content-Type: application/json" -d@'artifacts/deployment-policy.json' -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/undeploy - -sleep 5 - -# Delete application -# curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/mock/undeploy.sh b/samples/more-complex-app/mock/undeploy.sh deleted file mode 100755 index 858f19a..0000000 --- a/samples/more-complex-app/mock/undeploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# undeploy application -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/app_boo/undeploy http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/application_definition.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/application_definition.json b/samples/more-complex-app/openstack/artifacts/application_definition.json deleted file mode 100644 index e94d848..0000000 --- a/samples/more-complex-app/openstack/artifacts/application_definition.json +++ /dev/null @@ -1,141 +0,0 @@ -{ - "applicationId": "app_boo", - "alias": "app_boo_r2", - "components": { - "groups": [ - { - "name": "group6", - "alias": "mygroup6", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group7", - "alias": "mygroup7", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group7tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group6tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - }, - { - "name": "group8", - "alias": "mygroup8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "groups": [ - { - "name": "group9", - "alias": "mygroup9", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group9tom", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "group8tom2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ] - } - ], - "cartridges": [ - { - "type": "tomcat", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat1", - "autoscalingPolicy": "autoscale_policy_1" - } - }, - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "mytomcat2", - "autoscalingPolicy": "autoscale_policy_1" - } - } - ], - "dependencies": { - "startupOrders": [ - "group.group6,cartridge.tomcat,group.group8" - ], - "terminationBehaviour": "terminate-all" - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/autoscale-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/autoscale-policy.json b/samples/more-complex-app/openstack/artifacts/autoscale-policy.json deleted file mode 100755 index 9e9ad99..0000000 --- a/samples/more-complex-app/openstack/artifacts/autoscale-policy.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "autoscale_policy_1", - "loadThresholds": { - "requestsInFlight": { - "threshold": 80 - }, - "memoryConsumption": { - "threshold": 90 - }, - "loadAverage": { - "threshold": 50 - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/deployment-policy.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/deployment-policy.json b/samples/more-complex-app/openstack/artifacts/deployment-policy.json deleted file mode 100644 index d4d3936..0000000 --- a/samples/more-complex-app/openstack/artifacts/deployment-policy.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "applicationId": "app_boo", - "applicationPolicy": { - "applicationId": "app_boo_r4", - "networkPartition": [ - { - "id": "openstack_R1", - "activeByDefault": "true", - "partitions": [ - { - "id": "P1", - "provider": "openstack", - "property": [ - { - "name": "region", - "value": "RegionOne" - } - ] - } - ] - } - ] - }, - "childPolicies": [ - { - "alias": "mytomcat2", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mytomcat1", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup6", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - }, - { - "alias": "mygroup8", - "networkPartition": [ - { - "id": "openstack_R1", - "partitionAlgo": "one-after-another", - "partitions": [ - { - "id": "P1", - "max": 5 - } - ] - } - ] - } - ] -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/group6c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/group6c.json b/samples/more-complex-app/openstack/artifacts/group6c.json deleted file mode 100755 index 6a64b18..0000000 --- a/samples/more-complex-app/openstack/artifacts/group6c.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "group6", - "groups": [ - { - "name": "group7", - "cartridges": [ - "tomcat1", - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "cartridge.tomcat1,cartridge.tomcat2" - ], - "terminationBehaviour": "terminate-all" - } - }, - { - "name": "group8", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2" - ], - "dependencies": { - "startupOrders": [ - "group.group7,cartridge.tomcat2,group.group8" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/group8c.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/group8c.json b/samples/more-complex-app/openstack/artifacts/group8c.json deleted file mode 100755 index 3294aec..0000000 --- a/samples/more-complex-app/openstack/artifacts/group8c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "group8", - "groups": [ - { - "name": "group9", - "cartridges": [ - "tomcat1" - ] - } - ], - "cartridges": [ - "tomcat2", - "tomcat1" - ], - "dependencies": { - "startupOrders": [ - "group.group9,cartridge.tomcat2", - "group.group9,cartridge.tomcat1" - ], - "terminationBehaviour": "terminate-all" - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/tomcat.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/tomcat.json b/samples/more-complex-app/openstack/artifacts/tomcat.json deleted file mode 100755 index 2a93378..0000000 --- a/samples/more-complex-app/openstack/artifacts/tomcat.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat", - "provider": "apache", - "host": "isuruh.lk", - "category": "data", - "displayName": "tomcat", - "description": "tomcat Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "openstack", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "vishanth-key" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/tomcat1.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/tomcat1.json b/samples/more-complex-app/openstack/artifacts/tomcat1.json deleted file mode 100755 index edbe4fd..0000000 --- a/samples/more-complex-app/openstack/artifacts/tomcat1.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat1", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat1", - "description": "tomcat1 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "openstack", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "vishanth-key" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -} http://git-wip-us.apache.org/repos/asf/stratos/blob/d7f100da/samples/more-complex-app/openstack/artifacts/tomcat2.json ---------------------------------------------------------------------- diff --git a/samples/more-complex-app/openstack/artifacts/tomcat2.json b/samples/more-complex-app/openstack/artifacts/tomcat2.json deleted file mode 100755 index c898385..0000000 --- a/samples/more-complex-app/openstack/artifacts/tomcat2.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "type": "tomcat2", - "provider": "apache", - "category": "data", - "host": "isuruh.lk", - "displayName": "tomcat2", - "description": "tomcat2 Cartridge", - "version": "7", - "multiTenant": "false", - "portMapping": [ - { - "protocol": "http", - "port": "22", - "proxyPort": "8280" - } - ], - "deployment": { - }, - "iaasProvider": [ - { - "type": "openstack", - "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e", - "networkInterfaces": [ - { - "name": "network-non-routable", - "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e" - } - ], - "maxInstanceLimit": "2", - "property": [ - { - "name": "instanceType", - "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594" - }, - { - "name": "keyPair", - "value": "vishanth-key" - }, - { - "name": "securityGroups", - "value": "default" - } - ] - } - ], -}
