summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-March/003191.html
blob: 4ec563f89cd706b73b53bf4b5b475f8fd4b371f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-sysadm] Packaging puppet modules
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20Packaging%20puppet%20modules&In-Reply-To=%3C20110325010510.GB21938%40mars-attacks.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="003190.html">
   <LINK REL="Next"  HREF="003192.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-sysadm] Packaging puppet modules</H1>
    <B>nicolas vigier</B> 
    <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20Packaging%20puppet%20modules&In-Reply-To=%3C20110325010510.GB21938%40mars-attacks.org%3E"
       TITLE="[Mageia-sysadm] Packaging puppet modules">boklm at mars-attacks.org
       </A><BR>
    <I>Fri Mar 25 02:05:10 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="003190.html">[Mageia-sysadm] Some work to do on tx
</A></li>
        <LI>Next message: <A HREF="003192.html">[Mageia-sysadm] Packaging puppet modules
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#3191">[ date ]</a>
              <a href="thread.html#3191">[ thread ]</a>
              <a href="subject.html#3191">[ subject ]</a>
              <a href="author.html#3191">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hello,

We have now created a lot of puppet modules for different things used
on Mageia servers. And I think many of them could be useful for other
people installing servers. They are already available on our svn server,
but I think we can do something better, to make them easier to use.

When trying to use puppet modules from other people that I found on the
internet, I usually have the following problems :
 - modules are made for other distributions
 - modules have dependencies on other modules, and it is not easy to see
   which ones
 - sometimes they can have dependency on an other module doing something
   that you already do with a different module (for instance there is many
   different apache httpd modules)
 - modules come from unknow people, so you have to check them carefully
   before using them
 - you need to modify them to do what you want, because there often is
   a lot of hardcoded values everywhere

So I think it could be interesting to provide some modules for Mageia,
and distribute them as packages, doing the same as what we do for other
software.

We could do something like this :
 - one package per module
 - modules installed in /usr/share/puppet/modules
 - use rpm find-requires and find-provides to automatically manage
   dependencies between modules
 - remove any hardcoded values from modules, but use parameterised
   classes, so you don't have to modify modules to use them
 - setup puppet so that someone who wants to overwrite a module installed
   by a package can create one with the same name in /etc/puppet/modules.
   Or overwrite one template file.

Then people using Mageia will be able to install puppet modules that
are known to work with Mageia.

For instance, someone who wants to install a wordpress blog with a mysql
database on a second server could do something like this very quickly :

# urpmi puppet-wordpress puppet-mysql
# cat &gt; /etc/puppet/manifests/site.pp &lt;&lt;EOF
node server1 {
  class { mysql::server:
     dbtype =&gt; &quot;innodb&quot;
  }
  class { mysql::dbuser:
     dbuser =&gt; 'wordpress',
     dbpassword =&gt; 'password',
  }
}
node server2 {
  class { wordpress:
     hostname =&gt; 'blog.example.com',
     dbtype =&gt; 'mysql',
     dbhost =&gt; 'server1.example.com',
     dbuser =&gt; 'wordpress',
     dbpassword =&gt; 'password',
  }
}
EOF

Or someone who wants to setup a Mageia buildsystem to build his own
packages :
# urpmi puppet-mgabuildsystem
# cat &gt; /etc/puppet/manifests/site.pp &lt;&lt;EOF
node mainnode {
   class { mgabuildsystem::mainnode:
      distribname =&gt; &quot;My Distribution&quot;,
      domain =&gt; &quot;mydistribution.org&quot;,
      ...
   }
}
...
EOF

Those module could also be used locally by some tools. For instance if
we want to create a graphical tool like drakwizard, to setup some software
on a machine. This graphical interface would ask some parameters, then
install the corresponding puppet modules, generate a puppet file
containing the parameters entered and run puppet on it locally.

However compared to what we do currently :
 - it will be more work, to avoid hardcoding anything
 - modules can become more complexe if they support more things
 - we will have to be careful when changing API of released modules, or
   write it in release notes so users of the packages know what they need
   to change when updating to a newer release of the distribution.

So it is more work, but I think it can be worth it. We can maybe convince
other Mageia packagers to help write puppet modules for the software
they package.

A distribution providing puppet modules for many software would allow
someone to install one or many servers very quickly and easily, and I
think it would be very nice.

Maybe this is something that could be done for Mageia release 2 or later.
So I plan to try to see if/how this could be done.

What do you think ?

</PRE>







<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="003190.html">[Mageia-sysadm] Some work to do on tx
</A></li>
	<LI>Next message: <A HREF="003192.html">[Mageia-sysadm] Packaging puppet modules
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#3191">[ date ]</a>
              <a href="thread.html#3191">[ thread ]</a>
              <a href="subject.html#3191">[ subject ]</a>
              <a href="author.html#3191">[ 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>