konveyor / move2kube

Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.
https://move2kube.konveyor.io/
Apache License 2.0
383 stars 118 forks source link

Move2Kube - Unable to transform variable values from JSON file #980

Open mnarkhede85 opened 1 year ago

mnarkhede85 commented 1 year ago

Describe the bug Application has a custom variables in docker-compose file with the variables defined a separate JSON file. Upon running move2kube on docker-compose file, it did not transform the artifacts to Kubernetes manifests. It created the m2kplan file but did not create the myproject directory with required Kubernetes deployment files.

m2k transformer did not also prompt for options to enter or select port, deployment type, service type, registry etc.

To Reproduce Steps to reproduce the behavior:

  1. Created an application directory and copied docker-compose & .env ( json file) to docker-deploy directory.
  2. Copied custom m2k tranformer to application directory.
  3. Executed - move2kube plan -s docker-deploy -c fullm2kcustomtranformer --log-level=debug - Successful
  4. Executed - move2kube transform m2k.plan and below was the output.
  5. See error

move2kube transform m2k.plan INFO[0000] Detected a plan file at path /m2k.plan. Will transform using this plan. INFO[0000] Starting transformation ? Specify a Kubernetes style selector to select only the transformers that you want to run. ID: move2kube.transformerselector Hints:

? Select all transformer types that you are interested in: ID: move2kube.transformers.types Hints:

Expected behavior m2k should transform the docker-compose file to Kubernetes manifest files.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

HarikrishnanBalagopal commented 1 year ago

Probably we can close this. If I recall correctly the docker-compose.yaml was not valid. The service name had ${variable_name} in it. We worked around this with a custom Starlark transformer that created a valid yaml by substituting the service name.

Mohdcode commented 1 year ago

is it still open ? as you have commented on this seems like yaml config mismatch but if it is still need help please assign it to me

mnarkhede85 commented 1 year ago

Hello,

It’s still open. Pls let me know if you have any questions.

Thanks, Makrand

Get Outlook for iOShttps://aka.ms/o0ukef


From: Mohd Kamaal @.> Sent: Saturday, August 12, 2023 3:29:47 AM To: konveyor/move2kube @.> Cc: mnarkhede85 @.>; Author @.> Subject: Re: [konveyor/move2kube] Move2Kube - Unable to transform variable values from JSON file (Issue #980)

is it still open ? as you have commented on this seems like yaml config mismatch but if it is still need help please assign it to me

— Reply to this email directly, view it on GitHubhttps://github.com/konveyor/move2kube/issues/980#issuecomment-1675763297, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6DPW5IUXU4AM7WEEBUZAULXU4WGXANCNFSM6AAAAAAVK4CBBA. You are receiving this because you authored the thread.Message ID: @.***>