You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficcontrol.apache.org by Nir Sopher <ni...@qwilt.com> on 2017/01/23 21:44:32 UTC

Traffic Ops Dev environment - postgresql installation

Hi,

I am trying to create a new Traffic-Ops dev environment setup, following
the instructions in the developer guide.
I encountered however several failures on the way, related to the movement
toward postgresql. I therefore installed the relevant postgresql RPMs.

I got to the point I have to initilize the values in the postgresql server
in order for the "./db/admin.pl --env=development setup" command to run.

Should I follow the instructions in "experimental/server/README.md"?
Is there a way to deactivate the postgresql server and continue to work
with mysql until postgresql moves out from "experimental" phase?

10x,
Nir

Re: Traffic Ops Dev environment - postgresql installation

Posted by Nir Sopher <ni...@qwilt.com>.
Great:)
Thank you for the info.
Especially for the "development mode auto restart on change", it makes
things much more convenient,
Nir

On Tue, Jan 24, 2017 at 11:22 PM, Dan Kirkwood <da...@gmail.com> wrote:

> well done!
>
> admin.pl creates a separate database for each of those environments:
> to_test, to_integration, to_development, and traffic_ops (for
> production).   So yes -- they can all live together in the same
> postgres installation.   To initialize the database for running
> `bin/start.pl`,  you should run `db/admin.pl --env=development`.    To
> run from the installed directory (/opt/traffic_ops),  you should run
> with `--env=production`.   And, as you said,  `--env=test` and
> `--env=integration` for running unit tests and integration tests,
> respectively.
>
> The advantage of running development (using `./bin/start.pl`) is that
> it monitors the Perl libraries and automatically restarts the server
> when it detects any changes to them.
>
> I hope that's helpful -- do let us know how you're progressing..
>
> -dan
>
> On Tue, Jan 24, 2017 at 2:04 PM, Nir Sopher <ni...@qwilt.com> wrote:
> > Thank you Dan,
> > Indeed, moving to postgres would be the right choice, as I want to test
> the
> > changes on the branch I submit to.
> > I already tested today my dev env with TC 1.8, and I now have some
> > confidence in my its bringup protocol so I can move to a less stable
> branch.
> >
> > I used the command you sent.
> > Additionally I had to add a database with the same name, and adjust
> > "pg_hba.conf".
> > My traffic-ops is now up :)
> >
> > I assume (and tried it out), that:
> >
> >    1. In order to run "prove t" I need to run "./db/admin.pl --env=test
> >    setup"
> >    2. In order to run "prove t_integration" I need to run "./db/admin.pl
> >    --env=integration setup"
> >    3. In order to launch traffic-ops  I need to run "./db/admin.pl
> >    --env=development setup"
> >
> > Am I correct?
> > It looks like these admin.pl injected data can live together in the
> same DB
> > without a conflict. Is it true, or should I drop the DB / replace setup
> > when moving from one env to another?
> >
> > Thanks again.
> > Nir
> >
> >
> > On Tue, Jan 24, 2017 at 5:56 PM, Dan Kirkwood <da...@gmail.com> wrote:
> >
> >> sorry -- prematurely sent..
> >>
> >> Hi Nir,
> >>
> >> It probably is best to continue with postgres rather than starting with
> >> mysql..
> >>
> >> You need to be running as a user that has superuser privilege on the
> >> postgres db to run the `admin.pl setup`.   Try this:
> >>
> >> sudo su - postgres createuser -s -r -d -E <your username>
> >>
> >> and then try the `db/admin.pl ... setup` command again..
> >>
> >> If you still have problems,  please send the command and output you're
> >> seeing and we'll try to help move you along further..
> >>
> >> -dan
> >>
> >> On Tue, Jan 24, 2017 at 8:50 AM, Dan Kirkwood <da...@gmail.com>
> wrote:
> >> > Hi Nir,
> >> >
> >> > It probably is best to continue with postgres rather than starting
> with
> >> mysql..
> >> >
> >> > You need to be running as a user that has superuser privilege on the
> >> > postgres db to run the `admin.pl setup`.   Try this:
> >> >
> >> > sudo su postgres createuser -s
> >> >
> >> > On Tue, Jan 24, 2017 at 8:27 AM, David Neuman <
> david.neuman64@gmail.com>
> >> wrote:
> >> >> First of all, it looks like your documentation is to our old site,
> you
> >> will
> >> >> want to use http://trafficcontrol.apache.org/docs/latest/index.html
> in
> >> the
> >> >> future.
> >> >> If you don't have docker and docker-compose on your VM (it would need
> >> to be
> >> >> centos 7.x or above), we should be able to get it working with a
> >> "normal"
> >> >> postgres install; I would start by taking a look at the scripts that
> >> are in
> >> >> `/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh
> is
> >> >> familiar enough with the process that he can provide a quick how-to?
> >> >>
> >> >> On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:
> >> >>
> >> >>> Thank you Dave&Dan,
> >> >>>
> >> >>> The pg-migration document assumes I am working in a Docker
> environment.
> >> >>> Currently I am working on a VM on which I manually installed the
> >> software
> >> >>> requirement list
> >> >>> <http://traffic-control-cdn.net/docs/latest/development/
> >> >>> traffic_ops.html?#software-requirements>
> >> >>> .
> >> >>> Is there a specification that will allow me to bring up such a
> Docker?
> >> Am I
> >> >>> practically required t have one in order to work on traffic-ops?
> >> >>>
> >> >>> I tried to configure the postgres myself, but with no success so
> far.
> >> >>> Anyway, as I'm practically utilizing my dev environment for the
> first
> >> time,
> >> >>> it may be counter productive to work on an unstable branch.
> >> >>>
> >> >>> 10x,
> >> >>> Nir
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> Nir
> >> >>>
> >> >>> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com>
> >> wrote:
> >> >>>
> >> >>> > The postgresql version is still quite experimental right now.   If
> >> you
> >> >>> > are feeling adventurous,  we appreciate the help in testing it,
> but
> >> >>> > you may want to use 1.7.x or 1.8.x with mysql until we have the
> >> >>> > postgresql branch (master) more stable.   The master branch will
> not
> >> >>> > work with mysql at all.
> >> >>> >
> >> >>> > -Dan
> >> >>> >
> >> >>> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org>
> >> wrote:
> >> >>> > > I am certainly not the expert here, but I would start by taking
> a
> >> look
> >> >>> at
> >> >>> > > the README.md file in traffic_control/traffic_ops/
> >> app/db/pg-migration.
> >> >>> > You
> >> >>> > > can use that to migrate from mysql to postgres using
> >> docker-compose.
> >> >>> > >
> >> >>> > > —Dave
> >> >>> > >
> >> >>> > >
> >> >>> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com>
> >> wrote:
> >> >>> > >
> >> >>> > >> Hi,
> >> >>> > >>
> >> >>> > >> I am trying to create a new Traffic-Ops dev environment setup,
> >> >>> following
> >> >>> > >> the instructions in the developer guide.
> >> >>> > >> I encountered however several failures on the way, related to
> the
> >> >>> > movement
> >> >>> > >> toward postgresql. I therefore installed the relevant
> postgresql
> >> RPMs.
> >> >>> > >>
> >> >>> > >> I got to the point I have to initilize the values in the
> >> postgresql
> >> >>> > server
> >> >>> > >> in order for the "./db/admin.pl --env=development setup"
> command
> >> to
> >> >>> > run.
> >> >>> > >>
> >> >>> > >> Should I follow the instructions in
> "experimental/server/README.
> >> md"?
> >> >>> > >> Is there a way to deactivate the postgresql server and
> continue to
> >> >>> work
> >> >>> > >> with mysql until postgresql moves out from "experimental"
> phase?
> >> >>> > >>
> >> >>> > >> 10x,
> >> >>> > >> Nir
> >> >>> > >>
> >> >>> >
> >> >>>
> >>
>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Dan Kirkwood <da...@gmail.com>.
well done!

admin.pl creates a separate database for each of those environments:
to_test, to_integration, to_development, and traffic_ops (for
production).   So yes -- they can all live together in the same
postgres installation.   To initialize the database for running
`bin/start.pl`,  you should run `db/admin.pl --env=development`.    To
run from the installed directory (/opt/traffic_ops),  you should run
with `--env=production`.   And, as you said,  `--env=test` and
`--env=integration` for running unit tests and integration tests,
respectively.

The advantage of running development (using `./bin/start.pl`) is that
it monitors the Perl libraries and automatically restarts the server
when it detects any changes to them.

I hope that's helpful -- do let us know how you're progressing..

-dan

On Tue, Jan 24, 2017 at 2:04 PM, Nir Sopher <ni...@qwilt.com> wrote:
> Thank you Dan,
> Indeed, moving to postgres would be the right choice, as I want to test the
> changes on the branch I submit to.
> I already tested today my dev env with TC 1.8, and I now have some
> confidence in my its bringup protocol so I can move to a less stable branch.
>
> I used the command you sent.
> Additionally I had to add a database with the same name, and adjust
> "pg_hba.conf".
> My traffic-ops is now up :)
>
> I assume (and tried it out), that:
>
>    1. In order to run "prove t" I need to run "./db/admin.pl --env=test
>    setup"
>    2. In order to run "prove t_integration" I need to run "./db/admin.pl
>    --env=integration setup"
>    3. In order to launch traffic-ops  I need to run "./db/admin.pl
>    --env=development setup"
>
> Am I correct?
> It looks like these admin.pl injected data can live together in the same DB
> without a conflict. Is it true, or should I drop the DB / replace setup
> when moving from one env to another?
>
> Thanks again.
> Nir
>
>
> On Tue, Jan 24, 2017 at 5:56 PM, Dan Kirkwood <da...@gmail.com> wrote:
>
>> sorry -- prematurely sent..
>>
>> Hi Nir,
>>
>> It probably is best to continue with postgres rather than starting with
>> mysql..
>>
>> You need to be running as a user that has superuser privilege on the
>> postgres db to run the `admin.pl setup`.   Try this:
>>
>> sudo su - postgres createuser -s -r -d -E <your username>
>>
>> and then try the `db/admin.pl ... setup` command again..
>>
>> If you still have problems,  please send the command and output you're
>> seeing and we'll try to help move you along further..
>>
>> -dan
>>
>> On Tue, Jan 24, 2017 at 8:50 AM, Dan Kirkwood <da...@gmail.com> wrote:
>> > Hi Nir,
>> >
>> > It probably is best to continue with postgres rather than starting with
>> mysql..
>> >
>> > You need to be running as a user that has superuser privilege on the
>> > postgres db to run the `admin.pl setup`.   Try this:
>> >
>> > sudo su postgres createuser -s
>> >
>> > On Tue, Jan 24, 2017 at 8:27 AM, David Neuman <da...@gmail.com>
>> wrote:
>> >> First of all, it looks like your documentation is to our old site, you
>> will
>> >> want to use http://trafficcontrol.apache.org/docs/latest/index.html in
>> the
>> >> future.
>> >> If you don't have docker and docker-compose on your VM (it would need
>> to be
>> >> centos 7.x or above), we should be able to get it working with a
>> "normal"
>> >> postgres install; I would start by taking a look at the scripts that
>> are in
>> >> `/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh is
>> >> familiar enough with the process that he can provide a quick how-to?
>> >>
>> >> On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:
>> >>
>> >>> Thank you Dave&Dan,
>> >>>
>> >>> The pg-migration document assumes I am working in a Docker environment.
>> >>> Currently I am working on a VM on which I manually installed the
>> software
>> >>> requirement list
>> >>> <http://traffic-control-cdn.net/docs/latest/development/
>> >>> traffic_ops.html?#software-requirements>
>> >>> .
>> >>> Is there a specification that will allow me to bring up such a Docker?
>> Am I
>> >>> practically required t have one in order to work on traffic-ops?
>> >>>
>> >>> I tried to configure the postgres myself, but with no success so far.
>> >>> Anyway, as I'm practically utilizing my dev environment for the first
>> time,
>> >>> it may be counter productive to work on an unstable branch.
>> >>>
>> >>> 10x,
>> >>> Nir
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Nir
>> >>>
>> >>> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com>
>> wrote:
>> >>>
>> >>> > The postgresql version is still quite experimental right now.   If
>> you
>> >>> > are feeling adventurous,  we appreciate the help in testing it,  but
>> >>> > you may want to use 1.7.x or 1.8.x with mysql until we have the
>> >>> > postgresql branch (master) more stable.   The master branch will not
>> >>> > work with mysql at all.
>> >>> >
>> >>> > -Dan
>> >>> >
>> >>> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org>
>> wrote:
>> >>> > > I am certainly not the expert here, but I would start by taking a
>> look
>> >>> at
>> >>> > > the README.md file in traffic_control/traffic_ops/
>> app/db/pg-migration.
>> >>> > You
>> >>> > > can use that to migrate from mysql to postgres using
>> docker-compose.
>> >>> > >
>> >>> > > —Dave
>> >>> > >
>> >>> > >
>> >>> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com>
>> wrote:
>> >>> > >
>> >>> > >> Hi,
>> >>> > >>
>> >>> > >> I am trying to create a new Traffic-Ops dev environment setup,
>> >>> following
>> >>> > >> the instructions in the developer guide.
>> >>> > >> I encountered however several failures on the way, related to the
>> >>> > movement
>> >>> > >> toward postgresql. I therefore installed the relevant postgresql
>> RPMs.
>> >>> > >>
>> >>> > >> I got to the point I have to initilize the values in the
>> postgresql
>> >>> > server
>> >>> > >> in order for the "./db/admin.pl --env=development setup" command
>> to
>> >>> > run.
>> >>> > >>
>> >>> > >> Should I follow the instructions in "experimental/server/README.
>> md"?
>> >>> > >> Is there a way to deactivate the postgresql server and continue to
>> >>> work
>> >>> > >> with mysql until postgresql moves out from "experimental" phase?
>> >>> > >>
>> >>> > >> 10x,
>> >>> > >> Nir
>> >>> > >>
>> >>> >
>> >>>
>>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Nir Sopher <ni...@qwilt.com>.
Thank you Dan,
Indeed, moving to postgres would be the right choice, as I want to test the
changes on the branch I submit to.
I already tested today my dev env with TC 1.8, and I now have some
confidence in my its bringup protocol so I can move to a less stable branch.

