Re: Custom AMI .ssh directories disappearing on restart
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
- application/pgp-signature attachment: stored
Received on Wed May 16 2012 - 14:38:04 EDT
This archive was generated by
hypermail 2.3.0.