openstackgerrit | Merged openstack/cloud-init: It seems like httppretty 0.8.11 and 0.8.12 are broken https://review.openstack.org/264464 | 00:06 |
---|---|---|
=== smatzek_ is now known as smatzek | ||
smoser | harlowja, 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 | ||
SuperLag | I'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 to | 19:55 |
SuperLag | put it / how to make sure the config gets applied, when I start the instance. I'm using RHEL 7.2 Server, btw. | 19:55 |
SuperLag | I've got a start of the user-data file at http://pastebin.com/egBRbR7G | 19:55 |
larsks | SuperLag: amazon has some docs on this at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html | 19:58 |
larsks | SuperLag: Also of interest: http://stackoverflow.com/questions/22204001/how-does-ec2-install-the-public-key-from-your-keypair | 20:00 |
=== cpaelzer is now known as cpaelzer_afk | ||
smatzek | SuperLag: heads up, change lock-passwd: false to lock_passwd: false | 20:28 |
smatzek | SuperLag: https://bugs.launchpad.net/cloud-init/+bug/1531582 | 20:29 |
SuperLag | smatzek: thank you | 20:42 |
SuperLag | still going through the config file | 20:42 |
SuperLag | So 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 |
larsks | SuperLag: Sure. You can just remove /var/lib/cloud/instances/* | 20:52 |
larsks | You can also run individual modules directly, but I always need to look up the syntax for that. | 20:52 |
SuperLag | larsks: so far, I just want to set up a user, and make sure SSH works. | 20:56 |
SuperLag | larsks: couldn't find mkpasswd to do a password hash, on OS X. | 20:59 |
larsks | You 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 |
larsks | For 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 |
SuperLag | that'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 |
SuperLag | larsks: I haven't gotten it working, on multiple attempts | 21:02 |
SuperLag | but I wasn't using cloud-init at that point | 21:02 |
SuperLag | so how do I populate keys, if not with the user-data file? | 21:02 |
larsks | You 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.html | 21:04 |
larsks | When you launch an instance, you tell it which keypair to use. | 21:05 |
SuperLag | gah | 21:08 |
SuperLag | I didn't know you could import your own keypair. *sigh* | 21:08 |
SuperLag | I'm going to go bury my head in the sand somewhere. | 21:08 |
SuperLag | Nope. See it's still asking for a password. | 21:18 |
SuperLag | Okay. Confused. | 21:19 |
SuperLag | you said the user for RHEL should be cloud-user | 21:19 |
SuperLag | and *that* works | 21:20 |
SuperLag | and even if I copy the authorized_keys file from ~cloud-user/.ssh/ to ~my-user/.ssh/ it *still* doesn't work | 21:23 |
SuperLag | I don't get it | 21:23 |
=== shardy_afk is now known as shardy | ||
SuperLag | Do I need anything more involved than this? http://pastebin.com/3tDptjJC | 23:37 |
SuperLag | Am I leaving something out? | 23:38 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!