Thread: Execute DDL across multiple servers in an automated manner

Execute DDL across multiple servers in an automated manner

From
Anderson Abreu
Date:
Hi all,

I use PostgreSQL 9.4

I'm looking for some package/library/plugin to execute DDL across multiple servers in an automated manner.

Can do this with shellscript.

I would like to know if this is the only way? 


Thanks & Regards
 

---
 
Anderson Abreu
andersonabreu@gmail.com

"The judoka is what has: humility to learn what you teach, patience to teachwhat they learned to their fellow man and faith to believe in what you don't understand. Learn a little more every day and use it every day for the good "(Jigoro Kano)

Re: Execute DDL across multiple servers in an automated manner

From
Melvin Davidson
Date:
to execute a script simultaneously across multiple terminals.

Alternatively, you can write a script that loops through host connections to execute the DDL.
 

On Fri, Aug 28, 2015 at 9:35 AM, Anderson Abreu <andersonabreu@gmail.com> wrote:
Hi all,

I use PostgreSQL 9.4

I'm looking for some package/library/plugin to execute DDL across multiple servers in an automated manner.

Can do this with shellscript.

I would like to know if this is the only way? 


Thanks & Regards
 

---
 
Anderson Abreu
andersonabreu@gmail.com

"The judoka is what has: humility to learn what you teach, patience to teachwhat they learned to their fellow man and faith to believe in what you don't understand. Learn a little more every day and use it every day for the good "(Jigoro Kano)



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Re: Execute DDL across multiple servers in an automated manner

From
Adrian Klaver
Date:
On 08/28/2015 06:35 AM, Anderson Abreu wrote:
> Hi all,
>
> I usePostgreSQL9.4
>
> I'm looking for somepackage/library/plugintoexecute DDLacross multiple
> serversin an automated manner.

This covers a lot of ground. Could you be more specific:

1) Do you have a preferred programmng/scripting language?

2) Are you trying to schema versioning or are you rolling out complete
packages?

3) What Oses are you dealing with and what method of remote connection?

4) Are the servers all the same version of Postgres(or are they even all
Postgres servers), so do you have to take into account version differences?


>
> Can do thiswithshellscript.
>
> I would like to knowifthis is the only way?

No, that is the problem:)

>
>
> Thanks & Regards
>
>
> ---
>
> Anderson Abreu
> andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>
>
> "Thejudokaiswhathas:humilitytolearnwhatyouteach,patienceto teachwhat
> theylearnedtotheir fellow manandfaithtobelieve in whatyou don't
> understand.Learna little more every dayanduse it every dayfor the
> good"(Jigoro Kano)


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Execute DDL across multiple servers in an automated manner

From
Anderson Abreu
Date:

2015-08-28 10:55 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com>:
On 08/28/2015 06:35 AM, Anderson Abreu wrote:
Hi all,

I usePostgreSQL9.4

I'm looking for somepackage/library/plugintoexecute DDLacross multiple
serversin an automated manner.

This covers a lot of ground. Could you be more specific:

1) Do you have a preferred programmng/scripting language?

No, I don't have a preferred language. I thought in a package similar the pgbouncer. 
 

2) Are you trying to schema versioning or are you rolling out complete packages?

Well, a schema versioning is interesting. Exists any package to postgresql?
 

3) What Oses are you dealing with and what method of remote connection?

My OS is ubuntu 14.04 in two hundred servers

4) Are the servers all the same version of Postgres(or are they even all Postgres servers), so do you have to take into account version differences?

All servers are in same version, PostgreSQL 9.4.

Thanks & Regards,
Anderson Abreu
 



Can do thiswithshellscript.

I would like to knowifthis is the only way?

No, that is the problem:)



Thanks & Regards


---

Anderson Abreu
andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>

"Thejudokaiswhathas:humilitytolearnwhatyouteach,patienceto teachwhat
theylearnedtotheir fellow manandfaithtobelieve in whatyou don't
understand.Learna little more every dayanduse it every dayfor the
good"(Jigoro Kano)


--
Adrian Klaver
adrian.klaver@aklaver.com

Re: Execute DDL across multiple servers in an automated manner

From
Adrian Klaver
Date:
On 08/28/2015 07:09 AM, Anderson Abreu wrote:
>
> 2015-08-28 10:55 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>>:
>
>     On 08/28/2015 06:35 AM, Anderson Abreu wrote:
>
>         Hi all,
>
>         I usePostgreSQL9.4
>
>         I'm looking for somepackage/library/plugintoexecute DDLacross
>         multiple
>         serversin an automated manner.
>
>
>     This covers a lot of ground. Could you be more specific:
>
>     1) Do you have a preferred programmng/scripting language?
>
>
> No, I don't have a preferred language. I thought in a package similar
> the pgbouncer.

