Update with uuid
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/599e543a Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/599e543a Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/599e543a Branch: refs/heads/master Commit: 599e543a816bbe8b2d6ec957b2e6b7333dc3d5b6 Parents: 1156a56 Author: gayangunarathne <[email protected]> Authored: Fri Aug 28 19:37:06 2015 +0530 Committer: gayangunarathne <[email protected]> Committed: Fri Aug 28 19:37:06 2015 +0530 ---------------------------------------------------------------------- .../cloud/controller/iaases/kubernetes/KubernetesIaas.java | 2 +- .../simple/single-cartridge-app/scripts/common/deploy.sh | 4 ++++ .../simple/single-cartridge-app/scripts/kubernetes/deploy.sh | 8 +++++--- 3 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/599e543a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java index 23c5514..b9c15dc 100644 --- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java +++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/kubernetes/KubernetesIaas.java @@ -394,7 +394,7 @@ public class KubernetesIaas extends Iaas { memory = Integer.parseInt(memoryProperty.getValue()); } - IaasProvider iaasProvider = CloudControllerContext.getInstance().getIaasProviderOfPartition(cartridge.getType(), partition.getUuid()); + IaasProvider iaasProvider = CloudControllerContext.getInstance().getIaasProviderOfPartition(cartridge.getUuid(), partition.getUuid()); if (iaasProvider == null) { String message = "Could not find iaas provider: [partition] " + partition.getUuid(); log.error(message); http://git-wip-us.apache.org/repos/asf/stratos/blob/599e543a/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh index bd7f988..b54439e 100755 --- a/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh +++ b/samples/applications/simple/single-cartridge-app/scripts/common/deploy.sh @@ -37,6 +37,7 @@ network_partitions_path=`cd "${script_path}/../../../../../network-partitions/${ deployment_policies_path=`cd "${script_path}/../../../../../deployment-policies"; pwd` application_policies_path=`cd "${script_path}/../../../../../application-policies"; pwd` tenants_path=`cd "${script_path}/../../../../../tenants"; pwd` +kubernetes_clusters_path=`cd "${script_path}/../../../../../kubernetes-clusters"; pwd` set -e @@ -53,6 +54,9 @@ 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 ${username}:${password} https://${host_ip}:${host_port}/api/autoscalingPolicies +echo "Adding kubernetes cluster..." +curl -X POST -H "Content-Type: application/json" -d "@${kubernetes_clusters_path}/kubernetes-cluster-2.json" -k -u ${username}:${password} https://${host_ip}:${host_port}/api/kubernetesClusters + echo "Adding network partitions..." curl -X POST -H "Content-Type: application/json" -d "@${network_partitions_path}/network-partition-1.json" -k -v -u ${username}:${password} https://${host_ip}:${host_port}/api/networkPartitions http://git-wip-us.apache.org/repos/asf/stratos/blob/599e543a/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh ---------------------------------------------------------------------- diff --git a/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh b/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh index 548c166..f4b463c 100755 --- a/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh +++ b/samples/applications/simple/single-cartridge-app/scripts/kubernetes/deploy.sh @@ -23,6 +23,8 @@ host_ip="localhost" host_port=9443 iaas="kubernetes" +username="admin@test$2.com" +password="admin123" prgdir=`dirname "$0"` script_path=`cd "$prgdir"; pwd` @@ -30,7 +32,7 @@ common_folder=`cd "${script_path}/../common"; pwd` kubernetes_clusters_path=`cd "${script_path}/../../../../../kubernetes-clusters"; pwd` -echo "Adding kubernetes cluster..." -curl -X POST -H "Content-Type: application/json" -d "@${kubernetes_clusters_path}/kubernetes-cluster-2.json" -k -u admin:admin https://${host_ip}:${host_port}/api/kubernetesClusters +#echo "Adding kubernetes cluster..." +#curl -X POST -H "Content-Type: application/json" -d "@${kubernetes_clusters_path}/kubernetes-cluster-2.json" -k -u ${username}:${password} https://${host_ip}:${host_port}/api/kubernetesClusters -bash ${common_folder}/deploy.sh ${iaas} \ No newline at end of file +bash ${common_folder}/deploy.sh ${iaas} $1
