[StarCluster] Custom AMI .ssh directories disappearing on restart
danny jacobs
wheresmytab at gmail.com
Wed May 16 14:58:07 EDT 2012
Yep. I've got it working now.
Mount your own home drive, create users once, profit.
I've started and stopped several times, all is roses.
Thanks for this awesome thing!
~Danny
On Wed, May 16, 2012 at 6:38 PM, Justin Riley <jtriley at mit.edu> wrote:
> The plugin needs to run each time you start the cluster in order to
> create the users on all nodes. User accounts are not baked into the AMIs
> so they must be created everytime you launch a cluster. If the $HOME
> folder already exists when creating the user it is reused along with any
> existing ssh keys. Make sense?
>
> ~Justin
>
> On Mon, May 07, 2012 at 09:05:52AM -0600, danny jacobs wrote:
>> Hi Justin,
>>
>> Mounting my own /home makes sense, but why do I want to run the
>> createusers plugin each time I start the server?
>>
>> Thanks
>> ~Danny
>>
>> On Mon, May 7, 2012 at 8:44 AM, Justin Riley <justin.t.riley at gmail.com> wrote:
>> > Hi Danny,
>> >
>> > First of all if you always want to use the same SSH keys for all 30
>> > users you need to specify an EBS volume for StarCluster to attach,
>> > mount, and NFS-share on /home, e,g:
>> >
>> > [volume myhome]
>> > volume_id = vol-923923
>> > mount_path = /home
>> >
>> > [cluster smallcluster]
>> > ...
>> > volumes = myhome
>> >
>> > This will preserve the entire /home folder when the cluster is
>> > terminated. The next time the cluster is started, using the
>> > 'smallcluster' template above, the /home folder will be reattached and
>> > the SSH keys will be reused by the createusers plugin.
>> >
>> > Concerning the 'disappearing' of .ssh I'm guessing you ran the plugin
>> > using the 'runplugin' command which does a quick one-time run of the
>> > plugin. In general if you wish to use a plugin every time you start a
>> > cluster you need to put the plugin in one of your cluster template's
>> > plugins list, e.g.:
>> >
>> > [cluster smallcluster]
>> > ...
>> > volumes = myhome
>> > plugins = createusers
>> >
>> > Hope that helps,
>> >
>> > ~Justin
>> >
>> > On 5/4/12 9:35 PM, danny jacobs wrote:
>> >> Hi Everyone,
>> >>
>> >> Background:
>> >> I created my own EBS-backed AMI by copying one of the starcluster AMIs
>> >> in the way described in the docs. ie
>> >>
>> >> starcluster start -o -s 1 -i m1.large -n ami-999d49f0 imagehost
>> >> <installed some stuff>
>> >> starcluster ebsimage <ami id> myami
>> >>
>> >> Then I substituted the output ami id into the starcluster config file,
>> >> Node_IMAGE_ID = <myami id>
>> >>
>> >> and started up a cluster with my new ami
>> >> Finally I ran the createusers plugin (with the 30 users example).
>> >>
>> >> Problem:
>> >> I am able to connect as any of the new users with the ssh keys
>> >> automatically downloaded as a tarball; all is well.
>> >> But when I terminate and then restart a new instance of the cluster,
>> >> the .ssh directories are gone. The userXXX directories are still
>> >> there but no more userXXX/.ssh.
>> >>
>> >> Is this supposed to be? What am I doing wrong?
>> >>
>> >>
>> >> Thanks,
>> >> ~Danny
>> >>
>> >> Arizona State University
>> >> School of Earth and Space Exploration
>> >> Low Frequency Cosmology
>> >> Phone: (505) 500 4521
>> >> Homepage: http://loco.lab.asu.edu/~jacobs/
>> >>
>> >> _______________________________________________
>> >> StarCluster mailing list
>> >> StarCluster at mit.edu
>> >> http://mailman.mit.edu/mailman/listinfo/starcluster
>> >
>>
>>
>>
>> --
>> ~Danny
>>
>> Arizona State University
>> School of Earth and Space Exploration
>> Low Frequency Cosmology
>> Phone: (505) 500 4521
>> Homepage: http://loco.lab.asu.edu/~jacobs/
>>
>> _______________________________________________
>> StarCluster mailing list
>> StarCluster at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/starcluster
--
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Danny Jacobs
Dept. of Physics and Astronomy
University of Pennsylvania
209 South 33rd Street
Philadelphia, PA 19104-6396
-------------------------------------------------
Office: Rittenhouse Lab - 1n2a
Phone: (215) 280-7357
Fax: (215) 898-2010
Homepage: http://dannycjacobs.googlepages.com
More information about the StarCluster
mailing list