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

Migrate automatic testing to docker #317

Open
leophys opened this issue Nov 6, 2017 · 8 comments
Open

Migrate automatic testing to docker #317

leophys opened this issue Nov 6, 2017 · 8 comments
Assignees

Comments

@leophys
Copy link
Member

leophys commented Nov 6, 2017

Hi,
I'd volunteer to migrate automatic installation and testing to docker. I am indeed not comfortable with vagrant and have acquired some confidence with docker.
I updated my local repo to dev:HEAD and I can make a pull request in few days.
Do you agree?
Is there any insight on elasticsearch I have to be aware of to do the magic?

Cheers

@boyska
Copy link
Member

boyska commented Nov 6, 2017 via email

@ael-code
Copy link
Member

ael-code commented Nov 30, 2017 via email

@ael-code
Copy link
Member

ael-code commented Nov 30, 2017

After a lot of effort I've successfully setup a docker environment for libreant, I'm experimenting on my local branch 1.

1 - The main Dockerfile allows to build a docker image for the libreant application itself
2 - The docker-compose.yml can be used to start libreant alongside the elasticsearch service that is built upon the official docker image 2

Actually the whole thing is pretty cool, it is possible to run libreant in few seconds without worrying about dependencies and moreover without messing up the local system with elasticsearch crap.
It is as simple as running docker-compose up and libreant should be listening on the usual local port 5000.

The only problem is that there are some compatibility issues with elasticsearch 6.x that I still need to solve.

@ael-code
Copy link
Member

Additionally it is still necessary to correctly expose the data volume of the two docker containers and provide a straightforward way to pass the libreant configuration to the docker service.

@ael-code ael-code removed the question label Nov 30, 2017
@leophys
Copy link
Member Author

leophys commented Dec 1, 2017

Mortacci tua! :)

I'll be on it tonight while I'm in train. I hope to look at what you did.

++DAJE

@ael-code
Copy link
Member

ael-code commented Dec 1, 2017

I was reasoning on this and in particular on the title of the PR.
As @boyska stated, we already have travis making all the tests for us. So I wouldn't use docker to substitute or to be integrated in travis.

Instead I think Docker will be really useful for the following scenarios:

  • Deploy libreant: We can provide an easy way to deploy and configure libreant through container based technology. For this purpose we should provide specific images for all the feature release of libreant. The image build process should fetch the source code from git tagged releases and the docker files should be placed in a stand-alone repository.
  • Development environment I'm actually using docker-compose to locally run libreant and make some test. The docker files should be placed in the project directory and the source code used should be the one you are currently working on.

@leophys
Copy link
Member Author

leophys commented Dec 3, 2017

@ael-code (cc @boyska)
I'd like to clarish my idea: I fundamentally was thinking of your second point

Development environment I'm actually using docker-compose to locally run libreant and make some test. The docker files should be placed in the project directory and the source code used should be the one you are currently working on.

In particular it is true in general that we may develop on different platforms, and keeping the development environment homogeneous may be a pain. What I ment was something as a (debian) container in which elasticsearch and libreant run. Ideally this should happen with the development directory on your local machine mounted on the docker container.

$ docker --rm --ti `pwd`/my-local-libreant:/libreant-dev-in-the-container libreant-docker

What I ment by "running the tests" was to be able to execute

$ pytest -v

Inside the container and get all green lights 😄

Moreover, I'd never deploy in a production environment a docker container (but this is my very own prejudice) against docker as a way to let everyone forget how to configure a server.

In a future issue I'd like to suggest to integrate libreant with uwsgi or something similar.

@leophys
Copy link
Member Author

leophys commented Aug 8, 2019

Hi,
as I wrote in #338, I'd close this issue and concentrate on modernizing this webapp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants