/srv/irclogs.ubuntu.com/2016/01/07/#cloud-init.txt

openstackgerritMerged openstack/cloud-init: It seems like httppretty 0.8.11 and 0.8.12 are broken  https://review.openstack.org/26446400:06
=== smatzek_ is now known as smatzek
smoserharlowja, no. got cancelled.14:15
=== cpaelzer is now known as cpaelzer_afk
=== devicenull_ is now known as devicenull
=== shardy is now known as shardy_afk
SuperLagI'm attempting to make a VMware VM that we can use anywhere. Currently "anywhere" means either a vSphere box, or AWS. When I export the VM to OVA, and then import to EC2, keys don't work. I've learned that cloud-init handles the piece of injecting the configuration when you bring up the instance the first time. I'm creating a user data file. I'm just not sure a. if I'm doing it right, and b. where to19:55
SuperLagput it / how to make sure the config gets applied, when I start the instance. I'm using RHEL 7.2 Server, btw.19:55
SuperLagI've got a start of the user-data file at http://pastebin.com/egBRbR7G19:55
larsksSuperLag: amazon has some docs on this at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html19:58
larsksSuperLag: Also of interest: http://stackoverflow.com/questions/22204001/how-does-ec2-install-the-public-key-from-your-keypair20:00
=== cpaelzer is now known as cpaelzer_afk
smatzekSuperLag:  heads up, change lock-passwd: false to lock_passwd: false20:28
smatzekSuperLag:  https://bugs.launchpad.net/cloud-init/+bug/153158220:29
SuperLagsmatzek: thank you20:42
SuperLagstill going through the config file20:42
SuperLagSo cloud-init is ran once on first boot, right? Do I understand that right? Is there way to reset its status to "never ran", so I don't have to spin up multiple instances for testing?20:46
larsksSuperLag: Sure.  You can just remove /var/lib/cloud/instances/*20:52
larsksYou can also run individual modules directly, but I always need to look up the syntax for that.20:52
SuperLaglarsks: so far, I just want to set up a user, and make sure SSH works.20:56
SuperLaglarsks: couldn't find mkpasswd to do a password hash, on OS X.20:59
larsksYou could (arguably, should) just rely on ssh keys rather than worrying about passwords.  I don't think I even have mkpasswd on my linux box.21:01
larsksFor just getting started, you should be able to rely on the existing user, and just use key-based login.  In this case, you don't even need to provide a user-data file.21:01
SuperLagthat's the goal, no password login, only keys... but I'm afraid to enable it yet, for fear that I'll get locked out (again)21:02
SuperLaglarsks: I haven't gotten it working, on multiple attempts21:02
SuperLagbut I wasn't using cloud-init at that point21:02
SuperLagso how do I populate keys, if not with the user-data file?21:02
larsksYou create (or import) ssh keys into amazon, where cloud-init will find them and use them for the default user (which differs by distro...on rhel7, should be "cloud-user").  http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html21:04
larsksWhen you launch an instance, you tell it which keypair to use.21:05
SuperLaggah21:08
SuperLagI didn't know you could import your own keypair. *sigh*21:08
SuperLagI'm going to go bury my head in the sand somewhere.21:08
SuperLagNope. See it's still asking for a password.21:18
SuperLagOkay. Confused.21:19
SuperLagyou said the user for RHEL should be cloud-user21:19
SuperLagand *that* works21:20
SuperLagand even if I copy the authorized_keys file from ~cloud-user/.ssh/ to ~my-user/.ssh/ it *still* doesn't work21:23
SuperLagI don't get it21:23
=== shardy_afk is now known as shardy
SuperLagDo I need anything more involved than this? http://pastebin.com/3tDptjJC23:37
SuperLagAm I leaving something out?23:38

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!