On Sat, Apr 12, 2014 at 12:49 PM, Akila Ravihansa Perera <[email protected]
> wrote:

> Hi Nirmal,
>
> We don't need zip/unzip to install Puppet. Actually I managed to install a
> default node without zip/unzip by adding package { 'unzip': ensure =>
> installed } to Puppet Java module.
>

Well, we still need wget? :-)

>
> What I'm trying to address is the redundant code in current Puppet master
> module structure. Currently we have "require java", class {'agent':} on
> each module, which can be avoided by creating a base module and other
> modules can inherit stuff from this.
>
> For eg. php module has  package { 'zip': ensure => installed }
> dependency, and also Java module need this package as well. Instead of
> putting these common tools in individual classes we can create a base class
> and others will inherit stuff from this.
>

:-) if you check the nodes.pp file, we already leverage puppet inheritance.

>
> If you're interested, I can create a patch for this to be reviewed.
>

It's better if you test it fully for all the existing scenarios
(judgemental) and I think these improvements can go for 4.1 but not for
4.0, since we're wrapping up 4.0 and this is not a blocker.

>
>
> On Sat, Apr 12, 2014 at 12:17 PM, Nirmal Fernando 
> <[email protected]>wrote:
>
>> Hi Akila,
>>
>> If you have a look at the current nodes.pp file, Dinesh have already
>> added a default section, which will be used to create a base image with
>> minimal software (without wget, zip).
>>
>> What problems you are trying to address here? Is it to avoid the
>> redundant code in nodes.pp file? Cause to install puppet you need these
>> wget etc. packages, hence no point of adding it in the default node.
>>
>>
>>
>> On Sat, Apr 12, 2014 at 11:15 AM, Akila Ravihansa Perera <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I was thinking that we could simplify cartridge creation process by
>>> creating a base Puppet module which would install common tools like zip,
>>> unzip, tar, wget and also include Java module in this base module.
>>>
>>> Basically, the module structure will be like this (not tested);
>>>
>>> node /base/ {
>>>
>>>     <declarations here>
>>>
>>> }
>>>
>>>
>>> class base {
>>>
>>>    package { 'unzip': ensure => installed }
>>>    package { 'tar': ensure => installed }
>>>    package { 'wget': ensure => installed }
>>>
>>>    class {'java'}
>>>    class {'agent':}
>>>
>>>    Class['java'] ~> Class['agent']
>>>
>>> }
>>>
>>>
>>> Then other Stratos module can include this
>>>
>>> node /lb/ inherits base {
>>>   class {'lb': maintenance_mode   => 'norestart',}
>>> }
>>>
>>> This will remove lot of redundancy and ugly dependencies we have
>>> now....WDYT?
>>>
>>>
>>> --
>>> Akila Ravihansa Perera
>>> Software Engineer
>>> WSO2 Inc.
>>> http://wso2.com
>>>
>>> Phone: +94 77 64 154 38
>>> Blog: http://ravihansa3000.blogspot.com
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Akila Ravihansa Perera
> Software Engineer
> WSO2 Inc.
> http://wso2.com
>
> Phone: +94 77 64 154 38
> Blog: http://ravihansa3000.blogspot.com
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to