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

support existing containers, single service & Multi-service with no dependencies #1122

Closed
yangcao77 opened this issue May 19, 2023 · 8 comments
Labels
area/library Common devfile library for interacting with devfiles lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. lifecycle/stale Stale items. These items have not been updated for 90 days. student Identified work that the students can work on

Comments

@yangcao77
Copy link
Contributor

yangcao77 commented May 19, 2023

Which area this feature is related to?

/area library

Which functionality do you think we should add?

Why is this needed? Is your feature request related to a problem?

Detailed description:

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 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 "conversion" of the docker-compose file to devfile, but a way to use the docker-compose and the devfile together.

Implementation:

Directly use Kompose and convert to a kubernetes component in devfile.
Document the limitation of the conversion. (will be from Kompose tool)

Add a way to refer to a docker-compose file from the devfile, e.g. a docker-compose component element. (should be similar to image component, with a uri reference)
Update the parsing model in the devfile library with a flag, for devfiles with the docker-compose component, convert the docker-compose component to other existing components using the library above, e.g. kubernetes components, and replace the docker-compose component with those generated components

Describe alternatives you've considered

  1. Podman: Limited documentation + only available for CLI.
  2. Parsing the inputs, building an intermediate representation, output the desired files: No documentation available + better considered for supporting new container implementation.

Additional context

@yangcao77 yangcao77 added the student Identified work that the students can work on label May 19, 2023
@openshift-ci openshift-ci bot added the area/library Common devfile library for interacting with devfiles label May 19, 2023
@yangcao77 yangcao77 moved this to Backlog in Devfile Project May 19, 2023
@yangcao77 yangcao77 moved this from Backlog to In Progress 🚧 in Devfile Project Jun 15, 2023
@yangcao77
Copy link
Contributor Author

blocked by #1120

@Mahajanet
Copy link

Mahajanet commented Jun 26, 2023

Investigating Kompose repository to import package for use. Adopted new schema + created flag in the parsing module. Working on convertor utils function to build kubernetes files on disk.

@amisevsk
Copy link
Contributor

Potential blocker for this issue: kubernetes/kompose#464

@Mahajanet
Copy link

In the next release of Kompose 1.29.0, there will be in built support to convert docker compose files into kubernetes objects. Presently, using select kompose library functions for conversion.

@Mahajanet
Copy link

Finished conversion of Docker-Compose to Kube representation, and further conversion to a Kube component. Currently testing for each case (uri + url + inline). Next step will be applying some commands to the components and clean up before a PR.

@Mahajanet
Copy link

Create a draft PR detailing the tasks finished and the tasks to be completed next.

@thepetk thepetk moved this from In Progress 🚧 to Backlog in Devfile Project Aug 8, 2023
@yangcao77
Copy link
Contributor Author

things left to be done:

  • cmds associated with the kube components need to be added
  • revert back kube components and cmds added when calling devfileObj.writeYaml
  • clean up for temp folder after the operation or upon errors
  • unit tests

@jasperchui jasperchui moved this from Backlog to Refinement in Devfile Project Nov 28, 2023
Copy link

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.

@github-actions github-actions bot added the lifecycle/stale Stale items. These items have not been updated for 90 days. label Sep 19, 2024
@github-actions github-actions bot added the lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. label Nov 18, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
@github-project-automation github-project-automation bot moved this from Refinement to Done ✅ in Devfile Project Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/library Common devfile library for interacting with devfiles lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. lifecycle/stale Stale items. These items have not been updated for 90 days. student Identified work that the students can work on
Projects
Status: Done ✅
Development

No branches or pull requests

5 participants