So something where you point at a database proxy and it would distribute
the changes to all the databases behind it?

I don't know of such a thing, but maybe someone else does.

>
>
>     2) Are you trying to schema versioning or are you rolling out
>     complete packages?
>
>
> Well, a schema versioning is interesting. Exists any package to postgresql?

I just finished a schema version change using Sqitch(http://sqitch.org/)
  It is not Postgres specific, but that is what I am deploying against.
My needs are simple and I am not deploying against two hundred servers.
There may be way to make that work using Sqitch, but that would probably
be a question for the Sqitch list:

https://groups.google.com/forum/#!forum/sqitch-users

Other schema version systems I know of are Alembic(Python) Rails(ruby).

>
>
>     3) What Oses are you dealing with and what method of remote connection?
>
>
> My OS is ubuntu 14.04 in two hundred servers

Probably should take a look at one of the automated deployment packages:

Chef https://www.chef.io/chef/

Puppet https://puppetlabs.com/

Salt http://saltstack.com/

There are probably others, these are just the ones I know about. They
are general purpose tools but have Postgres specific features. As an
examples:

http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postgres.html

https://github.com/puppetlabs/puppetlabs-postgresql#custom-resource-postgresql_psql

>
>
>     4) Are the servers all the same version of Postgres(or are they even
>     all Postgres servers), so do you have to take into account version
>     differences?
>
>
> All servers are in same version, PostgreSQL 9.4.
>
> Thanks & Regards,
> Anderson Abreu
>
>
>
>
>         Can do thiswithshellscript.
>
>         I would like to knowifthis is the only way?
>
>
>     No, that is the problem:)
>
>
>
>         Thanks & Regards
>
>
>         ---
>
>         Anderson Abreu
>         andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>
>         <mailto:andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>>
>
>         "Thejudokaiswhathas:humilitytolearnwhatyouteach,patienceto teachwhat
>         theylearnedtotheir fellow manandfaithtobelieve in whatyou don't
>         understand.Learna little more every dayanduse it every dayfor the
>         good"(Jigoro Kano)
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Execute DDL across multiple servers in an automated manner

From
Anderson Abreu
Date:

2015-08-28 13:40 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com>:
On 08/28/2015 07:09 AM, Anderson Abreu wrote:

2015-08-28 10:55 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>>:

    On 08/28/2015 06:35 AM, Anderson Abreu wrote:

        Hi all,

        I usePostgreSQL9.4

        I'm looking for somepackage/library/plugintoexecute DDLacross
        multiple
        serversin an automated manner.


    This covers a lot of ground. Could you be more specific:

    1) Do you have a preferred programmng/scripting language?


No, I don't have a preferred language. I thought in a package similar
the pgbouncer.

So something where you point at a database proxy and it would distribute the changes to all the databases behind it?

I don't know of such a thing, but maybe someone else does.



    2) Are you trying to schema versioning or are you rolling out
    complete packages?


Well, a schema versioning is interesting. Exists any package to postgresql?

I just finished a schema version change using Sqitch(http://sqitch.org/)  It is not Postgres specific, but that is what I am deploying against. My needs are simple and I am not deploying against two hundred servers. There may be way to make that work using Sqitch, but that would probably be a question for the Sqitch list:

https://groups.google.com/forum/#!forum/sqitch-users

Other schema version systems I know of are Alembic(Python) Rails(ruby).



    3) What Oses are you dealing with and what method of remote connection?


My OS is ubuntu 14.04 in two hundred servers

Probably should take a look at one of the automated deployment packages:

Chef https://www.chef.io/chef/

Puppet https://puppetlabs.com/

Salt http://saltstack.com/

There are probably others, these are just the ones I know about. They are general purpose tools but have Postgres specific features. As an examples:

http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postgres.html

https://github.com/puppetlabs/puppetlabs-postgresql#custom-resource-postgresql_psql



    4) Are the servers all the same version of Postgres(or are they even
    all Postgres servers), so do you have to take into account version
    differences?


All servers are in same version, PostgreSQL 9.4.

Thanks & Regards,
Anderson Abreu




        Can do thiswithshellscript.

        I would like to knowifthis is the only way?


    No, that is the problem:)



        Thanks & Regards

Thanks all,

I try your suggestions


Regras


        ---

        Anderson Abreu
        andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>
        <mailto:andersonabreu@gmail.com <mailto:andersonabreu@gmail.com>>

        "Thejudokaiswhathas:humilitytolearnwhatyouteach,patienceto teachwhat
        theylearnedtotheir fellow manandfaithtobelieve in whatyou don't
        understand.Learna little more every dayanduse it every dayfor the
        good"(Jigoro Kano)



    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




--
Adrian Klaver
adrian.klaver@aklaver.com