Description
Use Case
As a developer working on an existing project, I have already setup my environment and built a docker-compose file which defines all the different components that I need to test my application.
I want to leverage that docker-compose in my devfile - so I can make my developer environment codified/versioned/repeatable and keep using my docker-compose as well.
Goals
It's really common for a project to get a docker-compose file. In general this is a convenient way for the developers to more easily setup their application and all its components on their local environment. It can also be used along with different containers to completely build the source code of each application components and deploy those. In this case, there might be different dockerfiles associated with each application components which will trigger a specific "task".
The goal of the effort, is to tie the docker-compose file with the devfile. So if a developer knows how to build a docker-compose or already have one, it'll get easier to onboard on devfile and leverage work and effort that has already been produced. More importantly, it would let somebody continuing to evolve the devfile and the dockercompose so they complement each others.
Examples
There are many different samples we could be looking at:
One that might be even more interesting to look at would be this one https://github.com/RediSearch/redisearch-getting-started:
- Inside of
sample-app
, there is a dockercompose file - Each application components are getting built from a defined dockerfile
- Environments variables are used to connect the services
Steps / Challenges
1- Docker-compose file with existing containers
Let's take the case that the docker-compose file is only relying on containers that are already built and available in the container catalog (docker-compose not relying on dockerfiles). We should be able to use the docker-compose file and use its services as components for the devfile.
Targets:
- We can start by having a tool, that reads the docker-compose file and convert that as a devfile.
- We would need to formalize an improvement to the specification, so that it is possible to link devfile components from the docker-compose file - so it'll not be a "convertion" of the docker-compose file to devfile, but a way to use the docker-compose and the devfile together.
- We code the API that allows to do that.
2- Docker-compose file with to-be-built containers
In this case, we need to ensure that the devfile/api will have the ability to build the containers and provide them to the developers.
Targets:
- We should look at how we can do the build of the containers on the cluster (podman, sandboxed containers... )
Metadata
Metadata
Assignees
Labels
Type
Projects
Status