openwhisk icon indicating copy to clipboard operation
openwhisk copied to clipboard

where is the config file

Open ZYH1120 opened this issue 6 years ago • 4 comments

I want to change the config file of the openwhisk so that I can adjust the number of invoker container or the memory size of them.So how can I find the config file of openwhisk.

.

ZYH1120 avatar Sep 18 '20 13:09 ZYH1120

If you're ansible deployment to VMs then you edit this file https://github.com/apache/openwhisk/blob/master/ansible/environments/local/hosts.j2.ini to add more invoker hosts.

rabbah avatar Sep 21 '20 23:09 rabbah

@rabbah Can I change the config file if I deploy it with K8s? By the way, I also wonder what the difference between K8s and ansible deployment?

ZinuoCai avatar Mar 11 '21 05:03 ZinuoCai

Ansible is intended for a baremetal/VM deployment. For Kube, there are helm charts https://github.com/apache/openwhisk-deploy-kube which don't tend to rely or share some of the configurations with Ansible.

rabbah avatar Mar 11 '21 12:03 rabbah

Hi, there

I have deployed openwhisk in Kind(k8s in docker).

How do I change the default code size (48 MB in default)?

In the beginning, I run the following command for building virtual env.

docker run --rm -v "$PWD:/tmp" openwhisk/python3action /bin/bash -c "cd tmp; virtualenv --system-site-packages virtualenv; source virtualenv/bin/activate; pip install -r requirements.txt"

And I found that openwhisk/python3action is too slow and usually failed when building the env.

Then I change the command:

docker run --rm -v "$PWD:/tmp" ibmfunctions/action-python-v3.7:1.8.0 /bin/bash -c "cd tmp; virtualenv --system-site-packages virtualenv; source virtualenv/bin/activate; pip install -r reqs.txt"

where the reqs.txt just include opencv-python dependency

After I zip the virtualenv and __main__.py then I get func.zip, which is 63 M.

How to I change the default code size to create the action?

Thank you

GitHubDiom avatar Jun 06 '21 13:06 GitHubDiom