Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker simplification #61

Merged
merged 7 commits into from
Jun 17, 2020
Merged

Docker simplification #61

merged 7 commits into from
Jun 17, 2020

Conversation

markpatton
Copy link
Collaborator

@markpatton markpatton commented Apr 23, 2020

This is a big change.

The docker configuration has been simplified. Now there is just a modified tomcat container which also does initialization (lutece-init 0.7) and a MySQL container. The Tomcat being used now is Tomcat 9 with OpenJdk 8 instead of Tomcat 8 with OpenJdk 8. In addition MySQL 8 client tools are used for greater compatibility.

The production docker support has been removed because it will now be handled by building custom images based on lutece-init.

@markpatton markpatton changed the title Lutece init 0.7 Docker simplification Apr 23, 2020
Copy link
Contributor

@jrmartino jrmartino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cloned this repo and used the lutece_init_0,7 branch, In order to test I first had to get database init working by pulling in the database init structure missing in the Paris lutece-core develop branch from the master branch there. After I verified that I was able to init a database ...

I tried removing the lutece.sql file from the data directory, and pruning the database volume. docker-compose up then correctly generated the database from the war. I then pruned the volume and put the lutece.sql dump into he data directory - docker-compose up found the dump and populated the database. Finally, I pruned the volume and deleted the mysql image. docker-compose up constructed the mysql image and populated it with the dump. Everything worked perfectly.

The only issue I saw - not related to this PR - was in dumping the database. For some unknown reason, stderr seemed to be merged with stdout - so that initially, loading the dump failed because the first line of lutece.sql was this (dump command was docker exec -it mysql mysqldump -u <user> -p<password> lutece > lutece.sql):

mysqldump: [Warning] Using a password on the command line interface can be insecure.

this will probably not be an issue in production, just something to be aware of. this hack works:

docker exec -it mysql mysqldump -u <user> -p<password> lutece 2>&1 | grep -v 'mysqldump: \[Warning\]' > lutece.sql

@markpatton
Copy link
Collaborator Author

The container uses a Maria db command line tools instead of MySQL tools. It may be worth switching to the official MySQL 8 client.

@markpatton
Copy link
Collaborator Author

markpatton commented May 5, 2020

Switched the container to use MySQL 8 client tools. Seems less spammy.

@markpatton markpatton merged commit 9b165d3 into master Jun 17, 2020
@markpatton markpatton deleted the lutece_init_0.7 branch June 18, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants