diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-sysadm/2010-October/000065.html | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-October/000065.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2010-October/000065.html | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2010-October/000065.html b/zarb-ml/mageia-sysadm/2010-October/000065.html new file mode 100644 index 000000000..b1881efe6 --- /dev/null +++ b/zarb-ml/mageia-sysadm/2010-October/000065.html @@ -0,0 +1,189 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-sysadm] ssh keys + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20ssh%20keys&In-Reply-To=%3C1288104395.4401.141.camel%40akroma.ephaone.org%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000074.html"> + <LINK REL="Next" HREF="000082.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-sysadm] ssh keys</H1> + <B>Michael Scherer</B> + <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20ssh%20keys&In-Reply-To=%3C1288104395.4401.141.camel%40akroma.ephaone.org%3E" + TITLE="[Mageia-sysadm] ssh keys">misc at zarb.org + </A><BR> + <I>Tue Oct 26 16:46:35 CEST 2010</I> + <P><UL> + <LI>Previous message: <A HREF="000074.html">[Mageia-sysadm] ssh keys +</A></li> + <LI>Next message: <A HREF="000082.html">[Mageia-sysadm] ssh keys +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#65">[ date ]</a> + <a href="thread.html#65">[ thread ]</a> + <a href="subject.html#65">[ subject ]</a> + <a href="author.html#65">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Le lundi 25 octobre 2010 à 22:04 +0200, Michael Scherer a écrit : +><i> Hi fellow admins, +</I>><i> +</I>><i> In order to let you rui^W crash^W manage the server like I did, I need +</I>><i> your ssh keys to be sent here. +</I>><i> +</I>><i> So if you didn't already do ( ie, if you are not nanar, not coincoin and +</I>><i> not me ), please sent it to me. +</I> +I have added the keys that were sent to me in puppet ( without svn or +anything yet, nothing fancy ). + +So, a quick ( well, not so quick ) explanation of what I did : +1) setup puppetmaster ( ie, the reference ) on valstar : + + urpmi puppet-server + create some files in /etc/puppet/manifests/ + + site.pp , who just reference the 2 others : + + [<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">root at valstar</A> manifests]# ls + common.pp nodes.pp site.pp + [<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">root at valstar</A> manifests]# cat site.pp + import "common" + import "nodes" + + nodes.pp (arbitrary name ) contains the list of nodes, and their + class ( here, only one class, default_mageia_server, defined in +common ): + + node alamut { + include default_mageia_server + } + +in common.pp, we have this class : + +class default_mageia_server { + include default_ssh_root_key + include base_packages +} + +which lead me to the 2 first type of thing we will do with puppet +1) packages installation : + +class base_packages { + + $package_list = ['screen', 'vim-enhanced'] + + package { $package_list: + ensure => installed; + } +} + +basically, this mean that screen and vim-enhanced will be installed by +default, using urpmi ( or the appropriate tool depending on the OS ), on +every server. Add packages if needed, please keep the comment I have +added about who requested what and why, if not obvious ( first one to +install kde will be killed so hard that even his ancestors will die (tm) +sinfest ). + +We can also use this to ensure a package is never installed ( just cut +and past the class, and change the list, and the ensure value. See +puppet doc for that . + +2) ssh_keys installation. + +Like packages, there is a type for ssh keys : + +class default_ssh_root_key { + ssh_authorized_key { "ssh key misc": + type => "ssh-rsa", + key => "insert-real-long-key-here", + user => "root" + } + ssh_authorized_key { "ssh key blino": + type => "ssh-dss", + key => "insert-real-longer-and-stronger-bigger-blino-key-here", + user => "root" + } +} + +this mean that my key ( and blino's one ) is added to the proper file +directly, with correct permission. I have added blino, nanar, dmorgan, +coling, dams and me. Others didn't send it yet. + + +that's for the basic part. Puppetmaster reload itself when it detect the +config change. And it refuse invalid config in case of problem as does +the puppet agent on each node. + + +So next, on each server ( the 4 one in LO, I am taking care of the gandi +vm as soon as I finished to write this mail ), I have setup the puppet +agent : + + +2) setup puppet +for each node : + + urpmi puppet + vim /etc/puppet/puppet.conf ( add a "server = valstar.mageia.org" + entry in [puppetd], will likely be taken care by puppet itself + later ) + service puppet start + +on valstar, to authenticate the request ( ie, when puppet is started, it +exchanges ssl certs with the master to encrypt future exchange ). + +puppetca --list +puppetca --sign server + +on the node that just signed : +tail -f /var/log/messages, see there is no error, and test that we can +still connect as root. +Beware, this changed with puppet 2.6 some months ago, so i suggest +people to read the documentation if they read this mail after the end of +2010 :). + +If you have any questions on how to use puppet after this quick +introduction, do not hesitate to ping me on irc, or better here so +everybody will get the answer. + + +-- +Michael Scherer + +</PRE> + + + + + + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000074.html">[Mageia-sysadm] ssh keys +</A></li> + <LI>Next message: <A HREF="000082.html">[Mageia-sysadm] ssh keys +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#65">[ date ]</a> + <a href="thread.html#65">[ thread ]</a> + <a href="subject.html#65">[ subject ]</a> + <a href="author.html#65">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm +mailing list</a><br> +</body></html> |