ivanayov/mysql-function-openfaas

mysql_config not found

Closed this issue · 1 comments

I just did a brand new install of Kubernetes 1.11.0, plus version 0.6.12 of faas-cli and the current master of faas-netes -- all running on Ubuntu 16.04 LTS VMs. Things seem to work fine. But when I try to build your project, I get

File "setup_posix.py", line 28, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

Which is strange-looking, in that it's apparently inside mysql_config (line 28) when it raises this error.

If I were running this on the host, outside of Docker, I suspect I'd need to install libmysqlclient-dev (or something like that). Or maybe create a symlink to resolve the circular error (no idea what's really happening here, but it appears that things can't find things they need). Not sure what to do in the OpenFaaS environment ... Googling turns up semi-similar issues around mariaDB installs in Docker containers, where they talk about adding things to a Dockerfile.

I guess I'm confused about why my setup and yours aren't essentially the same, such that this builds for you, but not for me. Thoughts?

Sorry -- Erik Stoekl helped me understand that all I needed to do was faas-cli build with mysql-dev as the additional package, i.e:

faas-cli build -f blah.yml --build-arg ADDITIONAL_PACKAGE='mysql-dev'

... and it seems to have built without issues. Thanks!