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

Lars Kellogg-Stedman lars at redhat.com
Fri Oct 18 20:17:49 UTC 2013


On Fri, Oct 18, 2013 at 07:57:10PM +0000, David Raddatz wrote:
> Is there a way to comment things out? (the # sign is my guess)

Yes.  This file uses YAML syntax (http://en.wikipedia.org/wiki/YAML),
which uses '#' as a comment character.

You'll find lots of cloud-init documentation here:

  http://cloudinit.readthedocs.org/en/latest/index.html

(Although note that this documents the most recent version
of cloud-init, while the version in EPEL seems to be behind a few
revs.  A cursory look at the examples suggests that they're still
relevant.)

> 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?

When `disable_root` is `1`, then when you try to log into your system
as root using your ssh key you will see this message:

  Please login as the user "cloud" rather than the user "root".

(Where "cloud" is whatever user was provisioned by cloud-init)

Having `disable_root` set to 0 basically means "do nothing to the root
account".

> 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.

I believe the `- default` entry in the `users` section will cause
cloud-init to set up the `default_user` in the `system_info` section.
I have never actually bothered trying to modify this so consider this
conjecture on my part.

This page has example of creating additional users via cloud-init:

  http://cloudinit.readthedocs.org/en/latest/topics/examples.html

Note that if you're building your own image, you may also want to add
dracut-modules-growroot.noarch and rebuilding your initramfs.
If you're using a simple partitioning scheme, this module will edit
your partition table to expand the partition containing your root
filesystem so that it fills the disk.  This allows you (or Fedora, or
Ubuntu) to distribute a small cloud image and then deploy it onto a
much larger disk and be able to take advantage of the extra space.

-- 
Lars Kellogg-Stedman <lars at redhat.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/rhos-list/attachments/20131018/caee726a/attachment.sig>


More information about the rhos-list mailing list