Launching Asia Pacific EC2 Instances using Mr.Awsome

9 Responses to “Launching Asia Pacific EC2 Instances using Mr.Awsome”

Comments

  1. Nate Aune says:

    Hi Rodney,

    Thanks for your post about mr.awsome. I’m also using it for a project with Rice University, and they’re launching Rhaptos instances in the asia-pacific region.

    mr.awsome utilizes the security group as a unique identifier for the EC2 instances. Since you used the same security group “default” for each of your instances, mr.awsome thought they were the same one.

    The best practice way is to give each new EC2 instance you launch its own security group. Then you’ll be able to start/stop them independently.

    I also extended mr.awsome to be able to attach EBS volumes created from snapshots when you launch the EC2 instance. http://github.com/natea/mr.awsome/commit/6266363597d2a8f5b0929c6e41446f7897d5267c

    Nate

  2. rodney says:

    Hi Nate,

    Thanks, Florian pointed about the security group also. And that should be included I guess on the updated README. :)

  3. rodney says:

    I’ve updated my github. Instead of using user option in aws.conf, please use server_user.

    Rodney

  4. Hi rodney,

    I discovered mr.awsome through your blog and I also updated the snapshot with the ability to add the instances in a load balancer (this should be useful also when having a template of server).

    I guess, we are getting there :-)

  5. rodney says:

    Hi Sebastien,

    Glad you find mr.awsome here. Feel free to share me and others for your updates. :)

    Cheers,

  6. fenris says:

    hi,
    can u guys help me .. im getting this:

    $ /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/aws start demo-server
    Traceback (most recent call last):
    File “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/aws”, line 9, in
    load_entry_point(‘mr.awsome==0.8′, ‘console_scripts’, ‘aws’)()
    File “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pkg_resources.py”, line 305, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pkg_resources.py”, line 2244, in load_entry_point
    return ep.load()
    File “/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pkg_resources.py”, line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    ImportError: No module named awsome

  7. fenris says:

    sorry to bother u guys again .. here is the latest error i got :

    $ aws start demo-server
    /Library/Python/2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
    import warnings
    /Library/Python/2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    import warnings
    Traceback (most recent call last):
    File “/usr/local/bin/aws”, line 8, in
    load_entry_point(‘mr.awsome==0.8′, ‘console_scripts’, ‘aws’)()
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/__init__.py”, line 687, in aws
    return aws(argv)
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/__init__.py”, line 681, in __call__
    args.func(sub_argv, args.func.__doc__)
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/__init__.py”, line 474, in cmd_start
    choices=list(self.ec2.instances))
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/__init__.py”, line 363, in ec2
    self._ec2 = EC2(self.configfile)
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/__init__.py”, line 327, in __init__
    self.config = Config(configpath)
    File “/Library/Python/2.6/site-packages/mr.awsome-0.8-py2.6.egg/mr/awsome/config.py”, line 78, in __init__
    _config.read(config)
    File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ConfigParser.py”, line 286, in read
    self._read(fp, filename)
    File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ConfigParser.py”, line 510, in _read
    raise e
    ConfigParser.ParsingError: File contains parsing errors: /Users/fenris/Documents/BiS/EC2/IntOffice/etc/aws.conf
    [line 4]: ‘tcp 22 22 0.0.0.0/0\n’
    [line 5]: ‘tcp 80 80 0.0.0.0/0\n’
    [line 10]: ‘tcp 22 22 0.0.0.0/0\n’
    [line 11]: ‘tcp 80 80 0.0.0.0/0\n’

    while checking the port .. there is no haslib for python 2.6:

    $ sudo port search hashlib
    py25-hashlib @2.5.4 (python)
    This is a stub. hashlib is now built with python25

  8. fenris says:

    $ aws start demo-server
    /Library/Python/2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/SHA.py:6: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
    import warnings
    /Library/Python/2.6/site-packages/pycrypto-2.0.1-py2.6-macosx-10.6-universal.egg/Crypto/Hash/MD5.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    import warnings
    usage: aws start [-h] [-o [OVERRIDE [OVERRIDE ...]]] instance
    aws start: error: argument instance: invalid choice: ‘demo-server’ (choose from ‘demo-dbserver’, ‘demo-webserver’)

    how do i remove @ ignore / hide the import warnings?

  9. rodney says:

    Hi fenris,

    This is a pycrypto bugs you can check this thread https://bugs.launchpad.net/pycrypto/+bug/269429

    I also have the same warnings but mr.awsome is working fine..though annoying.:)

Share Your Thoughts