kengz / aiva

AIVA (A.I. Virtual Assistant): General-purpose virtual assistant for developers.
http://kengz.me/aiva/
MIT License
822 stars 595 forks source link

Proper Dockerization #26

Open kengz opened 7 years ago

kengz commented 7 years ago

This is the thread for discussing the proper dockerization of AIVA. The current master is stable and can begin to be dockerized.

However, when the CGKB branch is merged we'd need to add new dependencies and process control, as it interacts at core with python (spaCy NLP), uses the neo4j graph database for the brain, and socket IO server for node-python communication.

dschaper commented 7 years ago

https://hub.docker.com/r/zabbix/zabbix-server-pgsql/ May be of interest in the scheme, noting their way of creating the psql databases at build time. Not sure if that would conflict with non-Docker installs though, can sequalize handle an existing database and username if provided in the db.json?

What I'm thinking may be (short|long) term would be to compose. That would allow for smaller overall size, and ease of replacing the daemons as they are new-released. Node has an official image, Python, Postgres and most of the services do. This would also allow for two Dockerfiles, a production and and development for separation, if you would like that.

Where I see potential issues is the omnibus installer that currently works for Mac/Homebrew and Docker. There may need to eventually be two repos, one for straight installations and one for Dockerized installations, but that's not a definite.

kengz commented 7 years ago

Breaking it up is a good idea! Especially given that it has several disjointed components (including the nlp brain feature under work).

On Oct 30, 2016, 11:48 PM -0400, Dan Schaper notifications@github.com, wrote:

https://hub.docker.com/r/zabbix/zabbix-server-pgsql/ May be of interest in the scheme, noting their way of creating the psql databases at build time. Not sure if that would conflict with non-Docker installs though, can sequalize handle an existing database and username if provided in the db.json?

What I'm thinking may be (short|long) term would be to compose. That would allow for smaller overall size, and ease of replacing the daemons as they are new-released. Node has an official image, Python, Postgres and most of the services do. This would also allow for two Dockerfiles, a production and and development for separation, if you would like that.

Where I see potential issues is the omnibus installer that currently works for Mac/Homebrew and Docker. There may need to eventually be two repos, one for straight installations and one for Dockerized installations, but that's not a definite.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub (https://github.com/kengz/aiva/issues/26#issuecomment-257208694), or mute the thread (https://github.com/notifications/unsubscribe-auth/AH1Db29Cyqrg35vDow2lclngqqrgYTVAks5q5WUkgaJpZM4KkoAV).

dschaper commented 7 years ago

https://hub.docker.com/_/postgres/ Official PostsgreSQL @ 9.6.0 https://hub.docker.com/_/python/ Official Python @ 3.5.2 https://hub.docker.com/_/node/ Official Node @ 7.0.0 https://hub.docker.com/_/ruby/ Official Ruby @ 2.3.1 https://hub.docker.com/_/nginx/ Official nginx @ 1.11.5

And you might even be able to pull in a hubot or and adapter or two, not quite sure yet. But with each of those composed you could make it small, easy to change out when new releases come online and the like. Way before Canonical and Debian get around to packaging the things up to fit.

dschaper commented 7 years ago

I haven't forgotten about this, just swamped with the holidays coming up and Pi-hole taking a ton of time. How set are you on Postgres? Would you be open to another database that was compliant with SQL?

kengz commented 7 years ago

Likewise.

The core is Sequelize, so anything listed on here is alright, it's only a matter of changing config file for the user, and all else is taken care of in the Sequelize backend.

The only reason I switch to postgres is the need to use JSON types in the db (chatlog, user info, etc). Sequelize still has an open issue on supporting JSON with the new mysql, so once's that's ready I'll move back to mysql.

dschaper commented 7 years ago

Great! Thanks for the direction and I'll get some research done and see how best to configure this.

kengz commented 7 years ago

over time postgres proved too hard to work with, so switched back to mysql in v4.2.0, fyi.

dschaper commented 7 years ago

Thanks for the update, I hope to get some time after the holidays to get back to this. I think mysql, or MariaDB is a good choice. (And a little easier to network in a composed environment.) I need to install the latest AIVA and see what's new :smile:

kengz commented 7 years ago

yep, plus they're great to work with, and a lot of people use them at work (me too). So far I've merged the cgkb branch with an NLP parser - enough people have tested it over time, so thought that was mature enough. Another addition is the conversation classifier. Need to update docs on those sometime too.

dschaper commented 7 years ago

Still on my radar, just been slammed with Pi-hole. Hope to have time soon to help out again, and work in some of the Docker changes to Compose.