http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh deleted file mode 100755 index f6c2e14..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/deploy.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -iaas=$1 -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` - -artifacts_path=`cd "${script_path}/../../artifacts"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd` -cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd` -autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd` -network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd` -deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd` -application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd` - -set -e - -if [[ -z "${iaas}" ]]; then - echo "Usage: deploy.sh [iaas]" - exit -fi - -echo ${autoscaling_policies_path}/autoscaling-policy-1.json -echo "Adding autoscale policy..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding network partitions..." -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions - -echo "Adding deployment policy..." -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies - -echo "Adding mysql cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/mysql.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding php cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/php.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding esb cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/esb.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -sleep 1 - -echo "Adding application policy..." -curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies - -sleep 1 - -echo "Adding esb-php-nested-with-esb-php-nested-with-mysql-php group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/esb-php-nested-with-esb-php-nested-with-mysql-php.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -sleep 1 - -echo "Creating application..." -curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications - -sleep 1 - -echo "Deploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/deploy/application-policy-1
http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh deleted file mode 100644 index 2658130..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/common/undeploy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -set -e - -echo "Undeploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/undeploy - -sleep 10 - -echo "Deleting application..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app - -echo "Removing groups..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/esb-php-nested-with-esb-php-nested-with-mysql-php - -echo "Removing cartridges..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/php -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/mysql -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/esb - -echo "Removing autoscale policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1 - -echo "Removing deployment policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-1 - -echo "Removing network partitions..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-2 - -echo "Removing application policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh deleted file mode 100755 index 1370667..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="ec2" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/ec2/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh deleted file mode 100755 index 0d614cc..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/deploy.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 -iaas="kubernetes" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -kubernetes_clusters_path=`cd "${script_path}/../../../../kubernets-clusters"; pwd` - -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${kubernetes_clusters_path}/kubernetes-cluster-1.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh deleted file mode 100644 index 0054670..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/kubernetes/undeploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh - -echo "Removing kubernetes cluster..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh deleted file mode 100755 index 93f8517..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -iaas="mock" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh deleted file mode 100755 index 17d8c71..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/mock/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh deleted file mode 100755 index 4c39959..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="openstack" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh b/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/esb-php-nested-with-esb-php-nested-with-mysql-php-app/scripts/openstack/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/README.md ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/README.md b/samples/applications/group-cartridges/README.md deleted file mode 100644 index 34cfb83..0000000 --- a/samples/applications/group-cartridges/README.md +++ /dev/null @@ -1,14 +0,0 @@ -single_group_v3 -=============== - -Application folder structure ----------------------------- --- artifacts/<iaas>/ IaaS specific artifacts --- scripts/common/ Common scripts for all iaases --- scripts/<iaas> IaaS specific scripts - -How to run ----------- -cd scripts/<iaas>/ -./deploy.sh - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/artifacts/application.json ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/artifacts/application.json b/samples/applications/group-cartridges/artifacts/application.json deleted file mode 100644 index 8a82371..0000000 --- a/samples/applications/group-cartridges/artifacts/application.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "applicationId": "group-cartridges", - "alias": "my-group-cartridges", - "components": { - "cartridges":[ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat1", - "autoscalingPolicy": "autoscaling-policy-1", - "deploymentPolicy":"deployment-policy-2", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type":"mysql", - "cartridgeMin": 1, - "cartridgeMax": 10, - "subscribableInfo":{ - "alias":"my-mysql", - "autoscalingPolicy":"autoscaling-policy-1", - "deploymentPolicy":"deployment-policy-2", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"", - "repoUsername":"", - "repoPassword":"" - } - } - - } - ], - "dependencies": { - "startupOrders": [ - "cartridge.my-mysql,cartridge.my-tomcat1" - ], - "terminationBehaviour": "terminate-all" - } - } -} - - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/common/deploy.sh b/samples/applications/group-cartridges/scripts/common/deploy.sh deleted file mode 100755 index 42a482c..0000000 --- a/samples/applications/group-cartridges/scripts/common/deploy.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -iaas=$1 -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` - -artifacts_path=`cd "${script_path}/../../artifacts"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd` -cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd` -autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd` -network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd` -deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd` -application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd` - -set -e - -if [[ -z "${iaas}" ]]; then - echo "Usage: deploy.sh [iaas]" - exit -fi - -echo ${autoscaling_policies_path}/autoscaling-policy-1.json -echo "Adding autoscale policy..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding network partitions..." -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions - -echo "Adding deployment policies..." -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies - -echo "Adding tomcat cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/mysql.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding tomcat1 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding tomcat2 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding group6c group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -sleep 1 - -echo "Adding application policy..." -curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies - -sleep 1 - -echo "Creating application..." -curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications - -sleep 1 - -echo "Deploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-cartridges/deploy/application-policy-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/common/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/common/undeploy.sh b/samples/applications/group-cartridges/scripts/common/undeploy.sh deleted file mode 100644 index 2bb13e6..0000000 --- a/samples/applications/group-cartridges/scripts/common/undeploy.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -set -e - -echo "Undeploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-cartridges/undeploy - -sleep 10 - -echo "Deleting application..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-cartridges - -echo "Removing groups..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group8 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group6 - -echo "Removing cartridges..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat2 - -echo "Removing autoscale policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1 - -echo "Removing deployment policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies/deployment-policy-2 - -echo "Removing network partitions..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions/network-partition-2 - -echo "Removing application policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1 - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/ec2/deploy.sh b/samples/applications/group-cartridges/scripts/ec2/deploy.sh deleted file mode 100755 index 1370667..0000000 --- a/samples/applications/group-cartridges/scripts/ec2/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="ec2" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/ec2/undeploy.sh b/samples/applications/group-cartridges/scripts/ec2/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-cartridges/scripts/ec2/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh b/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh deleted file mode 100755 index 32eff3c..0000000 --- a/samples/applications/group-cartridges/scripts/kubernetes/deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 -iaas="kubernetes" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` - -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/kubernetes-cluster.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters - -bash ${common_folder}/deploy.sh ${iaas} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh b/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh deleted file mode 100644 index 0054670..0000000 --- a/samples/applications/group-cartridges/scripts/kubernetes/undeploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh - -echo "Removing kubernetes cluster..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/mock/deploy.sh b/samples/applications/group-cartridges/scripts/mock/deploy.sh deleted file mode 100755 index 93f8517..0000000 --- a/samples/applications/group-cartridges/scripts/mock/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -iaas="mock" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/mock/undeploy.sh b/samples/applications/group-cartridges/scripts/mock/undeploy.sh deleted file mode 100755 index 17d8c71..0000000 --- a/samples/applications/group-cartridges/scripts/mock/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/openstack/deploy.sh b/samples/applications/group-cartridges/scripts/openstack/deploy.sh deleted file mode 100755 index 4c39959..0000000 --- a/samples/applications/group-cartridges/scripts/openstack/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="openstack" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-cartridges/scripts/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-cartridges/scripts/openstack/undeploy.sh b/samples/applications/group-cartridges/scripts/openstack/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-cartridges/scripts/openstack/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/README.md ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/README.md b/samples/applications/group-scaling-v1/README.md deleted file mode 100644 index 7b09b98..0000000 --- a/samples/applications/group-scaling-v1/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Group Scaling v1 -================ - -Application folder structure ----------------------------- --- artifacts/<iaas>/ IaaS specific artifacts --- scripts/common/ Common scripts for all iaases --- scripts/<iaas> IaaS specific scripts - -How to run ----------- -cd scripts/<iaas>/ -./deploy.sh - -How to undeploy ---------------- -cd scripts/<iaas>/ -./undeploy.sh \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/artifacts/application.json ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/artifacts/application.json b/samples/applications/group-scaling-v1/artifacts/application.json deleted file mode 100644 index c486e93..0000000 --- a/samples/applications/group-scaling-v1/artifacts/application.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "applicationId": "group-scaling-v1", - "alias": "my-group-scaling-v1", - "components": { - "groups": [ - { - "name": "group2", - "alias": "my-group2", - "groupMinInstances": 1, - "groupMaxInstances": 2, - "deploymentPolicy":"deployment-policy-1", - "cartridges": [ - { - "type": "c2", - "cartridgeMin": 2, - "cartridgeMax": 4, - "subscribableInfo": { - "alias": "my-c2", - "autoscalingPolicy": "autoscaling-policy-c2", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "c3", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-c3", - "autoscalingPolicy": "autoscaling-policy-c3", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c3-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ] - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/common/deploy.sh b/samples/applications/group-scaling-v1/scripts/common/deploy.sh deleted file mode 100644 index 27b732e..0000000 --- a/samples/applications/group-scaling-v1/scripts/common/deploy.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -iaas=$1 -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` - -artifacts_path=`cd "${script_path}/../../artifacts"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd` -cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd` -autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd` -network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd` -deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd` -application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd` - -set -e - -if [[ -z "${iaas}" ]]; then - echo "Usage: deploy.sh [iaas]" - exit -fi - -echo "Adding autoscaling policy c2..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding autoscaling policy c3..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding network partitions..." -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions - -echo "Adding deployment policies..." -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies - -echo "Adding c2 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding c3 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding group1b group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1b.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -sleep 1 - -echo "Adding application policy..." -curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies - -sleep 1 - -echo "Creating application..." -curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications - -echo "Deploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1/deploy/application-policy-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/common/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/common/undeploy.sh b/samples/applications/group-scaling-v1/scripts/common/undeploy.sh deleted file mode 100644 index cbca5a0..0000000 --- a/samples/applications/group-scaling-v1/scripts/common/undeploy.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -set -e - -echo "Undeploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1/undeploy - -sleep 10 - -echo "Deleting application..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling-v1 - -echo "Removing groups..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group2 - -echo "Removing cartridges..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3 - -echo "Removing autoscaling policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3 - -echo "Removing application policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1 - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh b/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh deleted file mode 100755 index 1370667..0000000 --- a/samples/applications/group-scaling-v1/scripts/ec2/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="ec2" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh b/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-scaling-v1/scripts/ec2/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh b/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh deleted file mode 100755 index 32eff3c..0000000 --- a/samples/applications/group-scaling-v1/scripts/kubernetes/deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 -iaas="kubernetes" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` - -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/kubernetes-cluster.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters - -bash ${common_folder}/deploy.sh ${iaas} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh b/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh deleted file mode 100644 index 0054670..0000000 --- a/samples/applications/group-scaling-v1/scripts/kubernetes/undeploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh - -echo "Removing kubernetes cluster..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/mock/deploy.sh b/samples/applications/group-scaling-v1/scripts/mock/deploy.sh deleted file mode 100755 index 93f8517..0000000 --- a/samples/applications/group-scaling-v1/scripts/mock/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -iaas="mock" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh b/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh deleted file mode 100755 index 17d8c71..0000000 --- a/samples/applications/group-scaling-v1/scripts/mock/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh b/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh deleted file mode 100755 index 4c39959..0000000 --- a/samples/applications/group-scaling-v1/scripts/openstack/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="openstack" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh b/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-scaling-v1/scripts/openstack/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/README.md ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/README.md b/samples/applications/group-scaling/README.md deleted file mode 100644 index 1443d02..0000000 --- a/samples/applications/group-scaling/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Group Scaling -=========== - -Application folder structure ----------------------------- --- artifacts/<iaas>/ IaaS specific artifacts --- scripts/common/ Common scripts for all iaases --- scripts/<iaas> IaaS specific scripts - -How to run ----------- -cd scripts/<iaas>/ -./deploy.sh - -How to undeploy ---------------- -cd scripts/<iaas>/ -./undeploy.sh \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/artifacts/application.json ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/artifacts/application.json b/samples/applications/group-scaling/artifacts/application.json deleted file mode 100644 index c2b3f3c..0000000 --- a/samples/applications/group-scaling/artifacts/application.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "applicationId": "group-scaling", - "alias": "my-group-scaling", - "components": { - "groups": [ - { - "name": "group1", - "alias": "my-group1", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "deploymentPolicy":"deployment-policy-1", - "groups": [ - { - "name": "group2", - "alias": "my-group2", - "groupMinInstances": 1, - "groupMaxInstances": 2, - "cartridges": [ - { - "type": "c2", - "cartridgeMin": 2, - "cartridgeMax": 4, - "subscribableInfo": { - "alias": "my-c2-group2", - "autoscalingPolicy": "autoscaling-policy-c2", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "c3", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-c3-group2", - "autoscalingPolicy": "autoscaling-policy-c3", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c3-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ], - "cartridges": [ - { - "type": "c1", - "cartridgeMin": 2, - "cartridgeMax": 4, - "subscribableInfo": { - "alias": "my-c1-group1", - "autoscalingPolicy": "autoscaling-policy-c1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - } - ], - "cartridges": [ - { - "type": "c4", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-c4", - "autoscalingPolicy": "autoscaling-policy-c4", - "deploymentPolicy":"deployment-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-c4-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ], - "dependencies": { - "startupOrders": [ - "group.my-group1,cartridge.my-c4" - ], - "terminationBehaviour": "terminate-dependents" - } - } -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/common/deploy.sh b/samples/applications/group-scaling/scripts/common/deploy.sh deleted file mode 100644 index 992fbf0..0000000 --- a/samples/applications/group-scaling/scripts/common/deploy.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -iaas=$1 -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` - -artifacts_path=`cd "${script_path}/../../artifacts"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd` -cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd` -autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd` -network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd` -deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd` -application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd` - -set -e - -if [[ -z "${iaas}" ]]; then - echo "Usage: deploy.sh [iaas]" - exit -fi - -echo "Adding autoscaling policy c1..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding autoscaling policy c2..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding autoscaling policy c3..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding autoscaling policy c4..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding network partitions..." -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions - -echo "Adding deployment policies..." -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies - -echo "Adding c1 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding c2 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding c3 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding c4 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/c4.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding group1 group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -sleep 1 - -echo "Adding application policy..." -curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies - -sleep 1 - -echo "Creating application..." -curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications - -sleep 1 - -echo "Deploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling/deploy/application-policy-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/common/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/common/undeploy.sh b/samples/applications/group-scaling/scripts/common/undeploy.sh deleted file mode 100644 index 599e6d7..0000000 --- a/samples/applications/group-scaling/scripts/common/undeploy.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -set -e - -echo "Undeploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling/undeploy - -sleep 10 - -echo "Deleting application..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/group-scaling - -echo "Removing groups..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group1 - -echo "Removing cartridges..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c2 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c3 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/c4 - -echo "Removing autoscaling policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c2 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c3 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-c4 - -echo "Removing application policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1 - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/ec2/deploy.sh b/samples/applications/group-scaling/scripts/ec2/deploy.sh deleted file mode 100755 index 1370667..0000000 --- a/samples/applications/group-scaling/scripts/ec2/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="ec2" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/ec2/undeploy.sh b/samples/applications/group-scaling/scripts/ec2/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-scaling/scripts/ec2/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/kubernetes/deploy.sh b/samples/applications/group-scaling/scripts/kubernetes/deploy.sh deleted file mode 100755 index 32eff3c..0000000 --- a/samples/applications/group-scaling/scripts/kubernetes/deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 -iaas="kubernetes" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` - -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/kubernetes-cluster.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters - -bash ${common_folder}/deploy.sh ${iaas} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh b/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh deleted file mode 100644 index 0054670..0000000 --- a/samples/applications/group-scaling/scripts/kubernetes/undeploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh - -echo "Removing kubernetes cluster..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/mock/deploy.sh b/samples/applications/group-scaling/scripts/mock/deploy.sh deleted file mode 100755 index 93f8517..0000000 --- a/samples/applications/group-scaling/scripts/mock/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -iaas="mock" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/mock/undeploy.sh b/samples/applications/group-scaling/scripts/mock/undeploy.sh deleted file mode 100755 index 17d8c71..0000000 --- a/samples/applications/group-scaling/scripts/mock/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/openstack/deploy.sh b/samples/applications/group-scaling/scripts/openstack/deploy.sh deleted file mode 100755 index 4c39959..0000000 --- a/samples/applications/group-scaling/scripts/openstack/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="openstack" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/group-scaling/scripts/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/group-scaling/scripts/openstack/undeploy.sh b/samples/applications/group-scaling/scripts/openstack/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/group-scaling/scripts/openstack/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/README.md ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/README.md b/samples/applications/more-complex-app/README.md deleted file mode 100644 index 4e3bc4d..0000000 --- a/samples/applications/more-complex-app/README.md +++ /dev/null @@ -1,14 +0,0 @@ -more-complex-app -================ - -Application folder structure ----------------------------- --- artifacts/<iaas>/ IaaS specific artifacts --- scripts/common/ Common scripts for all iaases --- scripts/<iaas> IaaS specific scripts - -How to run ----------- -cd scripts/<iaas>/ -./deploy.sh - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/artifacts/application.json ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/artifacts/application.json b/samples/applications/more-complex-app/artifacts/application.json deleted file mode 100644 index 3112bb1..0000000 --- a/samples/applications/more-complex-app/artifacts/application.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "applicationId": "more-complex-app", - "alias": "my-more-complex-app", - "components": { - "groups": [ - { - "name": "group6", - "alias": "my-group6", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "deploymentPolicy":"deployment-policy-1", - "groups": [ - { - "name": "group7", - "alias": "my-group7", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat1-group7", - "autoscalingPolicy": "autoscaling-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat2-group7", - "autoscalingPolicy": "autoscaling-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - }, - { - "name": "group8", - "alias": "my-group8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "deploymentPolicy":"deployment-policy-1", - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat1-group8", - "autoscalingPolicy": "autoscaling-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": "my-tomcat2-group6", - "autoscalingPolicy": "autoscaling-policy-1", - "deploymentPolicy":"deployment-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat2-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ] - }, - { - "name": "group8", - "alias": "my-group8", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "deploymentPolicy":"deployment-policy-1", - "groups": [ - { - "name": "group9", - "alias": "my-group9", - "groupMinInstances": 1, - "groupMaxInstances": 1, - "cartridges": [ - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat1-group9", - "autoscalingPolicy": "autoscaling-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": "my-tomcat1-group8", - "autoscalingPolicy": "autoscaling-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "tomcat2", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat2-group8", - "autoscalingPolicy": "autoscaling-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": "my-tomcat", - "autoscalingPolicy": "autoscaling-policy-1", - "deploymentPolicy":"deployment-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - }, - { - "type": "tomcat1", - "cartridgeMin": 1, - "cartridgeMax": 2, - "subscribableInfo": { - "alias": "my-tomcat1", - "autoscalingPolicy": "autoscaling-policy-1", - "deploymentPolicy":"deployment-policy-1", - "artifactRepository":{ - "privateRepo":false, - "repoUrl":"https://github.com/imesh/stratos-tomcat1-applications.git", - "repoUsername":"", - "repoPassword":"" - } - } - } - ], - "dependencies": { - "startupOrders": [ - "group.my-group6,cartridge.my-tomcat,cartridge.my-tomcat1,group.my-group8" - ], - "terminationBehaviour": "terminate-all" - } - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/common/deploy.sh b/samples/applications/more-complex-app/scripts/common/deploy.sh deleted file mode 100755 index 2dc7958..0000000 --- a/samples/applications/more-complex-app/scripts/common/deploy.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -iaas=$1 -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` - -artifacts_path=`cd "${script_path}/../../artifacts"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` -cartridges_path=`cd "${script_path}/../../../../cartridges/${iaas}"; pwd` -cartridges_groups_path=`cd "${script_path}/../../../../cartridges-groups"; pwd` -autoscaling_policies_path=`cd "${script_path}/../../../../autoscaling-policies"; pwd` -network_partitions_path=`cd "${script_path}/../../../../network-partitions/${iaas}"; pwd` -deployment_policies_path=`cd "${script_path}/../../../../deployment-policies"; pwd` -application_policies_path=`cd "${script_path}/../../../../application-policies"; pwd` - -set -e - -if [[ -z "${iaas}" ]]; then - echo "Usage: deploy.sh [iaas]" - exit -fi - -echo ${autoscaling_policies_path}/autoscaling-policy-1.json -echo "Adding autoscale policy..." -curl -X POST -H "Content-Type: application/json" -d "@${autoscaling_policies_path}/autoscaling-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies - -echo "Adding network partitions..." -curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/networkPartitions - -echo "Adding deployment policies..." -curl -X POST -H "Content-Type: application/json" -d "@${deployment_policies_path}/deployment-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/deploymentPolicies - -echo "Adding tomcat cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding tomcat1 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding tomcat2 cartridge..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_path}/tomcat2.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges - -echo "Adding group6c3 group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group6c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -echo "Adding group8c3 group..." -curl -X POST -H "Content-Type: application/json" -d "@${cartridges_groups_path}/group8c3.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups - -sleep 1 - -echo "Adding application policy..." -curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy-1.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies - -sleep 1 - -echo "Creating application..." -curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications - -sleep 1 - -echo "Deploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/more-complex-app/deploy/application-policy-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/common/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/common/undeploy.sh b/samples/applications/more-complex-app/scripts/common/undeploy.sh deleted file mode 100644 index 7c45c57..0000000 --- a/samples/applications/more-complex-app/scripts/common/undeploy.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -set -e - -echo "Undeploying application..." -curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/more-complex-app/undeploy - - -sleep 10 - -echo "Deleting application..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/more-complex-app - -echo "Removing groups..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group8 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridgeGroups/group6 - -echo "Removing cartridges..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat1 -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/cartridges/tomcat2 - -echo "Removing autoscale policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/autoscalingPolicies/autoscaling-policy-1 - -echo "Removing application policies..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies/application-policy-1 - http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/ec2/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/ec2/deploy.sh b/samples/applications/more-complex-app/scripts/ec2/deploy.sh deleted file mode 100755 index 1370667..0000000 --- a/samples/applications/more-complex-app/scripts/ec2/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="ec2" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/ec2/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/ec2/undeploy.sh b/samples/applications/more-complex-app/scripts/ec2/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/more-complex-app/scripts/ec2/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh b/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh deleted file mode 100755 index 32eff3c..0000000 --- a/samples/applications/more-complex-app/scripts/kubernetes/deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 -iaas="kubernetes" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` -iaas_artifacts_path=`cd "${script_path}/../../artifacts/${iaas}"; pwd` - -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${iaas_artifacts_path}/kubernetes-cluster.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters - -bash ${common_folder}/deploy.sh ${iaas} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh b/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh deleted file mode 100644 index 0054670..0000000 --- a/samples/applications/more-complex-app/scripts/kubernetes/undeploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -host_ip="localhost" -host_port=9443 - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh - -echo "Removing kubernetes cluster..." -curl -X DELETE -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters/kubernetes-cluster-1 http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/mock/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/mock/deploy.sh b/samples/applications/more-complex-app/scripts/mock/deploy.sh deleted file mode 100755 index 93f8517..0000000 --- a/samples/applications/more-complex-app/scripts/mock/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -iaas="mock" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/mock/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/mock/undeploy.sh b/samples/applications/more-complex-app/scripts/mock/undeploy.sh deleted file mode 100755 index 17d8c71..0000000 --- a/samples/applications/more-complex-app/scripts/mock/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/openstack/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/openstack/deploy.sh b/samples/applications/more-complex-app/scripts/openstack/deploy.sh deleted file mode 100755 index 4c39959..0000000 --- a/samples/applications/more-complex-app/scripts/openstack/deploy.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -iaas="openstack" - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/deploy.sh ${iaas} http://git-wip-us.apache.org/repos/asf/stratos/blob/aaa8a0f4/samples/applications/more-complex-app/scripts/openstack/undeploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/more-complex-app/scripts/openstack/undeploy.sh b/samples/applications/more-complex-app/scripts/openstack/undeploy.sh deleted file mode 100644 index 17d8c71..0000000 --- a/samples/applications/more-complex-app/scripts/openstack/undeploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -prgdir=`dirname "$0"` -script_path=`cd "$prgdir"; pwd` -common_folder=`cd "${script_path}/../common"; pwd` - -bash ${common_folder}/undeploy.sh
