[StarCluster] Adding Python Modules

Justin Riley jtriley at MIT.EDU
Mon Mar 14 23:09:17 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Chris,

> I should have mentioned that I tried 'sudo easy_install ...' and it
> prompted me for a password. Hitting return didn't do the trick...
>

How are you logging into the instance? Have you tried the
sshmaster/sshnode/sshinstance commands? All of these commands should log
you in as root by default:

# login as root on the master node of 'mycluster'
$ starcluster sshmaster mycluster

# login as root to node001 of 'mycluster'
$ starcluster sshnode mycluster node001

# login as root to any instance by instance id (keypair must be defined
in config)
$ starcluster sshinstance i-14e9157c

# login as root to any instance by public dns name (keypair must be
defined in config)
$ starcluster sshinstance ec2-123-123-123-12.compute-1.amazonaws.com

If these commands work you should be logged in as root and easy_install
should work without any 'permission denied' errors. Pass --help to any
of these commands for more details and a list of available options.


> Once I am able to create a new custom AMI, shouldn't I be able to spin
> up a cluster of VMs all using the same image?

Absolutely. You can do this by putting your new AMI id as the
NODE_IMAGE_ID setting in a cluster template defined in the config. Have
a look at the comments for the NODE_IMAGE_ID setting in the example
'smallcluster' config here:
http://web.mit.edu/stardev/cluster/docs/configuration.html#defining-cluster-templates

However, please note that currently the best way to create a new AMI
based on the StarCluster AMI is to launch a single instance of the AMI
using the AWS Console instead of StarCluster. Then login to the instance
as root, modify the install, and create a new AMI from the instance. If
you want to create an S3-backed AMI you can use StarCluster's
'createimage' command to completely automate the process:

$ starcluster createimage i-999999 my-new-image my-s3-bucket

Please see http://web.mit.edu/stardev/cluster/docs/create_new_ami.html
for more details.

Hope that helps,

~Justin



> 
> Chris
> 
> On Mon, Mar 14, 2011 at 6:57 PM, Austin Godber <godber at uberhip.com
> <mailto:godber at uberhip.com>> wrote:
> 
>     You should be able to use sudo to do things as the root user:
> 
>     sudo easy_install boto
> 
>     I am pretty sure that works.
> 
>     Though you should keep in mind that will only run it on the current
>     node and /usr/local isn't share between nodes ... at least as far as
>     I know of.
> 
>     Austin
> 
> 
>     On 03/14/2011 08:55 PM, Chris Diehl wrote:
>>     Hello,
>>
>>     I just successfully fired up my first cluster in short order which
>>     is brilliant!
>>
>>     My first step was to try and install additional modules so that I
>>     could save a custom AMI for future use. 
>>
>>     Doing an 'easy_install <packagename>' yielded:
>>
>>     -------------------------
>>
>>     error: can't create or remove files in install directory
>>
>>     The following error occurred while trying to add or remove files
>>     in the
>>     installation directory:
>>
>>         [Errno 13] Permission denied:
>>     '/usr/local/lib/python2.6/dist-packages/test-easy-install-5265.write-test'
>>
>>     The installation directory you specified (via --install-dir,
>>     --prefix, or
>>     the distutils default setting) was:
>>
>>         /usr/local/lib/python2.6/dist-packages/
>>
>>     Perhaps your account does not have write access to this directory?
>>      If the
>>     installation directory is a system-owned directory, you may need
>>     to sign in
>>     as the administrator or "root" account.  If you do not have
>>     administrative
>>     access to this machine, you may wish to choose a different
>>     installation
>>     directory, preferably one that is listed in your PYTHONPATH
>>     environment
>>     variable.
>>
>>     -------------------------
>>
>>     Does sgeadmin not have admin rights? Should I be able to install
>>     software at will without permissions issues?
>>
>>     Chris
>>
>>
>>
>>     _______________________________________________
>>     StarCluster mailing list
>>     StarCluster at mit.edu <mailto:StarCluster at mit.edu>
>>     http://mailman.mit.edu/mailman/listinfo/starcluster
> 
> 
>     _______________________________________________
>     StarCluster mailing list
>     StarCluster at mit.edu <mailto:StarCluster at mit.edu>
>     http://mailman.mit.edu/mailman/listinfo/starcluster
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1+2F0ACgkQ4llAkMfDcrmIUQCgjwAYW/u11uFbR3oBSHiAHxLx
8/8AoIjNpa27nPra3RvI7YWsxTQhVXwA
=jbKi
-----END PGP SIGNATURE-----



More information about the StarCluster mailing list