[rhos-list] cloud-init configuration for ssh access

David Raddatz draddatz at sgi.com
Fri Oct 18 20:06:37 UTC 2013


Note, on a whim, I edited the /etc/cloud/cloud.cfg file in my RH instance to change disable_root from 1 to 0 and I was able to then ssh into the instance as root (before it would say that I should use cloud-user).

So, I think that answers most, if not all, of my questions.  (I commented out the disable_root: 1 line using the # sign and added disable_root: 0).

I don't think I need to add cloud-tester under "users:" now based on this either.

Dave

> -----Original Message-----
> From: rhos-list-bounces at redhat.com [mailto:rhos-list-
> bounces at redhat.com] On Behalf Of David Raddatz
> Sent: Friday, October 18, 2013 2:57 PM
> To: Lars Kellogg-Stedman
> Cc: rhos-list at redhat.com
> Subject: Re: [rhos-list] cloud-init configuration for ssh access
> 
> Hello,
> 
> I'm editing the /etc/cloud/cloud.cfg file (there was no /etc/cloudinit/
> directory or file) that cloud-init installed and want to check on a couple
> things:
> 
> Is there a way to comment things out? (the # sign is my guess)
> 
> Near the top it has
> 	users:
> 	 - default
> 
> Do I need to add "- root" if I want to allow root to login as well?  OR, do I just
> change disable_root: from 1 to 0?
> 
> Under "system_info:", there is a "default_user:" section with cloud-user.  I
> just renamed that so I wouldn't confused for when I was using the rh image
> or my image (used cloud-tester for my image).  Do I need to add cloud-tester
> under "users:" or should I be OK since I made that user the default.
> 
> Thanks for all the help so far,
> Dave
> 
> > -----Original Message-----
> > From: Lars Kellogg-Stedman [mailto:lars at redhat.com]
> > Sent: Friday, October 18, 2013 11:57 AM
> > To: David Raddatz
> > Cc: rhos-list at redhat.com
> > Subject: Re: [rhos-list] rhos-list Digest, Vol 15, Issue 8
> >
> > On Fri, Oct 18, 2013 at 04:42:04PM +0000, David Raddatz wrote:
> > > a.       Install it on my “host” or controller node OR is it on the
> > > VM that I’m using to create an image from?
> >
> > You install it *inside your instance*.  cloud-init will fetch an ssh
> > key from the metadata server and place it on the instance filesystem
> > in an appropriate account.
> >
> > > a.       Anything in particular that I need to configure or will it
> > > be self-evident once I edit the file?
> >
> > You probably won't have to edit much to get things working.  You may
> > want to change the name of the user that it creates and/or provisions,
> > which depending on what vintage of cloud-init you have may default to
> > "ec2-user", "fedora", or "cloud-user".
> >
> > > a.       Just to make sure - this is done using glance image-create
> > > I assume - right?
> >
> > Yes.  After getting your image into a state that you're happy with it,
> > you use `glance image-create` to upload the image to OpenStack so that
> > you can deploy instances from it.
> >
> > > I also assume that I need to run virt-sysprep after I set up my VM
> > > image that I’m creating to use as the OpenStack image - is that
> > > correct?
> >
> > It's probably a good idea.  I have never run virt-sysprep, but I
> > probably take of things manually the virt-sysprep will do for you
> > automatically (e.g., removing MAC addresses from network configuration
> files, etc).
> >
> > > a.       I hope it works!
> >
> > > Now, will this work with the root user as well as a non-root user?
> >
> > What do you mean?  You can configure cloud-init to provision either a
> > non- root user or the root user.  If you provision a non-root user,
> > you'll probably want to arrange for that user to have sudo privileges
> > (this is the typical configuration).
> >
> > You may want to start by grabbing one of the pre-build cloud images
> > from
> > here:
> >
> > - http://fedoraproject.org/en/get-fedora-options#clouds
> >
> > You can use this to see how things work when they're already configured.
> >
> > --
> > Lars Kellogg-Stedman <lars at redhat.com>
> 
> _______________________________________________
> rhos-list mailing list
> rhos-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rhos-list




More information about the rhos-list mailing list