I used the command you sent.
Additionally I had to add a database with the same name, and adjust
"pg_hba.conf".
My traffic-ops is now up :)

I assume (and tried it out), that:

   1. In order to run "prove t" I need to run "./db/admin.pl --env=test
   setup"
   2. In order to run "prove t_integration" I need to run "./db/admin.pl
   --env=integration setup"
   3. In order to launch traffic-ops  I need to run "./db/admin.pl
   --env=development setup"

Am I correct?
It looks like these admin.pl injected data can live together in the same DB
without a conflict. Is it true, or should I drop the DB / replace setup
when moving from one env to another?

Thanks again.
Nir


On Tue, Jan 24, 2017 at 5:56 PM, Dan Kirkwood <da...@gmail.com> wrote:

> sorry -- prematurely sent..
>
> Hi Nir,
>
> It probably is best to continue with postgres rather than starting with
> mysql..
>
> You need to be running as a user that has superuser privilege on the
> postgres db to run the `admin.pl setup`.   Try this:
>
> sudo su - postgres createuser -s -r -d -E <your username>
>
> and then try the `db/admin.pl ... setup` command again..
>
> If you still have problems,  please send the command and output you're
> seeing and we'll try to help move you along further..
>
> -dan
>
> On Tue, Jan 24, 2017 at 8:50 AM, Dan Kirkwood <da...@gmail.com> wrote:
> > Hi Nir,
> >
> > It probably is best to continue with postgres rather than starting with
> mysql..
> >
> > You need to be running as a user that has superuser privilege on the
> > postgres db to run the `admin.pl setup`.   Try this:
> >
> > sudo su postgres createuser -s
> >
> > On Tue, Jan 24, 2017 at 8:27 AM, David Neuman <da...@gmail.com>
> wrote:
> >> First of all, it looks like your documentation is to our old site, you
> will
> >> want to use http://trafficcontrol.apache.org/docs/latest/index.html in
> the
> >> future.
> >> If you don't have docker and docker-compose on your VM (it would need
> to be
> >> centos 7.x or above), we should be able to get it working with a
> "normal"
> >> postgres install; I would start by taking a look at the scripts that
> are in
> >> `/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh is
> >> familiar enough with the process that he can provide a quick how-to?
> >>
> >> On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:
> >>
> >>> Thank you Dave&Dan,
> >>>
> >>> The pg-migration document assumes I am working in a Docker environment.
> >>> Currently I am working on a VM on which I manually installed the
> software
> >>> requirement list
> >>> <http://traffic-control-cdn.net/docs/latest/development/
> >>> traffic_ops.html?#software-requirements>
> >>> .
> >>> Is there a specification that will allow me to bring up such a Docker?
> Am I
> >>> practically required t have one in order to work on traffic-ops?
> >>>
> >>> I tried to configure the postgres myself, but with no success so far.
> >>> Anyway, as I'm practically utilizing my dev environment for the first
> time,
> >>> it may be counter productive to work on an unstable branch.
> >>>
> >>> 10x,
> >>> Nir
> >>>
> >>>
> >>>
> >>>
> >>> Nir
> >>>
> >>> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com>
> wrote:
> >>>
> >>> > The postgresql version is still quite experimental right now.   If
> you
> >>> > are feeling adventurous,  we appreciate the help in testing it,  but
> >>> > you may want to use 1.7.x or 1.8.x with mysql until we have the
> >>> > postgresql branch (master) more stable.   The master branch will not
> >>> > work with mysql at all.
> >>> >
> >>> > -Dan
> >>> >
> >>> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org>
> wrote:
> >>> > > I am certainly not the expert here, but I would start by taking a
> look
> >>> at
> >>> > > the README.md file in traffic_control/traffic_ops/
> app/db/pg-migration.
> >>> > You
> >>> > > can use that to migrate from mysql to postgres using
> docker-compose.
> >>> > >
> >>> > > —Dave
> >>> > >
> >>> > >
> >>> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com>
> wrote:
> >>> > >
> >>> > >> Hi,
> >>> > >>
> >>> > >> I am trying to create a new Traffic-Ops dev environment setup,
> >>> following
> >>> > >> the instructions in the developer guide.
> >>> > >> I encountered however several failures on the way, related to the
> >>> > movement
> >>> > >> toward postgresql. I therefore installed the relevant postgresql
> RPMs.
> >>> > >>
> >>> > >> I got to the point I have to initilize the values in the
> postgresql
> >>> > server
> >>> > >> in order for the "./db/admin.pl --env=development setup" command
> to
> >>> > run.
> >>> > >>
> >>> > >> Should I follow the instructions in "experimental/server/README.
> md"?
> >>> > >> Is there a way to deactivate the postgresql server and continue to
> >>> work
> >>> > >> with mysql until postgresql moves out from "experimental" phase?
> >>> > >>
> >>> > >> 10x,
> >>> > >> Nir
> >>> > >>
> >>> >
> >>>
>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Dan Kirkwood <da...@gmail.com>.
sorry -- prematurely sent..

Hi Nir,

It probably is best to continue with postgres rather than starting with mysql..

You need to be running as a user that has superuser privilege on the
postgres db to run the `admin.pl setup`.   Try this:

sudo su - postgres createuser -s -r -d -E <your username>

and then try the `db/admin.pl ... setup` command again..

If you still have problems,  please send the command and output you're
seeing and we'll try to help move you along further..

-dan

On Tue, Jan 24, 2017 at 8:50 AM, Dan Kirkwood <da...@gmail.com> wrote:
> Hi Nir,
>
> It probably is best to continue with postgres rather than starting with mysql..
>
> You need to be running as a user that has superuser privilege on the
> postgres db to run the `admin.pl setup`.   Try this:
>
> sudo su postgres createuser -s
>
> On Tue, Jan 24, 2017 at 8:27 AM, David Neuman <da...@gmail.com> wrote:
>> First of all, it looks like your documentation is to our old site, you will
>> want to use http://trafficcontrol.apache.org/docs/latest/index.html in the
>> future.
>> If you don't have docker and docker-compose on your VM (it would need to be
>> centos 7.x or above), we should be able to get it working with a "normal"
>> postgres install; I would start by taking a look at the scripts that are in
>> `/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh is
>> familiar enough with the process that he can provide a quick how-to?
>>
>> On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:
>>
>>> Thank you Dave&Dan,
>>>
>>> The pg-migration document assumes I am working in a Docker environment.
>>> Currently I am working on a VM on which I manually installed the software
>>> requirement list
>>> <http://traffic-control-cdn.net/docs/latest/development/
>>> traffic_ops.html?#software-requirements>
>>> .
>>> Is there a specification that will allow me to bring up such a Docker? Am I
>>> practically required t have one in order to work on traffic-ops?
>>>
>>> I tried to configure the postgres myself, but with no success so far.
>>> Anyway, as I'm practically utilizing my dev environment for the first time,
>>> it may be counter productive to work on an unstable branch.
>>>
>>> 10x,
>>> Nir
>>>
>>>
>>>
>>>
>>> Nir
>>>
>>> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com> wrote:
>>>
>>> > The postgresql version is still quite experimental right now.   If you
>>> > are feeling adventurous,  we appreciate the help in testing it,  but
>>> > you may want to use 1.7.x or 1.8.x with mysql until we have the
>>> > postgresql branch (master) more stable.   The master branch will not
>>> > work with mysql at all.
>>> >
>>> > -Dan
>>> >
>>> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org> wrote:
>>> > > I am certainly not the expert here, but I would start by taking a look
>>> at
>>> > > the README.md file in traffic_control/traffic_ops/app/db/pg-migration.
>>> > You
>>> > > can use that to migrate from mysql to postgres using docker-compose.
>>> > >
>>> > > —Dave
>>> > >
>>> > >
>>> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:
>>> > >
>>> > >> Hi,
>>> > >>
>>> > >> I am trying to create a new Traffic-Ops dev environment setup,
>>> following
>>> > >> the instructions in the developer guide.
>>> > >> I encountered however several failures on the way, related to the
>>> > movement
>>> > >> toward postgresql. I therefore installed the relevant postgresql RPMs.
>>> > >>
>>> > >> I got to the point I have to initilize the values in the postgresql
>>> > server
>>> > >> in order for the "./db/admin.pl --env=development setup" command to
>>> > run.
>>> > >>
>>> > >> Should I follow the instructions in "experimental/server/README.md"?
>>> > >> Is there a way to deactivate the postgresql server and continue to
>>> work
>>> > >> with mysql until postgresql moves out from "experimental" phase?
>>> > >>
>>> > >> 10x,
>>> > >> Nir
>>> > >>
>>> >
>>>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Dan Kirkwood <da...@gmail.com>.
Hi Nir,

