[Patrick Dunnigan] writes on [comp.lang.tcl][http://groups.google.com/group/comp.lang.tcl/msg/6a98081e21f9ec7d?hl=en&]: I am please to announce the inaugural version of TclCloud, v1.0. **Description** TclCloud is an opensource tcl interface to the Amazon AWS webservices api that enabled cloud automation of most AWS products and operations. Example use cases include the following: * starting and stopping EC2 instances * attaching EBS volumes * creating and interfacing with SimpleDB and RDS instances * managing EC2 Autoscale and Load Balancer configurations * sending Simple Email Service messages * creating, submitting and monitoring Elastic Map Reduce (Hadoop) jobs * configuring VPC networks * and so on ... For more information on the Amazon AWS cloud products, see: http://aws.amazon.com/products/ **Repository and Download** https://github.com/cloudsidekick/tclcloud **Bug and Feature Requests** https://github.com/cloudsidekick/tclcloud/issues General questions can be posted to comp.lang.tcl **How does it work?** All of the Amazon Web Services features are managed through their APIs by connecting to "endpoints" and issuing either REST or SOAP web service calls. Most programming language SDKs provide an abstraction layer to these APIs. TclCloud opens up the AWS API to the TCL developer with minimal abstraction and does not require a new release to support new AWS features to existing products (which happens quite frequently). Responses from the AWS endpoint are returned in pure xml format which are easily parsed using tdom. For more information on the AWS API documentation, see: http://aws.amazon.com/documentation/ To try out TclCloud you must have an Amazon AWS account with an API access key and secret key. Note: TclCloud was developed and tested on tcl 8.6 on linux. I plan to support tcl 8.5 with TclOO and test on Windows. **Installation** Requirements - tcl 8.6 on linux, tcllib, TclCurl Download the TclCloud from the Download button from the Git repository above. Unzip the contents into the lib/tclcloud directory in your tcl home directory. Make sure you have tcllib and TclCurl installed too. **Usage** To create a new connection object, substitute your AWS provided access key and secret key. The connection new object will not attempt to create a connection to AWS, it simply creates the connection object for use. ====== ::tclcloud::connection new ====== : `aws access key` - the AWS provided access key : `aws secret key` - the AWS provided secret key Example: ====== set awsconn [::tclcloud::connection new MYACCESSKEYKJREKJ MYSECRETKEYLKJDLLKJSDDKJF] ====== To send a request to the AWS endpoint: ====== call_aws ====== product: the AWS product to manage, currently one of the following values: ec2 emr as rds sqs ses cw elb vpc iam ebs ** ec2 - EC2 ** emr - Elastic MapReduce ** as - AutoScale ** rds - Relational Database Service ** sqs - Simple Queue Service ** ses - Simple Email Service ** cw - CloudWatch ** elb - Elastic Load Balancer ** vpc - Virtual Private Cloud ** iam - Identity and Access Management ** ebs - Elastic Beanstalk ** sns - Simple Notification Service ** cfn - Cloudformation region: the AWS region to interact with. This is product specific, see the following link for which regions apply to what products. <
> http://docs.amazonwebservices.com/general/latest/gr/index.html <
> Currently one of the following values: us-east-1, us-west-1, eu-west-1, ap-southeast-1, ap-northeast-1 or leave blank for the default (typically us-east-1) action: this will correspond with the specific product API operation or action. Examples include: `AssociateAddress`, `CreateImage`, `GetAttributes`, etc. parameter: key / value pairs that will be passed to the API in a tcl list format. api version: the api version for the specific product API. Leave blank for the default. **TODO ** * add support for S3, Cloudfront, Route53, Import/Export * certify tcl 8.5, Windows and Mac * incorporate XML results parser using tdom, to list and json * more sample code * add support for the Rackspace, vSphere, OpSource, etc. APIs **Samples** To launch an Ubuntu instance, default region and api version: ====== package require tclcloud set awsconn [::tclcloud::connection new MYACCESSKEYKJREKJ MYSECRETKEYLKJDLLKJSDDKJF4] set return_value [$awsconn call_aws ec2 {} RunInstances {ImageId ami-1aad5273 MinCount 1 MaxCount 1 KeyName CentiviaKey SecurityGroup.1 {MySQL intranet} InstanceType t1.micro Placement.AvailabilityZone us- east-1d} {}] puts $return_value ====== ======none c10b0d57-964c-452e-a2ca-77aa8c49a65c ami-3012e159 001825975926/Windows IIS SQL Server Small available 001825975926 false x86_64 machine windows Windows IIS SQL Server Small Windows IIS SQL Server Small ebs /dev/sda1 /dev/sda1 snap-345e8058 30 true hvm Name Windows 2008 64 Dev Instance xen ami-40659629 001825975926/Informix Linux Dev available 001825975926 false i386 machine Informix Linux Dev Informix Linux Dev ebs /dev/sda1 /dev/sda1 snap-182ef074 10 true paravirtual Name Linux Informix xen ====== <>Internet