kernelci / kernelci-docker

Docker containers configurations for KernelCI
GNU Lesser General Public License v2.1
9 stars 23 forks source link

How to run the app? #1

Closed lookatcn closed 7 years ago

lookatcn commented 7 years ago

Hi , team We are trying to set up kernelci locally. Now we have built all the docker images separately, but don't know how to run them. Is there any document about this? Thank you in advance!

MiloCasagrande commented 7 years ago

Hi,

did you create the docker images starting from this repository?

Asking because we never tested it, nor we tested the image creation. This repository is here more as a placeholder for how we think we should build the container images, but we are not using it for running kernelci.org.

Personally, I would start from the backend making sure it is working and coming up correctly. If you use Docker, I would probably try to create a Docker compose file in order to orchestrate the backend side of kernelci.

But I still need to understand where are you at, at the moment. :smile: Did you build all the images?

lookatcn commented 7 years ago

Hi,

Thank you for your quick response!

What we have done here is:

Now we don't know how to make all these docker images work/run together.

MiloCasagrande commented 7 years ago

As I previously said, we have never tested if this setup works or if it even runs correctly, so take this as exploratory work and an experiment.

Obligatory (Latin) quote:

Hic sunt leones

You will have to get your hands dirty to fix things here and there where things break, and I'm not sure how much we can hand-handle you there since we never tested it.

For starter, you need to start those containers. Preferably start with the redis and mongo ones, since they are more or less standalone. After that, start the celery and celery-beat and finally the kernelci-backend one.

You probably want to attach some storage to those containers, and make sure they are mounted correctly to save the data. You need to look at the database configurations and their Docker container options. For the kernelci-backend one, you probably only need a volume attached to /var/www/images/kernel-ci, where uploaded files are stored. But it all depends on what you are trying to achieve.

You need to have a little bit of understanding of how the Docker networking works in order to "link" all the containers together so that they can speak with each other. You might have to tweak or change the config files, especially based on how you run the containers and how you name them: your host names might have to be changed.

You'll have to handle secrets (passwords and such) on your side as well: that can change a lot based on which orchestration tool you are going to use. If you are going with Docker, look at Docker compose and how to manage secrets there.

lookatcn commented 7 years ago

Thanks a lot! We plan to try this method after we get familiar with docker.