It probably is best to continue with postgres rather than starting with mysql..

You need to be running as a user that has superuser privilege on the
postgres db to run the `admin.pl setup`.   Try this:

sudo su postgres createuser -s

On Tue, Jan 24, 2017 at 8:27 AM, David Neuman <da...@gmail.com> wrote:
> First of all, it looks like your documentation is to our old site, you will
> want to use http://trafficcontrol.apache.org/docs/latest/index.html in the
> future.
> If you don't have docker and docker-compose on your VM (it would need to be
> centos 7.x or above), we should be able to get it working with a "normal"
> postgres install; I would start by taking a look at the scripts that are in
> `/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh is
> familiar enough with the process that he can provide a quick how-to?
>
> On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:
>
>> Thank you Dave&Dan,
>>
>> The pg-migration document assumes I am working in a Docker environment.
>> Currently I am working on a VM on which I manually installed the software
>> requirement list
>> <http://traffic-control-cdn.net/docs/latest/development/
>> traffic_ops.html?#software-requirements>
>> .
>> Is there a specification that will allow me to bring up such a Docker? Am I
>> practically required t have one in order to work on traffic-ops?
>>
>> I tried to configure the postgres myself, but with no success so far.
>> Anyway, as I'm practically utilizing my dev environment for the first time,
>> it may be counter productive to work on an unstable branch.
>>
>> 10x,
>> Nir
>>
>>
>>
>>
>> Nir
>>
>> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com> wrote:
>>
>> > The postgresql version is still quite experimental right now.   If you
>> > are feeling adventurous,  we appreciate the help in testing it,  but
>> > you may want to use 1.7.x or 1.8.x with mysql until we have the
>> > postgresql branch (master) more stable.   The master branch will not
>> > work with mysql at all.
>> >
>> > -Dan
>> >
>> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org> wrote:
>> > > I am certainly not the expert here, but I would start by taking a look
>> at
>> > > the README.md file in traffic_control/traffic_ops/app/db/pg-migration.
>> > You
>> > > can use that to migrate from mysql to postgres using docker-compose.
>> > >
>> > > —Dave
>> > >
>> > >
>> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:
>> > >
>> > >> Hi,
>> > >>
>> > >> I am trying to create a new Traffic-Ops dev environment setup,
>> following
>> > >> the instructions in the developer guide.
>> > >> I encountered however several failures on the way, related to the
>> > movement
>> > >> toward postgresql. I therefore installed the relevant postgresql RPMs.
>> > >>
>> > >> I got to the point I have to initilize the values in the postgresql
>> > server
>> > >> in order for the "./db/admin.pl --env=development setup" command to
>> > run.
>> > >>
>> > >> Should I follow the instructions in "experimental/server/README.md"?
>> > >> Is there a way to deactivate the postgresql server and continue to
>> work
>> > >> with mysql until postgresql moves out from "experimental" phase?
>> > >>
>> > >> 10x,
>> > >> Nir
>> > >>
>> >
>>

Re: Traffic Ops Dev environment - postgresql installation

Posted by David Neuman <da...@gmail.com>.
First of all, it looks like your documentation is to our old site, you will
want to use http://trafficcontrol.apache.org/docs/latest/index.html in the
future.
If you don't have docker and docker-compose on your VM (it would need to be
centos 7.x or above), we should be able to get it working with a "normal"
postgres install; I would start by taking a look at the scripts that are in
`/traffic_control/traffic_ops/app/db/pg-migration`.  Maybe @dangogh is
familiar enough with the process that he can provide a quick how-to?

On Mon, Jan 23, 2017 at 5:14 PM, Nir Sopher <ni...@qwilt.com> wrote:

> Thank you Dave&Dan,
>
> The pg-migration document assumes I am working in a Docker environment.
> Currently I am working on a VM on which I manually installed the software
> requirement list
> <http://traffic-control-cdn.net/docs/latest/development/
> traffic_ops.html?#software-requirements>
> .
> Is there a specification that will allow me to bring up such a Docker? Am I
> practically required t have one in order to work on traffic-ops?
>
> I tried to configure the postgres myself, but with no success so far.
> Anyway, as I'm practically utilizing my dev environment for the first time,
> it may be counter productive to work on an unstable branch.
>
> 10x,
> Nir
>
>
>
>
> Nir
>
> On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com> wrote:
>
> > The postgresql version is still quite experimental right now.   If you
> > are feeling adventurous,  we appreciate the help in testing it,  but
> > you may want to use 1.7.x or 1.8.x with mysql until we have the
> > postgresql branch (master) more stable.   The master branch will not
> > work with mysql at all.
> >
> > -Dan
> >
> > On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org> wrote:
> > > I am certainly not the expert here, but I would start by taking a look
> at
> > > the README.md file in traffic_control/traffic_ops/app/db/pg-migration.
> > You
> > > can use that to migrate from mysql to postgres using docker-compose.
> > >
> > > —Dave
> > >
> > >
> > > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:
> > >
> > >> Hi,
> > >>
> > >> I am trying to create a new Traffic-Ops dev environment setup,
> following
> > >> the instructions in the developer guide.
> > >> I encountered however several failures on the way, related to the
> > movement
> > >> toward postgresql. I therefore installed the relevant postgresql RPMs.
> > >>
> > >> I got to the point I have to initilize the values in the postgresql
> > server
> > >> in order for the "./db/admin.pl --env=development setup" command to
> > run.
> > >>
> > >> Should I follow the instructions in "experimental/server/README.md"?
> > >> Is there a way to deactivate the postgresql server and continue to
> work
> > >> with mysql until postgresql moves out from "experimental" phase?
> > >>
> > >> 10x,
> > >> Nir
> > >>
> >
>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Nir Sopher <ni...@qwilt.com>.
Thank you Dave&Dan,

The pg-migration document assumes I am working in a Docker environment.
Currently I am working on a VM on which I manually installed the software
requirement list
<http://traffic-control-cdn.net/docs/latest/development/traffic_ops.html?#software-requirements>
.
Is there a specification that will allow me to bring up such a Docker? Am I
practically required t have one in order to work on traffic-ops?

I tried to configure the postgres myself, but with no success so far.
Anyway, as I'm practically utilizing my dev environment for the first time,
it may be counter productive to work on an unstable branch.

10x,
Nir




Nir

On Tue, Jan 24, 2017 at 12:56 AM, Dan Kirkwood <da...@gmail.com> wrote:

> The postgresql version is still quite experimental right now.   If you
> are feeling adventurous,  we appreciate the help in testing it,  but
> you may want to use 1.7.x or 1.8.x with mysql until we have the
> postgresql branch (master) more stable.   The master branch will not
> work with mysql at all.
>
> -Dan
>
> On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org> wrote:
> > I am certainly not the expert here, but I would start by taking a look at
> > the README.md file in traffic_control/traffic_ops/app/db/pg-migration.
> You
> > can use that to migrate from mysql to postgres using docker-compose.
> >
> > —Dave
> >
> >
> > On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:
> >
> >> Hi,
> >>
> >> I am trying to create a new Traffic-Ops dev environment setup, following
> >> the instructions in the developer guide.
> >> I encountered however several failures on the way, related to the
> movement
> >> toward postgresql. I therefore installed the relevant postgresql RPMs.
> >>
> >> I got to the point I have to initilize the values in the postgresql
> server
> >> in order for the "./db/admin.pl --env=development setup" command to
> run.
> >>
> >> Should I follow the instructions in "experimental/server/README.md"?
> >> Is there a way to deactivate the postgresql server and continue to work
> >> with mysql until postgresql moves out from "experimental" phase?
> >>
> >> 10x,
> >> Nir
> >>
>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Dan Kirkwood <da...@gmail.com>.
The postgresql version is still quite experimental right now.   If you
are feeling adventurous,  we appreciate the help in testing it,  but
you may want to use 1.7.x or 1.8.x with mysql until we have the
postgresql branch (master) more stable.   The master branch will not
work with mysql at all.

-Dan

On Mon, Jan 23, 2017 at 2:50 PM, Dave Neuman <ne...@apache.org> wrote:
> I am certainly not the expert here, but I would start by taking a look at
> the README.md file in traffic_control/traffic_ops/app/db/pg-migration. You
> can use that to migrate from mysql to postgres using docker-compose.
>
> —Dave
>
>
> On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:
>
>> Hi,
>>
>> I am trying to create a new Traffic-Ops dev environment setup, following
>> the instructions in the developer guide.
>> I encountered however several failures on the way, related to the movement
>> toward postgresql. I therefore installed the relevant postgresql RPMs.
>>
>> I got to the point I have to initilize the values in the postgresql server
>> in order for the "./db/admin.pl --env=development setup" command to run.
>>
>> Should I follow the instructions in "experimental/server/README.md"?
>> Is there a way to deactivate the postgresql server and continue to work
>> with mysql until postgresql moves out from "experimental" phase?
>>
>> 10x,
>> Nir
>>

Re: Traffic Ops Dev environment - postgresql installation

Posted by Dave Neuman <ne...@apache.org>.
I am certainly not the expert here, but I would start by taking a look at
the README.md file in traffic_control/traffic_ops/app/db/pg-migration. You
can use that to migrate from mysql to postgres using docker-compose.

—Dave
​

On Mon, Jan 23, 2017 at 2:44 PM, Nir Sopher <ni...@qwilt.com> wrote:

> Hi,
>
> I am trying to create a new Traffic-Ops dev environment setup, following
> the instructions in the developer guide.
> I encountered however several failures on the way, related to the movement
> toward postgresql. I therefore installed the relevant postgresql RPMs.
>
> I got to the point I have to initilize the values in the postgresql server
> in order for the "./db/admin.pl --env=development setup" command to run.
>
> Should I follow the instructions in "experimental/server/README.md"?
> Is there a way to deactivate the postgresql server and continue to work
> with mysql until postgresql moves out from "experimental" phase?
>
> 10x,
> Nir
>