Hi Steve,

I did the docker build setup and have been experimenting off and on
with running traffic_ops under docker as well.  I'll comment on a few
things below..

-dan

On Fri, Jun 30, 2017 at 7:27 AM, Steve Malenfant <[email protected]> wrote:
> I'm currently in the process of testing Traffic Ops under docker and making
> a ready to go layered image but doing it without the RPM (call it either
> dev or prepping docker images). I'm sure there is work ongoing and would
> like to discuss.

Happily!

> install_goose.sh
> - Is there a requirement github/lib/pq to run Traffic Ops?

Not to run traffic ops,  but I believe goose uses this for postgres access.

> - Is there another requirement to have golang installed outside of
> install_goose?

yes -- for any goose migrations written in go.  goose compiles the .go
migration and links it in at run time.

> - Do we need to delete golang tarball everytime it runs?

not necessarily.   It deletes it to keep from cluttering things..
when creating a docker image, it's best to delete any extra cruft
that's not needed in a running container to reduce the size of the
final image.

> Is gcc and all the development library needed to run Traffic Ops? Or is
> this only required for the RPM Build? I see those in the spec file :
>
> "expat-devel gcc-c++ libpcap-devel openssl-devel libcurl-devel libidn-devel"

Those are required by Perl modules installed by carton. I'm pretty
sure gcc and c++ aren't needed once they're installed.

> A few new requirement for Traffic Ops RPM not added to spec file which was
> discovered during installation and planning to add to the Traffic Ops RPM
> Spec file :
>
> "postgresql96 postgresql96-devel cronie git"

I don't know about cronie..   but the postgres packages are required
for the Perl DBD::Pg package that mojo uses to access the database.
If you look at the master branch,  those have already been added to
the spec file.

> Note that git is probably only required for "install_goose.sh".

I think that's true.

> There is a function called "find_conf_path" which seems to assume all
> configuration is in /opt/traffic-ops/app/conf. This makes it difficult to
> mount a volume to store configuration file (if you need to). There is a
> MOJO_CONFIG for cdn.conf, but it doesn't apply to influx/riak/etc. I would
> add a variable called MOJO_CONFIG_PATH to override this behavior. I would
> rather see configurations in /etc/traffic_ops/conf than in the current
> /opt/traffic_ops/app/conf directory.

The /opt/traffic_ops path is baked into a lot of the code.   It may be
hard to untangle that..   Not saying it's a bad idea,  just that it
may not be worth the amount of work it would take.

> There is a requirement to have this file called "invalid_passwords.txt".
> The process doesn't start if not present and it is located in the "conf"
> folder. Should this be environment dependent and be optional?

That's part of an effort to improve the base level of security for
traffic ops.  Of course,  that's something that can be discussed...

> Any objections about adding a "Makefile" at the root of the project to
> build the docker containers? I can give an example through a pull request.
> This might be confusing for the normal build of the project (RPMS). I'll
> try to find a way to put in infrastructure/docker, but had issues with
> directory structure.

It's a tough call adding yet another file to the top level..   You can
always run as `make -f infrastructure/docker/build/Makefile`..

> Steve

Reply via email to