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

docs: write a guide for setting up the docker+wasm on linux #19

Open
hydai opened this issue Aug 25, 2023 · 3 comments
Open

docs: write a guide for setting up the docker+wasm on linux #19

hydai opened this issue Aug 25, 2023 · 3 comments
Assignees

Comments

@hydai
Copy link
Member

hydai commented Aug 25, 2023

We can install docker desktop on macOS and Windows easily. However, it's unclear when you try to set up the environment on Linux. We should provide a guide for this.

@hydai hydai self-assigned this Aug 25, 2023
@kmboyle
Copy link

kmboyle commented Feb 19, 2024

I was not able to get the Microservices template up and running via an Ubuntu VM on macOS darwin aarch64. I ran into a couple issues with docker compose (my buildkit platform shows linux/arm64). I also tried to manually build and run the Microservices in the VM, but having trouble connecting to the mysql server. Would love to see some docs on how, if possible, to get this running on a Linux VM on macOS. Keep up the great work, love what you all are doing.
Thanks!

@kmboyle
Copy link

kmboyle commented Feb 19, 2024

Long story, but I finally got it to work (building and running it locally without Docker). For anyone who encounters this error: mask too long when connecting to mysql, this may help. I found that this library mysql_common was throwing the error mask too long as it was attempting to handle SHA-1 encoding. In mysql I found that when I created a new user, the default plugin mechanism was caching_sha2_password. I found the plugin mechanism with select user, authentication_string, plugin, host from mysql.user;

I ended up modifying the users plugin mechanism to mysql_native_password, and then I was able to run curl http://localhost:8080/init successfully.

I am not entirely clear on the security impacts of doing this, so review documentation carefully.

@juntao
Copy link
Member

juntao commented Feb 19, 2024

Thanks! I remember seeing this problem as well. The mysql-common crate does seem problematic for certain versions of MySQL (esp newer version).

For production use cases in the cloud, we are connecting from WasmEdge to a MySQL instance (eg AWS RDS) with TLS. You can see an example here:

https://github.com/WasmEdge/wasmedge-db-examples/tree/main/mysql_async

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants