-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: wasm transformers #1061
Comments
@HarikrishnanBalagopal any resources available to learn about wasm support ? |
@kanha-gupta You can start with WebAssembly Specifications, Hari will add more to this. |
Have updated above. Can add more details if necessary. |
I'm really interested in this project. I wanted to provide you with an update on my progress with the Move2Kube WASM integration for custom transformers. So far, I have successfully built the Move2Kube CLI and have been using it and (UI) to perform built-in and custom transformations as described in the Move2Kube documentation. Also, I've reported Inconsistent Planning Results Between Move2Kube UI and CLI bug in UI while following the Move2Kube tutorials. It has been an exciting experience so far, and I'm impressed with the plugin-friendly architecture that Move2Kube offers. Currently, I am dedicating time to learn about TinyGo, WASM specifications, and how to compile Golang programs to the WebAssembly System Interface (WASI) API, with a particular focus on functions imported from the host. I will let you know if any progress or questions about the project! |
Hi @HarikrishnanBalagopal @kmehant, I wanted to share with you my recent experience with the Web Assembly using TinyGo. I took the time to understand the differences between TinyGo and Go Default Compiler and compiled a simple Golang program for WASI using TinyGo. The program involved image processing for a checkerboard, and I imported functions from the host into JavaScript. Specifically, I configured the checkerboard size to be 1000 pixels x 1000 pixels and compared its performance with the vanilla JavaScript version. The results were impressive, as the computationally intensive task performed with Go and WebAssembly was nearly twice as fast as the JavaScript version. I have attached a demo for you to see where the website is refreshed every half second to illustrate the performance differences of checkboard generation. checkboard_image_processing.mp4Moreover, I noticed that the performance margin increased until it hit the threshold of the machine's memory, which highlights the efficiency of implementing such tasks in Go using WebAssembly. After going through this experience, I have a solid understanding of why WebAssembly is an excellent option for handling computationally intensive tasks. It clearly demonstrates the advantages of combining TinyGo and WebAssembly, as they prove to be lightweight and remarkably fast together. |
@HarikrishnanBalagopal @kmehant Now I'd like to know where is the Move2Kube transformation engine source code for custom transformers located ? |
Hi @kmehant @HarikrishnanBalagopal |
@mohamedawnallah @DhruvSinghiitmandi
Have added the link to tutorial, code and documentation to the Getting started section in the first post.
Have added some more links to the custom transformers docs and code in the Getting started section. If you have any specific questions regarding code/documentation please post it in this thread or ask in the #konveyor channel on the Kubernetes Slack workspace https://kubernetes.slack.com/archives/CR85S82A2 |
Hi @kmehant @HarikrishnanBalagopal ! |
There is a task assigned to all candidates to design a technical proposal on how they will solve this issue. Progress made on the issue may also be considered but not a requirement. We are only expecting candidates to have a good understanding of the issue, technologies involved, and the code base. |
I am Vishal Raj, a final year CSE student. The Konveyor: Move2Kube project for implementing WASM Transformers sounds like an interesting challenge. I'm excited to contribute to this CLI tool and support the running of WASM modules as custom transformers. My familiarity with Golang and knowledge of WASM/WASI will be valuable assets in tackling this project. I'm eager to explore this plugin-friendly architecture and leverage the extensive sandboxing and language versatility of WASM to enhance Move2Kube's capabilities. Let's work together to make Move2Kube even more powerful and efficient with custom WASM transformers! |
@kmehant @HarikrishnanBalagopal |
Thanks for accepting me as a mentee in the LFX program. I am currently working on this. |
LFX link
https://mentorship.lfx.linuxfoundation.org/project/ec286a9e-e48d-4c83-a991-9c79a4ec213a
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. Move2Kube has a very plugin friendly architecture, users can write custom logic in the form of "Transformers" that Move2Kube can integrate seamlessly into its transformation pipeline. So far we have support for both Starlark and container image based transformers. We would like to support writing transformers as WASM modules that Move2Kube can run. WASM provides extensive sandboxing for security, it allows writing transformers in different language stacks like Rust, C/C++, etc. other than Golang, and WASM is just as lightweight and fast as Starlark.
Prerequisites
Please familiar yourself with the topics and try compiling simple Golang programs to WASI (preferably those that use functions imported from the host) with TinyGo so that you are familiar with the workflow and challenges involved.
Getting Started
Follow the tutorial on how to use it to do a transformation https://move2kube.konveyor.io/tutorials/cli
Challenges
This is not an exhaustive list, just the ones we have found so far.
Tasks
The text was updated successfully, but these errors were encountered: