Amazon Autoscaling ~ Issue uploading payload?
The Cloud Zone is presented by DZone and Microsoft. Let our tutorials, design patterns, and news guide you through the maze of constantly increasing cloud solutions. Microsoft has a host of tools to let you deploy Node.js, PHP, and Java apps on their Windows Azure platform.
We tried to upload a payload.zip for
the autoscaled load balanced system, with the startup-parameters for
our Application Server (using the commands given below). There seems to
be some issue for the current Amazon Autoscaling API, that prevents us
from uploading the user-data-file. We have reported the issue in the AWS forum, and awaiting their reply. :)
Creating a launch config
Updating Auto Scaling Group
However we found that, it works when the payload is sent as a string using the param --user-data, instead of --user-data, so we used that to get appserver running, load balanced and auto scaled.
Launch Config
Since this works, we are happy to proceed passing the payload as a string, instead of sending it as a zip file. Relevant products will be taken from the S3 buckets and run using the script, hence producing the autoscaled appserver instances.
Source: http://kkpradeeban.blogspot.com/2011/03/amazon-autoscaling-issue-uploading.html
Creating a launch config
pradeeban@pradeeban:~/pem$ as-create-launch-config autoscalelcapp --image-id ami-xxxxxxxx --instance-type m1.large --user-data-file /tmp/payload.zip --key "keypair" --group "default" -K KEY.pem -C CERT.pem
Updating Auto Scaling Group
pradeeban@pradeeban:~/pem$ as-update-auto-scaling-group autoscleasg1 --availability-zones us-east-1c --launch-configuration autoscalelcas --min-size 1 --max-size 5 -K KEY.pem -C CERT.pem
However we found that, it works when the payload is sent as a string using the param --user-data, instead of --user-data, so we used that to get appserver running, load balanced and auto scaled.
Launch Config
pradeeban@pradeeban:~/pem$ as-create-launch-config autoscalelcas2 --image-id ami-xxxxxxxx --instance-type m1.large --user-data "AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxx,AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx,AMI_ID=ami-xxxxxxxx,ELASTIC_IP=xx.xx.xxx.xxx,PRODUCT_MODIFICATIONS_PATH_S3=s3://wso2-stratos-conf-1.0.0/appserver/,COMMON_MODIFICATIONS_PATH_S3=s3://wso2-stratos-conf-1.0.0/stratos/,PRODUCT_PATH_S3=s3://wso2-stratos-products-1.0.0,PRODUCT_NAME=wso2stratos-as-1.0.0,SERVER_NAME=appserver.cloud.wso2.com,HTTP_PORT=9763,HTTPS_PORT=9443,STARTUP_DELAY=0" -K KEY.pem -C CERT.pem
OK-Created launch config
Since this works, we are happy to proceed passing the payload as a string, instead of sending it as a zip file. Relevant products will be taken from the S3 buckets and run using the script, hence producing the autoscaled appserver instances.
Source: http://kkpradeeban.blogspot.com/2011/03/amazon-autoscaling-issue-uploading.html
Tags:
Published at DZone with permission of Kathiravelu Pradeeban, author and DZone MVB.(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)
Whether it's IaaS or PaaS, there are many options and features for developers to consider when deploying applications to cloud environments. Cloud Zone is your trusted guide through the jungle of diverse cloud solutions. Get clear cut information on solutions like Windows Azure, open and flexible cloud platform to develop, deploy and manage applications on Microsoft's datacenters. You can see how well your apps run on Azure with their free 3 month trial.



