You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/03/06 11:20:58 UTC
stratos git commit: Fixing dependency scaling sample with new rest api
Repository: stratos
Updated Branches:
refs/heads/master 1330d86d7 -> 357d0d971
Fixing dependency scaling sample with new rest api
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/357d0d97
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/357d0d97
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/357d0d97
Branch: refs/heads/master
Commit: 357d0d97156ad5a988ec77db677647c3e47d951a
Parents: 1330d86
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Fri Mar 6 15:50:47 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Fri Mar 6 15:50:47 2015 +0530
----------------------------------------------------------------------
.../sample-cartridges/scripts/common/deploy.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/357d0d97/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
----------------------------------------------------------------------
diff --git a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh b/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
index f7d9735..c2d2afb 100755
--- a/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
+++ b/samples/applications/dependent-scaling/sample-cartridges/scripts/common/deploy.sh
@@ -14,6 +14,7 @@ cartridges_groups_path=`cd "${script_path}/../../../../../cartridges-groups"; pw
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
@@ -39,6 +40,9 @@ 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
sleep 1
+echo "Adding application policy..."
+curl -X POST -H "Content-Type: application/json" -d "@${application_policies_path}/application-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applicationPolicies
+
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
@@ -46,4 +50,6 @@ curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/applicat
sleep 1
echo "Deploying application..."
-curl -X POST -H "Content-Type: application/json" -d "@${artifacts_path}/application-policy.json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-cartridges-app/deploy
+
+curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://${host_ip}:${host_port}/api/applications/dependency-scaling-cartridges-app/deploy/application-policy-1
+