Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.
Creating a launch config
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. :)
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
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.
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
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
The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.