You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Rajkumar Rajaratnam <ra...@wso2.com> on 2014/08/04 19:05:19 UTC

PostgreSQL Cartridge for Apache Stratos

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-cartridge-on-apache-stratos.html
4. https://github.com/apache/stratos/pull/9

Thanks.

-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
Apologies I meant Lasindu, not Udara.
On 14 Aug 2014 07:45, "chris snow" <ch...@gmail.com> wrote:

> Thanks for the explanation Udara!  My main concern was that the word
> 'document' suggested steps that have to be manually performed by someone.
> On 14 Aug 2014 07:07, "Lasindu Charith" <la...@wso2.com> wrote:
>
>> Hi Chris,
>>
>> The changes to be done after installing a puppet module can be scripted
>> via an agent extension. But If we are to do any minor changes to the puppet
>> module installation, from the script, we can do them via the
>> node.pp/<module_name>.pp (Say we need to run a apt-get update). If the
>> puppet module we download needs many changes, you can still use the script
>> Raj has created, but need to point to another module repository where your
>> customized module is hosted or install via a module tar ball(changed puppet
>> module) as described in [1
>> <https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html>
>> ].
>>
>> [1]
>> https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html
>>
>>  Thanks,
>>
>> On Sat, Aug 9, 2014 at 12:14 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> Hi Rajkumar, could option 1 be scripted so that it can be automated?
>>>  On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <ra...@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 <
>>>>> dchalfant@greaterbrain.com> wrote:
>>>>>
>>>>>> Keep it decoupled as suggested below has its advantages.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: chris snow [mailto:chsnow123@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 <
>>>>>> rajkumarr@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 <ch...@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
>>>>>> >> <ra...@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 <ch...@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
>>>>>> >> >> <ra...@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
>>>>>> >> >> > <ra...@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
>>>>>> >> >> >> <ra...@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
>>>>>> >> >> >>> <ra...@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
>>>>>> >> >> >>>> <ra...@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
>>>>>> >> >> >>>> > <ra...@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
>>>>>
>>>>
>>
>>
>> --
>> *Lasindu Charith*
>> Software Engineer, WSO2 Inc.
>> Mobile: +94714427192
>> Web: blog.lasindu.com
>>
>

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Chris,

I guess documenting the changes to be done is not going to work.

Documenting/Automating changes will lead to several problems. For example,
you need to update the script every time if the upstream modules are
updated. It is hard to sync the script with upstream modules.

As Lasindu mentioned, if we are to change anything in upstream modules, you
need to host your own version of upstream modules (which includes your
changes) in your own repository and point it to the script.

Thanks.


On Thu, Aug 14, 2014 at 12:15 PM, chris snow <ch...@gmail.com> wrote:

> Thanks for the explanation Udara!  My main concern was that the word
> 'document' suggested steps that have to be manually performed by someone.
> On 14 Aug 2014 07:07, "Lasindu Charith" <la...@wso2.com> wrote:
>
>> Hi Chris,
>>
>> The changes to be done after installing a puppet module can be scripted
>> via an agent extension. But If we are to do any minor changes to the puppet
>> module installation, from the script, we can do them via the
>> node.pp/<module_name>.pp (Say we need to run a apt-get update). If the
>> puppet module we download needs many changes, you can still use the script
>> Raj has created, but need to point to another module repository where your
>> customized module is hosted or install via a module tar ball(changed puppet
>> module) as described in [1
>> <https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html>
>> ].
>>
>> [1]
>> https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html
>>
>>  Thanks,
>>
>> On Sat, Aug 9, 2014 at 12:14 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> Hi Rajkumar, could option 1 be scripted so that it can be automated?
>>>  On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <ra...@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 <
>>>>> dchalfant@greaterbrain.com> wrote:
>>>>>
>>>>>> Keep it decoupled as suggested below has its advantages.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: chris snow [mailto:chsnow123@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 <
>>>>>> rajkumarr@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 <ch...@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
>>>>>> >> <ra...@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 <ch...@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
>>>>>> >> >> <ra...@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
>>>>>> >> >> > <ra...@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
>>>>>> >> >> >> <ra...@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
>>>>>> >> >> >>> <ra...@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
>>>>>> >> >> >>>> <ra...@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
>>>>>> >> >> >>>> > <ra...@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
>>>>>
>>>>
>>
>>
>> --
>> *Lasindu Charith*
>> Software Engineer, WSO2 Inc.
>> Mobile: +94714427192
>> Web: blog.lasindu.com
>>
>


-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
Thanks for the explanation Udara!  My main concern was that the word
'document' suggested steps that have to be manually performed by someone.
On 14 Aug 2014 07:07, "Lasindu Charith" <la...@wso2.com> wrote:

> Hi Chris,
>
> The changes to be done after installing a puppet module can be scripted
> via an agent extension. But If we are to do any minor changes to the puppet
> module installation, from the script, we can do them via the
> node.pp/<module_name>.pp (Say we need to run a apt-get update). If the
> puppet module we download needs many changes, you can still use the script
> Raj has created, but need to point to another module repository where your
> customized module is hosted or install via a module tar ball(changed puppet
> module) as described in [1
> <https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html>
> ].
>
> [1]
> https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html
>
>  Thanks,
>
> On Sat, Aug 9, 2014 at 12:14 PM, chris snow <ch...@gmail.com> wrote:
>
>> Hi Rajkumar, could option 1 be scripted so that it can be automated?
>>  On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <ra...@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 <
>>>> dchalfant@greaterbrain.com> wrote:
>>>>
>>>>> Keep it decoupled as suggested below has its advantages.
>>>>>
>>>>> -----Original Message-----
>>>>> From: chris snow [mailto:chsnow123@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 <
>>>>> rajkumarr@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 <ch...@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
>>>>> >> <ra...@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 <ch...@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
>>>>> >> >> <ra...@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
>>>>> >> >> > <ra...@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
>>>>> >> >> >> <ra...@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
>>>>> >> >> >>> <ra...@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
>>>>> >> >> >>>> <ra...@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
>>>>> >> >> >>>> > <ra...@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
>>>>
>>>
>
>
> --
> *Lasindu Charith*
> Software Engineer, WSO2 Inc.
> Mobile: +94714427192
> Web: blog.lasindu.com
>

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Lasindu Charith <la...@wso2.com>.
Hi Chris,

The changes to be done after installing a puppet module can be scripted via
an agent extension. But If we are to do any minor changes to the puppet
module installation, from the script, we can do them via the
node.pp/<module_name>.pp (Say we need to run a apt-get update). If the
puppet module we download needs many changes, you can still use the script
Raj has created, but need to point to another module repository where your
customized module is hosted or install via a module tar ball(changed puppet
module) as described in [1
<https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html>
].

[1]
https://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html

 Thanks,

On Sat, Aug 9, 2014 at 12:14 PM, chris snow <ch...@gmail.com> wrote:

> Hi Rajkumar, could option 1 be scripted so that it can be automated?
>  On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <ra...@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 <
>>> dchalfant@greaterbrain.com> wrote:
>>>
>>>> Keep it decoupled as suggested below has its advantages.
>>>>
>>>> -----Original Message-----
>>>> From: chris snow [mailto:chsnow123@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 <ra...@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 <ch...@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
>>>> >> <ra...@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 <ch...@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
>>>> >> >> <ra...@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
>>>> >> >> > <ra...@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
>>>> >> >> >> <ra...@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
>>>> >> >> >>> <ra...@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
>>>> >> >> >>>> <ra...@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
>>>> >> >> >>>> > <ra...@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
>>>
>>


-- 
*Lasindu Charith*
Software Engineer, WSO2 Inc.
Mobile: +94714427192
Web: blog.lasindu.com

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
Hi Rajkumar, could option 1 be scripted so that it can be automated?
On 9 Aug 2014 04:11, "Rajkumar Rajaratnam" <ra...@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 <
>> dchalfant@greaterbrain.com> wrote:
>>
>>> Keep it decoupled as suggested below has its advantages.
>>>
>>> -----Original Message-----
>>> From: chris snow [mailto:chsnow123@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 <ra...@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 <ch...@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
>>> >> <ra...@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 <ch...@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
>>> >> >> <ra...@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
>>> >> >> > <ra...@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
>>> >> >> >> <ra...@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
>>> >> >> >>> <ra...@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
>>> >> >> >>>> <ra...@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
>>> >> >> >>>> > <ra...@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
>>
>

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
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 <dchalfant@greaterbrain.com
> > wrote:
>
>> Keep it decoupled as suggested below has its advantages.
>>
>> -----Original Message-----
>> From: chris snow [mailto:chsnow123@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 <ra...@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 <ch...@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
>> >> <ra...@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 <ch...@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
>> >> >> <ra...@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
>> >> >> > <ra...@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
>> >> >> >> <ra...@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
>> >> >> >>> <ra...@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
>> >> >> >>>> <ra...@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
>> >> >> >>>> > <ra...@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
>

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Imesh Gunaratne <im...@apache.org>.
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 <dc...@greaterbrain.com>
wrote:

> Keep it decoupled as suggested below has its advantages.
>
> -----Original Message-----
> From: chris snow [mailto:chsnow123@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 <ra...@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 <ch...@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
> >> <ra...@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 <ch...@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
> >> >> <ra...@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
> >> >> > <ra...@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
> >> >> >> <ra...@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
> >> >> >>> <ra...@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
> >> >> >>>> <ra...@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
> >> >> >>>> > <ra...@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

RE: PostgreSQL Cartridge for Apache Stratos

Posted by Dale Chalfant <dc...@greaterbrain.com>.
Keep it decoupled as suggested below has its advantages.

-----Original Message-----
From: chris snow [mailto:chsnow123@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 <ra...@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 <ch...@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 
>> <ra...@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 <ch...@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 
>> >> <ra...@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 
>> >> > <ra...@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 
>> >> >> <ra...@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 
>> >> >>> <ra...@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 
>> >> >>>> <ra...@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 
>> >> >>>> > <ra...@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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Nirmal Fernando <ni...@gmail.com>.
Ok, as long as we stick to one version that'd be ok.



On Tue, Aug 5, 2014 at 7:39 PM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Hi Nirmal,
>
> Puppet module tool can download specific version of a module.
>
> For example,
>
> puppet module install puppetlabs-apache --version 0.0.2
>
> Idea is to have a comma separated list of modules along with information
> such as version, etc and download those using puppet module tool. IMO, we
> don't need to modify puppet master script. We can have separate script for
> doing this stuff. This way, this becomes optional. If a user wants, he can
> use this script to do stuffs. Or he can download modules and put them into
> puppet master manually.
>
> Thanks.
>
>
> On Tue, Aug 5, 2014 at 7:26 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> Can we guarantee that latest puppet dependency modules won't break the
>> puppet module which uses those dependencies? IMO this approach would result
>> in lot of issues.
>>
>>
>> On Tue, Aug 5, 2014 at 7:08 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> Hi Devs - does anyone else have a view on this approach?
>>>
>>> On Tue, Aug 5, 2014 at 2:37 PM, Rajkumar Rajaratnam <ra...@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 <ch...@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 <
>>> rajkumarr@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_installing.html
>>> >> >
>>> >> > Thanks.
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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
>>> >> >> <ra...@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
>>> >> >> > <ra...@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
>>> >> >> >> <ra...@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
>>> >> >> >>> <ra...@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
>>> >> >> >>>> <ra...@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
>>> >> >> >>>> > <ra...@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-cartridge-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
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Software Engineer | WSO2, Inc.
>  Mobile +94777568639 | +94783498120
>



-- 
Best Regards,
Nirmal

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

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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi Nirmal,

Puppet module tool can download specific version of a module.

For example,

puppet module install puppetlabs-apache --version 0.0.2

Idea is to have a comma separated list of modules along with information
such as version, etc and download those using puppet module tool. IMO, we
don't need to modify puppet master script. We can have separate script for
doing this stuff. This way, this becomes optional. If a user wants, he can
use this script to do stuffs. Or he can download modules and put them into
puppet master manually.

Thanks.


On Tue, Aug 5, 2014 at 7:26 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> Can we guarantee that latest puppet dependency modules won't break the
> puppet module which uses those dependencies? IMO this approach would result
> in lot of issues.
>
>
> On Tue, Aug 5, 2014 at 7:08 PM, chris snow <ch...@gmail.com> wrote:
>
>> Hi Devs - does anyone else have a view on this approach?
>>
>> On Tue, Aug 5, 2014 at 2:37 PM, Rajkumar Rajaratnam <ra...@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 <ch...@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 <
>> rajkumarr@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_installing.html
>> >> >
>> >> > Thanks.
>> >> >
>> >> >
>> >> >
>> >> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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
>> >> >> <ra...@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
>> >> >> > <ra...@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
>> >> >> >> <ra...@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
>> >> >> >>> <ra...@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
>> >> >> >>>> <ra...@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
>> >> >> >>>> > <ra...@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-cartridge-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
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Nirmal Fernando <ni...@gmail.com>.
Can we guarantee that latest puppet dependency modules won't break the
puppet module which uses those dependencies? IMO this approach would result
in lot of issues.


On Tue, Aug 5, 2014 at 7:08 PM, chris snow <ch...@gmail.com> wrote:

> Hi Devs - does anyone else have a view on this approach?
>
> On Tue, Aug 5, 2014 at 2:37 PM, Rajkumar Rajaratnam <ra...@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 <ch...@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 <
> rajkumarr@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_installing.html
> >> >
> >> > Thanks.
> >> >
> >> >
> >> >
> >> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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
> >> >> <ra...@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
> >> >> > <ra...@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
> >> >> >> <ra...@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
> >> >> >>> <ra...@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
> >> >> >>>> <ra...@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
> >> >> >>>> > <ra...@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-cartridge-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
>



-- 
Best Regards,
Nirmal

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

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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
Hi Devs - does anyone else have a view on this approach?

On Tue, Aug 5, 2014 at 2:37 PM, Rajkumar Rajaratnam <ra...@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 <ch...@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 <ra...@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_installing.html
>> >
>> > Thanks.
>> >
>> >
>> >
>> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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
>> >> <ra...@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
>> >> > <ra...@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
>> >> >> <ra...@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
>> >> >>> <ra...@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
>> >> >>>> <ra...@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
>> >> >>>> > <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
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 <ch...@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 <ra...@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_installing.html
> >
> > Thanks.
> >
> >
> >
> > On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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 <rajkumarr@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
> >> > <ra...@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
> >> >> <ra...@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
> >> >>> <ra...@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
> >> >>>> <ra...@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
> >> >>>> > <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
Hi Rajkumar - using the puppet module tool makes more sense to me.

On Tue, Aug 5, 2014 at 10:46 AM, Rajkumar Rajaratnam <ra...@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_installing.html
>
> Thanks.
>
>
>
> On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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 <ra...@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
>> > <ra...@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
>> >> <ra...@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
>> >>> <ra...@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
>> >>>> <ra...@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
>> >>>> > <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
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_installing.html

Thanks.



On Tue, Aug 5, 2014 at 2:53 PM, chris snow <ch...@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 <ra...@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 <rajkumarr@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 <
> rajkumarr@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
> >>> <ra...@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
> >>>> <ra...@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
> >>>> > <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by chris snow <ch...@gmail.com>.
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 <ra...@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 <ra...@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 <ra...@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
>>> <ra...@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
>>>> <ra...@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
>>>> > <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
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 <https://forge.puppetlabs.com/puppetlabs/stdlib>
   - puppetlabs/apt <https://forge.puppetlabs.com/puppetlabs/apt>
   - puppetlabs/concat <https://forge.puppetlabs.com/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 <ra...@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 <ra...@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 <
>> ravihansa@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 <ra...@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 <
>>> rajkumarr@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
And,

672 files are new files. Changed only nodes.pp

Thanks.


On Mon, Aug 4, 2014 at 11:09 PM, Rajkumar Rajaratnam <ra...@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 <
> ravihansa@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 <ra...@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 <
>> rajkumarr@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
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 <ra...@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 <ra...@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 <rajkumarr@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Akila Ravihansa Perera <ra...@wso2.com>.
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 <ra...@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 <ra...@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-cartridge-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

Re: PostgreSQL Cartridge for Apache Stratos

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi,

Pull request link is https://github.com/apache/stratos/pull/10

Thanks.


On Mon, Aug 4, 2014 at 10:35 PM, Rajkumar Rajaratnam <ra...@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-cartridge-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