From dust to technology
OpenShift Express Free and easy cloud deployments PHP, Python, Ruby Git push and leave the rest to us
OpenShift Flex Auto-scale new and existing apps in the cloud PHP, Java EE, MySQL, MongoDB, Memcache, DFS Full control over configuration & Built-in monitoring
OpenShift Power* Complete control over cloud deployments Custom topologies, root access, multi-tier dependencies Turn any application into a cloud deployment template
* Coming soon.
Since we use a shared account of AWS to work. It becomes incredibly painful to manage it. So I thought it would be good to have a mechanism write or export the list to of instances to a CSV so we could send a claim mail to see who claims these instances. So I wrote this
#!/usr/bin/env python
from boto.ec2 import EC2Connection
csv_file = open('instances.csv','w+')
def process_instance_list(connection):
map(build_instance_list,connection.get_all_instances())
def build_instance_list(reservation):
map(write_instances,reservation.instances)
def write_instances(instance):
if (instance.virtualizationType == 'hvm'):
platform = 'Windows'
else:
platform = 'Linux'
csv_file.write("%s,%s,%s,%s,%s,%s\n"%(instance.id,instance.public_dns_name,
instance.state,instance.placement,instance.architecture, platform))
csv_file.flush()
if __name__=="__main__":
connection = EC2Connection(aws_access_key_id='XXXXXXX',aws_secret_access_key='XXXXXXXX')
process_instance_list(connection)
csv_file.close()
This piece of code is pretty straight and any EC2 noop could understand it. What I do is, get list of instances and layout their details line-wise and comma separated into a csv file. Now this file could be easily imported into excel sheet. I need to get a better mechanism, I know. But, for now this works.
Aha, this is 1st of Feb 2011. I thought there will be some changes done 1st Jan 2011 but I thought I better put it out by a month and here I am sitting telling all of you that this is only a blog of hope and not of resurrection.
Now, at my desk in office, juggling a couple of things. First up is gonna be review of an architecture for which the a DR needs to be provided on the Amazon Cloud. Well many of you might think this kids stuff but I guess it is not, because every component of the existing architecture is insanely proprietary to make your life difficult. To make it worse the client wants to see almost all the apples on AWS EC2 to compare with the existing apples on the current site. Grrrrr..... thats going to be hard. Well lets see I will update you soon on this.
Then there is a sales meet happening and technology presentations need to up. I am ok with doing presentations as long as they do not push me to use the templates that corporates come with. That really is a bummer as you will agree with me that its difficult to fit every idea into the same frame and expect it to look beautiful.
Well the other project that I am with, unamed and closed(at the moment). I have kind of completed the Logic in my mind for this, but its sad that too many things have to be cleared up, before I sit to do some interesting coding on this mini sized project with a great potential. I have made the choice of programming language(Python), framework(Flask) and database backend(Riak).
On the domestic front, Grandfather is admitted in the hospital with an enlarged prostrate. This requires surgery, which is due tomorrow. He is 87 but healthy, and i guess the latter will take him through the surgery well. My daughter is battling her cough and cold, son is handling quite some changes and wife trying to get busy at something while sitting at home on maternity.
I have done this an Karmic server instance, running on the Karmic UEC. There must be similar steps for CentOS and Fedora which I guess someone will leave a comment on.The catch it seems is to download the latest euca2ools, and it worked magic, thanks Kiran for pointing me to the forum post and I hope this post will help you in you manual preparation for UEC.