Hi Rajkumar, could option 1 be scripted so that it can be automated?
On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <rajkum...@wso2.com> wrote:

> Hi,
>
> I have done PostgreSQL cartridge without changing anything in puppetforge
> modules. AFAIK, Lasindu did Nodejs cartridge without changing anything. We
> can use the exact same module most of the time.
>
> However, I can't 100% sure that we don't have to change anything. We may
> need to change for some other modules in future. We have 3 solutions,
>
> 1. Document the changes to be done once modules are downloaded.
> 2. Include such modules in stratos code base.
> 3. We can provide an external repository to puppet module tool, to search
> and download puppet modules. We can host such modules in an external
> repository and ask puppet module tool to download from there.
>
> IMO, including such modules in stratos code base is not a good idea. It
> will create lots of issues.
>
> We can go for either 1 or 3.
>
> WDYT?
>
> Is there any alternative to it?
>
> Thanks.
>
>
> On Saturday, August 9, 2014, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi Rajkumar,
>>
>> Once the puppet module is downloaded, do we apply any changes on top of
>> it? If so how do we do it?
>>
>> Thanks
>>
>>
>> On Tue, Aug 5, 2014 at 12:58 PM, Dale Chalfant <
>> dchalf...@greaterbrain.com> wrote:
>>
>>> Keep it decoupled as suggested below has its advantages.
>>>
>>> -----Original Message-----
>>> From: chris snow [mailto:chsnow...@gmail.com]
>>> Sent: Tuesday, August 05, 2014 9:39 AM
>>> To: dev
>>> Subject: Re: PostgreSQL Cartridge for Apache Stratos
>>>
>>> Hi Devs - does anyone else have a view on this approach?
>>>
>>> On Tue, Aug 5, 2014 at 2:37 PM, Rajkumar Rajaratnam <rajkum...@wso2.com>
>>> wrote:
>>> > Hi Chris,
>>> >
>>> > I will come up with a solution using puppet module tool.
>>> >
>>> > Thanks.
>>> >
>>> >
>>> > On Tue, Aug 5, 2014 at 6:47 PM, chris snow <chsnow...@gmail.com>
>>> wrote:
>>> >>
>>> >> Hi Rajkumar - using the puppet module tool makes more sense to me.
>>> >>
>>> >> On Tue, Aug 5, 2014 at 10:46 AM, Rajkumar Rajaratnam
>>> >> <rajkum...@wso2.com>
>>> >> wrote:
>>> >> > Hi Chris,
>>> >> >
>>> >> > Yes, it is maintained in git repo too.
>>> >> >
>>> >> > What if we do like this.
>>> >> >
>>> >> > Let's not include any of the puppet forge modules in Apache Stratos.
>>> >> >
>>> >> > There is something called "puppet module tool" [1] in puppet. We
>>> >> > can use this to download puppet forge modules.
>>> >> >
>>> >> > While we install puppet master, we can use this "puppet module
>>> >> > tool" to download whatever puppet forge modules we need, and put
>>> >> > them into modules directory automatically.
>>> >> >
>>> >> > This way, we don't need to include any of the puppet forge modules
>>> >> > in stratos code base and we are guarantee to have the latest puppet
>>> >> > forge modules too.
>>> >> >
>>> >> > 1.
>>> >> >
>>> >> > https://docs.puppetlabs.com/puppet/latest/reference/modules_install
>>> >> > ing.html
>>> >> >
>>> >> > Thanks.
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <chsnow...@gmail.com>
>>> wrote:
>>> >> >>
>>> >> >> Hi Rajkumar, that is still quite a lot of files for the team to
>>> >> >> keep in sync with upstream.  Are the upstream files in a git repo?
>>> >> >> Are the upstream files modified for stratos or just copied without
>>> >> >> any change?
>>> >> >>
>>> >> >> On Tue, Aug 5, 2014 at 9:55 AM, Rajkumar Rajaratnam
>>> >> >> <rajkum...@wso2.com>
>>> >> >> wrote:
>>> >> >> > Hi,
>>> >> >> >
>>> >> >> > I have removed all test files and meta data files that we don't
>>> need.
>>> >> >> > Number
>>> >> >> > of files are 200 now.
>>> >> >> >
>>> >> >> > These are the basic/utility modules from Puppet Laps.
>>> >> >> >
>>> >> >> > puppetlabs/stdlib
>>> >> >> > puppetlabs/apt
>>> >> >> > puppetlabs/concat
>>> >> >> >
>>> >> >> > Almost every single puppet module in puppet forge has
>>> >> >> > dependencies to one or more of these utility modules.
>>> >> >> >
>>> >> >> > PostgreSQL also depends on these utility modules.
>>> >> >> >
>>> >> >> > We may not need to include any additional modules if we are
>>> >> >> > utilizing any other modules in future.
>>> >> >> >
>>> >> >> > For example, if we are using their nodejs module, it also has
>>> >> >> > these dependencies. Hence, IMO, it is worth to have these
>>> modules.
>>> >> >> >
>>> >> >> > Pull request is updated now.
>>> >> >> >
>>> >> >> > https://github.com/apache/stratos/pull/10
>>> >> >> >
>>> >> >> > Someone may review it.
>>> >> >> >
>>> >> >> > If this is not the right way of doing, lets discuss for an
>>> >> >> > alternative.
>>> >> >> >
>>> >> >> > Thanks.
>>> >> >> >
>>> >> >> >
>>> >> >> > On Mon, Aug 4, 2014 at 11:15 PM, Rajkumar Rajaratnam
>>> >> >> > <rajkum...@wso2.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> And,
>>> >> >> >>
>>> >> >> >> 672 files are new files. Changed only nodes.pp
>>> >> >> >>
>>> >> >> >> Thanks.
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> On Mon, Aug 4, 2014 at 11:09 PM, Rajkumar Rajaratnam
>>> >> >> >> <rajkum...@wso2.com>
>>> >> >> >> wrote:
>>> >> >> >>>
>>> >> >> >>> Hi Akila,
>>> >> >> >>>
>>> >> >> >>> I am using PostgreSQL puppet module from Puppet Laps. This
>>> >> >> >>> module has dependency to another 4 modules of them. We need to
>>> >> >> >>> have all. We can edit their modules and remove unwanted files.
>>> >> >> >>> But it will be very hard to sync with their libraries in
>>> >> >> >>> future (for example, if we want to update their modules, we
>>> >> >> >>> may have to do it manually again).
>>> >> >> >>>
>>> >> >> >>> Actually 664 files are coming from their libraries. What
>>> >> >> >>> should I do?
>>> >> >> >>>
>>> >> >> >>> Thanks.
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>> On Mon, Aug 4, 2014 at 10:58 PM, Akila Ravihansa Perera
>>> >> >> >>> <raviha...@wso2.com> wrote:
>>> >> >> >>>>
>>> >> >> >>>> Hi Rajkumar,
>>> >> >> >>>>
>>> >> >> >>>> Nice work.
>>> >> >> >>>>
>>> >> >> >>>> But there are 673 files changed in your PR. Something is not
>>> >> >> >>>> right.
>>> >> >> >>>> Can you create a JIRA for this and attach the patch?
>>> >> >> >>>>
>>> >> >> >>>> Thanks.
>>> >> >> >>>>
>>> >> >> >>>> On Mon, Aug 4, 2014 at 10:39 PM, Rajkumar Rajaratnam
>>> >> >> >>>> <rajkum...@wso2.com> wrote:
>>> >> >> >>>> > Hi,
>>> >> >> >>>> >
>>> >> >> >>>> > Pull request link is
>>> >> >> >>>> > https://github.com/apache/stratos/pull/10
>>> >> >> >>>> >
>>> >> >> >>>> > Thanks.
>>> >> >> >>>> >
>>> >> >> >>>> >
>>> >> >> >>>> > On Mon, Aug 4, 2014 at 10:35 PM, Rajkumar Rajaratnam
>>> >> >> >>>> > <rajkum...@wso2.com>
>>> >> >> >>>> > wrote:
>>> >> >> >>>> >>
>>> >> >> >>>> >> Hi Devs,
>>> >> >> >>>> >>
>>> >> >> >>>> >> I have created a PostgreSQL cartridge [3] for Apache
>>> Stratos.
>>> >> >> >>>> >> It
>>> >> >> >>>> >> consists
>>> >> >> >>>> >> of 2 modules.
>>> >> >> >>>> >>
>>> >> >> >>>> >> PostgreSQL server
>>> >> >> >>>> >> phpPgAdmin web interface
>>> >> >> >>>> >>
>>> >> >> >>>> >>
>>> >> >> >>>> >> PostgreSQL server
>>> >> >> >>>> >>
>>> >> >> >>>> >> I have utilized PostgreSQL puppet module [1] from puppet
>>> >> >> >>>> >> laps and plugged in my phpPgAdmin module[2] to come up
>>> >> >> >>>> >> with a PostgreSQL cartridge.
>>> >> >> >>>> >>
>>> >> >> >>>> >> Puppet laps' PostgreSQL module has several great features.
>>> >> >> >>>> >> Some of them are,
>>> >> >> >>>> >>
>>> >> >> >>>> >> configure and manage PostgreSQL server (for example, who
>>> >> >> >>>> >> can access and/or from where) creating and managing
>>> >> >> >>>> >> databases managing users, roles and permissions install
>>> >> >> >>>> >> PostgreSQL bindings for languages such as java (JDBC),
>>> >> >> >>>> >> Perl and Python.
>>> >> >> >>>> >>
>>> >> >> >>>> >> There are more, you may refer [1] for the complete
>>> >> >> >>>> >> documentation.
>>> >> >> >>>> >>
>>> >> >> >>>> >> phpPgAdmin Web Interface
>>> >> >> >>>> >>
>>> >> >> >>>> >> I have developed a phpPgAdmin puppet module [2] for
>>> >> >> >>>> >> PostgreSQL server management through browsers.
>>> >> >> >>>> >>
>>> >> >> >>>> >> Usage
>>> >> >> >>>> >>
>>> >> >> >>>> >> Everything is documented in more detail here [3].
>>> >> >> >>>> >>
>>> >> >> >>>> >> Sample cartridge deployment would looks like below in an
>>> >> >> >>>> >> openstack environment,
>>> >> >> >>>> >>
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "type": "postgresql",
>>> >> >> >>>> >> "provider": "data",
>>> >> >> >>>> >> "host": "stratos.com",
>>> >> >> >>>> >> "displayName": "postgresql",
>>> >> >> >>>> >> "description": "postgresql Cartridge",
>>> >> >> >>>> >> "version": "9.1",
>>> >> >> >>>> >> "multiTenant": "false",
>>> >> >> >>>> >> "portMapping": [
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "protocol": "http",
>>> >> >> >>>> >> "port": "5432",
>>> >> >> >>>> >> "proxyPort": "80"
>>> >> >> >>>> >> }
>>> >> >> >>>> >> ],
>>> >> >> >>>> >> "deployment": {},
>>> >> >> >>>> >> "iaasProvider": [
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "type": "openstack",
>>> >> >> >>>> >> "imageId":
>>> >> >> >>>> >> "RegionOne/f2ddf72a-4e76-4893-a9fa-e5f4352f1a86",
>>> >> >> >>>> >> "property": [
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "name": "instanceType",
>>> >> >> >>>> >> "value": "RegionOne/3"
>>> >> >> >>>> >> },
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "name": "keyPair",
>>> >> >> >>>> >> "value": "raj-openstack"
>>> >> >> >>>> >> },
>>> >> >> >>>> >> {
>>> >> >> >>>> >> "name": "securityGroups",
>>> >> >> >>>> >> "value": "all-open"
>>> >> >> >>>> >> }
>>> >> >> >>>> >> ]
>>> >> >> >>>> >> }
>>> >> >> >>>> >> ]
>>> >> >> >>>> >> }
>>> >> >> >>>> >>
>>> >> >> >>>> >> Sample node definition (in nodes.pp) would looks like,
>>> >> >> >>>> >>
>>> >> >> >>>> >> # postgresql cartridge node node /postgresql/ inherits
>>> >> >> >>>> >> base { require java class {'agent':}
>>> >> >> >>>> >>
>>> >> >> >>>> >> class { 'postgresql::server':
>>> >> >> >>>> >> ip_mask_deny_postgres_user => '0.0.0.0/32',
>>> >> >> >>>> >> ip_mask_allow_all_users => '0.0.0.0/0', listen_addresses
>>> >> >> >>>> >> => '*', manage_firewall => true, postgres_password =>
>>> >> >> >>>> >> 'postgres'
>>> >> >> >>>> >> }
>>> >> >> >>>> >>
>>> >> >> >>>> >> postgresql::server::db { 'stratos-postgres-sample':
>>> >> >> >>>> >> user => 'root',
>>> >> >> >>>> >> password => postgresql_password('root', 'root'), }
>>> >> >> >>>> >>
>>> >> >> >>>> >> class {'phppgadmin':
>>> >> >> >>>> >> db_host => 'localhost',
>>> >> >> >>>> >> db_port => '5432',
>>> >> >> >>>> >> owned_only => false,
>>> >> >> >>>> >> extra_login_security => false }
>>> >> >> >>>> >>
>>> >> >> >>>> >> Class['postgresql::server']->Class['phppgadmin']~>
>>> >> >> >>>> >> Class['agent']
>>> >> >> >>>> >> }
>>> >> >> >>>> >>
>>> >> >> >>>> >> I have sent pull request 4.0.0
>>> >> >> >>>> >>
>>> >> >> >>>> >> Can someone review and merge the pull request [4]?
>>> >> >> >>>> >>
>>> >> >> >>>> >> 1. https://forge.puppetlabs.com/puppetlabs/postgresql
>>> >> >> >>>> >> 2. https://github.com/R-Rajkumar/phppgadmin.git
>>> >> >> >>>> >> 3.
>>> >> >> >>>> >>
>>> >> >> >>>> >>
>>> >> >> >>>> >>
>>> >> >> >>>> >> http://blog.rajkumarr.com/2014/08/using-postgresql-cartrid
>>> >> >> >>>> >> ge-on-apache-stratos.html 4.
>>> >> >> >>>> >> https://github.com/apache/stratos/pull/9
>>> >> >> >>>> >>
>>> >> >> >>>> >> Thanks.
>>> >> >> >>>> >>
>>> >> >> >>>> >> --
>>> >> >> >>>> >> Rajkumar Rajaratnam
>>> >> >> >>>> >> Software Engineer | WSO2, Inc.
>>> >> >> >>>> >> Mobile +94777568639 | +94783498120
>>> >> >> >>>> >
>>> >> >> >>>> >
>>> >> >> >>>> >
>>> >> >> >>>> >
>>> >> >> >>>> > --
>>> >> >> >>>> > Rajkumar Rajaratnam
>>> >> >> >>>> > Software Engineer | WSO2, Inc.
>>> >> >> >>>> > Mobile +94777568639 | +94783498120
>>> >> >> >>>>
>>> >> >> >>>>
>>> >> >> >>>>
>>> >> >> >>>> --
>>> >> >> >>>> Akila Ravihansa Perera
>>> >> >> >>>> Software Engineer
>>> >> >> >>>> WSO2 Inc.
>>> >> >> >>>> http://wso2.com
>>> >> >> >>>>
>>> >> >> >>>> Phone: +94 77 64 154 38
>>> >> >> >>>> Blog: http://ravihansa3000.blogspot.com
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>>
>>> >> >> >>> --
>>> >> >> >>> Rajkumar Rajaratnam
>>> >> >> >>> Software Engineer | WSO2, Inc.
>>> >> >> >>> Mobile +94777568639 | +94783498120
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> --
>>> >> >> >> Rajkumar Rajaratnam
>>> >> >> >> Software Engineer | WSO2, Inc.
>>> >> >> >> Mobile +94777568639 | +94783498120
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Rajkumar Rajaratnam
>>> >> >> > Software Engineer | WSO2, Inc.
>>> >> >> > Mobile +94777568639 | +94783498120
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Rajkumar Rajaratnam
>>> >> > Software Engineer | WSO2, Inc.
>>> >> > Mobile +94777568639 | +94783498120
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Rajkumar Rajaratnam
>>> > Software Engineer | WSO2, Inc.
>>> > Mobile +94777568639 | +94783498120
>>>
>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PPMC Member, Apache Stratos
>>
>

Reply via email to